diff --git a/.eslintignore b/.eslintignore index 8b1c7f98fb5..3bec98d90dd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -16,6 +16,7 @@ # typings/** **/src/main/typescript/generated/proto/** +**/src/main/typescript/generated/wasm-pack/** packages/cactus-verifier/src/main/typescript/ packages/cactus-cmd-socketio-server/** diff --git a/.prettierignore b/.prettierignore index 3f04e23721e..a7e509ae92c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,4 +6,5 @@ **/generated/ packages/core packages/connection-chain -contribs/ \ No newline at end of file +contribs/ +**/src/main/typescript/generated/** \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/README.md b/packages/cactus-plugin-keychain-memory-wasm/README.md new file mode 100644 index 00000000000..92bd53e72ab --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/README.md @@ -0,0 +1,16 @@ +# `@hyperledger/cactus-plugin-keychain-memory-wasm` + +## Table of Contents + +- [1. Summary](#1-summary) +- [Usage](#usage) + +## Summary + +Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly. + +> **Do not use this in production. It does not encrypt the stored data at all. It stores everything in plain text!** +## Usage + +Can be used the same way as the non-WASM implementation in the package: `@hyperledger/cactus-plugin-keychain-memory` +The only difference is that this one is backed by code written in Rust that is compiled down to WebAssembly modules to be loaded instead of the usual TS->JS transpilation process. diff --git a/packages/cactus-plugin-keychain-memory-wasm/openapitools.json b/packages/cactus-plugin-keychain-memory-wasm/openapitools.json new file mode 100644 index 00000000000..29f5d069907 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "5.2.0" + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/package.json b/packages/cactus-plugin-keychain-memory-wasm/package.json new file mode 100644 index 00000000000..0f6d6bf03f0 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/package.json @@ -0,0 +1,90 @@ +{ + "name": "@hyperledger/cactus-plugin-keychain-memory-wasm", + "version": "1.0.0-rc.1", + "description": "Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly.", + "main": "dist/lib/main/typescript/index.js", + "mainMinified": "dist/cactus-plugin-keychain-memory-wasm.node.umd.min.js", + "browser": "dist/cactus-plugin-keychain-memory-wasm.web.umd.js", + "browserMinified": "dist/cactus-plugin-keychain-memory-wasm.web.umd.min.js", + "module": "dist/lib/main/typescript/index.js", + "types": "dist/lib/main/typescript/index.d.ts", + "files": [ + "dist/*" + ], + "scripts": { + "wasm-pack": "CARGO_TARGET_DIR=${PWD}/dist/target-rustc/ wasm-pack build src/main/rust/cactus-plugin-keychain-memory-wasm/ --release --scope=hyperledger --target=nodejs --out-dir=../../../../src/main/typescript/generated/wasm-pack/", + "postwasm-pack": "run-s del-wasm-pack-project-files copy-wasm-bg", + "del-wasm-pack-project-files": "del-cli src/main/typescript/generated/wasm-pack/{package.json,README.md,.gitignore}", + "copy-wasm-bg": "cpy './main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg*' '../dist/lib/' --cwd=src --parents", + "generate-sdk": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected", + "generate-rust-server": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g rust-server -o ./src/main/rust/generated/openapi/rust-server", + "codegen:openapi": "npm run generate-sdk", + "codegen": "run-p 'codegen:*'", + "watch": "npm-watch", + "webpack": "npm-run-all webpack:dev", + "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", + "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", + "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js" + }, + "watch": { + "codegen:openapi": { + "patterns": [ + "./src/main/json/openapi.json" + ] + } + }, + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperledger/cactus.git" + }, + "keywords": [ + "Hyperledger", + "Cactus", + "Integration", + "Blockchain", + "Distributed Ledger Technology" + ], + "author": { + "name": "Hyperledger Cactus Contributors", + "email": "cactus@lists.hyperledger.org", + "url": "https://www.hyperledger.org/use/cactus" + }, + "contributors": [ + { + "name": "Please add yourself to the list of contributors", + "email": "your.name@example.com", + "url": "https://example.com" + }, + { + "name": "Peter Somogyvari", + "email": "peter.somogyvari@accenture.com", + "url": "https://accenture.com" + } + ], + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/hyperledger/cactus/issues" + }, + "homepage": "https://github.com/hyperledger/cactus#readme", + "dependencies": { + "@hyperledger/cactus-common": "0.10.0", + "@hyperledger/cactus-core": "0.10.0", + "@hyperledger/cactus-core-api": "0.10.0", + "axios": "0.21.4", + "express": "4.17.1", + "prom-client": "13.2.0", + "uuid": "8.3.2" + }, + "devDependencies": { + "@types/express": "4.17.13", + "cpy-cli": "3.1.1", + "del-cli": "4.0.1" + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json b/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json new file mode 100644 index 00000000000..9e740b75750 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json @@ -0,0 +1,137 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Hyperledger Cactus Plugin - Keychain Memory WASM", + "description": "Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript.", + "version": "1.0.0-rc.1", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "paths": { + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry": { + "post": { + "x-hyperledger-cactus": { + "http": { + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry", + "verbLowerCase": "post" + } + }, + "operationId": "getKeychainEntryV1", + "summary": "Retrieves the contents of a keychain entry from the backend.", + "parameters": [], + "requestBody": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" + }, + "responses": { + "200": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" + }, + "400": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" + }, + "401": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" + }, + "404": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" + }, + "500": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry": { + "post": { + "x-hyperledger-cactus": { + "http": { + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry", + "verbLowerCase": "post" + } + }, + "operationId": "setKeychainEntryV1", + "summary": "Sets a value under a key on the keychain backend.", + "parameters": [], + "requestBody": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" + }, + "responses": { + "200": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" + }, + "400": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" + }, + "401": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" + }, + "500": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry": { + "post": { + "x-hyperledger-cactus": { + "http": { + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry", + "verbLowerCase": "post" + } + }, + "operationId": "deleteKeychainEntryV1", + "summary": "Deletes an entry under a key on the keychain backend.", + "parameters": [], + "requestBody": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" + }, + "responses": { + "200": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" + }, + "400": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400" + }, + "401": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401" + }, + "500": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry": { + "post": { + "x-hyperledger-cactus": { + "http": { + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry", + "verbLowerCase": "post" + } + }, + "operationId": "hasKeychainEntryV1", + "summary": "Checks that an entry exists under a key on the keychain backend", + "parameters": [], + "requestBody": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" + }, + "responses": { + "200": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" + }, + "400": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" + }, + "401": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" + }, + "500": { + "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.1/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.cargo-ok b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.cargo-ok new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore new file mode 100644 index 00000000000..4e301317e55 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore @@ -0,0 +1,6 @@ +/target +**/*.rs.bk +Cargo.lock +bin/ +pkg/ +wasm-pack.log diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml new file mode 100644 index 00000000000..105c6ed0a86 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "cactus-plugin-keychain-memory-wasm" +version = "1.0.0-rc.1" +authors = ["Peter Somogyvari "] +edition = "2018" + +[build] +target-dir = "../../../../dist/target-rustc/" + +[lib] +crate-type = ["cdylib", "rlib"] + +[features] +default = ["console_error_panic_hook"] + +[dependencies] +wasm-bindgen = { version = "0.2.63", features = ["serde-serialize"] } +wasm-bindgen-futures = "0.4.28" + +# The `console_error_panic_hook` crate provides better debugging of panics by +# logging them with `console.error`. This is great for development, but requires +# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for +# code size when deploying. +console_error_panic_hook = { version = "0.1.6", optional = true } + +# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size +# compared to the default allocator's ~10K. It is slower than the default +# allocator, however. +# +# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now. +wee_alloc = { version = "0.4.5", optional = true } + +js-sys = "0.3.55" +serde = { version = "1.0.130", features = ["derive"] } +serde_json = "1.0.68" +# hashicorp_vault = { version = "2.1.0" } +ureq = { version = "2.2.0", features = ["json", "charset"] } + +[dev-dependencies] +wasm-bindgen-test = "0.3.13" + +[profile.release] +# Tell `rustc` to optimize for small code size. +opt-level = "s" diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE new file mode 100644 index 00000000000..1b5ec8b78e2 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md new file mode 100644 index 00000000000..1e4617a6d29 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md @@ -0,0 +1,69 @@ +
+ +

wasm-pack-template

+ + A template for kick starting a Rust and WebAssembly project using wasm-pack. + +

+ Build Status +

+ +

+ Tutorial + | + Chat +

+ + Built with 🦀🕸 by The Rust and WebAssembly Working Group +
+ +## About + +[**📚 Read this template tutorial! 📚**][template-docs] + +This template is designed for compiling Rust libraries into WebAssembly and +publishing the resulting package to NPM. + +Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other +templates and usages of `wasm-pack`. + +[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html +[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html + +## 🚴 Usage + +### 🐑 Use `cargo generate` to Clone this Template + +[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate) + +``` +cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project +cd my-project +``` + +### 🛠️ Build with `wasm-pack build` + +``` +wasm-pack build +``` + +### 🔬 Test in Headless Browsers with `wasm-pack test` + +``` +wasm-pack test --headless --firefox +``` + +### 🎁 Publish to NPM with `wasm-pack publish` + +``` +wasm-pack publish +``` + +## 🔋 Batteries Included + +* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating + between WebAssembly and JavaScript. +* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook) + for logging panic messages to the developer console. +* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized + for small code size. diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs new file mode 100644 index 00000000000..2a05fde493a --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs @@ -0,0 +1,111 @@ +mod utils; + +use std::collections::HashMap; +use serde::{Serialize, Deserialize}; +use wasm_bindgen::prelude::*; + +// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global +// allocator. +#[cfg(feature = "wee_alloc")] +#[global_allocator] +static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; + +// We have to allow snake case because the JS side expects it. +#[allow(non_snake_case)] +#[wasm_bindgen] +#[derive(Serialize, Deserialize)] +pub struct PluginKeychainMemoryWasmOptions { + #[wasm_bindgen(getter_with_clone)] + pub instanceId: String, + + #[wasm_bindgen(getter_with_clone)] + pub keychainId: String, +} + +#[wasm_bindgen] +impl PluginKeychainMemoryWasmOptions { +} + +#[wasm_bindgen] +pub struct PluginKeychainMemoryWasm { + data: HashMap, + options: PluginKeychainMemoryWasmOptions, +} + +#[wasm_bindgen] +impl PluginKeychainMemoryWasm { + #[wasm_bindgen(constructor)] + pub fn new(options: PluginKeychainMemoryWasmOptions) -> Self { + PluginKeychainMemoryWasm { data: HashMap::new(), options } + } + + // We have to allow snake case because the JS side expects it. + #[allow(non_snake_case)] + pub fn getPackageName(&self) -> String { + "@hyperledger/cactus-plugin-keychain-memory-wasm".to_string() + } + + // We have to allow snake case because the JS side expects it. + #[allow(non_snake_case)] + pub fn getKeychainId(&self) -> String { + self.options.keychainId.clone() + } + + // We have to allow snake case because the JS side expects it. + #[allow(non_snake_case)] + pub fn getInstanceId(&self) -> String { + self.options.instanceId.clone() + } + + // We have to allow snake case because the JS side expects it. + #[allow(non_snake_case)] + pub fn onPluginInit(&self) -> js_sys::Promise { + js_sys::Promise::resolve(&"Initialization OK".into()) + } + + pub fn get(&self, key: &str) -> js_sys::Promise { + let value = self.data.get(key); + js_sys::Promise::resolve(&value.into()) + } + + pub fn set(&mut self, key: &str, value: &str) -> js_sys::Promise { + self.data.insert(key.to_string(), value.to_string()); + js_sys::Promise::resolve(&JsValue::UNDEFINED.into()) + } + + pub fn has(&self, key: &str) -> js_sys::Promise { + let is_present = self.data.contains_key(key); + js_sys::Promise::resolve(&is_present.into()) + } + + pub fn delete(&mut self, key: &str) -> js_sys::Promise { + self.data.remove(key); + js_sys::Promise::resolve(&JsValue::UNDEFINED.into()) + } +} + + +#[wasm_bindgen] +pub struct PluginFactoryKeychain { +} + +#[wasm_bindgen] +impl PluginFactoryKeychain { + #[wasm_bindgen(constructor)] + pub fn new() -> Self { + PluginFactoryKeychain {} + } + + pub fn create(&self, options_raw: &JsValue) -> PluginKeychainMemoryWasm { + let options: PluginKeychainMemoryWasmOptions = options_raw.into_serde().unwrap(); + PluginKeychainMemoryWasm::new(options) + } +} + +// We have to allow snake case because the JS side expects it. +#[allow(non_snake_case)] +#[wasm_bindgen] +pub async fn createPluginFactory() -> PluginFactoryKeychain { + utils::set_panic_hook(); + PluginFactoryKeychain::new() +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs new file mode 100644 index 00000000000..b1d7929dc9c --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs @@ -0,0 +1,10 @@ +pub fn set_panic_hook() { + // When the `console_error_panic_hook` feature is enabled, we can call the + // `set_panic_hook` function at least once during initialization, and then + // we will get better error messages if our code ever panics. + // + // For more details see + // https://github.com/rustwasm/console_error_panic_hook#readme + #[cfg(feature = "console_error_panic_hook")] + console_error_panic_hook::set_once(); +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs new file mode 100644 index 00000000000..de5c1dafefb --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs @@ -0,0 +1,13 @@ +//! Test suite for the Web and headless browsers. + +#![cfg(target_arch = "wasm32")] + +extern crate wasm_bindgen_test; +use wasm_bindgen_test::*; + +wasm_bindgen_test_configure!(run_in_browser); + +#[wasm_bindgen_test] +fn pass() { + assert_eq!(1 + 1, 2); +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config new file mode 100644 index 00000000000..b8acc9c00c8 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config @@ -0,0 +1,18 @@ +[build] +rustflags = [ + "-W", "missing_docs", # detects missing documentation for public members + + "-W", "trivial_casts", # detects trivial casts which could be removed + + "-W", "trivial_numeric_casts", # detects trivial casts of numeric types which could be removed + + "-W", "unsafe_code", # usage of `unsafe` code + + "-W", "unused_qualifications", # detects unnecessarily qualified names + + "-W", "unused_extern_crates", # extern crates that are never used + + "-W", "unused_import_braces", # unnecessary braces around an imported item + + "-D", "warnings", # all warnings should be denied +] diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore new file mode 100644 index 00000000000..a9d37c560c6 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore @@ -0,0 +1,2 @@ +target +Cargo.lock diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore new file mode 100644 index 00000000000..f40de3e6f39 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore @@ -0,0 +1,39 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +api/openapi.yaml +docs/**/*.md +examples/ca.pem +examples/client/main.rs +examples/server-chain.pem +examples/server-key.pem + +# examples/server/main.rs +# examples/server/server.rs +# src/client/mod.rs +# src/context.rs +# src/header.rs +# src/lib.rs +# src/models.rs +# src/server/mod.rs diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES new file mode 100644 index 00000000000..7396771dbf2 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES @@ -0,0 +1,28 @@ +.cargo/config +.gitignore +.openapi-generator-ignore +Cargo.toml +README.md +api/openapi.yaml +docs/DeleteKeychainEntryRequestV1.md +docs/DeleteKeychainEntryResponseV1.md +docs/GetKeychainEntryRequest.md +docs/GetKeychainEntryResponse.md +docs/HasKeychainEntryRequestV1.md +docs/HasKeychainEntryResponseV1.md +docs/PrometheusExporterMetricsResponse.md +docs/SetKeychainEntryRequest.md +docs/SetKeychainEntryResponse.md +docs/default_api.md +examples/ca.pem +examples/client/main.rs +examples/server-chain.pem +examples/server-key.pem +examples/server/main.rs +examples/server/server.rs +src/client/mod.rs +src/context.rs +src/header.rs +src/lib.rs +src/models.rs +src/server/mod.rs diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION new file mode 100644 index 00000000000..7cbea073bea --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml new file mode 100644 index 00000000000..230d902e8cb --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml @@ -0,0 +1,77 @@ +[package] +name = "openapi_client" +version = "0.3.0" +authors = [] +description = "Contains/describes the Keychain API types/paths for Hyperledger Cactus." +license = "Unlicense" +edition = "2018" + +[features] +default = ["client", "server"] +client = [ + "hyper", "hyper-openssl", "hyper-tls", "native-tls", "openssl", "url" +] +server = [ + "serde_ignored", "hyper", "regex", "percent-encoding", "url", "lazy_static" +] +conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"] + +[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] +native-tls = { version = "0.2", optional = true } +hyper-tls = { version = "0.4", optional = true } + +[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] +hyper-openssl = { version = "0.8", optional = true } +openssl = {version = "0.10", optional = true } + +[dependencies] +# Common +async-trait = "0.1.24" +chrono = { version = "0.4", features = ["serde"] } +futures = "0.3" +swagger = "5.0.2" +log = "0.4.0" +mime = "0.3" + +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +# Crates included if required by the API definition + +# Common between server and client features +hyper = {version = "0.13", optional = true} +serde_ignored = {version = "0.1.1", optional = true} +url = {version = "2.1", optional = true} + +# Client-specific + +# Server, and client callback-specific +lazy_static = { version = "1.4", optional = true } +percent-encoding = {version = "2.1.0", optional = true} +regex = {version = "1.3", optional = true} + +# Conversion +frunk = { version = "0.3.0", optional = true } +frunk_derives = { version = "0.3.0", optional = true } +frunk_core = { version = "0.3.0", optional = true } +frunk-enum-derive = { version = "0.2.0", optional = true } +frunk-enum-core = { version = "0.2.0", optional = true } + +[dev-dependencies] +clap = "2.25" +env_logger = "0.7" +tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } +native-tls = "0.2" +tokio-tls = "0.3" + +[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] +tokio-openssl = "0.4" +openssl = "0.10" + +[[example]] +name = "client" +required-features = ["client"] + +[[example]] +name = "server" +required-features = ["server"] diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md new file mode 100644 index 00000000000..ba40b3c718c --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md @@ -0,0 +1,127 @@ +# Rust API for openapi_client + +Contains/describes the Keychain API types/paths for Hyperledger Cactus. + +## Overview + +This client/server was generated by the [openapi-generator] +(https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote +server, you can easily generate a server stub. + +To see how to make this your own, look here: + +[README]((https://openapi-generator.tech)) + +- API version: 0.3.0 +- Build date: 2021-10-04T20:30:49.096004-07:00[America/Los_Angeles] + + + +This autogenerated project defines an API crate `openapi_client` which contains: +* An `Api` trait defining the API in Rust. +* Data types representing the underlying data model. +* A `Client` type which implements `Api` and issues HTTP requests for each operation. +* A router which accepts HTTP requests and invokes the appropriate `Api` method for each operation. + +It also contains an example server and client which make use of `openapi_client`: + +* The example server starts up a web server using the `openapi_client` + router, and supplies a trivial implementation of `Api` which returns failure + for every operation. +* The example client provides a CLI which lets you invoke + any single operation on the `openapi_client` client by passing appropriate + arguments on the command line. + +You can use the example server and client as a basis for your own code. +See below for [more detail on implementing a server](#writing-a-server). + +## Examples + +Run examples with: + +``` +cargo run --example +``` + +To pass in arguments to the examples, put them after `--`, for example: + +``` +cargo run --example client -- --help +``` + +### Running the example server +To run the server, follow these simple steps: + +``` +cargo run --example server +``` + +### Running the example client +To run a client, follow one of the following simple steps: + +``` +cargo run --example client DeleteKeychainEntryV1 +cargo run --example client GetPrometheusMetricsV1 +cargo run --example client HasKeychainEntryV1 +``` + +### HTTPS +The examples can be run in HTTPS mode by passing in the flag `--https`, for example: + +``` +cargo run --example server -- --https +``` + +This will use the keys/certificates from the examples directory. Note that the +server chain is signed with `CN=localhost`. + +## Using the generated library + +The generated library has a few optional features that can be activated through Cargo. + +* `server` + * This defaults to enabled and creates the basic skeleton of a server implementation based on hyper + * To create the server stack you'll need to provide an implementation of the API trait to provide the server function. +* `client` + * This defaults to enabled and creates the basic skeleton of a client implementation based on hyper + * The constructed client implements the API trait by making remote API call. +* `conversions` + * This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types. + +See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your `Cargo.toml`. + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteKeychainEntryV1**](docs/default_api.md#deleteKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry | Deletes an entry from the keychain stored under the provided key. +[**getKeychainEntryV1**](docs/default_api.md#getKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. +[**getPrometheusMetricsV1**](docs/default_api.md#getPrometheusMetricsV1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics | Get the Prometheus Metrics +[**hasKeychainEntryV1**](docs/default_api.md#hasKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry | Retrieves the information regarding a key being present on the keychain or not. +[**setKeychainEntryV1**](docs/default_api.md#setKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry | Sets a value under a key on the keychain backend. + + +## Documentation For Models + + - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) + - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) + - [GetKeychainEntryRequest](docs/GetKeychainEntryRequest.md) + - [GetKeychainEntryResponse](docs/GetKeychainEntryResponse.md) + - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) + - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) + - [PrometheusExporterMetricsResponse](docs/PrometheusExporterMetricsResponse.md) + - [SetKeychainEntryRequest](docs/SetKeychainEntryRequest.md) + - [SetKeychainEntryResponse](docs/SetKeychainEntryResponse.md) + + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + + + diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs new file mode 100644 index 00000000000..f081334656d --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs @@ -0,0 +1,117 @@ +#![allow(missing_docs, unused_variables, trivial_casts)] + + +#[allow(unused_imports)] +use futures::{future, Stream, stream}; +#[allow(unused_imports)] +use openapi_client::{Api, ApiNoContext, Client, ContextWrapperExt, models, + DeleteKeychainEntryV1Response, + GetKeychainEntryV1Response, + GetPrometheusMetricsV1Response, + HasKeychainEntryV1Response, + SetKeychainEntryV1Response, + }; +use clap::{App, Arg}; + +#[allow(unused_imports)] +use log::info; + +// swagger::Has may be unused if there are no examples +#[allow(unused_imports)] +use swagger::{AuthData, ContextBuilder, EmptyContext, Has, Push, XSpanIdString}; + +type ClientContext = swagger::make_context_ty!(ContextBuilder, EmptyContext, Option, XSpanIdString); + +// rt may be unused if there are no examples +#[allow(unused_mut)] +fn main() { + env_logger::init(); + + let matches = App::new("client") + .arg(Arg::with_name("operation") + .help("Sets the operation to run") + .possible_values(&[ + "DeleteKeychainEntryV1", + "GetPrometheusMetricsV1", + "HasKeychainEntryV1", + ]) + .required(true) + .index(1)) + .arg(Arg::with_name("https") + .long("https") + .help("Whether to use HTTPS or not")) + .arg(Arg::with_name("host") + .long("host") + .takes_value(true) + .default_value("localhost") + .help("Hostname to contact")) + .arg(Arg::with_name("port") + .long("port") + .takes_value(true) + .default_value("8080") + .help("Port to contact")) + .get_matches(); + + let is_https = matches.is_present("https"); + let base_url = format!("{}://{}:{}", + if is_https { "https" } else { "http" }, + matches.value_of("host").unwrap(), + matches.value_of("port").unwrap()); + + let context: ClientContext = + swagger::make_context!(ContextBuilder, EmptyContext, None as Option, XSpanIdString::default()); + + let mut client : Box> = if matches.is_present("https") { + // Using Simple HTTPS + let client = Box::new(Client::try_new_https(&base_url) + .expect("Failed to create HTTPS client")); + Box::new(client.with_context(context)) + } else { + // Using HTTP + let client = Box::new(Client::try_new_http( + &base_url) + .expect("Failed to create HTTP client")); + Box::new(client.with_context(context)) + }; + + let mut rt = tokio::runtime::Runtime::new().unwrap(); + + match matches.value_of("operation") { + Some("DeleteKeychainEntryV1") => { + let result = rt.block_on(client.delete_keychain_entry_v1( + None + )); + info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + /* Disabled because there's no example. + Some("GetKeychainEntryV1") => { + let result = rt.block_on(client.get_keychain_entry_v1( + ??? + )); + info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + */ + Some("GetPrometheusMetricsV1") => { + let result = rt.block_on(client.get_prometheus_metrics_v1( + )); + info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + Some("HasKeychainEntryV1") => { + let result = rt.block_on(client.has_keychain_entry_v1( + None + )); + info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + /* Disabled because there's no example. + Some("SetKeychainEntryV1") => { + let result = rt.block_on(client.set_keychain_entry_v1( + ??? + )); + info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + */ + _ => { + panic!("Invalid operation provided") + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs new file mode 100644 index 00000000000..39f7b35da96 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs @@ -0,0 +1,25 @@ +//! Main binary entry point for openapi_client implementation. + +#![allow(missing_docs)] + +use clap::{App, Arg}; + +mod server; + + +/// Create custom server, wire it to the autogenerated router, +/// and pass it to the web server. +#[tokio::main] +async fn main() { + env_logger::init(); + + let matches = App::new("server") + .arg(Arg::with_name("https") + .long("https") + .help("Whether to use HTTPS or not")) + .get_matches(); + + let addr = "127.0.0.1:8080"; + + server::create(addr, matches.is_present("https")).await; +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs new file mode 100644 index 00000000000..7c4102d77cf --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs @@ -0,0 +1,166 @@ +//! Main library entry point for openapi_client implementation. + +#![allow(unused_imports)] + +use async_trait::async_trait; +use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; +use hyper::server::conn::Http; +use hyper::service::Service; +use log::info; +#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] +use openssl::ssl::SslAcceptorBuilder; +use std::future::Future; +use std::marker::PhantomData; +use std::net::SocketAddr; +use std::sync::{Arc, Mutex}; +use std::task::{Context, Poll}; +use swagger::{Has, XSpanIdString}; +use swagger::auth::MakeAllowAllAuthenticator; +use swagger::EmptyContext; +use tokio::net::TcpListener; + +#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] +use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; + +use openapi_client::models; + +/// Builds an SSL implementation for Simple HTTPS from some hard-coded file names +pub async fn create(addr: &str, https: bool) { + let addr = addr.parse().expect("Failed to parse bind address"); + + let server = Server::new(); + + let service = MakeService::new(server); + + let service = MakeAllowAllAuthenticator::new(service, "cosmo"); + + let mut service = + openapi_client::server::context::MakeAddContext::<_, EmptyContext>::new( + service + ); + + if https { + #[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] + { + unimplemented!("SSL is not implemented for the examples on MacOS, Windows or iOS"); + } + + #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] + { + let mut ssl = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).expect("Failed to create SSL Acceptor"); + + // Server authentication + ssl.set_private_key_file("examples/server-key.pem", SslFiletype::PEM).expect("Failed to set private key"); + ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set cerificate chain"); + ssl.check_private_key().expect("Failed to check private key"); + + let tls_acceptor = Arc::new(ssl.build()); + let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); + let mut incoming = tcp_listener.incoming(); + + while let (Some(tcp), rest) = incoming.into_future().await { + if let Ok(tcp) = tcp { + let addr = tcp.peer_addr().expect("Unable to get remote address"); + let service = service.call(addr); + let tls_acceptor = Arc::clone(&tls_acceptor); + + tokio::spawn(async move { + let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; + + let service = service.await.map_err(|_| ())?; + + Http::new().serve_connection(tls, service).await.map_err(|_| ()) + }); + } + + incoming = rest; + } + } + } else { + // Using HTTP + hyper::server::Server::bind(&addr).serve(service).await.unwrap() + } +} + +#[derive(Copy, Clone)] +pub struct Server { + marker: PhantomData, +} + +impl Server { + pub fn new() -> Self { + Server{marker: PhantomData} + } +} + + +use openapi_client::{ + Api, + DeleteKeychainEntryV1Response, + GetKeychainEntryV1Response, + GetPrometheusMetricsV1Response, + HasKeychainEntryV1Response, + SetKeychainEntryV1Response, +}; +use openapi_client::server::MakeService; +use std::error::Error; +use swagger::ApiError; + +#[async_trait] +impl Api for Server where C: Has + Send + Sync +{ + /// Deletes an entry from the keychain stored under the provided key. + async fn delete_keychain_entry_v1( + &self, + delete_keychain_entry_request_v1: Option, + context: &C) -> Result + { + let context = context.clone(); + info!("delete_keychain_entry_v1({:?}) - X-Span-ID: {:?}", delete_keychain_entry_request_v1, context.get().0.clone()); + Err("Generic failuare".into()) + } + + /// Retrieves the contents of a keychain entry from the backend. + async fn get_keychain_entry_v1( + &self, + get_keychain_entry_request: models::GetKeychainEntryRequest, + context: &C) -> Result + { + let context = context.clone(); + info!("get_keychain_entry_v1({:?}) - X-Span-ID: {:?}", get_keychain_entry_request, context.get().0.clone()); + Err("Generic failuare".into()) + } + + /// Get the Prometheus Metrics + async fn get_prometheus_metrics_v1( + &self, + context: &C) -> Result + { + let context = context.clone(); + info!("get_prometheus_metrics_v1() - X-Span-ID: {:?}", context.get().0.clone()); + Err("Generic failuare".into()) + } + + /// Retrieves the information regarding a key being present on the keychain or not. + async fn has_keychain_entry_v1( + &self, + has_keychain_entry_request_v1: Option, + context: &C) -> Result + { + let context = context.clone(); + info!("has_keychain_entry_v1({:?}) - X-Span-ID: {:?}", has_keychain_entry_request_v1, context.get().0.clone()); + Err("Generic failuare".into()) + } + + /// Sets a value under a key on the keychain backend. + async fn set_keychain_entry_v1( + &self, + set_keychain_entry_request: models::SetKeychainEntryRequest, + context: &C) -> Result + { + let context = context.clone(); + info!("set_keychain_entry_v1({:?}) - X-Span-ID: {:?}", set_keychain_entry_request, context.get().0.clone()); + Err("Generic failuare".into()) + } + +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs new file mode 100644 index 00000000000..4a7db5e3935 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs @@ -0,0 +1,851 @@ +use async_trait::async_trait; +use futures::{Stream, future, future::BoxFuture, stream, future::TryFutureExt, future::FutureExt, stream::StreamExt}; +use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; +use hyper::{Body, Request, Response, service::Service, Uri}; +use percent_encoding::{utf8_percent_encode, AsciiSet}; +use std::borrow::Cow; +use std::convert::TryInto; +use std::io::{ErrorKind, Read}; +use std::error::Error; +use std::future::Future; +use std::fmt; +use std::marker::PhantomData; +use std::path::Path; +use std::sync::{Arc, Mutex}; +use std::str; +use std::str::FromStr; +use std::string::ToString; +use std::task::{Context, Poll}; +use swagger::{ApiError, AuthData, BodyExt, Connector, DropContextService, Has, XSpanIdString}; +use url::form_urlencoded; + + +use crate::models; +use crate::header; + +/// https://url.spec.whatwg.org/#fragment-percent-encode-set +#[allow(dead_code)] +const FRAGMENT_ENCODE_SET: &AsciiSet = &percent_encoding::CONTROLS + .add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); + +/// This encode set is used for object IDs +/// +/// Aside from the special characters defined in the `PATH_SEGMENT_ENCODE_SET`, +/// the vertical bar (|) is encoded. +#[allow(dead_code)] +const ID_ENCODE_SET: &AsciiSet = &FRAGMENT_ENCODE_SET.add(b'|'); + +use crate::{Api, + DeleteKeychainEntryV1Response, + GetKeychainEntryV1Response, + GetPrometheusMetricsV1Response, + HasKeychainEntryV1Response, + SetKeychainEntryV1Response + }; + +/// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes. +fn into_base_path(input: impl TryInto, correct_scheme: Option<&'static str>) -> Result { + // First convert to Uri, since a base path is a subset of Uri. + let uri = input.try_into()?; + + let scheme = uri.scheme_str().ok_or(ClientInitError::InvalidScheme)?; + + // Check the scheme if necessary + if let Some(correct_scheme) = correct_scheme { + if scheme != correct_scheme { + return Err(ClientInitError::InvalidScheme); + } + } + + let host = uri.host().ok_or_else(|| ClientInitError::MissingHost)?; + let port = uri.port_u16().map(|x| format!(":{}", x)).unwrap_or_default(); + Ok(format!("{}://{}{}{}", scheme, host, port, uri.path().trim_end_matches('/'))) +} + +/// A client that implements the API by making HTTP calls out to a server. +pub struct Client where + S: Service< + (Request, C), + Response=Response> + Clone + Sync + Send + 'static, + S::Future: Send + 'static, + S::Error: Into + fmt::Display, + C: Clone + Send + Sync + 'static +{ + /// Inner service + client_service: S, + + /// Base path of the API + base_path: String, + + /// Marker + marker: PhantomData, +} + +impl fmt::Debug for Client where + S: Service< + (Request, C), + Response=Response> + Clone + Sync + Send + 'static, + S::Future: Send + 'static, + S::Error: Into + fmt::Display, + C: Clone + Send + Sync + 'static +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "Client {{ base_path: {} }}", self.base_path) + } +} + +impl Clone for Client where + S: Service< + (Request, C), + Response=Response> + Clone + Sync + Send + 'static, + S::Future: Send + 'static, + S::Error: Into + fmt::Display, + C: Clone + Send + Sync + 'static +{ + fn clone(&self) -> Self { + Self { + client_service: self.client_service.clone(), + base_path: self.base_path.clone(), + marker: PhantomData, + } + } +} + +impl Client, C>, C> where + Connector: hyper::client::connect::Connect + Clone + Send + Sync + 'static, + C: Clone + Send + Sync + 'static, +{ + /// Create a client with a custom implementation of hyper::client::Connect. + /// + /// Intended for use with custom implementations of connect for e.g. protocol logging + /// or similar functionality which requires wrapping the transport layer. When wrapping a TCP connection, + /// this function should be used in conjunction with `swagger::Connector::builder()`. + /// + /// For ordinary tcp connections, prefer the use of `try_new_http`, `try_new_https` + /// and `try_new_https_mutual`, to avoid introducing a dependency on the underlying transport layer. + /// + /// # Arguments + /// + /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" + /// * `protocol` - Which protocol to use when constructing the request url, e.g. `Some("http")` + /// * `connector` - Implementation of `hyper::client::Connect` to use for the client + pub fn try_new_with_connector( + base_path: &str, + protocol: Option<&'static str>, + connector: Connector, + ) -> Result + { + let client_service = hyper::client::Client::builder().build(connector); + let client_service = DropContextService::new(client_service); + + Ok(Self { + client_service, + base_path: into_base_path(base_path, protocol)?, + marker: PhantomData, + }) + } +} + +#[derive(Debug, Clone)] +pub enum HyperClient { + Http(hyper::client::Client), + Https(hyper::client::Client), +} + +impl Service> for HyperClient { + type Response = Response; + type Error = hyper::Error; + type Future = hyper::client::ResponseFuture; + + fn poll_ready(&mut self, cx: &mut Context) -> Poll> { + match self { + HyperClient::Http(client) => client.poll_ready(cx), + HyperClient::Https(client) => client.poll_ready(cx), + } + } + + fn call(&mut self, req: Request) -> Self::Future { + match self { + HyperClient::Http(client) => client.call(req), + HyperClient::Https(client) => client.call(req) + } + } +} + +impl Client, C> where + C: Clone + Send + Sync + 'static, +{ + /// Create an HTTP client. + /// + /// # Arguments + /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" + pub fn try_new( + base_path: &str, + ) -> Result { + let uri = Uri::from_str(base_path)?; + + let scheme = uri.scheme_str().ok_or(ClientInitError::InvalidScheme)?; + let scheme = scheme.to_ascii_lowercase(); + + let connector = Connector::builder(); + + let client_service = match scheme.as_str() { + "http" => { + HyperClient::Http(hyper::client::Client::builder().build(connector.build())) + }, + "https" => { + let connector = connector.https() + .build() + .map_err(|e| ClientInitError::SslError(e))?; + HyperClient::Https(hyper::client::Client::builder().build(connector)) + }, + _ => { + return Err(ClientInitError::InvalidScheme); + } + }; + + let client_service = DropContextService::new(client_service); + + Ok(Self { + client_service, + base_path: into_base_path(base_path, None)?, + marker: PhantomData, + }) + } +} + +impl Client, C>, C> where + C: Clone + Send + Sync + 'static +{ + /// Create an HTTP client. + /// + /// # Arguments + /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" + pub fn try_new_http( + base_path: &str, + ) -> Result { + let http_connector = Connector::builder().build(); + + Self::try_new_with_connector(base_path, Some("http"), http_connector) + } +} + +#[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] +type HttpsConnector = hyper_tls::HttpsConnector; + +#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] +type HttpsConnector = hyper_openssl::HttpsConnector; + +impl Client, C>, C> where + C: Clone + Send + Sync + 'static +{ + /// Create a client with a TLS connection to the server + /// + /// # Arguments + /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" + pub fn try_new_https(base_path: &str) -> Result + { + let https_connector = Connector::builder() + .https() + .build() + .map_err(|e| ClientInitError::SslError(e))?; + Self::try_new_with_connector(base_path, Some("https"), https_connector) + } + + /// Create a client with a TLS connection to the server using a pinned certificate + /// + /// # Arguments + /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" + /// * `ca_certificate` - Path to CA certificate used to authenticate the server + #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] + pub fn try_new_https_pinned( + base_path: &str, + ca_certificate: CA, + ) -> Result + where + CA: AsRef, + { + let https_connector = Connector::builder() + .https() + .pin_server_certificate(ca_certificate) + .build() + .map_err(|e| ClientInitError::SslError(e))?; + Self::try_new_with_connector(base_path, Some("https"), https_connector) + } + + /// Create a client with a mutually authenticated TLS connection to the server. + /// + /// # Arguments + /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" + /// * `ca_certificate` - Path to CA certificate used to authenticate the server + /// * `client_key` - Path to the client private key + /// * `client_certificate` - Path to the client's public certificate associated with the private key + #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] + pub fn try_new_https_mutual( + base_path: &str, + ca_certificate: CA, + client_key: K, + client_certificate: D, + ) -> Result + where + CA: AsRef, + K: AsRef, + D: AsRef, + { + let https_connector = Connector::builder() + .https() + .pin_server_certificate(ca_certificate) + .client_authentication(client_key, client_certificate) + .build() + .map_err(|e| ClientInitError::SslError(e))?; + Self::try_new_with_connector(base_path, Some("https"), https_connector) + } +} + +impl Client where + S: Service< + (Request, C), + Response=Response> + Clone + Sync + Send + 'static, + S::Future: Send + 'static, + S::Error: Into + fmt::Display, + C: Clone + Send + Sync + 'static +{ + /// Constructor for creating a `Client` by passing in a pre-made `hyper::service::Service` / + /// `tower::Service` + /// + /// This allows adding custom wrappers around the underlying transport, for example for logging. + pub fn try_new_with_client_service( + client_service: S, + base_path: &str, + ) -> Result + { + Ok(Self { + client_service, + base_path: into_base_path(base_path, None)?, + marker: PhantomData, + }) + } +} + +/// Error type failing to create a Client +#[derive(Debug)] +pub enum ClientInitError { + /// Invalid URL Scheme + InvalidScheme, + + /// Invalid URI + InvalidUri(hyper::http::uri::InvalidUri), + + /// Missing Hostname + MissingHost, + + /// SSL Connection Error + #[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] + SslError(native_tls::Error), + + /// SSL Connection Error + #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] + SslError(openssl::error::ErrorStack), +} + +impl From for ClientInitError { + fn from(err: hyper::http::uri::InvalidUri) -> ClientInitError { + ClientInitError::InvalidUri(err) + } +} + +impl fmt::Display for ClientInitError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let s: &dyn fmt::Debug = self; + s.fmt(f) + } +} + +impl Error for ClientInitError { + fn description(&self) -> &str { + "Failed to produce a hyper client." + } +} + +#[async_trait] +impl Api for Client where + S: Service< + (Request, C), + Response=Response> + Clone + Sync + Send + 'static, + S::Future: Send + 'static, + S::Error: Into + fmt::Display, + C: Has + Clone + Send + Sync + 'static, +{ + fn poll_ready(&self, cx: &mut Context) -> Poll> { + match self.client_service.clone().poll_ready(cx) { + Poll::Ready(Err(e)) => Poll::Ready(Err(e.into())), + Poll::Ready(Ok(o)) => Poll::Ready(Ok(o)), + Poll::Pending => Poll::Pending, + } + } + + async fn delete_keychain_entry_v1( + &self, + param_delete_keychain_entry_request_v1: Option, + context: &C) -> Result + { + let mut client_service = self.client_service.clone(); + let mut uri = format!( + "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry", + self.base_path + ); + + // Query parameters + let query_string = { + let mut query_string = form_urlencoded::Serializer::new("".to_owned()); + query_string.finish() + }; + if !query_string.is_empty() { + uri += "?"; + uri += &query_string; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), + }; + + let mut request = match Request::builder() + .method("POST") + .uri(uri) + .body(Body::empty()) { + Ok(req) => req, + Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) + }; + + // Body parameter + let body = param_delete_keychain_entry_request_v1.map(|ref body| { + serde_json::to_string(body).expect("impossible to fail to serialize") + }); + if let Some(body) = body { + *request.body_mut() = Body::from(body); + } + + let header = "application/json"; + request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) + }); + let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); + request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) + }); + + let mut response = client_service.call((request, context.clone())) + .map_err(|e| ApiError(format!("No response received: {}", e))).await?; + + match response.status().as_u16() { + 200 => { + let body = response.into_body(); + let body = body + .to_raw() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; + let body = str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; + let body = serde_json::from_str::(body)?; + Ok(DeleteKeychainEntryV1Response::OK + (body) + ) + } + code => { + let headers = response.headers().clone(); + let body = response.into_body() + .take(100) + .to_raw().await; + Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(body) => match String::from_utf8(body) { + Ok(body) => body, + Err(e) => format!("", e), + }, + Err(e) => format!("", e), + } + ))) + } + } + } + + async fn get_keychain_entry_v1( + &self, + param_get_keychain_entry_request: models::GetKeychainEntryRequest, + context: &C) -> Result + { + let mut client_service = self.client_service.clone(); + let mut uri = format!( + "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry", + self.base_path + ); + + // Query parameters + let query_string = { + let mut query_string = form_urlencoded::Serializer::new("".to_owned()); + query_string.finish() + }; + if !query_string.is_empty() { + uri += "?"; + uri += &query_string; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), + }; + + let mut request = match Request::builder() + .method("POST") + .uri(uri) + .body(Body::empty()) { + Ok(req) => req, + Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) + }; + + let body = serde_json::to_string(¶m_get_keychain_entry_request).expect("impossible to fail to serialize"); + *request.body_mut() = Body::from(body); + + let header = "application/json"; + request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) + }); + let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); + request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) + }); + + let mut response = client_service.call((request, context.clone())) + .map_err(|e| ApiError(format!("No response received: {}", e))).await?; + + match response.status().as_u16() { + 200 => { + let body = response.into_body(); + let body = body + .to_raw() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; + let body = str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; + let body = serde_json::from_str::(body)?; + Ok(GetKeychainEntryV1Response::OK + (body) + ) + } + 400 => { + let body = response.into_body(); + Ok( + GetKeychainEntryV1Response::BadRequest + ) + } + 401 => { + let body = response.into_body(); + Ok( + GetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid + ) + } + 404 => { + let body = response.into_body(); + Ok( + GetKeychainEntryV1Response::AKeychainItemWithTheSpecifiedKeyWasNotFound + ) + } + 500 => { + let body = response.into_body(); + Ok( + GetKeychainEntryV1Response::UnexpectedError + ) + } + code => { + let headers = response.headers().clone(); + let body = response.into_body() + .take(100) + .to_raw().await; + Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(body) => match String::from_utf8(body) { + Ok(body) => body, + Err(e) => format!("", e), + }, + Err(e) => format!("", e), + } + ))) + } + } + } + + async fn get_prometheus_metrics_v1( + &self, + context: &C) -> Result + { + let mut client_service = self.client_service.clone(); + let mut uri = format!( + "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics", + self.base_path + ); + + // Query parameters + let query_string = { + let mut query_string = form_urlencoded::Serializer::new("".to_owned()); + query_string.finish() + }; + if !query_string.is_empty() { + uri += "?"; + uri += &query_string; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), + }; + + let mut request = match Request::builder() + .method("GET") + .uri(uri) + .body(Body::empty()) { + Ok(req) => req, + Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) + }; + + let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); + request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) + }); + + let mut response = client_service.call((request, context.clone())) + .map_err(|e| ApiError(format!("No response received: {}", e))).await?; + + match response.status().as_u16() { + 200 => { + let body = response.into_body(); + let body = body + .to_raw() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; + let body = str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; + let body = body.to_string(); + Ok(GetPrometheusMetricsV1Response::OK + (body) + ) + } + code => { + let headers = response.headers().clone(); + let body = response.into_body() + .take(100) + .to_raw().await; + Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(body) => match String::from_utf8(body) { + Ok(body) => body, + Err(e) => format!("", e), + }, + Err(e) => format!("", e), + } + ))) + } + } + } + + async fn has_keychain_entry_v1( + &self, + param_has_keychain_entry_request_v1: Option, + context: &C) -> Result + { + let mut client_service = self.client_service.clone(); + let mut uri = format!( + "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry", + self.base_path + ); + + // Query parameters + let query_string = { + let mut query_string = form_urlencoded::Serializer::new("".to_owned()); + query_string.finish() + }; + if !query_string.is_empty() { + uri += "?"; + uri += &query_string; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), + }; + + let mut request = match Request::builder() + .method("POST") + .uri(uri) + .body(Body::empty()) { + Ok(req) => req, + Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) + }; + + let body = param_has_keychain_entry_request_v1.map(|ref body| { + serde_json::to_string(body).expect("impossible to fail to serialize") + }); + if let Some(body) = body { + *request.body_mut() = Body::from(body); + } + + let header = "application/json"; + request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) + }); + let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); + request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) + }); + + let mut response = client_service.call((request, context.clone())) + .map_err(|e| ApiError(format!("No response received: {}", e))).await?; + + match response.status().as_u16() { + 200 => { + let body = response.into_body(); + let body = body + .to_raw() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; + let body = str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; + let body = serde_json::from_str::(body)?; + Ok(HasKeychainEntryV1Response::OK + (body) + ) + } + code => { + let headers = response.headers().clone(); + let body = response.into_body() + .take(100) + .to_raw().await; + Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(body) => match String::from_utf8(body) { + Ok(body) => body, + Err(e) => format!("", e), + }, + Err(e) => format!("", e), + } + ))) + } + } + } + + async fn set_keychain_entry_v1( + &self, + param_set_keychain_entry_request: models::SetKeychainEntryRequest, + context: &C) -> Result + { + let mut client_service = self.client_service.clone(); + let mut uri = format!( + "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry", + self.base_path + ); + + // Query parameters + let query_string = { + let mut query_string = form_urlencoded::Serializer::new("".to_owned()); + query_string.finish() + }; + if !query_string.is_empty() { + uri += "?"; + uri += &query_string; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), + }; + + let mut request = match Request::builder() + .method("POST") + .uri(uri) + .body(Body::empty()) { + Ok(req) => req, + Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) + }; + + let body = serde_json::to_string(¶m_set_keychain_entry_request).expect("impossible to fail to serialize"); + + *request.body_mut() = Body::from(body); + + let header = "application/json"; + request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) + }); + + let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); + request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { + Ok(h) => h, + Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) + }); + + let mut response = client_service.call((request, context.clone())) + .map_err(|e| ApiError(format!("No response received: {}", e))).await?; + + match response.status().as_u16() { + 200 => { + let body = response.into_body(); + let body = body + .to_raw() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; + let body = str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; + let body = serde_json::from_str::(body)?; + Ok(SetKeychainEntryV1Response::OK + (body) + ) + } + 400 => { + let body = response.into_body(); + Ok( + SetKeychainEntryV1Response::BadRequest + ) + } + 401 => { + let body = response.into_body(); + Ok( + SetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid + ) + } + 500 => { + let body = response.into_body(); + Ok( + SetKeychainEntryV1Response::UnexpectedError + ) + } + code => { + let headers = response.headers().clone(); + let body = response.into_body() + .take(100) + .to_raw().await; + Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(body) => match String::from_utf8(body) { + Ok(body) => body, + Err(e) => format!("", e), + }, + Err(e) => format!("", e), + } + ))) + } + } + } + +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs new file mode 100644 index 00000000000..fadd880b965 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs @@ -0,0 +1,113 @@ +use futures::future::BoxFuture; +use hyper::header::HeaderName; +use hyper::{Error, Request, Response, StatusCode, service::Service}; +use url::form_urlencoded; +use std::default::Default; +use std::io; +use std::marker::PhantomData; +use std::task::{Poll, Context}; +use swagger::auth::{AuthData, Authorization, Bearer, Scopes}; +use swagger::{EmptyContext, Has, Pop, Push, XSpanIdString}; +use crate::Api; + +pub struct MakeAddContext { + inner: T, + marker: PhantomData, +} + +impl MakeAddContext +where + A: Default + Push, + B: Push, Result = C>, + C: Push, Result = D>, +{ + pub fn new(inner: T) -> MakeAddContext { + MakeAddContext { + inner, + marker: PhantomData, + } + } +} + +// Make a service that adds context. +impl Service for + MakeAddContext +where + Target: Send, + A: Default + Push + Send, + B: Push, Result = C>, + C: Push, Result = D>, + D: Send + 'static, + T: Service + Send, + T::Future: Send + 'static +{ + type Error = T::Error; + type Response = AddContext; + type Future = BoxFuture<'static, Result>; + + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.inner.poll_ready(cx) + } + + fn call(&mut self, target: Target) -> Self::Future { + let service = self.inner.call(target); + + Box::pin(async move { + Ok(AddContext::new(service.await?)) + }) + } +} + +/// Middleware to add context data from the request +pub struct AddContext +where + A: Default + Push, + B: Push, Result = C>, + C: Push, Result = D> +{ + inner: T, + marker: PhantomData, +} + +impl AddContext +where + A: Default + Push, + B: Push, Result = C>, + C: Push, Result = D>, +{ + pub fn new(inner: T) -> Self { + AddContext { + inner, + marker: PhantomData, + } + } +} + +impl Service> for AddContext + where + A: Default + Push, + B: Push, Result=C>, + C: Push, Result=D>, + D: Send + 'static, + T: Service<(Request, D)> +{ + type Error = T::Error; + type Future = T::Future; + type Response = T::Response; + + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.inner.poll_ready(cx) + } + + + fn call(&mut self, request: Request) -> Self::Future { + let context = A::default().push(XSpanIdString::get_or_generate(&request)); + let headers = request.headers(); + + + let context = context.push(None::); + let context = context.push(None::); + + self.inner.call((request, context)) + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs new file mode 100644 index 00000000000..5bc6ebe929b --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs @@ -0,0 +1,180 @@ +use chrono::{DateTime, Utc}; +use hyper::header::HeaderValue; +use std::convert::TryFrom; +use std::fmt; +use std::ops::Deref; + +/// A struct to allow homogeneous conversion into a HeaderValue. We can't +/// implement the From/Into trait on HeaderValue because we don't own +/// either of the types. +#[derive(Debug, Clone)] +pub(crate) struct IntoHeaderValue(pub T); + +// Generic implementations + +impl Deref for IntoHeaderValue { + type Target = T; + + fn deref(&self) -> &T { + &self.0 + } +} + +// Derive for each TryFrom in hyper::header::HeaderValue + +macro_rules! ihv_generate { + ($t:ident) => { + impl TryFrom for IntoHeaderValue<$t> { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> Result { + match hdr_value.to_str() { + Ok(hdr_value) => match hdr_value.parse::<$t>() { + Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), + Err(e) => Err(format!("Unable to parse {} as a string: {}", + stringify!($t), e)), + }, + Err(e) => Err(format!("Unable to parse header {:?} as a string - {}", + hdr_value, e)), + } + } + } + + impl TryFrom> for HeaderValue { + type Error = String; + + fn try_from(hdr_value: IntoHeaderValue<$t>) -> Result { + Ok(hdr_value.0.into()) + } + } + }; +} + +ihv_generate!(u64); +ihv_generate!(i64); +ihv_generate!(i16); +ihv_generate!(u16); +ihv_generate!(u32); +ihv_generate!(usize); +ihv_generate!(isize); +ihv_generate!(i32); + +// Custom derivations + +// Vec + +impl TryFrom for IntoHeaderValue> { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> Result { + match hdr_value.to_str() { + Ok(hdr_value) => Ok(IntoHeaderValue( + hdr_value + .split(',') + .filter_map(|x| match x.trim() { + "" => None, + y => Some(y.to_string()), + }) + .collect())), + Err(e) => Err(format!("Unable to parse header: {:?} as a string - {}", + hdr_value, e)), + } + } +} + +impl TryFrom>> for HeaderValue { + type Error = String; + + fn try_from(hdr_value: IntoHeaderValue>) -> Result { + match HeaderValue::from_str(&hdr_value.0.join(", ")) { + Ok(hdr_value) => Ok(hdr_value), + Err(e) => Err(format!("Unable to convert {:?} into a header - {}", + hdr_value, e)) + } + } +} + +// String + +impl TryFrom for IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> Result { + match hdr_value.to_str() { + Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value.to_string())), + Err(e) => Err(format!("Unable to convert header {:?} to {}", + hdr_value, e)), + } + } +} + +impl TryFrom> for HeaderValue { + type Error = String; + + fn try_from(hdr_value: IntoHeaderValue) -> Result { + match HeaderValue::from_str(&hdr_value.0) { + Ok(hdr_value) => Ok(hdr_value), + Err(e) => Err(format!("Unable to convert {:?} from a header {}", + hdr_value, e)) + } + } +} + +// bool +impl TryFrom for IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> Result { + match hdr_value.to_str() { + Ok(hdr_value) => match hdr_value.parse() { + Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), + Err(e) => Err(format!("Unable to parse bool from {} - {}", + hdr_value, e)), + }, + Err(e) => Err(format!("Unable to convert {:?} from a header {}", + hdr_value, e)), + } + } +} + +impl TryFrom> for HeaderValue { + type Error = String; + + fn try_from(hdr_value: IntoHeaderValue) -> Result { + match HeaderValue::from_str(&hdr_value.0.to_string()) { + Ok(hdr_value) => Ok(hdr_value), + Err(e) => Err(format!("Unable to convert: {:?} into a header: {}", + hdr_value, e)) + } + } +} + +// DateTime + +impl TryFrom for IntoHeaderValue> { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> Result { + match hdr_value.to_str() { + Ok(hdr_value) => match DateTime::parse_from_rfc3339(hdr_value) { + Ok(date) => Ok(IntoHeaderValue(date.with_timezone(&Utc))), + Err(e) => Err(format!("Unable to parse: {} as date - {}", + hdr_value, e)), + }, + Err(e) => Err(format!("Unable to convert header {:?} to string {}", + hdr_value, e)), + } + } +} + +impl TryFrom>> for HeaderValue { + type Error = String; + + fn try_from(hdr_value: IntoHeaderValue>) -> Result { + match HeaderValue::from_str(hdr_value.0.to_rfc3339().as_str()) { + Ok(hdr_value) => Ok(hdr_value), + Err(e) => Err(format!("Unable to convert {:?} to a header: {}", + hdr_value, e)), + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs new file mode 100644 index 00000000000..610c0250fe9 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs @@ -0,0 +1,245 @@ +#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] + +use async_trait::async_trait; +use futures::Stream; +use std::error::Error; +use std::task::{Poll, Context}; +use swagger::{ApiError, ContextWrapper}; +use serde::{Serialize, Deserialize}; + +type ServiceError = Box; + +pub const BASE_PATH: &'static str = ""; +pub const API_VERSION: &'static str = "0.3.0"; + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum DeleteKeychainEntryV1Response { + /// OK + OK + (models::DeleteKeychainEntryResponseV1) +} + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[must_use] +pub enum GetKeychainEntryV1Response { + /// OK + OK + (models::GetKeychainEntryResponse) + , + /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. + BadRequest + , + /// Authorization information is missing or invalid. + AuthorizationInformationIsMissingOrInvalid + , + /// A keychain item with the specified key was not found. + AKeychainItemWithTheSpecifiedKeyWasNotFound + , + /// Unexpected error. + UnexpectedError +} + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum GetPrometheusMetricsV1Response { + /// OK + OK + (String) +} + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum HasKeychainEntryV1Response { + /// OK + OK + (models::HasKeychainEntryResponseV1) +} + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[must_use] +pub enum SetKeychainEntryV1Response { + /// OK + OK + (models::SetKeychainEntryResponse) + , + /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. + BadRequest + , + /// Authorization information is missing or invalid. + AuthorizationInformationIsMissingOrInvalid + , + /// Unexpected error. + UnexpectedError +} + +/// API +#[async_trait] +pub trait Api { + fn poll_ready(&self, _cx: &mut Context) -> Poll>> { + Poll::Ready(Ok(())) + } + + /// Deletes an entry from the keychain stored under the provided key. + async fn delete_keychain_entry_v1( + &self, + delete_keychain_entry_request_v1: Option, + context: &C) -> Result; + + /// Retrieves the contents of a keychain entry from the backend. + async fn get_keychain_entry_v1( + &self, + get_keychain_entry_request: models::GetKeychainEntryRequest, + context: &C) -> Result; + + /// Get the Prometheus Metrics + async fn get_prometheus_metrics_v1( + &self, + context: &C) -> Result; + + /// Retrieves the information regarding a key being present on the keychain or not. + async fn has_keychain_entry_v1( + &self, + has_keychain_entry_request_v1: Option, + context: &C) -> Result; + + /// Sets a value under a key on the keychain backend. + async fn set_keychain_entry_v1( + &self, + set_keychain_entry_request: models::SetKeychainEntryRequest, + context: &C) -> Result; + +} + +/// API where `Context` isn't passed on every API call +#[async_trait] +pub trait ApiNoContext { + + fn poll_ready(&self, _cx: &mut Context) -> Poll>>; + + fn context(&self) -> &C; + + /// Deletes an entry from the keychain stored under the provided key. + async fn delete_keychain_entry_v1( + &self, + delete_keychain_entry_request_v1: Option, + ) -> Result; + + /// Retrieves the contents of a keychain entry from the backend. + async fn get_keychain_entry_v1( + &self, + get_keychain_entry_request: models::GetKeychainEntryRequest, + ) -> Result; + + /// Get the Prometheus Metrics + async fn get_prometheus_metrics_v1( + &self, + ) -> Result; + + /// Retrieves the information regarding a key being present on the keychain or not. + async fn has_keychain_entry_v1( + &self, + has_keychain_entry_request_v1: Option, + ) -> Result; + + /// Sets a value under a key on the keychain backend. + async fn set_keychain_entry_v1( + &self, + set_keychain_entry_request: models::SetKeychainEntryRequest, + ) -> Result; + +} + +/// Trait to extend an API to make it easy to bind it to a context. +pub trait ContextWrapperExt where Self: Sized +{ + /// Binds this API to a context. + fn with_context(self: Self, context: C) -> ContextWrapper; +} + +impl + Send + Sync, C: Clone + Send + Sync> ContextWrapperExt for T { + fn with_context(self: T, context: C) -> ContextWrapper { + ContextWrapper::::new(self, context) + } +} + +#[async_trait] +impl + Send + Sync, C: Clone + Send + Sync> ApiNoContext for ContextWrapper { + fn poll_ready(&self, cx: &mut Context) -> Poll> { + self.api().poll_ready(cx) + } + + fn context(&self) -> &C { + ContextWrapper::context(self) + } + + /// Deletes an entry from the keychain stored under the provided key. + async fn delete_keychain_entry_v1( + &self, + delete_keychain_entry_request_v1: Option, + ) -> Result + { + let context = self.context().clone(); + self.api().delete_keychain_entry_v1(delete_keychain_entry_request_v1, &context).await + } + + /// Retrieves the contents of a keychain entry from the backend. + async fn get_keychain_entry_v1( + &self, + get_keychain_entry_request: models::GetKeychainEntryRequest, + ) -> Result + { + let context = self.context().clone(); + self.api().get_keychain_entry_v1(get_keychain_entry_request, &context).await + } + + /// Get the Prometheus Metrics + async fn get_prometheus_metrics_v1( + &self, + ) -> Result + { + let context = self.context().clone(); + self.api().get_prometheus_metrics_v1(&context).await + } + + /// Retrieves the information regarding a key being present on the keychain or not. + async fn has_keychain_entry_v1( + &self, + has_keychain_entry_request_v1: Option, + ) -> Result + { + let context = self.context().clone(); + self.api().has_keychain_entry_v1(has_keychain_entry_request_v1, &context).await + } + + /// Sets a value under a key on the keychain backend. + async fn set_keychain_entry_v1( + &self, + set_keychain_entry_request: models::SetKeychainEntryRequest, + ) -> Result + { + let context = self.context().clone(); + self.api().set_keychain_entry_v1(set_keychain_entry_request, &context).await + } + +} + + +#[cfg(feature = "client")] +pub mod client; + +// Re-export Client as a top-level name +#[cfg(feature = "client")] +pub use client::Client; + +#[cfg(feature = "server")] +pub mod server; + +// Re-export router() as a top-level name +#[cfg(feature = "server")] +pub use self::server::Service; + +#[cfg(feature = "server")] +pub mod context; + +pub mod models; + +#[cfg(any(feature = "client", feature = "server"))] +pub(crate) mod header; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs new file mode 100644 index 00000000000..913b7721d36 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs @@ -0,0 +1,1000 @@ +#![allow(unused_qualifications)] + +use crate::models; +#[cfg(any(feature = "client", feature = "server"))] +use crate::header; + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct DeleteKeychainEntryRequestV1 { + /// The key of the entry to delete from the keychain. + #[serde(rename = "key")] + pub key: String, + +} + +impl DeleteKeychainEntryRequestV1 { + pub fn new(key: String, ) -> DeleteKeychainEntryRequestV1 { + DeleteKeychainEntryRequestV1 { + key: key, + } + } +} + +/// Converts the DeleteKeychainEntryRequestV1 value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for DeleteKeychainEntryRequestV1 { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a DeleteKeychainEntryRequestV1 value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for DeleteKeychainEntryRequestV1 { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing DeleteKeychainEntryRequestV1".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing DeleteKeychainEntryRequestV1".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(DeleteKeychainEntryRequestV1 { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in DeleteKeychainEntryRequestV1".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for DeleteKeychainEntryRequestV1 - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into DeleteKeychainEntryRequestV1 - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct DeleteKeychainEntryResponseV1 { + /// The key of the entry that was deleted from the keychain. + #[serde(rename = "key")] + pub key: String, + +} + +impl DeleteKeychainEntryResponseV1 { + pub fn new(key: String, ) -> DeleteKeychainEntryResponseV1 { + DeleteKeychainEntryResponseV1 { + key: key, + } + } +} + +/// Converts the DeleteKeychainEntryResponseV1 value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for DeleteKeychainEntryResponseV1 { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a DeleteKeychainEntryResponseV1 value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for DeleteKeychainEntryResponseV1 { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing DeleteKeychainEntryResponseV1".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing DeleteKeychainEntryResponseV1".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(DeleteKeychainEntryResponseV1 { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in DeleteKeychainEntryResponseV1".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for DeleteKeychainEntryResponseV1 - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into DeleteKeychainEntryResponseV1 - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct GetKeychainEntryRequest { + /// The key for the entry to get from the keychain. + #[serde(rename = "key")] + pub key: String, + +} + +impl GetKeychainEntryRequest { + pub fn new(key: String, ) -> GetKeychainEntryRequest { + GetKeychainEntryRequest { + key: key, + } + } +} + +/// Converts the GetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for GetKeychainEntryRequest { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryRequest value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for GetKeychainEntryRequest { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryRequest".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryRequest".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(GetKeychainEntryRequest { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryRequest".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for GetKeychainEntryRequest - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into GetKeychainEntryRequest - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct GetKeychainEntryResponse { + /// The key that was used to retrieve the value from the keychain. + #[serde(rename = "key")] + pub key: String, + + /// The value associated with the requested key on the keychain. + #[serde(rename = "value")] + pub value: String, + +} + +impl GetKeychainEntryResponse { + pub fn new(key: String, value: String, ) -> GetKeychainEntryResponse { + GetKeychainEntryResponse { + key: key, + value: value, + } + } +} + +/// Converts the GetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for GetKeychainEntryResponse { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + + params.push("value".to_string()); + params.push(self.value.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryResponse value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for GetKeychainEntryResponse { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + pub value: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryResponse".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + "value" => intermediate_rep.value.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryResponse".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(GetKeychainEntryResponse { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryResponse".to_string())?, + value: intermediate_rep.value.into_iter().next().ok_or("value missing in GetKeychainEntryResponse".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for GetKeychainEntryResponse - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into GetKeychainEntryResponse - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct HasKeychainEntryRequestV1 { + /// The key to check for presence in the keychain. + #[serde(rename = "key")] + pub key: String, + +} + +impl HasKeychainEntryRequestV1 { + pub fn new(key: String, ) -> HasKeychainEntryRequestV1 { + HasKeychainEntryRequestV1 { + key: key, + } + } +} + +/// Converts the HasKeychainEntryRequestV1 value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for HasKeychainEntryRequestV1 { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a HasKeychainEntryRequestV1 value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for HasKeychainEntryRequestV1 { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing HasKeychainEntryRequestV1".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing HasKeychainEntryRequestV1".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(HasKeychainEntryRequestV1 { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in HasKeychainEntryRequestV1".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for HasKeychainEntryRequestV1 - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into HasKeychainEntryRequestV1 - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct HasKeychainEntryResponseV1 { + /// The key that was used to check the presence of the value in the keychain. + #[serde(rename = "key")] + pub key: String, + + /// Date and time encoded as JSON when the presence check was performed by the plugin backend. + #[serde(rename = "checkedAt")] + pub checked_at: String, + + /// The boolean true or false indicating the presence or absence of an entry under 'key'. + #[serde(rename = "isPresent")] + pub is_present: bool, + +} + +impl HasKeychainEntryResponseV1 { + pub fn new(key: String, checked_at: String, is_present: bool, ) -> HasKeychainEntryResponseV1 { + HasKeychainEntryResponseV1 { + key: key, + checked_at: checked_at, + is_present: is_present, + } + } +} + +/// Converts the HasKeychainEntryResponseV1 value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for HasKeychainEntryResponseV1 { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + + params.push("checkedAt".to_string()); + params.push(self.checked_at.to_string()); + + + params.push("isPresent".to_string()); + params.push(self.is_present.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a HasKeychainEntryResponseV1 value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for HasKeychainEntryResponseV1 { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + pub checked_at: Vec, + pub is_present: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing HasKeychainEntryResponseV1".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + "checkedAt" => intermediate_rep.checked_at.push(::from_str(val).map_err(|x| format!("{}", x))?), + "isPresent" => intermediate_rep.is_present.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing HasKeychainEntryResponseV1".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(HasKeychainEntryResponseV1 { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in HasKeychainEntryResponseV1".to_string())?, + checked_at: intermediate_rep.checked_at.into_iter().next().ok_or("checkedAt missing in HasKeychainEntryResponseV1".to_string())?, + is_present: intermediate_rep.is_present.into_iter().next().ok_or("isPresent missing in HasKeychainEntryResponseV1".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for HasKeychainEntryResponseV1 - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into HasKeychainEntryResponseV1 - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct PrometheusExporterMetricsResponse(String); + +impl std::convert::From for PrometheusExporterMetricsResponse { + fn from(x: String) -> Self { + PrometheusExporterMetricsResponse(x) + } +} + +impl std::string::ToString for PrometheusExporterMetricsResponse { + fn to_string(&self) -> String { + self.0.to_string() + } +} + +impl std::str::FromStr for PrometheusExporterMetricsResponse { + type Err = std::string::ParseError; + fn from_str(x: &str) -> std::result::Result { + std::result::Result::Ok(PrometheusExporterMetricsResponse(x.to_string())) + } +} + +impl std::convert::From for String { + fn from(x: PrometheusExporterMetricsResponse) -> Self { + x.0 + } +} + +impl std::ops::Deref for PrometheusExporterMetricsResponse { + type Target = String; + fn deref(&self) -> &String { + &self.0 + } +} + +impl std::ops::DerefMut for PrometheusExporterMetricsResponse { + fn deref_mut(&mut self) -> &mut String { + &mut self.0 + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct SetKeychainEntryRequest { + /// The key for the entry to set on the keychain. + #[serde(rename = "key")] + pub key: String, + + /// The value that will be associated with the key on the keychain. + #[serde(rename = "value")] + pub value: String, + +} + +impl SetKeychainEntryRequest { + pub fn new(key: String, value: String, ) -> SetKeychainEntryRequest { + SetKeychainEntryRequest { + key: key, + value: value, + } + } +} + +/// Converts the SetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for SetKeychainEntryRequest { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + + params.push("value".to_string()); + params.push(self.value.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryRequest value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for SetKeychainEntryRequest { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + pub value: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryRequest".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + "value" => intermediate_rep.value.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryRequest".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(SetKeychainEntryRequest { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryRequest".to_string())?, + value: intermediate_rep.value.into_iter().next().ok_or("value missing in SetKeychainEntryRequest".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for SetKeychainEntryRequest - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into SetKeychainEntryRequest - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + + +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] +pub struct SetKeychainEntryResponse { + /// The key that was used to set the value on the keychain. + #[serde(rename = "key")] + pub key: String, + +} + +impl SetKeychainEntryResponse { + pub fn new(key: String, ) -> SetKeychainEntryResponse { + SetKeychainEntryResponse { + key: key, + } + } +} + +/// Converts the SetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::string::ToString for SetKeychainEntryResponse { + fn to_string(&self) -> String { + let mut params: Vec = vec![]; + + params.push("key".to_string()); + params.push(self.key.to_string()); + + params.join(",").to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryResponse value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for SetKeychainEntryResponse { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + #[derive(Default)] + // An intermediate representation of the struct to use for parsing. + struct IntermediateRep { + pub key: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(',').into_iter(); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryResponse".to_string()) + }; + + if let Some(key) = key_result { + match key { + "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), + _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryResponse".to_string()) + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(SetKeychainEntryResponse { + key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryResponse".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom> for hyper::header::HeaderValue { + type Error = String; + + fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match hyper::header::HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err( + format!("Invalid header value for SetKeychainEntryResponse - value: {} is invalid {}", + hdr_value, e)) + } + } +} + +#[cfg(any(feature = "client", feature = "server"))] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), + std::result::Result::Err(err) => std::result::Result::Err( + format!("Unable to convert header value '{}' into SetKeychainEntryResponse - {}", + value, err)) + } + }, + std::result::Result::Err(e) => std::result::Result::Err( + format!("Unable to convert header: {:?} to string: {}", + hdr_value, e)) + } + } +} + diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs new file mode 100644 index 00000000000..f8a7b0c1022 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs @@ -0,0 +1,549 @@ +use futures::{future, future::BoxFuture, Stream, stream, future::FutureExt, stream::TryStreamExt}; +use hyper::{Request, Response, StatusCode, Body, HeaderMap}; +use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; +use log::warn; +#[allow(unused_imports)] +use std::convert::{TryFrom, TryInto}; +use std::error::Error; +use std::future::Future; +use std::marker::PhantomData; +use std::task::{Context, Poll}; +use swagger::{ApiError, BodyExt, Has, RequestParser, XSpanIdString}; +pub use swagger::auth::Authorization; +use swagger::auth::Scopes; +use url::form_urlencoded; + +#[allow(unused_imports)] +use crate::models; +use crate::header; + +pub use crate::context; + +type ServiceFuture = BoxFuture<'static, Result, crate::ServiceError>>; + +use crate::{Api, + DeleteKeychainEntryV1Response, + GetKeychainEntryV1Response, + GetPrometheusMetricsV1Response, + HasKeychainEntryV1Response, + SetKeychainEntryV1Response +}; + +mod paths { + use lazy_static::lazy_static; + + lazy_static! { + pub static ref GLOBAL_REGEX_SET: regex::RegexSet = regex::RegexSet::new(vec![ + r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry$", + r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry$", + r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics$", + r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry$", + r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry$" + ]) + .expect("Unable to create global regex set"); + } + pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY: usize = 0; + pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY: usize = 1; + pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS: usize = 2; + pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY: usize = 3; + pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY: usize = 4; +} + +pub struct MakeService where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + api_impl: T, + marker: PhantomData, +} + +impl MakeService where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + pub fn new(api_impl: T) -> Self { + MakeService { + api_impl, + marker: PhantomData + } + } +} + +impl hyper::service::Service for MakeService where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + type Response = Service; + type Error = crate::ServiceError; + type Future = future::Ready>; + + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + Poll::Ready(Ok(())) + } + + fn call(&mut self, target: Target) -> Self::Future { + futures::future::ok(Service::new( + self.api_impl.clone(), + )) + } +} + +fn method_not_allowed() -> Result, crate::ServiceError> { + Ok( + Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) + .body(Body::empty()) + .expect("Unable to create Method Not Allowed response") + ) +} + +pub struct Service where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + api_impl: T, + marker: PhantomData, +} + +impl Service where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + pub fn new(api_impl: T) -> Self { + Service { + api_impl: api_impl, + marker: PhantomData + } + } +} + +impl Clone for Service where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static +{ + fn clone(&self) -> Self { + Service { + api_impl: self.api_impl.clone(), + marker: self.marker.clone(), + } + } +} + +impl hyper::service::Service<(Request, C)> for Service where + T: Api + Clone + Send + Sync + 'static, + C: Has + Send + Sync + 'static +{ + type Response = Response; + type Error = crate::ServiceError; + type Future = ServiceFuture; + + fn poll_ready(&mut self, cx: &mut Context) -> Poll> { + self.api_impl.poll_ready(cx) + } + + fn call(&mut self, req: (Request, C)) -> Self::Future { async fn run(mut api_impl: T, req: (Request, C)) -> Result, crate::ServiceError> where + T: Api + Clone + Send + 'static, + C: Has + Send + Sync + 'static + { + let (request, context) = req; + let (parts, body) = request.into_parts(); + let (method, uri, headers) = (parts.method, parts.uri, parts.headers); + let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); + + match &method { + + // DeleteKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => { + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + let result = body.to_raw().await; + match result { + Ok(body) => { + let mut unused_elements = Vec::new(); + let param_delete_keychain_entry_request_v1: Option = if !body.is_empty() { + let deserializer = &mut serde_json::Deserializer::from_slice(&*body); + match serde_ignored::deserialize(deserializer, |path| { + warn!("Ignoring unknown field in body: {}", path); + unused_elements.push(path.to_string()); + }) { + Ok(param_delete_keychain_entry_request_v1) => param_delete_keychain_entry_request_v1, + Err(_) => None, + } + } else { + None + }; + + let result = api_impl.delete_keychain_entry_v1( + param_delete_keychain_entry_request_v1, + &context + ).await; + let mut response = Response::new(Body::empty()); + response.headers_mut().insert( + HeaderName::from_static("x-span-id"), + HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) + .expect("Unable to create X-Span-ID header value")); + + if !unused_elements.is_empty() { + response.headers_mut().insert( + HeaderName::from_static("warning"), + HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) + .expect("Unable to create Warning header value")); + } + + match result { + Ok(rsp) => match rsp { + DeleteKeychainEntryV1Response::OK + (body) + => { + *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_str("application/json") + .expect("Unable to create Content-Type header for DELETE_KEYCHAIN_ENTRY_V1_OK")); + let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); + *response.body_mut() = Body::from(body); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + *response.body_mut() = Body::from("An internal error occurred"); + }, + } + + Ok(response) + }, + Err(e) => Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't read body parameter DeleteKeychainEntryRequestV1: {}", e))) + .expect("Unable to create Bad Request response due to unable to read body parameter DeleteKeychainEntryRequestV1")), + } + }, + + // GetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => { + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + let result = body.to_raw().await; + match result { + Ok(body) => { + let mut unused_elements = Vec::new(); + let param_get_keychain_entry_request: Option = if !body.is_empty() { + let deserializer = &mut serde_json::Deserializer::from_slice(&*body); + match serde_ignored::deserialize(deserializer, |path| { + warn!("Ignoring unknown field in body: {}", path); + unused_elements.push(path.to_string()); + }) { + Ok(param_get_keychain_entry_request) => param_get_keychain_entry_request, + Err(e) => return Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't parse body parameter GetKeychainEntryRequest - doesn't match schema: {}", e))) + .expect("Unable to create Bad Request response for invalid body parameter GetKeychainEntryRequest due to schema")), + } + } else { + None + }; + let param_get_keychain_entry_request = match param_get_keychain_entry_request { + Some(param_get_keychain_entry_request) => param_get_keychain_entry_request, + None => return Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from("Missing required body parameter GetKeychainEntryRequest")) + .expect("Unable to create Bad Request response for missing body parameter GetKeychainEntryRequest")), + }; + + let result = api_impl.get_keychain_entry_v1( + param_get_keychain_entry_request, + &context + ).await; + let mut response = Response::new(Body::empty()); + response.headers_mut().insert( + HeaderName::from_static("x-span-id"), + HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) + .expect("Unable to create X-Span-ID header value")); + + if !unused_elements.is_empty() { + response.headers_mut().insert( + HeaderName::from_static("warning"), + HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) + .expect("Unable to create Warning header value")); + } + + match result { + Ok(rsp) => match rsp { + GetKeychainEntryV1Response::OK + (body) + => { + *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_str("application/json") + .expect("Unable to create Content-Type header for GET_KEYCHAIN_ENTRY_V1_OK")); + let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); + *response.body_mut() = Body::from(body); + }, + GetKeychainEntryV1Response::BadRequest + => { + *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); + }, + GetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid + => { + *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); + }, + GetKeychainEntryV1Response::AKeychainItemWithTheSpecifiedKeyWasNotFound + => { + *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); + }, + GetKeychainEntryV1Response::UnexpectedError + => { + *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + *response.body_mut() = Body::from("An internal error occurred"); + }, + } + + Ok(response) + }, + Err(e) => Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't read body parameter GetKeychainEntryRequest: {}", e))) + .expect("Unable to create Bad Request response due to unable to read body parameter GetKeychainEntryRequest")), + } + }, + + // GetPrometheusMetricsV1 - GET /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics + &hyper::Method::GET if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => { + let result = api_impl.get_prometheus_metrics_v1( + &context + ).await; + let mut response = Response::new(Body::empty()); + response.headers_mut().insert( + HeaderName::from_static("x-span-id"), + HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) + .expect("Unable to create X-Span-ID header value")); + + match result { + Ok(rsp) => match rsp { + GetPrometheusMetricsV1Response::OK + (body) + => { + *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_str("text/plain") + .expect("Unable to create Content-Type header for GET_PROMETHEUS_METRICS_V1_OK")); + let body = body; + *response.body_mut() = Body::from(body); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + *response.body_mut() = Body::from("An internal error occurred"); + }, + } + + Ok(response) + }, + + // HasKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => { + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + let result = body.to_raw().await; + match result { + Ok(body) => { + let mut unused_elements = Vec::new(); + let param_has_keychain_entry_request_v1: Option = if !body.is_empty() { + let deserializer = &mut serde_json::Deserializer::from_slice(&*body); + match serde_ignored::deserialize(deserializer, |path| { + warn!("Ignoring unknown field in body: {}", path); + unused_elements.push(path.to_string()); + }) { + Ok(param_has_keychain_entry_request_v1) => param_has_keychain_entry_request_v1, + Err(_) => None, + } + } else { + None + }; + + let result = api_impl.has_keychain_entry_v1( + param_has_keychain_entry_request_v1, + &context + ).await; + let mut response = Response::new(Body::empty()); + response.headers_mut().insert( + HeaderName::from_static("x-span-id"), + HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) + .expect("Unable to create X-Span-ID header value")); + + if !unused_elements.is_empty() { + response.headers_mut().insert( + HeaderName::from_static("warning"), + HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) + .expect("Unable to create Warning header value")); + } + + match result { + Ok(rsp) => match rsp { + HasKeychainEntryV1Response::OK + (body) + => { + *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_str("application/json") + .expect("Unable to create Content-Type header for HAS_KEYCHAIN_ENTRY_V1_OK")); + let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); + *response.body_mut() = Body::from(body); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + *response.body_mut() = Body::from("An internal error occurred"); + }, + } + + Ok(response) + }, + Err(e) => Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't read body parameter HasKeychainEntryRequestV1: {}", e))) + .expect("Unable to create Bad Request response due to unable to read body parameter HasKeychainEntryRequestV1")), + } + }, + + // SetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => { + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + let result = body.to_raw().await; + match result { + Ok(body) => { + let mut unused_elements = Vec::new(); + let param_set_keychain_entry_request: Option = if !body.is_empty() { + let deserializer = &mut serde_json::Deserializer::from_slice(&*body); + match serde_ignored::deserialize(deserializer, |path| { + warn!("Ignoring unknown field in body: {}", path); + unused_elements.push(path.to_string()); + }) { + Ok(param_set_keychain_entry_request) => param_set_keychain_entry_request, + Err(e) => return Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't parse body parameter SetKeychainEntryRequest - doesn't match schema: {}", e))) + .expect("Unable to create Bad Request response for invalid body parameter SetKeychainEntryRequest due to schema")), + } + } else { + None + }; + let param_set_keychain_entry_request = match param_set_keychain_entry_request { + Some(param_set_keychain_entry_request) => param_set_keychain_entry_request, + None => return Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from("Missing required body parameter SetKeychainEntryRequest")) + .expect("Unable to create Bad Request response for missing body parameter SetKeychainEntryRequest")), + }; + + let result = api_impl.set_keychain_entry_v1( + param_set_keychain_entry_request, + &context + ).await; + let mut response = Response::new(Body::empty()); + response.headers_mut().insert( + HeaderName::from_static("x-span-id"), + HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) + .expect("Unable to create X-Span-ID header value")); + + if !unused_elements.is_empty() { + response.headers_mut().insert( + HeaderName::from_static("warning"), + HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) + .expect("Unable to create Warning header value")); + } + + match result { + Ok(rsp) => match rsp { + SetKeychainEntryV1Response::OK + (body) + => { + *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_str("application/json") + .expect("Unable to create Content-Type header for SET_KEYCHAIN_ENTRY_V1_OK")); + let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); + *response.body_mut() = Body::from(body); + }, + SetKeychainEntryV1Response::BadRequest + => { + *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); + }, + SetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid + => { + *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); + }, + SetKeychainEntryV1Response::UnexpectedError + => { + *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + *response.body_mut() = Body::from("An internal error occurred"); + }, + } + + Ok(response) + }, + Err(e) => Ok(Response::builder() + .status(StatusCode::BAD_REQUEST) + .body(Body::from(format!("Couldn't read body parameter SetKeychainEntryRequest: {}", e))) + .expect("Unable to create Bad Request response due to unable to read body parameter SetKeychainEntryRequest")), + } + }, + + _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => method_not_allowed(), + _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => method_not_allowed(), + _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => method_not_allowed(), + _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => method_not_allowed(), + _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => method_not_allowed(), + _ => Ok(Response::builder().status(StatusCode::NOT_FOUND) + .body(Body::empty()) + .expect("Unable to create Not Found response")) + } + } Box::pin(run(self.api_impl.clone(), req)) } +} + +/// Request parser for `Api`. +pub struct ApiRequestParser; +impl RequestParser for ApiRequestParser { + fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); + match request.method() { + // DeleteKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => Ok("DeleteKeychainEntryV1"), + // GetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => Ok("GetKeychainEntryV1"), + // GetPrometheusMetricsV1 - GET /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics + &hyper::Method::GET if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => Ok("GetPrometheusMetricsV1"), + // HasKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => Ok("HasKeychainEntryV1"), + // SetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry + &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => Ok("SetKeychainEntryV1"), + _ => Err(()), + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore new file mode 100644 index 00000000000..ad66c7e1784 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore @@ -0,0 +1,27 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +.npmignore +.gitignore +git_push.sh diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES new file mode 100644 index 00000000000..53250c02696 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES @@ -0,0 +1,5 @@ +api.ts +base.ts +common.ts +configuration.ts +index.ts diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION new file mode 100644 index 00000000000..7cbea073bea --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts new file mode 100644 index 00000000000..0296a9385d1 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -0,0 +1,466 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hyperledger Cactus Plugin - Keychain Memory WASM + * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. + * + * The version of the OpenAPI document: 1.0.0-rc.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface DeleteKeychainEntryRequestV1 + */ +export interface DeleteKeychainEntryRequestV1 { + /** + * The key for the entry to check the presence of on the keychain. + * @type {string} + * @memberof DeleteKeychainEntryRequestV1 + */ + key: string; +} +/** + * + * @export + * @interface DeleteKeychainEntryResponseV1 + */ +export interface DeleteKeychainEntryResponseV1 { + /** + * The key that was deleted from the keychain. + * @type {string} + * @memberof DeleteKeychainEntryResponseV1 + */ + key: string; +} +/** + * + * @export + * @interface GetKeychainEntryRequestV1 + */ +export interface GetKeychainEntryRequestV1 { + /** + * The key for the entry to get from the keychain. + * @type {string} + * @memberof GetKeychainEntryRequestV1 + */ + key: string; +} +/** + * + * @export + * @interface GetKeychainEntryResponseV1 + */ +export interface GetKeychainEntryResponseV1 { + /** + * The key that was used to retrieve the value from the keychain. + * @type {string} + * @memberof GetKeychainEntryResponseV1 + */ + key: string; + /** + * The value associated with the requested key on the keychain. + * @type {string} + * @memberof GetKeychainEntryResponseV1 + */ + value: string; +} +/** + * + * @export + * @interface HasKeychainEntryRequestV1 + */ +export interface HasKeychainEntryRequestV1 { + /** + * The key to check for presence in the keychain. + * @type {string} + * @memberof HasKeychainEntryRequestV1 + */ + key: string; +} +/** + * + * @export + * @interface HasKeychainEntryResponseV1 + */ +export interface HasKeychainEntryResponseV1 { + /** + * The key that was used to check the presence of the value in the entry store. + * @type {string} + * @memberof HasKeychainEntryResponseV1 + */ + key: string; + /** + * Date and time encoded as JSON when the presence check was performed by the plugin backend. + * @type {string} + * @memberof HasKeychainEntryResponseV1 + */ + checkedAt: string; + /** + * The boolean true or false indicating the presence or absence of an entry under \'key\'. + * @type {boolean} + * @memberof HasKeychainEntryResponseV1 + */ + isPresent: boolean; +} +/** + * + * @export + * @interface SetKeychainEntryRequestV1 + */ +export interface SetKeychainEntryRequestV1 { + /** + * The key for the entry to set on the keychain. + * @type {string} + * @memberof SetKeychainEntryRequestV1 + */ + key: string; + /** + * The value that will be associated with the key on the keychain. + * @type {string} + * @memberof SetKeychainEntryRequestV1 + */ + value: string; +} +/** + * + * @export + * @interface SetKeychainEntryResponseV1 + */ +export interface SetKeychainEntryResponseV1 { + /** + * The key that was used to set the value on the keychain. + * @type {string} + * @memberof SetKeychainEntryResponseV1 + */ + key: string; +} + +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Deletes an entry under a key on the keychain backend. + * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: any = {}): Promise => { + // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined + assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieves the contents of a keychain entry from the backend. + * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: any = {}): Promise => { + // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined + assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Checks that an entry exists under a key on the keychain backend + * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: any = {}): Promise => { + // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined + assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Sets a value under a key on the keychain backend. + * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: any = {}): Promise => { + // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined + assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Deletes an entry under a key on the keychain backend. + * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Retrieves the contents of a keychain entry from the backend. + * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Checks that an entry exists under a key on the keychain backend + * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Sets a value under a key on the keychain backend. + * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @summary Deletes an entry under a key on the keychain backend. + * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { + return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves the contents of a keychain entry from the backend. + * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { + return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Checks that an entry exists under a key on the keychain backend + * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { + return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Sets a value under a key on the keychain backend. + * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { + return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * + * @summary Deletes an entry under a key on the keychain backend. + * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any) { + return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves the contents of a keychain entry from the backend. + * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any) { + return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Checks that an entry exists under a key on the keychain backend + * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any) { + return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Sets a value under a key on the keychain backend. + * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any) { + return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts new file mode 100644 index 00000000000..9557610514c --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hyperledger Cactus Plugin - Keychain Memory WASM + * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. + * + * The version of the OpenAPI document: 1.0.0-rc.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts new file mode 100644 index 00000000000..7c46a869028 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hyperledger Cactus Plugin - Keychain Memory WASM + * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. + * + * The version of the OpenAPI document: 1.0.0-rc.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + if (Array.isArray(object[key])) { + searchParams.delete(key); + for (const item of object[key]) { + searchParams.append(key, item); + } + } else { + searchParams.set(key, object[key]); + } + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts new file mode 100644 index 00000000000..2f099177235 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hyperledger Cactus Plugin - Keychain Memory WASM + * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. + * + * The version of the OpenAPI document: 1.0.0-rc.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts new file mode 100644 index 00000000000..1865264eca2 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hyperledger Cactus Plugin - Keychain Memory WASM + * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. + * + * The version of the OpenAPI document: 1.0.0-rc.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts new file mode 100644 index 00000000000..cec698a76a8 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** +* @returns {Promise} +*/ +export function createPluginFactory(): Promise; +/** +*/ +export class PluginFactoryKeychain { + free(): void; +/** +*/ + constructor(); +/** +* @param {any} options_raw +* @returns {PluginKeychainMemoryWasm} +*/ + create(options_raw: any): PluginKeychainMemoryWasm; +} +/** +*/ +export class PluginKeychainMemoryWasm { + free(): void; +/** +* @param {PluginKeychainMemoryWasmOptions} options +*/ + constructor(options: PluginKeychainMemoryWasmOptions); +/** +* @returns {string} +*/ + getPackageName(): string; +/** +* @returns {string} +*/ + getKeychainId(): string; +/** +* @returns {string} +*/ + getInstanceId(): string; +/** +* @returns {Promise} +*/ + onPluginInit(): Promise; +/** +* @param {string} key +* @returns {Promise} +*/ + get(key: string): Promise; +/** +* @param {string} key +* @param {string} value +* @returns {Promise} +*/ + set(key: string, value: string): Promise; +/** +* @param {string} key +* @returns {Promise} +*/ + has(key: string): Promise; +/** +* @param {string} key +* @returns {Promise} +*/ + delete(key: string): Promise; +} +/** +*/ +export class PluginKeychainMemoryWasmOptions { + free(): void; +/** +*/ + instanceId: string; +/** +*/ + keychainId: string; +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js new file mode 100644 index 00000000000..7f70182589a --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js @@ -0,0 +1,512 @@ +let imports = {}; +imports['__wbindgen_placeholder__'] = module.exports; +let wasm; +const { TextDecoder, TextEncoder } = require(`util`); + +let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + +cachedTextDecoder.decode(); + +let cachegetUint8Memory0 = null; +function getUint8Memory0() { + if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { + cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachegetUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + +const heap = new Array(32).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { return heap[idx]; } + +function dropObject(idx) { + if (idx < 36) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +let WASM_VECTOR_LEN = 0; + +let cachedTextEncoder = new TextEncoder('utf-8'); + +const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); +} + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; +}); + +function passStringToWasm0(arg, malloc, realloc) { + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length); + getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len); + + const mem = getUint8Memory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3); + const view = getUint8Memory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachegetInt32Memory0 = null; +function getInt32Memory0() { + if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { + cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachegetInt32Memory0; +} + +function makeMutClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + const a = state.a; + state.a = 0; + try { + return f(a, state.b, ...args); + } finally { + if (--state.cnt === 0) { + wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); + + } else { + state.a = a; + } + } + }; + real.original = state; + + return real; +} +function __wbg_adapter_12(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3fc6a2433749b2e5(arg0, arg1, addHeapObject(arg2)); +} + +function _assertClass(instance, klass) { + if (!(instance instanceof klass)) { + throw new Error(`expected instance of ${klass.name}`); + } + return instance.ptr; +} + +let stack_pointer = 32; + +function addBorrowedObject(obj) { + if (stack_pointer == 1) throw new Error('out of js stack'); + heap[--stack_pointer] = obj; + return stack_pointer; +} +/** +* @returns {Promise} +*/ +module.exports.createPluginFactory = function() { + var ret = wasm.createPluginFactory(); + return takeObject(ret); +}; + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_exn_store(addHeapObject(e)); + } +} +function __wbg_adapter_33(arg0, arg1, arg2, arg3) { + wasm.wasm_bindgen__convert__closures__invoke2_mut__h86e348db1f6fdb62(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); +} + +/** +*/ +class PluginFactoryKeychain { + + static __wrap(ptr) { + const obj = Object.create(PluginFactoryKeychain.prototype); + obj.ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.ptr; + this.ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_pluginfactorykeychain_free(ptr); + } + /** + */ + constructor() { + var ret = wasm.pluginfactorykeychain_new(); + return PluginFactoryKeychain.__wrap(ret); + } + /** + * @param {any} options_raw + * @returns {PluginKeychainMemoryWasm} + */ + create(options_raw) { + try { + var ret = wasm.pluginfactorykeychain_create(this.ptr, addBorrowedObject(options_raw)); + return PluginKeychainMemoryWasm.__wrap(ret); + } finally { + heap[stack_pointer++] = undefined; + } + } +} +module.exports.PluginFactoryKeychain = PluginFactoryKeychain; +/** +*/ +class PluginKeychainMemoryWasm { + + static __wrap(ptr) { + const obj = Object.create(PluginKeychainMemoryWasm.prototype); + obj.ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.ptr; + this.ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_pluginkeychainmemorywasm_free(ptr); + } + /** + * @param {PluginKeychainMemoryWasmOptions} options + */ + constructor(options) { + _assertClass(options, PluginKeychainMemoryWasmOptions); + var ptr0 = options.ptr; + options.ptr = 0; + var ret = wasm.pluginkeychainmemorywasm_new(ptr0); + return PluginKeychainMemoryWasm.__wrap(ret); + } + /** + * @returns {string} + */ + getPackageName() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.pluginkeychainmemorywasm_getPackageName(retptr, this.ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(r0, r1); + } + } + /** + * @returns {string} + */ + getKeychainId() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.pluginkeychainmemorywasm_getKeychainId(retptr, this.ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(r0, r1); + } + } + /** + * @returns {string} + */ + getInstanceId() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.pluginkeychainmemorywasm_getInstanceId(retptr, this.ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(r0, r1); + } + } + /** + * @returns {Promise} + */ + onPluginInit() { + var ret = wasm.pluginkeychainmemorywasm_onPluginInit(this.ptr); + return takeObject(ret); + } + /** + * @param {string} key + * @returns {Promise} + */ + get(key) { + var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ret = wasm.pluginkeychainmemorywasm_get(this.ptr, ptr0, len0); + return takeObject(ret); + } + /** + * @param {string} key + * @param {string} value + * @returns {Promise} + */ + set(key, value) { + var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + var ret = wasm.pluginkeychainmemorywasm_set(this.ptr, ptr0, len0, ptr1, len1); + return takeObject(ret); + } + /** + * @param {string} key + * @returns {Promise} + */ + has(key) { + var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ret = wasm.pluginkeychainmemorywasm_has(this.ptr, ptr0, len0); + return takeObject(ret); + } + /** + * @param {string} key + * @returns {Promise} + */ + delete(key) { + var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ret = wasm.pluginkeychainmemorywasm_delete(this.ptr, ptr0, len0); + return takeObject(ret); + } +} +module.exports.PluginKeychainMemoryWasm = PluginKeychainMemoryWasm; +/** +*/ +class PluginKeychainMemoryWasmOptions { + + __destroy_into_raw() { + const ptr = this.ptr; + this.ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_pluginkeychainmemorywasmoptions_free(ptr); + } + /** + */ + get instanceId() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.__wbg_get_pluginkeychainmemorywasmoptions_instanceId(retptr, this.ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(r0, r1); + } + } + /** + * @param {string} arg0 + */ + set instanceId(arg0) { + var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + wasm.__wbg_set_pluginkeychainmemorywasmoptions_instanceId(this.ptr, ptr0, len0); + } + /** + */ + get keychainId() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.__wbg_get_pluginkeychainmemorywasmoptions_keychainId(retptr, this.ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(r0, r1); + } + } + /** + * @param {string} arg0 + */ + set keychainId(arg0) { + var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + wasm.__wbg_set_pluginkeychainmemorywasmoptions_keychainId(this.ptr, ptr0, len0); + } +} +module.exports.PluginKeychainMemoryWasmOptions = PluginKeychainMemoryWasmOptions; + +module.exports.__wbindgen_string_new = function(arg0, arg1) { + var ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +}; + +module.exports.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); +}; + +module.exports.__wbg_pluginfactorykeychain_new = function(arg0) { + var ret = PluginFactoryKeychain.__wrap(arg0); + return addHeapObject(ret); +}; + +module.exports.__wbindgen_json_serialize = function(arg0, arg1) { + const obj = getObject(arg1); + var ret = JSON.stringify(obj === undefined ? null : obj); + var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len0; + getInt32Memory0()[arg0 / 4 + 0] = ptr0; +}; + +module.exports.__wbindgen_cb_drop = function(arg0) { + const obj = takeObject(arg0).original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + var ret = false; + return ret; +}; + +module.exports.__wbg_call_346669c262382ad7 = function() { return handleError(function (arg0, arg1, arg2) { + var ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; + +module.exports.__wbg_new_b1d61b5687f5e73a = function(arg0, arg1) { + try { + var state0 = {a: arg0, b: arg1}; + var cb0 = (arg0, arg1) => { + const a = state0.a; + state0.a = 0; + try { + return __wbg_adapter_33(a, state0.b, arg0, arg1); + } finally { + state0.a = a; + } + }; + var ret = new Promise(cb0); + return addHeapObject(ret); + } finally { + state0.a = state0.b = 0; + } +}; + +module.exports.__wbg_resolve_d23068002f584f22 = function(arg0) { + var ret = Promise.resolve(getObject(arg0)); + return addHeapObject(ret); +}; + +module.exports.__wbg_then_2fcac196782070cc = function(arg0, arg1) { + var ret = getObject(arg0).then(getObject(arg1)); + return addHeapObject(ret); +}; + +module.exports.__wbg_new_693216e109162396 = function() { + var ret = new Error(); + return addHeapObject(ret); +}; + +module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) { + var ret = getObject(arg1).stack; + var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len0; + getInt32Memory0()[arg0 / 4 + 0] = ptr0; +}; + +module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) { + try { + console.error(getStringFromWasm0(arg0, arg1)); + } finally { + wasm.__wbindgen_free(arg0, arg1); + } +}; + +module.exports.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +}; + +module.exports.__wbindgen_closure_wrapper161 = function(arg0, arg1, arg2) { + var ret = makeMutClosure(arg0, arg1, 42, __wbg_adapter_12); + return addHeapObject(ret); +}; + +const path = require('path').join(__dirname, 'cactus_plugin_keychain_memory_wasm_bg.wasm'); +const bytes = require('fs').readFileSync(path); + +const wasmModule = new WebAssembly.Module(bytes); +const wasmInstance = new WebAssembly.Instance(wasmModule, imports); +wasm = wasmInstance.exports; +module.exports.__wasm = wasm; + diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm new file mode 100644 index 00000000000..d53b9386842 Binary files /dev/null and b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm differ diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts new file mode 100644 index 00000000000..23bbe537931 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +export const memory: WebAssembly.Memory; +export function __wbg_pluginkeychainmemorywasmoptions_free(a: number): void; +export function __wbg_get_pluginkeychainmemorywasmoptions_instanceId(a: number, b: number): void; +export function __wbg_set_pluginkeychainmemorywasmoptions_instanceId(a: number, b: number, c: number): void; +export function __wbg_get_pluginkeychainmemorywasmoptions_keychainId(a: number, b: number): void; +export function __wbg_set_pluginkeychainmemorywasmoptions_keychainId(a: number, b: number, c: number): void; +export function __wbg_pluginkeychainmemorywasm_free(a: number): void; +export function pluginkeychainmemorywasm_new(a: number): number; +export function pluginkeychainmemorywasm_getPackageName(a: number, b: number): void; +export function pluginkeychainmemorywasm_getKeychainId(a: number, b: number): void; +export function pluginkeychainmemorywasm_getInstanceId(a: number, b: number): void; +export function pluginkeychainmemorywasm_onPluginInit(a: number): number; +export function pluginkeychainmemorywasm_get(a: number, b: number, c: number): number; +export function pluginkeychainmemorywasm_set(a: number, b: number, c: number, d: number, e: number): number; +export function pluginkeychainmemorywasm_has(a: number, b: number, c: number): number; +export function pluginkeychainmemorywasm_delete(a: number, b: number, c: number): number; +export function __wbg_pluginfactorykeychain_free(a: number): void; +export function pluginfactorykeychain_new(): number; +export function pluginfactorykeychain_create(a: number, b: number): number; +export function createPluginFactory(): number; +export function __wbindgen_malloc(a: number): number; +export function __wbindgen_realloc(a: number, b: number, c: number): number; +export const __wbindgen_export_2: WebAssembly.Table; +export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3fc6a2433749b2e5(a: number, b: number, c: number): void; +export function __wbindgen_add_to_stack_pointer(a: number): number; +export function __wbindgen_free(a: number, b: number): void; +export function __wbindgen_exn_store(a: number): void; +export function wasm_bindgen__convert__closures__invoke2_mut__h86e348db1f6fdb62(a: number, b: number, c: number, d: number): void; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts new file mode 100755 index 00000000000..87cb558397c --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts @@ -0,0 +1 @@ +export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts new file mode 100755 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts new file mode 100644 index 00000000000..4cd9bc18646 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts @@ -0,0 +1,38 @@ +import { v4 as uuidv4 } from "uuid"; + +import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; +import { PluginFactory } from "@hyperledger/cactus-core-api"; + +import { + IPluginKeychainMemoryWasmOptions, + PluginKeychainMemoryWasm, +} from "./plugin-keychain-memory-wasm"; + +import { createPluginFactory } from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm"; + +export class PluginFactoryKeychain extends PluginFactory< + PluginKeychainMemoryWasm, + IPluginKeychainMemoryWasmOptions, + IPluginFactoryOptions +> { + async create( + pluginOptions?: IPluginKeychainMemoryWasmOptions, + ): Promise { + const instanceId = uuidv4(); + const keychainId = uuidv4(); + const logLevel = "TRACE"; + const wasmPluginFactory = await createPluginFactory(); + const wasmPlugin = await wasmPluginFactory.create({ + instanceId, + keychainId, + }); + + const options = pluginOptions || { + instanceId, + keychainId, + logLevel, + wasmPlugin, + }; + return new PluginKeychainMemoryWasm(options); + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts new file mode 100644 index 00000000000..14bde0eef2a --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts @@ -0,0 +1,141 @@ +import { Express } from "express"; + +import { Checks } from "@hyperledger/cactus-common"; +import { Logger, LogLevelDesc } from "@hyperledger/cactus-common"; +import { LoggerProvider } from "@hyperledger/cactus-common"; + +import { + ICactusPluginOptions, + IPluginKeychain, + IPluginWebService, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; + +import OAS from "../json/openapi.json"; +import { SetKeychainEntryV1Endpoint } from "./webservices/set-keychain-entry-endpoint-v1"; +import { GetKeychainEntryV1Endpoint } from "./webservices/get-keychain-entry-endpoint-v1"; +import { DeleteKeychainEntryV1Endpoint } from "./webservices/delete-keychain-entry-endpoint-v1"; +import { HasKeychainEntryV1Endpoint } from "./webservices/has-keychain-entry-endpoint-v1"; + +export interface IPluginKeychainMemoryWasmOptions extends ICactusPluginOptions { + logLevel?: LogLevelDesc; + wasmPlugin: IPluginKeychain; + keychainId: string; +} + +export class PluginKeychainMemoryWasm + implements IPluginKeychain, IPluginWebService { + public static readonly CLASS_NAME = "PluginKeychainMemoryWasm"; + + private readonly wasm: IPluginKeychain; + private readonly log: Logger; + private readonly instanceId: string; + private endpoints: IWebServiceEndpoint[] | undefined; + + public get className(): string { + return PluginKeychainMemoryWasm.CLASS_NAME; + } + + constructor(public readonly opts: IPluginKeychainMemoryWasmOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(opts, `${fnTag} arg options`); + Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); + Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); + Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); + Checks.nonBlankString(opts.instanceId, `${fnTag} options.instanceId`); + Checks.truthy(opts.wasmPlugin, `${fnTag} arg options.wasmPlugin`); + + this.wasm = opts.wasmPlugin; + + const level = this.opts.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + + this.instanceId = this.opts.instanceId; + + this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); + this.log.warn( + `Never use ${this.className} in production. ` + + `It does not support encryption. It stores everything in plain text.`, + ); + } + + public async shutdown(): Promise { + return; + } + + public getOpenApiSpec(): unknown { + return OAS; + } + + async registerWebServices(app: Express): Promise { + const webServices = await this.getOrCreateWebServices(); + await Promise.all(webServices.map((ws) => ws.registerExpress(app))); + return webServices; + } + + public async getOrCreateWebServices(): Promise { + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + const endpoints: IWebServiceEndpoint[] = [ + new SetKeychainEntryV1Endpoint({ + plugin: this, + logLevel: this.opts.logLevel, + }), + new GetKeychainEntryV1Endpoint({ + plugin: this, + logLevel: this.opts.logLevel, + }), + new DeleteKeychainEntryV1Endpoint({ + plugin: this, + logLevel: this.opts.logLevel, + }), + new HasKeychainEntryV1Endpoint({ + plugin: this, + logLevel: this.opts.logLevel, + }), + ]; + + this.endpoints = endpoints; + + return endpoints; + } + + public getInstanceId(): string { + return this.instanceId; + } + + public getKeychainId(): string { + return this.opts.keychainId; + } + + public getPackageName(): string { + return `@hyperledger/cactus-plugin-keychain-memory-wasm`; + } + + public async onPluginInit(): Promise { + return; + } + + async get(key: string): Promise { + const value = this.wasm.get(key); + if (value) { + return value; + } else { + throw new Error(`Keychain entry for "${key}" not found.`); + } + } + + async has(key: string): Promise { + return this.wasm.has(key); + } + + async set(key: string, value: string): Promise { + return this.wasm.set(key, value); + } + + async delete(key: string): Promise { + return this.wasm.delete(key); + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts new file mode 100755 index 00000000000..adb992a7399 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts @@ -0,0 +1,23 @@ +import { PluginFactoryKeychain } from "./plugin-factory-keychain"; +import * as OpenApiJson from "../json/openapi.json"; +import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; + +export { OpenApiJson }; + +export * from "./generated/openapi/typescript-axios/index"; + +export { + PluginKeychainMemoryWasm, + IPluginKeychainMemoryWasmOptions, +} from "./plugin-keychain-memory-wasm"; + +export { PluginFactoryKeychain } from "./plugin-factory-keychain"; + +export async function createPluginFactory( + pluginFactoryOptions: IPluginFactoryOptions, +): Promise { + return new PluginFactoryKeychain(pluginFactoryOptions); +} + +export * as wasm from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm"; +// export * as wasm_bg from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm"; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts new file mode 100644 index 00000000000..b5c1a4427f9 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts @@ -0,0 +1,101 @@ +import type { Express, Request, Response } from "express"; + +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; +import { DeleteKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; + +import OAS from "../../json/openapi.json"; +import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; + +export interface IDeleteKeychainEntryEndpointOptions { + logLevel?: LogLevelDesc; + plugin: PluginKeychainMemoryWasm; +} + +export class DeleteKeychainEntryV1Endpoint implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "DeleteKeychainEntryV1Endpoint"; + + private readonly log: Logger; + + public get className(): string { + return DeleteKeychainEntryV1Endpoint.CLASS_NAME; + } + + constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.plugin, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getOasPath(): typeof OAS.paths["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry" + ]; + } + + public getPath(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.getOasPath().post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const { key } = req.body as DeleteKeychainEntryRequestV1; + const resBody = await this.options.plugin.delete(key); + res.json(resBody); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts new file mode 100644 index 00000000000..e09aee8e757 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts @@ -0,0 +1,108 @@ +import type { Express, Request, Response } from "express"; + +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; +import { + GetKeychainEntryRequestV1, + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../json/openapi.json"; +import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; + +export interface IGetKeychainEntryEndpointOptions { + logLevel?: LogLevelDesc; + plugin: PluginKeychainMemoryWasm; +} + +export class GetKeychainEntryV1Endpoint implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetKeychainEntryV1Endpoint"; + + private readonly log: Logger; + + public get className(): string { + return GetKeychainEntryV1Endpoint.CLASS_NAME; + } + + constructor(public readonly options: IGetKeychainEntryEndpointOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.plugin, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getOasPath(): typeof OAS.paths["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry" + ]; + } + + public getPath(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.getOasPath().post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const { key } = req.body as GetKeychainEntryRequestV1; + try { + const value = await this.options.plugin.get(key); + res.json({ key, value }); + } catch (ex) { + if (ex?.message?.includes(`${key} secret not found`)) { + res.status(404).json({ + key, + error: ex?.stack || ex?.message, + }); + } else { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts new file mode 100644 index 00000000000..4d2f450b580 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts @@ -0,0 +1,108 @@ +import type { Express, Request, Response } from "express"; + +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../json/openapi.json"; +import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; +import { HasKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; + +export interface IHasKeychainEntryEndpointOptions { + logLevel?: LogLevelDesc; + plugin: PluginKeychainMemoryWasm; +} + +export class HasKeychainEntryV1Endpoint implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "HasKeychainEntryV1Endpoint"; + + private readonly log: Logger; + + public get className(): string { + return HasKeychainEntryV1Endpoint.CLASS_NAME; + } + + constructor(public readonly options: IHasKeychainEntryEndpointOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.plugin, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getOasPath(): typeof OAS.paths["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry" + ]; + } + + public getPath(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.getOasPath().post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const reqBody = req.body as HasKeychainEntryRequestV1; + const { key } = reqBody; + const checkedAt = new Date().toJSON(); + const isPresent = await this.options.plugin.has(key); + const resBody = { + isPresent, + key, + checkedAt, + }; + res.json(resBody); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts new file mode 100644 index 00000000000..1138d884b98 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts @@ -0,0 +1,101 @@ +import type { Express, Request, Response } from "express"; + +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../json/openapi.json"; +import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; +import { SetKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; + +export interface ISetKeychainEntryEndpointOptions { + logLevel?: LogLevelDesc; + plugin: PluginKeychainMemoryWasm; +} + +export class SetKeychainEntryV1Endpoint implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "SetKeychainEntryV1Endpoint"; + + private readonly log: Logger; + + public get className(): string { + return SetKeychainEntryV1Endpoint.CLASS_NAME; + } + + constructor(public readonly options: ISetKeychainEntryEndpointOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.plugin, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getOasPath(): typeof OAS.paths["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry" + ]; + } + + public getPath(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = this.getOasPath(); + return apiPath.post["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.getOasPath().post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const { key, value } = req.body as SetKeychainEntryRequestV1; + const resBody = await this.options.plugin.set(key, value); + res.json(resBody); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts new file mode 100644 index 00000000000..a77b09a8292 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts @@ -0,0 +1,8 @@ +import test, { Test } from "tape-promise/tape"; + +import * as apiSurface from "../../../main/typescript/public-api"; + +test("Library can be loaded", (t: Test) => { + t.ok(apiSurface, "apiSurface truthy OK"); + t.end(); +}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts new file mode 100644 index 00000000000..a77b09a8292 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts @@ -0,0 +1,8 @@ +import test, { Test } from "tape-promise/tape"; + +import * as apiSurface from "../../../main/typescript/public-api"; + +test("Library can be loaded", (t: Test) => { + t.ok(apiSurface, "apiSurface truthy OK"); + t.end(); +}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts new file mode 100644 index 00000000000..2f1c1bf6448 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts @@ -0,0 +1,150 @@ +import test, { Test } from "tape-promise/tape"; + +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import { AddressInfo } from "net"; + +import { Bools, IListenOptions, Servers } from "@hyperledger/cactus-common"; + +import { v4 as uuidv4 } from "uuid"; +import { Configuration } from "@hyperledger/cactus-core-api"; + +import { + IPluginKeychainMemoryWasmOptions, + PluginKeychainMemoryWasm, +} from "../../../main/typescript"; + +import { DefaultApi as KeychainMemoryApi } from "../../../main/typescript/public-api"; +import { wasm } from "../../../main/typescript/public-api"; + +test("PluginKeychainMemory", (t1: Test) => { + t1.doesNotThrow( + () => + new PluginKeychainMemoryWasm({ + instanceId: "a", + keychainId: "a", + wasmPlugin: {} as PluginKeychainMemoryWasm, + }), + ); + + test("Validates constructor arg instanceId", (t: Test) => { + t.throws( + () => + new PluginKeychainMemoryWasm({ + instanceId: (null as unknown) as string, + keychainId: "valid-value", + wasmPlugin: {} as PluginKeychainMemoryWasm, + }), + ); + t.throws( + () => + new PluginKeychainMemoryWasm({ + instanceId: "", + keychainId: "valid-value", + wasmPlugin: {} as PluginKeychainMemoryWasm, + }), + ); + t.end(); + }); + + test("Validates constructor arg keychainId", (t: Test) => { + t.throws( + () => + new PluginKeychainMemoryWasm({ + instanceId: "valid-value", + keychainId: (null as unknown) as string, + wasmPlugin: {} as PluginKeychainMemoryWasm, + }), + ); + t.throws( + () => + new PluginKeychainMemoryWasm({ + instanceId: "valid-value", + keychainId: "", + wasmPlugin: {} as PluginKeychainMemoryWasm, + }), + ); + t.end(); + }); + + test("get,set,has,delete alters state as expected", async (t: Test) => { + const instanceId = uuidv4(); + const keychainId = uuidv4(); + const pluginFactory = await wasm.createPluginFactory(); + const pluginWasm = await pluginFactory.create({ + instanceId, + keychainId, + }); + const options: IPluginKeychainMemoryWasmOptions = { + instanceId, + keychainId, + wasmPlugin: pluginWasm, + }; + const plugin = new PluginKeychainMemoryWasm(options); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const server = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "0.0.0.0", + port: 0, + server, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + test.onFinish(async () => await Servers.shutdown(server)); + const { address, port } = addressInfo; + const apiHost = `http://${address}:${port}`; + + const config = new Configuration({ basePath: apiHost }); + const apiClient = new KeychainMemoryApi(config); + + await plugin.registerWebServices(expressApp); + + t.equal(plugin.getKeychainId(), options.keychainId, "Keychain ID set OK"); + t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); + + const key1 = uuidv4(); + const value1 = uuidv4(); + + const hasPriorRes = await apiClient.hasKeychainEntryV1({ key: key1 }); + t.ok(hasPriorRes, "hasPriorRes truthy OK"); + t.ok(hasPriorRes.data, "hasPriorRes.data truthy OK"); + t.true( + Bools.isBooleanStrict(hasPriorRes.data.isPresent), + "hasPriorRes.data.isPresent strictly boolean OK", + ); + + const hasPrior = hasPriorRes.data.isPresent; + t.false(hasPrior, "hasPrior === false OK"); + + await plugin.set(key1, value1); + + const hasAfter1 = await plugin.has(key1); + t.true(hasAfter1, "hasAfter === true OK"); + + const valueAfter1 = await plugin.get(key1); + t.ok(valueAfter1, "valueAfter truthy OK"); + t.equal(valueAfter1, value1, "valueAfter === value OK"); + + await plugin.delete(key1); + + const hasAfterDelete1 = await plugin.has(key1); + t.false(hasAfterDelete1, "hasAfterDelete === false OK"); + + const key2 = uuidv4(); + const value2 = uuidv4(); + + await plugin.set(key2, value2); + + const hasAfter = await plugin.has(key2); + t.true(hasAfter, "hasAfter === true OK"); + + const valueAfter2 = await plugin.get(key2); + t.ok(valueAfter2, "valueAfter truthy OK"); + t.equal(valueAfter2, value2, "valueAfter === value OK"); + t.end(); + }); + + t1.end(); +}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json b/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json new file mode 100644 index 00000000000..c0d9e767ec8 --- /dev/null +++ b/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "allowJs": true, + "composite": true, + "outDir": "./dist/lib/", + "declarationDir": "dist/lib", + "rootDir": "./src", + "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-memory-wasm.tsbuildinfo" + }, + "include": [ + "./src", + "**/openapi.json" + ], + "references": [ + { + "path": "../cactus-common/tsconfig.json" + }, + { + "path": "../cactus-core/tsconfig.json" + }, + { + "path": "../cactus-core-api/tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 344574e14ba..bef2be75f61 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -37,6 +37,9 @@ { "path": "./packages/cactus-plugin-keychain-memory/tsconfig.json" }, + { + "path": "./packages/cactus-plugin-keychain-memory-wasm/tsconfig.json" + }, { "path": "./packages/cactus-plugin-keychain-vault/tsconfig.json" }, diff --git a/yarn.lock b/yarn.lock index 99f39391cd1..cc652bc125b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,12 +31,12 @@ "@angular-devkit/core" "12.2.0" rxjs "6.6.7" -"@angular-devkit/architect@0.1202.8", "@angular-devkit/architect@>=0.1200.0 < 0.1300.0": - version "0.1202.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1202.8.tgz#27b5b21210063de16bee426c8bcd7f4e7aa59283" - integrity sha512-aPzwO3coRIuSjZa8FwFHy2y8OJarXG+afsqOk3muR6anvbdl+Av+m2RT8jjwj5J3D4N2eKZ7ob2q9HDUiHi4Pg== +"@angular-devkit/architect@0.1202.9", "@angular-devkit/architect@>=0.1200.0 < 0.1300.0": + version "0.1202.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1202.9.tgz#de1bce9bd74e5310232c609c2881e37705b4ad84" + integrity sha512-s2NcFqZjsdYoR0vhJWLCwykF6hG7F0C5fJJs49i6IJMKj5Ai58z7d2IFYvD8nA60paMvjFS14OQ+E/FEEEZ88Q== dependencies: - "@angular-devkit/core" "12.2.8" + "@angular-devkit/core" "12.2.9" rxjs "6.6.7" "@angular-devkit/build-angular@12.2.0": @@ -115,15 +115,15 @@ webpack-subresource-integrity "1.5.2" "@angular-devkit/build-angular@^12.0.0": - version "12.2.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-12.2.8.tgz#352b7526c7c4c12d49a00c3e341d06433b683add" - integrity sha512-nntuVk7K4DR0cdw1lAFLQKG6CFXQfnA2Ykk48gsMVAW2FHitrjiRfDuBKitx+D7f+cEXAFUO2wymrp9fIT2Z5w== + version "12.2.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-12.2.9.tgz#9a00ea7cc98781a5eba95aa7c12b3aab4694285b" + integrity sha512-A8yddhGpUnrTcA4WCiUxwklFbfkNMfvlST5CT9VLVjz4MEwwOpdaNmIF39+NMr4XTgOBbP6Bq/t3ciIsB5+/Uw== dependencies: "@ampproject/remapping" "1.0.1" - "@angular-devkit/architect" "0.1202.8" - "@angular-devkit/build-optimizer" "0.1202.8" - "@angular-devkit/build-webpack" "0.1202.8" - "@angular-devkit/core" "12.2.8" + "@angular-devkit/architect" "0.1202.9" + "@angular-devkit/build-optimizer" "0.1202.9" + "@angular-devkit/build-webpack" "0.1202.9" + "@angular-devkit/core" "12.2.9" "@babel/core" "7.14.8" "@babel/generator" "7.14.8" "@babel/helper-annotate-as-pure" "7.14.5" @@ -135,7 +135,7 @@ "@babel/template" "7.14.5" "@discoveryjs/json-ext" "0.5.3" "@jsdevtools/coverage-istanbul-loader" "3.0.5" - "@ngtools/webpack" "12.2.8" + "@ngtools/webpack" "12.2.9" ansi-colors "4.1.1" babel-loader "8.2.2" browserslist "^4.9.1" @@ -147,7 +147,7 @@ critters "0.0.10" css-loader "6.2.0" css-minimizer-webpack-plugin "3.0.2" - esbuild-wasm "0.12.29" + esbuild-wasm "0.13.4" find-cache-dir "3.3.1" glob "7.1.7" https-proxy-agent "5.0.0" @@ -189,7 +189,7 @@ webpack-merge "5.8.0" webpack-subresource-integrity "1.5.2" optionalDependencies: - esbuild "0.12.29" + esbuild "0.13.4" "@angular-devkit/build-optimizer@0.1202.0": version "0.1202.0" @@ -200,10 +200,10 @@ tslib "2.3.0" typescript "4.3.5" -"@angular-devkit/build-optimizer@0.1202.8": - version "0.1202.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1202.8.tgz#676f8e3faf132c1b7401a4905b2dc379d91a0dbb" - integrity sha512-GyzlbIM5RX5RhnX3wW0YV7K9ctoJQv5O7L/VUuDFpK8yaJjqjC+sZT+rnu6oPGFbPnYMx/BkkxzU2D0z98T4Mg== +"@angular-devkit/build-optimizer@0.1202.9": + version "0.1202.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1202.9.tgz#45c3c7b45126164151e9ca33d0d668a7464a8720" + integrity sha512-yDR7f2fRWzJdqa7U0eIYu5fCRIae3tcSsYE18UPiV5ypGK3talMIpZ1ibkklr9Nm9SAB6Js1/EdVBGB5jo3R9A== dependencies: source-map "0.7.3" tslib "2.3.0" @@ -217,12 +217,12 @@ "@angular-devkit/architect" "0.1202.0" rxjs "6.6.7" -"@angular-devkit/build-webpack@0.1202.8": - version "0.1202.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1202.8.tgz#288e83df8b15632bf72acd83a3e18df8bf764a92" - integrity sha512-ryzstLoMcJfICToZv/RwqeVNNZ3tn71+S1JxNled469gWnsZAvABfexe8BOaT0b0MTo8h49ULeK1DU8McLY78Q== +"@angular-devkit/build-webpack@0.1202.9": + version "0.1202.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1202.9.tgz#fc0676e0e7f8dae802a8ba3335863feaf1e2b7d8" + integrity sha512-UKVxFTRSyDpQDxM1yk1OJiynhbryrbsy+WgZ/gFcnZcrRGtrpAWOq+uMXfq05zET6CNqpOKBnxy9LSHAwXR5Ig== dependencies: - "@angular-devkit/architect" "0.1202.8" + "@angular-devkit/architect" "0.1202.9" rxjs "6.6.7" "@angular-devkit/core@12.2.0": @@ -237,10 +237,10 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/core@12.2.8", "@angular-devkit/core@^12.0.0": - version "12.2.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.8.tgz#b31282e46b5042b43e947730551b1208d5d45439" - integrity sha512-N13N1Lm7qllBXSVZYz4Khw75rnQnS3lu5QiJqlsaNklWgVfVz8jt99AAeGGvNGSLEbmZjlr35YLxu8ugD267Ug== +"@angular-devkit/core@12.2.9", "@angular-devkit/core@^12.0.0": + version "12.2.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.9.tgz#58f41ca4fea44307d90fb23af605ee06fe3c5552" + integrity sha512-iPHQiga08bbryiVq3QYzwpuq9sNb8CB/MVy65MHJ0fuW1z6RYDeUh1EziitBBUT2d81KWKPO1wQ2DuUoxOg4mg== dependencies: ajv "8.6.2" ajv-formats "2.1.0" @@ -258,12 +258,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@12.2.8": - version "12.2.8" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-12.2.8.tgz#d79d39d1de11b7c25ce3ee71f296f1547bbde972" - integrity sha512-SPiMFoCi1TpFXY6h1xGCakgdwT25gGHdbis1MuHE5yMcPLvhl/yr7EQVY1GY00/iMrgeslTHg/UPp4D6xHyQxA== +"@angular-devkit/schematics@12.2.9": + version "12.2.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-12.2.9.tgz#5dd639f5290b9dcb2e61b0ae167fc5258ec22a51" + integrity sha512-OcMDCdlIxiir8XntrNXdXEPi9/8BRx54oYZeRosr0sJZlz4pPzsHs36t5uX2DURYYMkNNMaBnf2luUIC+77ZsA== dependencies: - "@angular-devkit/core" "12.2.8" + "@angular-devkit/core" "12.2.9" ora "5.4.1" rxjs "6.6.7" @@ -570,10 +570,10 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" + integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg== dependencies: "@babel/highlight" "^7.14.5" @@ -604,19 +604,19 @@ source-map "^0.5.0" "@babel/core@^7.1.0", "@babel/core@^7.5.5", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.6": - version "7.15.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.5.tgz#f8ed9ace730722544609f90c9bb49162dc3bf5b9" - integrity sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg== + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" + integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og== dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.15.4" + "@babel/code-frame" "^7.15.8" + "@babel/generator" "^7.15.8" "@babel/helper-compilation-targets" "^7.15.4" - "@babel/helper-module-transforms" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.8" "@babel/helpers" "^7.15.4" - "@babel/parser" "^7.15.5" + "@babel/parser" "^7.15.8" "@babel/template" "^7.15.4" "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" + "@babel/types" "^7.15.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -633,12 +633,12 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.14.8", "@babel/generator@^7.15.4", "@babel/generator@^7.7.2": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.4.tgz#85acb159a267ca6324f9793986991ee2022a05b0" - integrity sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw== +"@babel/generator@^7.14.8", "@babel/generator@^7.15.4", "@babel/generator@^7.15.8", "@babel/generator@^7.7.2": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1" + integrity sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g== dependencies: - "@babel/types" "^7.15.4" + "@babel/types" "^7.15.6" jsesc "^2.5.1" source-map "^0.5.0" @@ -752,10 +752,10 @@ dependencies: "@babel/types" "^7.15.4" -"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.14.8", "@babel/helper-module-transforms@^7.15.4": - version "7.15.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz#7da80c8cbc1f02655d83f8b79d25866afe50d226" - integrity sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw== +"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.14.8", "@babel/helper-module-transforms@^7.15.4", "@babel/helper-module-transforms@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2" + integrity sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg== dependencies: "@babel/helper-module-imports" "^7.15.4" "@babel/helper-replace-supers" "^7.15.4" @@ -856,10 +856,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5", "@babel/parser@^7.7.2": - version "7.15.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae" - integrity sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8", "@babel/parser@^7.7.2": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" + integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": version "7.15.4" @@ -880,9 +880,9 @@ "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-proposal-async-generator-functions@^7.14.7": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz#f82aabe96c135d2ceaa917feb9f5fca31635277e" - integrity sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw== + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.8.tgz#a3100f785fab4357987c4223ab1b02b599048403" + integrity sha512-2Z5F2R2ibINTc63mY7FLqGfEbmofrHU9FitJW1Q7aPaKFhiPvSq6QEt/BoWN5oME3GVyjcRuNNSRbb9LC0CSWA== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.15.4" @@ -1361,12 +1361,12 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-spread@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144" - integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag== + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.15.8.tgz#79d5aa27f68d700449b2da07691dfa32d2f6d468" + integrity sha512-/daZ8s2tNaRekl9YJa9X4bzjpeRZLt122cpgFnQPLGUe61PH8zMEBmYqKkW5xF5JUEh5buEGXJoQpqBmIbpmEQ== dependencies: "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.15.4" "@babel/plugin-transform-sticky-regex@^7.14.5": version "7.14.5" @@ -1624,9 +1624,9 @@ "@commitlint/types" "^13.2.0" "@commitlint/load@^13.1.0": - version "13.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.2.0.tgz#6bd90b803f7fd102766731dad207cca075b67a4a" - integrity sha512-Nhkv+hwWCCxWGjmE9jd1U8kfGGCkZVpwzlTtdKxpY+Aj2VCFg3BjY+qA81pMF3oAsIpxchSaZG5llb8kduVjYg== + version "13.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.2.1.tgz#d5d926dbd05021c02837c438ff1057025b28b745" + integrity sha512-qlaJkj0hfa9gtWRfCfbgFBTK3GYQRmjZhba4l9mUu4wV9lEZ4ICFlrLtd/8kaLXf/8xbrPhkAPkVFOAqM0YwUQ== dependencies: "@commitlint/execute-rule" "^13.2.0" "@commitlint/resolve-extends" "^13.2.0" @@ -1636,6 +1636,7 @@ cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" + typescript "^4.4.3" "@commitlint/message@^13.2.0": version "13.2.0" @@ -1701,10 +1702,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.11.1.tgz#3cc1c81b446eb5efc25e60921edb30a23a4dd672" - integrity sha512-i/xbEfAP162BeZRftS+1l/BnOgoyBLauzGLp7c9MgBrB6hJf0fWjYndyLsKKXmHNRjPzqA8C6BHJRQh4ZSXi4g== +"@cspell/cspell-bundled-dicts@^5.12.3": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.12.3.tgz#d4ae61d03c6f991f4b03b03ee718830522bf74d5" + integrity sha512-f3kyUHYxyGqNt2DTphpmP8hr38YTL48wr4Dq7pZDbqDjLkerq9T7ufX2CZ2OfydBEdIgduX2UXwiow7IfdwY/A== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -1739,13 +1740,13 @@ "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.45" + "@cspell/dict-software-terms" "^1.0.47" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.11.1", "@cspell/cspell-types@^5.6.5": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.11.1.tgz#61e744782acb8f1fd21a44f0aa59de0572c6ccab" - integrity sha512-QSPqbrzbGOWDCibFirDQwheNyf0RIO4+GgYN5CQWis0y4ZY9GIBkQkxaqbgLQEu/lTRNyVhg+m/Y9yNv73t59A== +"@cspell/cspell-types@^5.12.3", "@cspell/cspell-types@^5.6.5": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.12.3.tgz#bfbebfa29d2f280d99785fdbc3e97bea60b47e5b" + integrity sha512-4l43apk3QGMkpszirKjrRGWmzZVuCyvoa0+kgWCl28dviLKsVonop8liBJaBzjmZbdpe27IKpMrNtj0fOus+fw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -1912,10 +1913,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.45": - version "1.0.46" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.46.tgz#edbb4d0585252e1f3deb14ffdacc9d12917118c5" - integrity sha512-W4Lf0AmWo7V/tS0kXKsTUW/edfYOQ7QTVisuuQM7bnttrykhlNuNrmcSSYNg5xn46H6MlaZvk3+oz4tHH30nbg== +"@cspell/dict-software-terms@^1.0.47": + version "1.0.47" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.47.tgz#c5b78982c8c33a47d8e3423c6ce7af9f38730f91" + integrity sha512-q7cPUaZ3KYtebHpUr/kQXEOIbtJbii069ubXE1eWHWnAYrJZOGFc0W4Sau0ZjeY7cdOXWeYZ3hzcW8XNtPkQrw== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -1934,6 +1935,13 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -2344,6 +2352,38 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@hyperledger/cactus-common@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@hyperledger/cactus-common/-/cactus-common-0.10.0.tgz#1f6ce74f3a9d19af95029274ddc1a5e3babdb6f3" + integrity sha512-3lXgLZ6pZY63wsBKeIZUkYZFiaWU9tAXSlqqK7wm4o14ikV2jWqrv7f1bWKtKRdlSEce04PMjrpZ33JtHtl3Og== + dependencies: + json-stable-stringify "1.0.1" + key-encoder "2.0.3" + loglevel "1.7.1" + loglevel-plugin-prefix "0.8.4" + secp256k1 "4.0.2" + sha3 "2.1.4" + +"@hyperledger/cactus-core-api@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@hyperledger/cactus-core-api/-/cactus-core-api-0.10.0.tgz#1756abedbe479055df43ac82702fd707e7ba2a51" + integrity sha512-9iTQTa8z3NxrkdGmAPEMrFVPNgJV91nrnbeMe0Ape78QvAW030slTp0Ygkec4pFErz7VWGz/onydUroGrFtTEg== + dependencies: + "@hyperledger/cactus-common" "0.10.0" + axios "0.21.4" + +"@hyperledger/cactus-core@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@hyperledger/cactus-core/-/cactus-core-0.10.0.tgz#5bc3a633ae5e3be99db9a209d836504f661f397d" + integrity sha512-NA7WedCFAyxRstHBkjqpWvTBbRCuEU5yze2n7HSZJfNOTi1VNHzsHPp+ZRPfHD7mzSZJSuqMuNRlH+++QT8yPw== + dependencies: + "@hyperledger/cactus-common" "0.10.0" + "@hyperledger/cactus-core-api" "0.10.0" + express "4.17.1" + express-jwt-authz "2.4.1" + express-openapi-validator "4.12.12" + typescript-optional "2.0.1" + "@improbable-eng/grpc-web-node-http-transport@^0.13.0": version "0.13.0" resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.13.0.tgz#a8680c7a8bce4c2b44fe48ba4b7c55b320cf5f54" @@ -2450,16 +2490,16 @@ jest-util "^26.6.2" slash "^3.0.0" -"@jest/console@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.4.tgz#2f1a4bf82b9940065d4818fac271def99ec55e5e" - integrity sha512-94znCKynPZpDpYHQ6esRJSc11AmONrVkBOBZiD7S+bSubHhrUfbS95EY5HIOxhm4PQO7cnvZkL3oJcY0oMA+Wg== +"@jest/console@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.5.tgz#bddbf8d41c191f17b52bf0c9e6c0d18605e35d6e" + integrity sha512-smtlRF9vNKorRMCUtJ+yllIoiY8oFmfFG7xlzsAE76nKEwXNhjPOJIsc7Dv+AUitVt76t+KjIpUP9m98Crn2LQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.2.4" - jest-util "^27.2.4" + jest-message-util "^27.2.5" + jest-util "^27.2.5" slash "^3.0.0" "@jest/core@^26.6.3": @@ -2496,35 +2536,35 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/core@^27.0.6", "@jest/core@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.4.tgz#0b932da787d64848eab720dbb88e5b7a3f86e539" - integrity sha512-UNQLyy+rXoojNm2MGlapgzWhZD1CT1zcHZQYeiD0xE7MtJfC19Q6J5D/Lm2l7i4V97T30usKDoEtjI8vKwWcLg== +"@jest/core@^27.0.6", "@jest/core@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.5.tgz#854c314708cee0d892ac4f531b9129f00a21ee69" + integrity sha512-VR7mQ+jykHN4WO3OvusRJMk4xCa2MFLipMS+43fpcRGaYrN1KwMATfVEXif7ccgFKYGy5D1TVXTNE4mGq/KMMA== dependencies: - "@jest/console" "^27.2.4" - "@jest/reporters" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/reporters" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.2.4" - jest-config "^27.2.4" - jest-haste-map "^27.2.4" - jest-message-util "^27.2.4" + jest-changed-files "^27.2.5" + jest-config "^27.2.5" + jest-haste-map "^27.2.5" + jest-message-util "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-resolve-dependencies "^27.2.4" - jest-runner "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" - jest-watcher "^27.2.4" + jest-resolve "^27.2.5" + jest-resolve-dependencies "^27.2.5" + jest-runner "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" + jest-watcher "^27.2.5" micromatch "^4.0.4" rimraf "^3.0.0" slash "^3.0.0" @@ -2540,15 +2580,15 @@ "@types/node" "*" jest-mock "^26.6.2" -"@jest/environment@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.4.tgz#db3e60f7dd30ab950f6ce2d6d7293ed9a6b7cbcd" - integrity sha512-wkuui5yr3SSQW0XD0Qm3TATUbL/WE3LDEM3ulC+RCQhMf2yxhci8x7svGkZ4ivJ6Pc94oOzpZ6cdHBAMSYd1ew== +"@jest/environment@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.5.tgz#b85517ccfcec55690c82c56f5a01a3b30c5e3c84" + integrity sha512-XvUW3q6OUF+54SYFCgbbfCd/BKTwm5b2MGLoc2jINXQLKQDTCS2P2IrpPOtQ08WWZDGzbhAzVhOYta3J2arubg== dependencies: - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" + jest-mock "^27.2.5" "@jest/fake-timers@^26.6.2": version "26.6.2" @@ -2562,17 +2602,17 @@ jest-mock "^26.6.2" jest-util "^26.6.2" -"@jest/fake-timers@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.4.tgz#00df08bd60332bd59503cb5b6db21e4903785f86" - integrity sha512-cs/TzvwWUM7kAA6Qm/890SK6JJ2pD5RfDNM3SSEom6BmdyV6OiWP1qf/pqo6ts6xwpcM36oN0wSEzcZWc6/B6w== +"@jest/fake-timers@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.5.tgz#0c7e5762d7bfe6e269e7b49279b097a52a42f0a0" + integrity sha512-ZGUb6jg7BgwY+nmO0TW10bc7z7Hl2G/UTAvmxEyZ/GgNFoa31tY9/cgXmqcxnnZ7o5Xs7RAOz3G1SKIj8IVDlg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@sinonjs/fake-timers" "^8.0.1" "@types/node" "*" - jest-message-util "^27.2.4" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-message-util "^27.2.5" + jest-mock "^27.2.5" + jest-util "^27.2.5" "@jest/globals@^26.6.2": version "26.6.2" @@ -2583,14 +2623,14 @@ "@jest/types" "^26.6.2" expect "^26.6.2" -"@jest/globals@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.4.tgz#0aeb22b011f8c8c4b8ff3b4dbd1ee0392fe0dd8a" - integrity sha512-DRsRs5dh0i+fA9mGHylTU19+8fhzNJoEzrgsu+zgJoZth3x8/0juCQ8nVVdW1er4Cqifb/ET7/hACYVPD0dBEA== +"@jest/globals@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.5.tgz#4115538f98ed6cee4051a90fdbd0854062902099" + integrity sha512-naRI537GM+enFVJQs6DcwGYPn/0vgJNb06zGVbzXfDfe/epDPV73hP1vqO37PqSKDeOXM2KInr6ymYbL1HTP7g== dependencies: - "@jest/environment" "^27.2.4" - "@jest/types" "^27.2.4" - expect "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/types" "^27.2.5" + expect "^27.2.5" "@jest/reporters@^26.6.2": version "26.6.2" @@ -2624,16 +2664,17 @@ optionalDependencies: node-notifier "^8.0.0" -"@jest/reporters@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.4.tgz#1482ff007f2e919d85c54b1563abb8b2ea2d5198" - integrity sha512-LHeSdDnDZkDnJ8kvnjcqV8P1Yv/32yL4d4XfR5gBiy3xGO0onwll1QEbvtW96fIwhx2nejug0GTaEdNDoyr3fQ== +"@jest/reporters@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.5.tgz#65198ed1f3f4449e3f656129764dc6c5bb27ebe3" + integrity sha512-zYuR9fap3Q3mxQ454VWF8I6jYHErh368NwcKHWO2uy2fwByqBzRHkf9j2ekMDM7PaSTWcLBSZyd7NNxR1iHxzQ== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" + "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -2644,10 +2685,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.2.4" - jest-resolve "^27.2.4" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-haste-map "^27.2.5" + jest-resolve "^27.2.5" + jest-util "^27.2.5" + jest-worker "^27.2.5" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -2682,13 +2723,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.4.tgz#d1ca8298d168f1b0be834bfb543b1ac0294c05d7" - integrity sha512-eU+PRo0+lIS01b0dTmMdVZ0TtcRSxEaYquZTRFMQz6CvsehGhx9bRzi9Zdw6VROviJyv7rstU+qAMX5pNBmnfQ== +"@jest/test-result@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.5.tgz#e9f73cf6cd5e2cc6eb3105339248dea211f9320e" + integrity sha512-ub7j3BrddxZ0BdSnM5JCF6cRZJ/7j3wgdX0+Dtwhw2Po+HKsELCiXUTvh+mgS4/89mpnU1CPhZxe2mTvuLPJJg== dependencies: - "@jest/console" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/types" "^27.2.5" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -2703,15 +2744,15 @@ jest-runner "^26.6.3" jest-runtime "^26.6.3" -"@jest/test-sequencer@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.4.tgz#df66422a3e9e7440ce8b7498e255fa6b52c0bc03" - integrity sha512-fpk5eknU3/DXE2QCCG1wv/a468+cfPo3Asu6d6yUtM9LOPh709ubZqrhuUOYfM8hXMrIpIdrv1CdCrWWabX0rQ== +"@jest/test-sequencer@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.5.tgz#ed5ae91c00e623fb719111d58e380395e16cefbb" + integrity sha512-8j8fHZRfnjbbdMitMAGFKaBZ6YqvFRFJlMJzcy3v75edTOqc7RY65S9JpMY6wT260zAcL2sTQRga/P4PglCu3Q== dependencies: - "@jest/test-result" "^27.2.4" + "@jest/test-result" "^27.2.5" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" - jest-runtime "^27.2.4" + jest-haste-map "^27.2.5" + jest-runtime "^27.2.5" "@jest/transform@^26.6.2": version "26.6.2" @@ -2734,21 +2775,21 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/transform@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.4.tgz#2fe5b6836895f7a1b8bdec442c51e83943c62733" - integrity sha512-n5FlX2TH0oQGwyVDKPxdJ5nI2sO7TJBFe3u3KaAtt7TOiV4yL+Y+rSFDl+Ic5MpbiA/eqXmLAQxjnBmWgS2rEA== +"@jest/transform@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.5.tgz#02b08862a56dbedddf0ba3c2eae41e049a250e29" + integrity sha512-29lRtAHHYGALbZOx343v0zKmdOg4Sb0rsA1uSv0818bvwRhs3TyElOmTVXlrw0v1ZTqXJCAH/cmoDXimBhQOJQ== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" + jest-haste-map "^27.2.5" jest-regex-util "^27.0.6" - jest-util "^27.2.4" + jest-util "^27.2.5" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -2766,10 +2807,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" - integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== +"@jest/types@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" + integrity sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -3520,10 +3561,10 @@ resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-12.2.0.tgz#5a988953600ab332e9f331437c47e371c3e2be6c" integrity sha512-EocGfCbpPAnanDlagtlbVHpgSWE0a5NyWOY6RCw0pAxj1zL9SYMMId4X+ZJ21C23m6JqNXnWNZ4ib+LaXBIOBg== -"@ngtools/webpack@12.2.8": - version "12.2.8" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-12.2.8.tgz#4e508280b98301950a81ef546b6447b633d9a9ea" - integrity sha512-utQrOXm4eS3BEQh2/y8zt5fVF9cuakfVQSPD/pWPKLqZsGc9wB3CHkrQED0EizsBfrsn5yLc3yPh3P8yGUmdRw== +"@ngtools/webpack@12.2.9": + version "12.2.9" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-12.2.9.tgz#e13d815d35e155bea6e2b13f6f54bc3275ed0670" + integrity sha512-IQkzvompjLdWbZ+33crtyVF8huF53C36k1FNFdq3x2j4Kw4ssDd6K9fq3aZpRCK0J8O79HJ5j4QH6ZtWjwajLg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -3595,9 +3636,9 @@ rimraf "^3.0.2" "@npmcli/node-gyp@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.2.tgz#3cdc1f30e9736dbc417373ed803b42b1a0a29ede" - integrity sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" + integrity sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA== "@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": version "1.3.2" @@ -3663,34 +3704,34 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^10.6.4": - version "10.6.4" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.6.4.tgz#c8b5b1f5c60ab7c62858abe2ef57bc709f426a30" - integrity sha512-JVmwWzYTIs6jACYOwD6zu5rdrqGIYsiAsLzTCxdrWIPNKNVjEF6vPTL20shmgJ4qZsq7WPBcLXLsaQD+NLChfg== +"@octokit/openapi-types@^11.2.0": + version "11.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" + integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== -"@octokit/plugin-paginate-rest@^2.16.4": - version "2.16.7" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.7.tgz#d25b6e650ba5a007002986f5fda66958d44e70a4" - integrity sha512-TMlyVhMPx6La1Ud4PSY4YxqAvb9YPEMs/7R1nBSbsw4wNqG73aBqls0r0dRRCWe5Pm0ZUGS9a94N46iAxlOR8A== +"@octokit/plugin-paginate-rest@^2.16.8": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" + integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== dependencies: - "@octokit/types" "^6.31.3" + "@octokit/types" "^6.34.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@5.11.4": - version "5.11.4" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.11.4.tgz#221dedcbdc45d6bfa54228d469e8c34acb4e0e34" - integrity sha512-iS+GYTijrPUiEiLoDsGJhrbXIvOPfm2+schvr+FxNMs7PeE9Nl4bAMhE8ftfNX3Z1xLxSKwEZh0O7GbWurX5HQ== +"@octokit/plugin-rest-endpoint-methods@^5.12.0": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" + integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== dependencies: - "@octokit/types" "^6.31.2" + "@octokit/types" "^6.34.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -3703,9 +3744,9 @@ once "^1.4.0" "@octokit/request@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.1.tgz#f97aff075c37ab1d427c49082fefeef0dba2d8ce" - integrity sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ== + version "5.6.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.2.tgz#1aa74d5da7b9e04ac60ef232edd9a7438dcf32d8" + integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.1.0" @@ -3715,21 +3756,21 @@ universal-user-agent "^6.0.0" "@octokit/rest@^18.1.0": - version "18.11.4" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.11.4.tgz#9fb6d826244554fbf8c110b9064018d7198eec51" - integrity sha512-QplypCyYxqMK05JdMSm/bDWZO8VWWaBdzQ9tbF9rEV9rIEiICh+v6q+Vu/Y5hdze8JJaxfUC+PBC7vrnEkZvZg== + version "18.12.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" + integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== dependencies: "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.4" + "@octokit/plugin-paginate-rest" "^2.16.8" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "5.11.4" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.31.2", "@octokit/types@^6.31.3": - version "6.31.3" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.31.3.tgz#14c2961baea853b2bf148d892256357a936343f8" - integrity sha512-IUG3uMpsLHrtEL6sCVXbxCgnbKcgpkS4K7gVEytLDvYYalkK3XcuMCHK1YPD8xJglSJAOAbL4MgXp47rS9G49w== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": + version "6.34.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" + integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== dependencies: - "@octokit/openapi-types" "^10.6.4" + "@octokit/openapi-types" "^11.2.0" "@openapitools/openapi-generator-cli@2.3.10": version "2.3.10" @@ -3840,12 +3881,12 @@ jsonc-parser "3.0.0" "@schematics/angular@^12.0.0": - version "12.2.8" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-12.2.8.tgz#18e310805a13bcc2e35cc282a5ab06ecfb84050c" - integrity sha512-xkVcX6lTHC5JzDOjGdRAZutVVpxkRkT84vXtVlJwojyhNjAZg5dm/GC84+gVGfmVnO9vkUIYo/vGoN+/ydcSdA== + version "12.2.9" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-12.2.9.tgz#6787a7b79020fb031e46e59f36767d6579dc5d50" + integrity sha512-IIczXVwegREekub0+bBxOc0dDL7j8p5rG6rB/2btJRR+tg04milP+BkvnQgksmIkW1OcZ5beRSB37R3jY/W/PA== dependencies: - "@angular-devkit/core" "12.2.8" - "@angular-devkit/schematics" "12.2.8" + "@angular-devkit/core" "12.2.9" + "@angular-devkit/schematics" "12.2.9" jsonc-parser "3.0.0" "@sentry/core@5.30.0": @@ -3970,9 +4011,9 @@ integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== "@stencil/core@^2.4.0", "@stencil/core@^2.5.0": - version "2.8.1" - resolved "https://registry.yarnpkg.com/@stencil/core/-/core-2.8.1.tgz#21b15c115d9a5e2f56379774fcbd9bc947bf336f" - integrity sha512-iv9J6oLO/lv7/aO45M05yw3pp1J7olY400vlOZgdMVs3s5zHfalY1ZPYM0KyqU4+7DZuadKYbd0aQZ/g2PInZw== + version "2.9.0" + resolved "https://registry.yarnpkg.com/@stencil/core/-/core-2.9.0.tgz#cbac84b996475b8fc983931539ed1261174e2df3" + integrity sha512-kY3xYolZoJO1MKslL0NQccHy72R3TIl1prHgfmIrEoGcnMgc6uiskdWaGMuI5/sCGz9T+QuTVz76B1H2ySyBZg== "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -4181,9 +4222,9 @@ "@types/estree" "*" "@types/eslint@*": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a" - integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A== + version "7.28.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.1.tgz#50b07747f1f84c2ba8cd394cf0fe0ba07afce320" + integrity sha512-XhZKznR3i/W5dXqUhgU9fFdJekufbeBd5DALmkuXoeFcjbQcPk+2cL+WLHf6Q81HWAnM2vrslIHpGVyCAviRwg== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -4439,9 +4480,9 @@ node-vault "*" "@types/node@*", "@types/node@>=10.0.0", "@types/node@>=12.12.47", "@types/node@>=13.7.0": - version "16.10.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.2.tgz#5764ca9aa94470adb4e1185fe2e9f19458992b2e" - integrity sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ== + version "16.10.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5" + integrity sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ== "@types/node@15.14.7": version "15.14.7" @@ -4454,14 +4495,14 @@ integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== "@types/node@^12.12.6": - version "12.20.27" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.27.tgz#4141fcad57c332a120591de883e26fe4bb14aaea" - integrity sha512-qZdePUDSLAZRXXV234bLBEUM0nAQjoxbcSwp1rqSMUe1rZ47mwU6OjciR/JvF1Oo8mc0ys6GE0ks0HGgqAZoGg== + version "12.20.28" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.28.tgz#4b20048c6052b5f51a8d5e0d2acbf63d5a17e1e2" + integrity sha512-cBw8gzxUPYX+/5lugXIPksioBSbE42k0fZ39p+4yRzfYjN6++eq9kAPdlY9qm+MXyfbk9EmvCYAYRn380sF46w== "@types/node@^14.0.24", "@types/node@^14.14.5", "@types/node@^14.6.2": - version "14.17.20" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.20.tgz#74cc80438fd0467dc4377ee5bbad89a886df3c10" - integrity sha512-gI5Sl30tmhXsqkNvopFydP7ASc4c2cLfGNQrVKN3X90ADFWFsPEsotm/8JHSUJQKTHbwowAHtcJPeyVhtKv0TQ== + version "14.17.21" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.21.tgz#6359d8cf73481e312a43886fa50afc70ce5592c6" + integrity sha512-zv8ukKci1mrILYiQOwGSV4FpkZhyxQtuFWGya2GujWg+zVAeRQ4qbaMmWp9vb9889CFA8JECH7lkwCL6Ygg8kA== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -4545,9 +4586,9 @@ integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== "@types/react@^16.9.23": - version "16.14.15" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.15.tgz#95d8fa3148050e94bcdc5751447921adbe19f9e6" - integrity sha512-jOxlBV9RGZhphdeqJTCv35VZOkjY+XIEY2owwSk84BNDdDv2xS6Csj6fhi+B/q30SR9Tz8lDNt/F2Z5RF3TrRg== + version "16.14.16" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.16.tgz#0ad1adaefbba4ccc307ddf364d071b3c81e0ce30" + integrity sha512-7waDQ0h1TkAk99S04wV0LUiiSXpT02lzrdDF4WZFqn2W0XE5ICXLBMtqXWZ688aX2dJislQ3knmZX/jH53RluQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4991,21 +5032,21 @@ "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.4.tgz#f03ce6311c0883a83d04569e2c03c6238316d2aa" - integrity sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.1.0.tgz#8342bef0badfb7dfd3b576f2574ab80c725be043" + integrity sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg== "@webpack-cli/info@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.3.0.tgz#9d78a31101a960997a4acd41ffd9b9300627fe2b" - integrity sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w== + version "1.4.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.4.0.tgz#b9179c3227ab09cbbb149aa733475fcf99430223" + integrity sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw== dependencies: envinfo "^7.7.3" "@webpack-cli/serve@^1.5.1": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec" - integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw== + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.6.0.tgz#2c275aa05c895eccebbfc34cfb223c6e8bd591a2" + integrity sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -5093,9 +5134,9 @@ acorn-globals@^6.0.0: acorn-walk "^7.1.1" acorn-import-assertions@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz#580e3ffcae6770eebeec76c3b9723201e9d01f78" - integrity sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA== + version "1.8.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" + integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== acorn-jsx@^5.3.1: version "5.3.2" @@ -5477,15 +5518,15 @@ array-ify@^1.0.0: integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-includes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + version "3.1.4" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" + integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" get-intrinsic "^1.1.1" - is-string "^1.0.5" + is-string "^1.0.7" array-timsort@^1.0.3: version "1.0.3" @@ -5750,15 +5791,15 @@ auto-bind@^4.0.0: integrity sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ== autoprefixer@^9.6.1: - version "9.8.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.7.tgz#e3c12de18a800af1a1a8155fbc01dc7de29ea184" - integrity sha512-7Hg99B1eTH5+LgmUBUSmov1Z3bsggQJS7v3IMGo6wcScnbRuvtMc871J9J+4bSbIqa9LSX/zypFXJ8sXHpMJeQ== + version "9.8.8" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a" + integrity sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA== dependencies: browserslist "^4.12.0" caniuse-lite "^1.0.30001109" - nanocolors "^0.2.8" normalize-range "^0.1.2" num2fraction "^1.2.2" + picocolors "^0.2.1" postcss "^7.0.32" postcss-value-parser "^4.1.0" @@ -5870,13 +5911,13 @@ babel-jest@^26.6.3: graceful-fs "^4.2.4" slash "^3.0.0" -babel-jest@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.4.tgz#21ed6729d51bdd75470bbbf3c8b08d86209fb0dc" - integrity sha512-f24OmxyWymk5jfgLdlCMu4fTs4ldxFBIdn5sJdhvGC1m08rSkJ5hYbWkNmfBSvE/DjhCVNSHXepxsI6THGfGsg== +babel-jest@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.5.tgz#6bbbc1bb4200fe0bfd1b1fbcbe02fc62ebed16aa" + integrity sha512-GC9pWCcitBhSuF7H3zl0mftoKizlswaF0E3qi+rPL417wKkCB0d+Sjjb0OfXvxj7gWiBf497ldgRMii68Xz+2g== dependencies: - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^27.2.0" @@ -6330,11 +6371,11 @@ blakejs@^1.1.0: integrity sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg== blob-to-it@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/blob-to-it/-/blob-to-it-1.0.3.tgz#699a05548f4d9a51851e476a5c2de4d11a801fe8" - integrity sha512-3bCrqSWG2qWwoIeF6DUJeuW/1isjx7DUhqZn9GpWlK8SVeqcjP+zw4yujdV0bVaqtggk6CUgtu87jfwHi5g7Zg== + version "1.0.4" + resolved "https://registry.yarnpkg.com/blob-to-it/-/blob-to-it-1.0.4.tgz#f6caf7a4e90b7bb9215fa6a318ed6bd8ad9898cb" + integrity sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA== dependencies: - browser-readablestream-to-it "^1.0.2" + browser-readablestream-to-it "^1.0.3" blob@0.0.5: version "0.0.5" @@ -6363,7 +6404,7 @@ bn.js@4.12.0, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4 resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2: +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -6511,10 +6552,10 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-readablestream-to-it@^1.0.1, browser-readablestream-to-it@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.2.tgz#f6b8d18e7a35b0321359261a32aa2c70f46921c4" - integrity sha512-lv4M2Z6RKJpyJijJzBQL5MNssS7i8yedl+QkhnLCyPtgNGNSXv1KthzUnye9NlRAtBAI80X6S9i+vK09Rzjcvg== +browser-readablestream-to-it@^1.0.1, browser-readablestream-to-it@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz#ac3e406c7ee6cdf0a502dd55db33bab97f7fba76" + integrity sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw== browser-request@~0.3.0: version "0.3.3" @@ -6587,16 +6628,16 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.17.1, browserslist@^4.6.4, browserslist@^4.9.1: - version "4.17.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.2.tgz#aa15dbd2fab399a399fe4df601bb09363c5458a6" - integrity sha512-jSDZyqJmkKMEMi7SZAgX5UltFdR5NAO43vY0AwTpu4X3sGH7GLLQ83KiUomgrnvZRCeW0yPPnKqnxPqQOER9zQ== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.17.3, browserslist@^4.6.4, browserslist@^4.9.1: + version "4.17.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.3.tgz#2844cd6eebe14d12384b0122d217550160d2d624" + integrity sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ== dependencies: - caniuse-lite "^1.0.30001261" - electron-to-chromium "^1.3.854" + caniuse-lite "^1.0.30001264" + electron-to-chromium "^1.3.857" escalade "^3.1.1" - nanocolors "^0.2.12" - node-releases "^1.1.76" + node-releases "^1.1.77" + picocolors "^0.2.1" browserstack@^1.5.1: version "1.6.1" @@ -6940,9 +6981,9 @@ camelcase-keys@^6.2.2: quick-lru "^4.0.1" camelcase-keys@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.0.tgz#40fcbe171f7432888369d0c871df7cfa5ce4f788" - integrity sha512-qlQlECgDl5Ev+gkvONaiD4X4TF2gyZKuLBvzx0zLo2UwAxmz3hJP/841aaMHTeH1T7v5HRwoRq91daulXoYWvg== + version "7.0.1" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.1.tgz#5a57e6dfb3f6c7929dad15599ee4476a7e9a3b2d" + integrity sha512-P331lEls98pW8JLyodNWfzuz91BEDVA4VpW2/SwXnyv2K495tq1N777xzDbFgnEigfA7UIY0xa6PwR/H9jijjA== dependencies: camelcase "^6.2.0" map-obj "^4.1.0" @@ -6989,10 +7030,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001261: - version "1.0.30001263" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz#7ce7a6fb482a137585cbc908aaf38e90c53a16a4" - integrity sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001264: + version "1.0.30001265" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz#0613c9e6c922e422792e6fcefdf9a3afeee4f8c3" + integrity sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw== canonical-path@1.0.0: version "1.0.0" @@ -8035,17 +8076,17 @@ copy-webpack-plugin@^6.2.1: webpack-sources "^1.4.3" core-js-compat@^3.15.0, core-js-compat@^3.16.2: - version "3.18.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.1.tgz#01942a0877caf9c6e5007c027183cf0bdae6a191" - integrity sha512-XJMYx58zo4W0kLPmIingVZA10+7TuKrMLPt83+EzDmxFJQUMcTVVmQ+n5JP4r6Z14qSzhQBRi3NSWoeVyKKXUg== + version "3.18.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.2.tgz#e40c266fbd613948dd8d2d2156345da8ac03c142" + integrity sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ== dependencies: - browserslist "^4.17.1" + browserslist "^4.17.3" semver "7.0.0" core-js-pure@^3.0.1: - version "3.18.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.18.1.tgz#097d34d24484be45cea700a448d1e74622646c80" - integrity sha512-kmW/k8MaSuqpvA1xm2l3TVlBuvW+XBkcaOroFUpO3D4lsTGQWBTb/tBDCf/PNkkPLrwgrkQRIYNPB0CeqGJWGQ== + version "3.18.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.18.2.tgz#d8cc11d4885ea919f3de776d45e720e4c769d406" + integrity sha512-4hMMLUlZhKJKOWbbGD1/VDUxGPEhEoN/T01k7bx271WiBKCvCfkgPzy0IeRS4PB50p6/N1q/SZL4B/TRsTE5bA== core-js@3.16.0: version "3.16.0" @@ -8058,9 +8099,9 @@ core-js@^2.4.0, core-js@^2.5.0: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.6.5: - version "3.18.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.18.1.tgz#289d4be2ce0085d40fc1244c0b1a54c00454622f" - integrity sha512-vJlUi/7YdlCZeL6fXvWNaLUPh/id12WXj3MbkMw5uOyF0PfWPBNOCNbs53YqgrvtujLNlt9JQpruyIKkUZ+PKA== + version "3.18.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.18.2.tgz#63a551e8a29f305cd4123754846e65896619ba5b" + integrity sha512-zNhPOUoSgoizoSQFdX1MeZO16ORRb9FFQLts8gSYbZU5FcgXhp24iMWMxnOQo5uIaIG7/6FA/IqJPwev1o9ZXQ== core-util-is@1.0.2: version "1.0.2" @@ -8272,32 +8313,32 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -cspell-glob@^5.11.1, cspell-glob@^5.6.5: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.11.1.tgz#c8d26a77f9769a291f16288776f3f544ea165d61" - integrity sha512-1/X8ZkC7bMh8kb5RjkIzlfktz4asGfIUHbLm85nXO7wRYFZ/spK11YrPsRNXoEJsoDUkElDUvgN3pJFd9tM3vw== +cspell-glob@^5.12.3, cspell-glob@^5.6.5: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.12.3.tgz#31d1b3799f2ced60814730ef1c9332260df44755" + integrity sha512-2ZgzHr01Blch1I1C3jkzb3IIEE7peoFDDAM+MONQdf8JugWrexZsQ3A6nNUuUgtHZYbJC01ZKzB1JunmE84caA== dependencies: micromatch "^4.0.4" -cspell-io@^5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.11.1.tgz#375c5db629c143aec3e4ecb576a53ad0c3e21176" - integrity sha512-FWCNq1dY6MO1Y494ou3Qdvm1fcWGte6bLLYycgz1CLwU42VAzOTMDzzR53+BExRb4HExp3penmIHGrwwG+BZHQ== +cspell-io@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.12.3.tgz#19bf52443ac964042b0a2e9103a8c12f3312d494" + integrity sha512-YqIsDPWj4OKyRYDZyZ9InvYBSGJAYbq/OMzCtJ1vCpgzGdm+7pWQkonGZMThPDW33EsSE8GPaT/XTGZbqZuDoA== cspell-lib@^5.6.6: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.11.1.tgz#68aa5b51a3f449fe1e60b65ff38cb0bfe52f8244" - integrity sha512-4o0umOGIdhx8pWqhVbminW14kwAoPOxiBmMUNwttZQ1kQw3WgT/6LwlFHbNL4pEIAgbMAnt4IX7IbTPL1Z+xDw== + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.12.3.tgz#47b2ebffe535a82eeed27f539125fef2fcedbb01" + integrity sha512-wiS3X3inzkwr2d6UojVLjzGFxwhnE+HoQYg7cDyC2qqK1Q++36c5bHJGE8564lsVedeAMVbHh81bP7hibg/yUw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.11.1" - "@cspell/cspell-types" "^5.11.1" + "@cspell/cspell-bundled-dicts" "^5.12.3" + "@cspell/cspell-types" "^5.12.3" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.11.1" - cspell-io "^5.11.1" - cspell-trie-lib "^5.11.1" + cspell-glob "^5.12.3" + cspell-io "^5.12.3" + cspell-trie-lib "^5.12.3" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -8306,10 +8347,10 @@ cspell-lib@^5.6.6: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.11.1.tgz#041742b39fd9fbc596a3d0aafc13b697a42b85f2" - integrity sha512-2VQqKT+a5YKRy1CDrJOxtwUaPKCugMzg+tgZT0ft+CXZ7dzIxqi1RsC63eDpKVPx06WwTFYMx9FvtVCzU+2LNQ== +cspell-trie-lib@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.12.3.tgz#31a6fe7ed3016d77768fc4b1dfcfab1a9dd46a93" + integrity sha512-kck/fUcsBeskuHPFSW4tn4yseDWCDTSaXwxTB+G129anzk0w7mz4LliBBfoD8AHo+D102N7nWmcKXxwPUxAXUQ== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" @@ -8452,9 +8493,9 @@ css-what@2.1: integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== css-what@^5.0.0, css-what@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" - integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" + integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== css@^2.0.0: version "2.2.4" @@ -8634,9 +8675,9 @@ data-urls@^2.0.0: whatwg-url "^8.0.0" date-fns@^2.16.1: - version "2.24.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.24.0.tgz#7d86dc0d93c87b76b63d213b4413337cfd1c105d" - integrity sha512-6ujwvwgPID6zbI0o7UbURi2vlLDR9uP26+tW6Lg+Ji3w7dd0i3DOcjcClLjLPranT60SSEFBwdSyYwn/ZkPIuw== + version "2.25.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680" + integrity sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w== date-format@^1.2.0: version "1.2.0" @@ -9422,10 +9463,10 @@ electron-fetch@^1.7.2: dependencies: encoding "^0.1.13" -electron-to-chromium@^1.3.854: - version "1.3.856" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz#75dee0eef9702bffabbf4c1293c989cd3cacb7ba" - integrity sha512-lSezYIe1/p5qkEswAfaQUseOBiwGwuCvRl/MKzOEVe++DcmQ92+43dznDl4rFJ4Zpu+kevhwyIf7KjJevyDA/A== +electron-to-chromium@^1.3.857: + version "1.3.866" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.866.tgz#d446338f5ad6948b27a50739760e7b0b5cc5032f" + integrity sha512-iYze6TpDXWxk+sfcpUUdTs6Pv/3kG45Pnjer2DxEeFw0N08bZeNLuz97s2lMgy8yObon48o0WHY2Bkg3xuAPOA== electron@13.3.0: version "13.3.0" @@ -9660,10 +9701,10 @@ errs@^0.3.2: resolved "https://registry.yarnpkg.com/errs/-/errs-0.3.2.tgz#798099b2dbd37ca2bc749e538a7c1307d0b50499" integrity sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk= -es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5, es-abstract@^1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.0.tgz#0a6e6682268e7f5bdc1c740b33ce2578d64538d3" - integrity sha512-oWPrF+7P1nGv/rw9oIInwdkmI1qediEJSvVfHFryBd8mWllCKB5tke3aKyf51J6chgyKmi6mODqdnin2yb88Nw== +es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -9767,20 +9808,117 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" -esbuild-wasm@0.12.29: - version "0.12.29" - resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.12.29.tgz#1d210bb7d463b2ca51c54d69bb4192d9709f6100" - integrity sha512-amSuB/qOGnTFYLOxGHDGosQbOKZnrinniPHFf6ZxzeNH7WAjLkjXluKyKAtX2YuhTkUXm9XV9igl13iqYZ44fQ== +esbuild-android-arm64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.4.tgz#5178a20d2b7aba741a31c19609f9e67b346996b9" + integrity sha512-elDJt+jNyoHFId0/dKsuVYUPke3EcquIyUwzJCH17a3ERglN3A9aMBI5zbz+xNZ+FbaDNdpn0RaJHCFLbZX+fA== + +esbuild-darwin-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.4.tgz#7a3e66c8e1271b650541b25eed65c84f3564a69d" + integrity sha512-zJQGyHRAdZUXlRzbN7W+7ykmEiGC+bq3Gc4GxKYjjWTgDRSEly98ym+vRNkDjXwXYD3gGzSwvH35+MiHAtWvLA== + +esbuild-darwin-arm64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.4.tgz#793feca6032b2a57ef291eb9b2d33768d60a49d6" + integrity sha512-r8oYvAtqSGq8HNTZCAx4TdLE7jZiGhX9ooGi5AQAey37MA6XNaP8ZNlw9OCpcgpx3ryU2WctXwIqPzkHO7a8dg== + +esbuild-freebsd-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.4.tgz#294aec3c2cf4b41fb6900212fc9c33dd8fbbb4a2" + integrity sha512-u9DRGkn09EN8+lCh6z7FKle7awi17PJRBuAKdRNgSo5ZrH/3m+mYaJK2PR2URHMpAfXiwJX341z231tSdVe3Yw== + +esbuild-freebsd-arm64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.4.tgz#09fe66c751c12f9b976976b1d83f3de594cb2787" + integrity sha512-q3B2k68Uf6gfjATjcK16DqxvjqRQkHL8aPoOfj4op+lSqegdXvBacB1d8jw8PxbWJ8JHpdTLdAVUYU80kotQXA== + +esbuild-linux-32@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.4.tgz#a9f0793d7bcc9cef4f4ffa4398c525877fba5839" + integrity sha512-UUYJPHSiKAO8KoN3Ls/iZtgDLZvK5HarES96aolDPWZnq9FLx4dIHM/x2z4Rxv9IYqQ/DxlPoE2Co1UPBIYYeA== + +esbuild-linux-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.4.tgz#c0d0b4c9d62e3bbf8bdf2cece37403aa6d60fc2e" + integrity sha512-+RnohAKiiUW4UHLGRkNR1AnENW1gCuDWuygEtd4jxTNPIoeC7lbXGor7rtgjj9AdUzFgOEvAXyNNX01kJ8NueQ== + +esbuild-linux-arm64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.4.tgz#1292d97bfa64a08d12728f8a7837bf92776c779b" + integrity sha512-+A188cAdd6QuSRxMIwRrWLjgphQA0LDAQ/ECVlrPVJwnx+1i64NjDZivoqPYLOTkSPIKntiWwMhhf0U5/RrPHQ== + +esbuild-linux-arm@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.4.tgz#186cd9b8885ac132b9953a4a0afe668168debd10" + integrity sha512-BH5gKve4jglS7UPSsfwHSX79I5agC/lm4eKoRUEyo8lwQs89frQSRp2Xup+6SFQnxt3md5EsKcd2Dbkqeb3gPA== + +esbuild-linux-mips64le@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.4.tgz#42049bf72bc586817b4a51cc9e32148d13e5e807" + integrity sha512-0xkwtPaUkG5xMTFGaQPe1AadSe5QAiQuD4Gix1O9k5Xo/U8xGIkw9UFUTvfEUeu71vFb6ZgsIacfP1NLoFjWNw== + +esbuild-linux-ppc64le@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.4.tgz#adf1ce2ef2302757c4383887da6ac4dd25be9d4f" + integrity sha512-E1+oJPP7A+j23GPo3CEpBhGwG1bni4B8IbTA3/3rvzjURwUMZdcN3Fhrz24rnjzdLSHmULtOE4VsbT42h1Om4Q== + +esbuild-openbsd-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.4.tgz#1c8122101898c52a20c8786935cf3eb7a19b83b4" + integrity sha512-xEkI1o5HYxDzbv9jSox0EsDxpwraG09SRiKKv0W8pH6O3bt+zPSlnoK7+I7Q69tkvONkpIq5n2o+c55uq0X7cw== + +esbuild-sunos-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.4.tgz#4ec95faa14a60f295fe485bebffefff408739337" + integrity sha512-bjXUMcODMnB6hQicLBBmmnBl7OMDyVpFahKvHGXJfDChIi5udiIRKCmFUFIRn+AUAKVlfrofRKdyPC7kBsbvGQ== + +esbuild-wasm@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.13.4.tgz#9ae8ec5234cc651b2d74b23d4adac984055cff1c" + integrity sha512-2dN7njr9/2QzKLqbTEgXr73vDbSqffdJMv4EfaMQoy04cej0owbGHH5apPgED0wN9I5e7sBT0/Q81tVy3wQBlA== + +esbuild-windows-32@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.4.tgz#3182c380487b797b04d0ec2c80c2945666869080" + integrity sha512-z4CH07pfyVY0XF98TCsGmLxKCl0kyvshKDbdpTekW9f2d+dJqn5mmoUyWhpSVJ0SfYWJg86FoD9nMbbaMVyGdg== + +esbuild-windows-64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.4.tgz#b9e995f92d81f433a04f33611e603e82f9232e69" + integrity sha512-uVL11vORRPjocGLYam67rwFLd0LvkrHEs+JG+1oJN4UD9MQmNGZPa4gBHo6hDpF+kqRJ9kXgQSeDqUyRy0tj/Q== + +esbuild-windows-arm64@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.4.tgz#fb239532f07b764d158f4cc787178ef4c6fadb5c" + integrity sha512-vA6GLvptgftRcDcWngD5cMlL4f4LbL8JjU2UMT9yJ0MT5ra6hdZNFWnOeOoEtY4GtJ6OjZ0i+81sTqhAB0fMkg== esbuild@0.12.17: version "0.12.17" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.17.tgz#5816f905c2905de0ebbc658860df7b5b48afbcd3" integrity sha512-GshKJyVYUnlSXIZj/NheC2O0Kblh42CS7P1wJyTbbIHevTG4jYMS9NNw8EOd8dDWD0dzydYHS01MpZoUcQXB4g== -esbuild@0.12.29: - version "0.12.29" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" - integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== +esbuild@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.4.tgz#ce2deb56c4fb360938311cbfc67f8e467bb6841b" + integrity sha512-wMA5eUwpavTBiNl+It6j8OQuKVh69l6z4DKDLzoTIqC+gChnPpcmqdA8WNHptUHRnfyML+mKEQPlW7Mybj8gHg== + optionalDependencies: + esbuild-android-arm64 "0.13.4" + esbuild-darwin-64 "0.13.4" + esbuild-darwin-arm64 "0.13.4" + esbuild-freebsd-64 "0.13.4" + esbuild-freebsd-arm64 "0.13.4" + esbuild-linux-32 "0.13.4" + esbuild-linux-64 "0.13.4" + esbuild-linux-arm "0.13.4" + esbuild-linux-arm64 "0.13.4" + esbuild-linux-mips64le "0.13.4" + esbuild-linux-ppc64le "0.13.4" + esbuild-openbsd-64 "0.13.4" + esbuild-sunos-64 "0.13.4" + esbuild-windows-32 "0.13.4" + esbuild-windows-64 "0.13.4" + esbuild-windows-arm64 "0.13.4" escalade@^3.1.1: version "3.1.1" @@ -9855,11 +9993,12 @@ eslint-import-resolver-node@^0.3.5: resolve "^1.20.0" eslint-module-utils@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" - integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.0.tgz#9e97c12688113401259b39d960e6a1f09f966435" + integrity sha512-hqSE88MmHl3ru9SYvDyGrlo0JwROlf9fiEMplEV7j/EAuq9iSlIlyCFbBT6pdULQBSnBYtYKiMLps+hKkyP7Gg== dependencies: debug "^3.2.7" + find-up "^2.1.0" pkg-dir "^2.0.0" eslint-plugin-es@^3.0.0: @@ -10382,16 +10521,16 @@ expect@^26.6.2: jest-message-util "^26.6.2" jest-regex-util "^26.0.0" -expect@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.4.tgz#4debf546050bcdad8914a8c95fec7662e02bf67c" - integrity sha512-gOtuonQ8TCnbNNCSw2fhVzRf8EFYDII4nB5NmG4IEV0rbUnW1I5zXvoTntU4iicB/Uh0oZr20NGlOLdJiwsOZA== +expect@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" + integrity sha512-ZrO0w7bo8BgGoP/bLz+HDCI+0Hfei9jUSZs5yI/Wyn9VkG9w8oJ7rHRgYj+MA7yqqFa0IwHA3flJzZtYugShJA== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" ansi-styles "^5.0.0" jest-get-type "^27.0.6" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" jest-regex-util "^27.0.6" express-http-proxy@1.6.2: @@ -11815,9 +11954,9 @@ google-protobuf@3.18.0-rc.2: integrity sha512-mKZG5WYrwR/y1mA8xB+qI1O/6Pmvu4V6zldf+dpHdx6zoyVWT5lJTyXU8rAlpL7jtbe47e6M9L4PyWnKsYMOXQ== google-protobuf@^3.6.1, google-protobuf@^3.9.1: - version "3.18.0" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.18.0.tgz#687449d8e858305d658dc1145852c306d8222f5a" - integrity sha512-WlaQWRkUOo/lm9uTgNH6nk9IQt814RggWPzKBfnAVewOFzSzRUSmS1yUWRT6ixW1vS7er5p6tmLSmwzpPpmc8A== + version "3.18.1" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.18.1.tgz#31de10b65e833aa5bbd44680e8a748fa54c920f6" + integrity sha512-cDqSamZ8rGs+pOzhIsBte7wpezUKg/sggeptDWN5odhnRY/eDLa5VWLeNeQvcfiqjS3yUwgM+6OePCJMB7aWZA== got@9.6.0, got@^9.6.0: version "9.6.0" @@ -12533,9 +12672,9 @@ immediate@~3.2.3: integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= immutable@^4.0.0-rc.12: - version "4.0.0-rc.15" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.15.tgz#c30056f05eaaf5650fd15230586688fdd15c54bc" - integrity sha512-v8+A3sNyaieoP9dHegl3tEYnIZa7vqNiSv0U6D7YddiZi34VjKy4GsIxrRHj2d8+CS3MeiVja5QyNe4JO/aEXA== + version "4.0.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23" + integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw== import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" @@ -12574,9 +12713,9 @@ import-local@^2.0.0: resolve-cwd "^2.0.0" import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + version "3.0.3" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" + integrity sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -13555,9 +13694,9 @@ istanbul-lib-coverage@^2.0.5: integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.1.tgz#e8900b3ed6069759229cf30f7067388d148aeb5e" - integrity sha512-GvCYYTxaCPqwMjobtVcVKvSHtAGe48MNhGjpK8LtVF8K0ISX7hCKl85LgtuaSneWVyQmaGcW3iXVV3GaZSLpmQ== + version "3.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.2.tgz#36786d4d82aad2ea5911007e255e2da6b5f80d86" + integrity sha512-o5+eTUYzCJ11/+JhW5/FUCdfsdoYVdQ/8I/OveE2XsjehYn5DdeSnNQAbjYaO8gQ6hvGTN6GM6ddQqpTVG5j8g== istanbul-lib-hook@^3.0.0: version "3.0.0" @@ -13610,18 +13749,18 @@ istanbul-lib-source-maps@^3.0.6: source-map "^0.6.1" istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" - integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" istanbul-reports@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" - integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.4.tgz#5c38ce8136edf484c0fcfbf7514aafb0363ed1db" + integrity sha512-bFjUnc95rHjdCR63WMHUS7yfJJh8T9IPSWavvR02hhjVwezWALZ5axF9EqjmwZHpXqkzbgAMP8DmAtiyNxrdrQ== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -13635,9 +13774,9 @@ isurl@^1.0.0-alpha5: is-object "^1.0.1" it-all@^1.0.2, it-all@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.5.tgz#e880510d7e73ebb79063a76296a2eb3cb77bbbdb" - integrity sha512-ygD4kA4vp8fi+Y+NBgEKt6W06xSbv6Ub/0V8d1r3uCyJ9Izwa1UspkIOlqY9fOee0Z1w3WRo1+VWyAU4DgtufA== + version "1.0.6" + resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" + integrity sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A== it-concat@^2.0.0: version "2.0.0" @@ -13647,19 +13786,19 @@ it-concat@^2.0.0: bl "^5.0.0" it-drain@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/it-drain/-/it-drain-1.0.4.tgz#15ee0e90fba4b5bc8cff1c61b8c59d4203293baa" - integrity sha512-coB7mcyZ4lWBQKoQGJuqM+P94pvpn2T3KY27vcVWPqeB1WmoysRC76VZnzAqrBWzpWcoEJMjZ+fsMBslxNaWfQ== + version "1.0.5" + resolved "https://registry.yarnpkg.com/it-drain/-/it-drain-1.0.5.tgz#0466d4e286b37bcd32599d4e99b37a87cb8cfdf6" + integrity sha512-r/GjkiW1bZswC04TNmUnLxa6uovme7KKwPhc+cb1hHU65E3AByypHH6Pm91WHuvqfFsm+9ws0kPtDBV3/8vmIg== it-filter@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/it-filter/-/it-filter-1.0.2.tgz#7a89b582d561b1f1ff09417ad86f509dfaab5026" - integrity sha512-rxFUyPCrhk7WrNxD8msU10iEPhQmROoqwuyWmQUYY1PtopwUGBYyra9EYG2nRZADYeuT83cohKWmKCWPzpeyiw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/it-filter/-/it-filter-1.0.3.tgz#66ea0cc4bf84af71bebd353c05a9c5735fcba751" + integrity sha512-EI3HpzUrKjTH01miLHWmhNWy3Xpbx4OXMXltgrNprL5lDpF3giVpHIouFpr5l+evXw6aOfxhnt01BIB+4VQA+w== it-first@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-first/-/it-first-1.0.6.tgz#a015ecfc62d2d517382138da4142b35e61f4131e" - integrity sha512-wiI02c+G1BVuu0jz30Nsr1/et0cpSRulKUusN8HDZXxuX4MdUzfMp2P4JUk+a49Wr1kHitRLrnnh3+UzJ6neaQ== + version "1.0.7" + resolved "https://registry.yarnpkg.com/it-first/-/it-first-1.0.7.tgz#a4bef40da8be21667f7d23e44dae652f5ccd7ab1" + integrity sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g== it-glob@~0.0.11: version "0.0.14" @@ -13670,19 +13809,19 @@ it-glob@~0.0.11: minimatch "^3.0.4" it-last@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/it-last/-/it-last-1.0.5.tgz#5c711c7d58948bcbc8e0cb129af3a039ba2a585b" - integrity sha512-PV/2S4zg5g6dkVuKfgrQfN2rUN4wdTI1FzyAvU+i8RV96syut40pa2s9Dut5X7SkjwA3P0tOhLABLdnOJ0Y/4Q== + version "1.0.6" + resolved "https://registry.yarnpkg.com/it-last/-/it-last-1.0.6.tgz#4106232e5905ec11e16de15a0e9f7037eaecfc45" + integrity sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q== it-map@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/it-map/-/it-map-1.0.5.tgz#2f6a9b8f0ba1ed1aeadabf86e00b38c73a1dc299" - integrity sha512-EElupuWhHVStUgUY+OfTJIS2MZed96lDrAXzJUuqiiqLnIKoBRqtX1ZG2oR0bGDsSppmz83MtzCeKLZ9TVAUxQ== + version "1.0.6" + resolved "https://registry.yarnpkg.com/it-map/-/it-map-1.0.6.tgz#6aa547e363eedcf8d4f69d8484b450bc13c9882c" + integrity sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ== it-peekable@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/it-peekable/-/it-peekable-1.0.2.tgz#3b2c7948b765f35b3bb07abbb9b2108c644e73c1" - integrity sha512-LRPLu94RLm+lxLZbChuc9iCXrKCOu1obWqxfaKhF00yIp30VGkl741b5P60U+rdBxuZD/Gt1bnmakernv7bVFg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/it-peekable/-/it-peekable-1.0.3.tgz#8ebe933767d9c5aa0ae4ef8e9cb3a47389bced8c" + integrity sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ== it-reader@^3.0.0: version "3.0.0" @@ -13692,9 +13831,9 @@ it-reader@^3.0.0: bl "^5.0.0" it-take@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/it-take/-/it-take-1.0.1.tgz#155b0f8ed4b6ff5eb4e9e7a2f4395f16b137b68a" - integrity sha512-6H6JAWYcyumKSpcIPLs6tHN4xnibphmyU79WQaYVCBtaBOzf4fn75wzvSH8fH8fcMlPBTWY1RlmOWleQxBt2Ug== + version "1.0.2" + resolved "https://registry.yarnpkg.com/it-take/-/it-take-1.0.2.tgz#b5f1570014db7c3454897898b69bb7ac9c3bffc1" + integrity sha512-u7I6qhhxH7pSevcYNaMECtkvZW365ARqAIt9K+xjdK1B2WUDEjQSfETkOCT8bxFq/59LqrN3cMLUtTgmDBaygw== it-tar@^3.0.0: version "3.0.0" @@ -13793,36 +13932,36 @@ jest-changed-files@^26.6.2: execa "^4.0.0" throat "^5.0.0" -jest-changed-files@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.4.tgz#d7de46e90e5a599c47e260760f5ab53516e835e6" - integrity sha512-eeO1C1u4ex7pdTroYXezr+rbr957myyVoKGjcY4R1TJi3A+9v+4fu1Iv9J4eLq1bgFyT3O3iRWU9lZsEE7J72Q== +jest-changed-files@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.5.tgz#9dfd550d158260bcb6fa80aff491f5647f7daeca" + integrity sha512-jfnNJzF89csUKRPKJ4MwZ1SH27wTmX2xiAIHUHrsb/OYd9Jbo4/SXxJ17/nnx6RIifpthk3Y+LEeOk+/dDeGdw== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.4.tgz#3bd898a29dcaf6a506f3f1b780dff5f67ca83c23" - integrity sha512-TtheheTElrGjlsY9VxkzUU1qwIx05ItIusMVKnvNkMt4o/PeegLRcjq3Db2Jz0GGdBalJdbzLZBgeulZAJxJWA== +jest-circus@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.5.tgz#573256a6fb6e447ac2fc7e0ade9375013309037f" + integrity sha512-eyL9IcrAxm3Saq3rmajFCwpaxaRMGJ1KJs+7hlTDinXpJmeR3P02bheM3CYohE7UfwOBmrFMJHjgo/WPcLTM+Q== dependencies: - "@jest/environment" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.2.4" + expect "^27.2.5" is-generator-fn "^2.0.0" - jest-each "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-each "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + pretty-format "^27.2.5" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" @@ -13847,20 +13986,20 @@ jest-cli@^26.6.3: yargs "^15.4.1" jest-cli@^27.0.6: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.4.tgz#acda7f367aa6e674723fc1a7334e0ae1799448d2" - integrity sha512-4kpQQkg74HYLaXo3nzwtg4PYxSLgL7puz1LXHj5Tu85KmlIpxQFjRkXlx4V47CYFFIDoyl3rHA/cXOxUWyMpNg== + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.5.tgz#88718c8f05f1c0f209152952ecd61afe4c3311bb" + integrity sha512-XzfcOXi5WQrXqFYsDxq5RDOKY4FNIgBgvgf3ZBz4e/j5/aWep5KnsAYH5OFPMdX/TP/LFsYQMRH7kzJUMh6JKg== dependencies: - "@jest/core" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/core" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-config "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" prompts "^2.0.1" yargs "^16.2.0" @@ -13888,32 +14027,32 @@ jest-config@^26.6.3: micromatch "^4.0.2" pretty-format "^26.6.2" -jest-config@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.4.tgz#0204969f5ae2e5190d47be2c14c04d631b7836e2" - integrity sha512-tWy0UxhdzqiKyp4l5Vq4HxLyD+gH5td+GCF3c22/DJ0bYAOsMo+qi2XtbJI6oYMH5JOJQs9nLW/r34nvFCehjA== +jest-config@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.5.tgz#c2e4ec6ea2bf4ffd2cae3d927999fe6159cba207" + integrity sha512-QdENtn9b5rIIYGlbDNEcgY9LDL5kcokJnXrp7x8AGjHob/XFqw1Z6p+gjfna2sUulQsQ3ce2Fvntnv+7fKYDhQ== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.2.4" - "@jest/types" "^27.2.4" - babel-jest "^27.2.4" + "@jest/test-sequencer" "^27.2.5" + "@jest/types" "^27.2.5" + babel-jest "^27.2.5" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.2.4" - jest-environment-jsdom "^27.2.4" - jest-environment-node "^27.2.4" + jest-circus "^27.2.5" + jest-environment-jsdom "^27.2.5" + jest-environment-node "^27.2.5" jest-get-type "^27.0.6" - jest-jasmine2 "^27.2.4" + jest-jasmine2 "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-runner "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-resolve "^27.2.5" + jest-runner "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" micromatch "^4.0.4" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-diff@^26.0.0, jest-diff@^26.6.2: version "26.6.2" @@ -13925,15 +14064,15 @@ jest-diff@^26.0.0, jest-diff@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.4.tgz#171c51d3d2c105c457100fee6e7bf7cee51c8d8c" - integrity sha512-bLAVlDSCR3gqUPGv+4nzVpEXGsHh98HjUL7Vb2hVyyuBDoQmja8eJb0imUABsuxBeUVmf47taJSAd9nDrwWKEg== +jest-diff@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.5.tgz#908f7a6aca5653824516ad30e0a9fd9767e53623" + integrity sha512-7gfwwyYkeslOOVQY4tVq5TaQa92mWfC9COsVYMNVYyJTOYAqbIkoD3twi5A+h+tAPtAelRxkqY6/xu+jwTr0dA== dependencies: chalk "^4.0.0" diff-sequences "^27.0.6" jest-get-type "^27.0.6" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-docblock@^26.0.0: version "26.0.0" @@ -13960,16 +14099,16 @@ jest-each@^26.6.2: jest-util "^26.6.2" pretty-format "^26.6.2" -jest-each@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.4.tgz#b4f280aafd63129ba82e345f0e74c5a10200aeef" - integrity sha512-w9XVc+0EDBUTJS4xBNJ7N2JCcWItFd006lFjz77OarAQcQ10eFDBMrfDv2GBJMKlXe9aq0HrIIF51AXcZrRJyg== +jest-each@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.5.tgz#378118d516db730b92096a9607b8711165946353" + integrity sha512-HUPWIbJT0bXarRwKu/m7lYzqxR4GM5EhKOsu0z3t0SKtbFN6skQhpAUADM4qFShBXb9zoOuag5lcrR1x/WM+Ag== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" chalk "^4.0.0" jest-get-type "^27.0.6" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-util "^27.2.5" + pretty-format "^27.2.5" jest-environment-jsdom@^26.6.2: version "26.6.2" @@ -13984,17 +14123,17 @@ jest-environment-jsdom@^26.6.2: jest-util "^26.6.2" jsdom "^16.4.0" -jest-environment-jsdom@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.4.tgz#39ae80bbb8675306bfaf0440be1e5f877554539a" - integrity sha512-X70pTXFSypD7AIzKT1mLnDi5hP9w9mdTRcOGOmoDoBrNyNEg4rYm6d4LQWFLc9ps1VnMuDOkFSG0wjSNYGjkng== +jest-environment-jsdom@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.5.tgz#21de3ad0e89441d961b592ba7561b16241279208" + integrity sha512-QtRpOh/RQKuXniaWcoFE2ElwP6tQcyxHu0hlk32880g0KczdonCs5P1sk5+weu/OVzh5V4Bt1rXuQthI01mBLg== dependencies: - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-mock "^27.2.5" + jest-util "^27.2.5" jsdom "^16.6.0" jest-environment-node@^26.6.2: @@ -14009,17 +14148,17 @@ jest-environment-node@^26.6.2: jest-mock "^26.6.2" jest-util "^26.6.2" -jest-environment-node@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.4.tgz#b79f98cb36e0c9111aac859c9c99f04eb2f74ff6" - integrity sha512-ZbVbFSnbzTvhLOIkqh5lcLuGCCFvtG4xTXIRPK99rV2KzQT3kNg16KZwfTnLNlIiWCE8do960eToeDfcqmpSAw== +jest-environment-node@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.5.tgz#ffa1afb3604c640ec841f044d526c65912e02cef" + integrity sha512-0o1LT4grm7iwrS8fIoLtwJxb/hoa3GsH7pP10P02Jpj7Mi4BXy65u46m89vEM2WfD1uFJQ2+dfDiWZNA2e6bJg== dependencies: - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-mock "^27.2.5" + jest-util "^27.2.5" jest-get-type@^26.3.0: version "26.3.0" @@ -14052,12 +14191,12 @@ jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" -jest-haste-map@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.4.tgz#f8974807bedf07348ca9fd24e5861ab7c8e61aba" - integrity sha512-bkJ4bT00T2K+1NZXbRcyKnbJ42I6QBvoDNMTAQQDBhaGNnZreiQKUNqax0e6hLTx7E75pKDeltVu3V1HAdu+YA== +jest-haste-map@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.5.tgz#0247b7299250643472bbcf5b4ad85c72d5178e2e" + integrity sha512-pzO+Gw2WLponaSi0ilpzYBE0kuVJstoXBX8YWyUebR8VaXuX4tzzn0Zp23c/WaETo7XYTGv2e8KdnpiskAFMhQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -14065,8 +14204,8 @@ jest-haste-map@^27.2.4: graceful-fs "^4.2.4" jest-regex-util "^27.0.6" jest-serializer "^27.0.6" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-util "^27.2.5" + jest-worker "^27.2.5" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: @@ -14096,28 +14235,28 @@ jest-jasmine2@^26.6.3: pretty-format "^26.6.2" throat "^5.0.0" -jest-jasmine2@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.4.tgz#4a1608133dbdb4d68b5929bfd785503ed9c9ba51" - integrity sha512-fcffjO/xLWLVnW2ct3No4EksxM5RyPwHDYu9QU+90cC+/eSMLkFAxS55vkqsxexOO5zSsZ3foVpMQcg/amSeIQ== +jest-jasmine2@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz#baaf96c69913c52bce0100000cf0721027c0fd66" + integrity sha512-hdxY9Cm/CjLqu2tXeAoQHPgA4vcqlweVXYOg1+S9FeFdznB9Rti+eEBKDDkmOy9iqr4Xfbq95OkC4NFbXXPCAQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.2.4" + "@jest/environment" "^27.2.5" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.2.4" + expect "^27.2.5" is-generator-fn "^2.0.0" - jest-each "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-each "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + pretty-format "^27.2.5" throat "^6.0.1" jest-leak-detector@^26.6.2: @@ -14128,13 +14267,13 @@ jest-leak-detector@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-leak-detector@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.4.tgz#9bb7eab26a73bb280e9298be8d80f389288ec8f1" - integrity sha512-SrcHWbe0EHg/bw2uBjVoHacTo5xosl068x2Q0aWsjr2yYuW2XwqrSkZV4lurUop0jhv1709ymG4or+8E4sH27Q== +jest-leak-detector@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.5.tgz#e2edc3b37d38e8d9a527e10e456b403c3151b206" + integrity sha512-HYsi3GUR72bYhOGB5C5saF9sPdxGzSjX7soSQS+BqDRysc7sPeBwPbhbuT8DnOpijnKjgwWQ8JqvbmReYnt3aQ== dependencies: jest-get-type "^27.0.6" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-matcher-utils@^26.6.2: version "26.6.2" @@ -14146,15 +14285,15 @@ jest-matcher-utils@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-matcher-utils@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.4.tgz#008fff018151415ad1b6cfc083fd70fe1e012525" - integrity sha512-nQeLfFAIPPkyhkDfifAPfP/U5wm1x0fLtAzqXZSSKckXDNuk2aaOfQiDYv1Mgf5GY6yOsxfUnvNm3dDjXM+BXw== +jest-matcher-utils@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" + integrity sha512-qNR/kh6bz0Dyv3m68Ck2g1fLW5KlSOUNcFQh87VXHZwWc/gY6XwnKofx76Qytz3x5LDWT09/2+yXndTkaG4aWg== dependencies: chalk "^4.0.0" - jest-diff "^27.2.4" + jest-diff "^27.2.5" jest-get-type "^27.0.6" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-message-util@^26.6.2: version "26.6.2" @@ -14171,18 +14310,18 @@ jest-message-util@^26.6.2: slash "^3.0.0" stack-utils "^2.0.2" -jest-message-util@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.4.tgz#667e8c0f2b973156d1bac7398a7f677705cafaca" - integrity sha512-wbKT/BNGnBVB9nzi+IoaLkXt6fbSvqUxx+IYY66YFh96J3goY33BAaNG3uPqaw/Sh/FR9YpXGVDfd5DJdbh4nA== +jest-message-util@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.5.tgz#ed8b7b0965247bb875a49c1f9b9ab2d1d0820028" + integrity sha512-ggXSLoPfIYcbmZ8glgEJZ8b+e0Msw/iddRmgkoO7lDAr9SmI65IIfv7VnvTnV4FGnIIUIjzM+fHRHO5RBvyAbQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.2.4" + pretty-format "^27.2.5" slash "^3.0.0" stack-utils "^2.0.3" @@ -14194,12 +14333,12 @@ jest-mock@^26.6.2: "@jest/types" "^26.6.2" "@types/node" "*" -jest-mock@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.4.tgz#c8f0ef33f73d8ff53e3f60b16d59f1128f4072ae" - integrity sha512-iVRU905rutaAoUcrt5Tm1JoHHWi24YabqEGXjPJI4tAyA6wZ7mzDi3GrZ+M7ebgWBqUkZE93GAx1STk7yCMIQA== +jest-mock@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.5.tgz#0ec38d5ff1e49c4802e7a4a8179e8d7a2fd84de0" + integrity sha512-HiMB3LqE9RzmeMzZARi2Bz3NoymxyP0gCid4y42ca1djffNtYFKgI220aC1VP1mUZ8rbpqZbHZOJ15093bZV/Q== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -14226,14 +14365,14 @@ jest-resolve-dependencies@^26.6.3: jest-regex-util "^26.0.0" jest-snapshot "^26.6.2" -jest-resolve-dependencies@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.4.tgz#20c41cc02b66aa45169b282356ec73b133013089" - integrity sha512-i5s7Uh9B3Q6uwxLpMhNKlgBf6pcemvWaORxsW1zNF/YCY3jd5EftvnGBI+fxVwJ1CBxkVfxqCvm1lpZkbaoGmg== +jest-resolve-dependencies@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.5.tgz#fcd8eca005b3d11ba32da443045c028164b83be1" + integrity sha512-BSjefped31bcvvCh++/pN9ueqqN1n0+p8/58yScuWfklLm2tbPbS9d251vJhAy0ZI2pL/0IaGhOTJrs9Y4FJlg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" jest-regex-util "^27.0.6" - jest-snapshot "^27.2.4" + jest-snapshot "^27.2.5" jest-resolve@^26.6.2: version "26.6.2" @@ -14249,19 +14388,19 @@ jest-resolve@^26.6.2: resolve "^1.18.1" slash "^3.0.0" -jest-resolve@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.4.tgz#d3b999f073ff84a8ae109ce99ff7f3223048701a" - integrity sha512-IsAO/3+3BZnKjI2I4f3835TBK/90dxR7Otgufn3mnrDFTByOSXclDi3G2XJsawGV4/18IMLARJ+V7Wm7t+J89Q== +jest-resolve@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.5.tgz#04dadbfc1312a2541f5c199c5011945e9cfe5cef" + integrity sha512-q5irwS3oS73SKy3+FM/HL2T7WJftrk9BRzrXF92f7net5HMlS7lJMg/ZwxLB4YohKqjSsdksEw7n/jvMxV7EKg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" + jest-haste-map "^27.2.5" jest-pnp-resolver "^1.2.2" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-util "^27.2.5" + jest-validate "^27.2.5" resolve "^1.20.0" slash "^3.0.0" @@ -14291,31 +14430,31 @@ jest-runner@^26.6.3: source-map-support "^0.5.6" throat "^5.0.0" -jest-runner@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.4.tgz#d816f4cb4af04f3cba703afcf5a35a335b77cad4" - integrity sha512-hIo5PPuNUyVDidZS8EetntuuJbQ+4IHWxmHgYZz9FIDbG2wcZjrP6b52uMDjAEQiHAn8yn8ynNe+TL8UuGFYKg== +jest-runner@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.5.tgz#3d9d0626f351480bb2cffcfbbfac240c0097ebd4" + integrity sha512-n41vw9RLg5TKAnEeJK9d6pGOsBOpwE89XBniK+AD1k26oIIy3V7ogM1scbDjSheji8MUPC9pNgCrZ/FHLVDNgg== dependencies: - "@jest/console" "^27.2.4" - "@jest/environment" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/environment" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.6" - jest-environment-jsdom "^27.2.4" - jest-environment-node "^27.2.4" - jest-haste-map "^27.2.4" - jest-leak-detector "^27.2.4" - jest-message-util "^27.2.4" - jest-resolve "^27.2.4" - jest-runtime "^27.2.4" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-environment-jsdom "^27.2.5" + jest-environment-node "^27.2.5" + jest-haste-map "^27.2.5" + jest-leak-detector "^27.2.5" + jest-message-util "^27.2.5" + jest-resolve "^27.2.5" + jest-runtime "^27.2.5" + jest-util "^27.2.5" + jest-worker "^27.2.5" source-map-support "^0.5.6" throat "^6.0.1" @@ -14352,19 +14491,19 @@ jest-runtime@^26.6.3: strip-bom "^4.0.0" yargs "^15.4.1" -jest-runtime@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.4.tgz#170044041e5d30625ab8d753516bbe503f213a5c" - integrity sha512-ICKzzYdjIi70P17MZsLLIgIQFCQmIjMFf+xYww3aUySiUA/QBPUTdUqo5B2eg4HOn9/KkUsV0z6GVgaqAPBJvg== +jest-runtime@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.5.tgz#d144c3f6889b927aae1e695b63a41a3323b7016b" + integrity sha512-N0WRZ3QszKyZ3Dm27HTBbBuestsSd3Ud5ooVho47XZJ8aSKO/X1Ag8M1dNx9XzfGVRNdB/xCA3lz8MJwIzPLLA== dependencies: - "@jest/console" "^27.2.4" - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/globals" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/globals" "^27.2.5" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/yargs" "^16.0.0" chalk "^4.0.0" cjs-module-lexer "^1.0.0" @@ -14373,14 +14512,14 @@ jest-runtime@^27.2.4: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" - jest-message-util "^27.2.4" - jest-mock "^27.2.4" + jest-haste-map "^27.2.5" + jest-message-util "^27.2.5" + jest-mock "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-resolve "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.2.0" @@ -14423,10 +14562,10 @@ jest-snapshot@^26.6.2: pretty-format "^26.6.2" semver "^7.3.2" -jest-snapshot@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.4.tgz#277b2269437e3ffcb91d95a73b24becf33c5a871" - integrity sha512-5DFxK31rYS8X8C6WXsFx8XxrxW3PGa6+9IrUcZdTLg1aEyXDGIeiBh4jbwvh655bg/9vTETbEj/njfZicHTZZw== +jest-snapshot@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.5.tgz#8a612fe31e2967f58ad364542198dff61f92ef32" + integrity sha512-2/Jkn+VN6Abwz0llBltZaiJMnL8b1j5Bp/gRIxe9YR3FCEh9qp0TXVV0dcpTGZ8AcJV1SZGQkczewkI9LP5yGw== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -14434,23 +14573,23 @@ jest-snapshot@^27.2.4: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.2.4" + expect "^27.2.5" graceful-fs "^4.2.4" - jest-diff "^27.2.4" + jest-diff "^27.2.5" jest-get-type "^27.0.6" - jest-haste-map "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-resolve "^27.2.4" - jest-util "^27.2.4" + jest-haste-map "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-resolve "^27.2.5" + jest-util "^27.2.5" natural-compare "^1.4.0" - pretty-format "^27.2.4" + pretty-format "^27.2.5" semver "^7.3.2" jest-util@^26.1.0, jest-util@^26.6.2: @@ -14465,12 +14604,12 @@ jest-util@^26.1.0, jest-util@^26.6.2: is-ci "^2.0.0" micromatch "^4.0.2" -jest-util@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.4.tgz#3d7ce081b2e7f4cfe0156452ac01f3cb456cc656" - integrity sha512-mW++4u+fSvAt3YBWm5IpbmRAceUqa2B++JlUZTiuEt2AmNYn0Yw5oay4cP17TGsMINRNPSGiJ2zNnX60g+VbFg== +jest-util@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.5.tgz#88740c4024d223634a82ce7c2263e8bc6df3b3ba" + integrity sha512-QRhDC6XxISntMzFRd/OQ6TGsjbzA5ONO0tlAj2ElHs155x1aEr0rkYJBEysG6H/gZVH3oGFzCdAB/GA8leh8NQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -14489,17 +14628,17 @@ jest-validate@^26.6.2: leven "^3.1.0" pretty-format "^26.6.2" -jest-validate@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.4.tgz#b66d462b2fb93d7e16a47d1aa8763d5600bf2cfa" - integrity sha512-VMtbxbkd7LHnIH7PChdDtrluCFRJ4b1YV2YJzNwwsASMWftq/HgqiqjvptBOWyWOtevgO3f14wPxkPcLlVBRog== +jest-validate@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.5.tgz#2d59bf1627d180f395ba58f24599b0ee0efcfbdf" + integrity sha512-XgYtjS89nhVe+UfkbLgcm+GgXKWgL80t9nTcNeejyO3t0Sj/yHE8BtIJqjZu9NXQksYbGImoQRXmQ1gP+Guffw== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" camelcase "^6.2.0" chalk "^4.0.0" jest-get-type "^27.0.6" leven "^3.1.0" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-watcher@^26.6.2: version "26.6.2" @@ -14514,17 +14653,17 @@ jest-watcher@^26.6.2: jest-util "^26.6.2" string-length "^4.0.1" -jest-watcher@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.4.tgz#b1d5c39ab94f59f4f35f66cc96f7761a10e0cfc4" - integrity sha512-LXC/0+dKxhK7cfF7reflRYlzDIaQE+fL4ynhKhzg8IMILNMuI4xcjXXfUJady7OR4/TZeMg7X8eHx8uan9vqaQ== +jest-watcher@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.5.tgz#41cd3e64dc5bea8a4327083d71ba7667be400567" + integrity sha512-umV4qGozg2Dn6DTTtqAh9puPw+DGLK9AQas7+mWjiK8t0fWMpxKg8ZXReZw7L4C88DqorsGUiDgwHNZ+jkVrkQ== dependencies: - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.2.4" + jest-util "^27.2.5" string-length "^4.0.1" jest-worker@^26.6.2: @@ -14536,10 +14675,10 @@ jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.4.tgz#881455df75e22e7726a53f43703ab74d6b36f82d" - integrity sha512-Zq9A2Pw59KkVjBBKD1i3iE2e22oSjXhUKKuAK1HGX8flGwkm6NMozyEYzKd41hXc64dbd/0eWFeEEuxqXyhM+g== +jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.5.tgz#ed42865661959488aa020e8a325df010597c36d4" + integrity sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -16077,12 +16216,12 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== merkle-patricia-tree@^4.2.0, merkle-patricia-tree@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.1.tgz#fc43e7b162e597a0720ccdd702bf1d49765691d2" - integrity sha512-25reMgrT8PhJy0Ba0U7fMZD2oobS1FPWB9vQa0uBpJYIQYYuFXEHoqEkTqA/UzX+s9br3pmUVVY/TOsFt/x0oQ== + version "4.2.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.2.tgz#6dec17855370172458244c2f42c989dd60b773a3" + integrity sha512-eqZYNTshcYx9aESkSPr71EqwsR/QmpnObDEV4iLxkt/x/IoLYZYjJvKY72voP/27Vy61iMOrfOG6jrn7ttXD+Q== dependencies: "@types/levelup" "^4.3.0" - ethereumjs-util "^7.1.0" + ethereumjs-util "^7.1.2" level-mem "^5.0.1" level-ws "^2.0.0" readable-stream "^3.6.0" @@ -16473,9 +16612,9 @@ ms@^2.0.0, ms@^2.1.1, ms@^2.1.2: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msal@^1.0.2: - version "1.4.13" - resolved "https://registry.yarnpkg.com/msal/-/msal-1.4.13.tgz#5279e43685f55c77477b6e54090130a3ac83f8b6" - integrity sha512-uFEa4KGlpGqNMwa7/1OQc6WQUF8iwHbaiHMVn0Cl66Ec7o30ZTtX9s9OWrf0wAxp8Mwg0JEE886z/PHpsiZUxQ== + version "1.4.14" + resolved "https://registry.yarnpkg.com/msal/-/msal-1.4.14.tgz#159d69b6b7f130563e20466158e87fd86d00ec28" + integrity sha512-k8M5+/jbfSQoCf7CyQzBP5HE5mY8TkBujykLGTEp2x0MvOK/FQsfUTNis28zlvvPVzhgrhb5GQiGM8rRpXyHdA== dependencies: tslib "^1.9.3" @@ -16633,15 +16772,10 @@ nanocolors@^0.1.12: resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.1.12.tgz#8577482c58cbd7b5bb1681db4cf48f11a87fd5f6" integrity sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ== -nanocolors@^0.2.12, nanocolors@^0.2.2, nanocolors@^0.2.8: - version "0.2.12" - resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.2.12.tgz#4d05932e70116078673ea4cc6699a1c56cc77777" - integrity sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug== - -nanoid@^3.0.2, nanoid@^3.1.12, nanoid@^3.1.20, nanoid@^3.1.23, nanoid@^3.1.25: - version "3.1.28" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.28.tgz#3c01bac14cb6c5680569014cc65a2f26424c6bd4" - integrity sha512-gSu9VZ2HtmoKYe/lmyPFES5nknFrHa+/DT9muUFWFMi6Jh9E1I7bkvlQ8xxf1Kos9pi9o8lBnIOkatMhKX/YUw== +nanoid@^3.0.2, nanoid@^3.1.12, nanoid@^3.1.20, nanoid@^3.1.23, nanoid@^3.1.28: + version "3.1.29" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.29.tgz#214fb2d7a33e1a5bef4757b779dfaeb6a4e5aeb4" + integrity sha512-dW2pUSGZ8ZnCFIlBIA31SV8huOGCHb6OwzVCc7A69rb/a+SgPBwfmLvK5TKQ3INPbRkcI8a/Owo0XbiTNH19wg== nanomatch@^1.2.9: version "1.2.13" @@ -16921,10 +17055,10 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^1.1.76: - version "1.1.76" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.76.tgz#df245b062b0cafbd5282ab6792f7dccc2d97f36e" - integrity sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA== +node-releases@^1.1.77: + version "1.1.77" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" + integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== node-ssh@12.0.0: version "12.0.0" @@ -17336,13 +17470,13 @@ object.assign@^4.1.0, object.assign@^4.1.2: object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" - integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + version "2.1.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" + integrity sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" object.pick@^1.3.0: version "1.3.0" @@ -17352,13 +17486,13 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" - integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.2" + es-abstract "^1.19.1" obliterator@^1.6.1: version "1.6.1" @@ -17853,9 +17987,9 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5: safe-buffer "^5.1.1" parse-duration@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.0.tgz#8605651745f61088f6fb14045c887526c291858c" - integrity sha512-X4kUkCTHU1N/kEbwK9FpUJ0UZQa90VzeczfS704frR30gljxDG0pSziws06XlK+CGRSo/1wtG1mFIdBFQTMQNw== + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.1.tgz#145ea89a4309ec8e9c0df9d82c17e4c12fe3afd7" + integrity sha512-vv3rNpBYqRo8m357JeFBYFud+yX6HyxT2oBCI5gi0d/zW7g2C+meWucThqzp47Mdp+90nOjDbXfrqxdvkEIMxA== parse-headers@^2.0.0: version "2.0.4" @@ -18052,6 +18186,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" + integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -18734,20 +18873,20 @@ postcss@8.3.6: source-map-js "^0.6.2" postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.38" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.38.tgz#5365a9c5126643d977046ad239f60eadda2491d6" - integrity sha512-wNrSHWjHDQJR/IZL5IKGxRtFgrYNaAA/UrkW2WqbtZO6uxSLMxMN+s2iqUMwnAWm3fMROlDYZB41dr0Mt7vBwQ== + version "7.0.39" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" + integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== dependencies: - nanocolors "^0.2.2" + picocolors "^0.2.1" source-map "^0.6.1" postcss@^8.2.15, postcss@^8.3.5: - version "8.3.8" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.8.tgz#9ebe2a127396b4b4570ae9f7770e7fb83db2bac1" - integrity sha512-GT5bTjjZnwDifajzczOC+r3FI3Cu+PgPvrsjhQdRqa2kTJ4968/X9CUce9xttIB0xOs5c6xf0TCWZo/y9lF6bA== + version "8.3.9" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.9.tgz#98754caa06c4ee9eb59cc48bd073bb6bd3437c31" + integrity sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw== dependencies: - nanocolors "^0.2.2" - nanoid "^3.1.25" + nanoid "^3.1.28" + picocolors "^0.2.1" source-map-js "^0.6.2" prebuild-install@^6.0.0: @@ -18826,12 +18965,12 @@ pretty-format@^26.0.0, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" - integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== +pretty-format@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.5.tgz#7cfe2a8e8f01a5b5b29296a0b70f4140df0830c5" + integrity sha512-+nYn2z9GgicO9JiqmY25Xtq8SYfZ/5VCpEU3pppHHNAhd1y+ZXxmNPd1evmNcAd6Hz4iBV2kf0UpGth5A/VJ7g== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" ansi-regex "^5.0.1" ansi-styles "^5.0.0" react-is "^17.0.1" @@ -18910,9 +19049,9 @@ promise@~2.0: is-promise "~1" prompts@^2.0.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" - integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" sisteransi "^1.0.5" @@ -19939,11 +20078,11 @@ rlp@2.2.4: bn.js "^4.11.1" rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: - version "2.2.6" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" - integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== dependencies: - bn.js "^4.11.1" + bn.js "^5.2.0" roarr@^2.15.3: version "2.15.4" @@ -19991,13 +20130,20 @@ rxjs@6.6.7, rxjs@^6.5.3, rxjs@^6.6.0, rxjs@^6.6.3, rxjs@^6.6.7: dependencies: tslib "^1.9.0" -rxjs@7.3.0, rxjs@^7.2.0: +rxjs@7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== dependencies: tslib "~2.1.0" +rxjs@^7.2.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" + integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== + dependencies: + tslib "~2.1.0" + safe-buffer@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -21051,9 +21197,9 @@ sprintf-js@~1.0.2: integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= ssh2@^1.1.0, ssh2@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.4.0.tgz#e32e8343394364c922bad915a5a7fecd67d0f5c5" - integrity sha512-XvXwcXKvS452DyQvCa6Ct+chpucwc/UyxgliYz+rWXJ3jDHdtBb9xgmxJdMmnIn5bpgGAEV3KaEsH98ZGPHqwg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.5.0.tgz#4dc559ba98a1cbb420e8d42998dfe35d0eda92bc" + integrity sha512-iUmRkhH9KGeszQwDW7YyyqjsMTf4z+0o48Cp4xOwlY5LjtbIAvyd3fwnsoUZW/hXmTCRA3yt7S/Jb9uVjErVlA== dependencies: asn1 "^0.2.4" bcrypt-pbkdf "^1.0.2" @@ -21294,22 +21440,22 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 strip-ansi "^6.0.1" string.prototype.padend@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz#6858ca4f35c5268ebd5e8615e1327d55f59ee311" - integrity sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ== + version "3.1.3" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz#997a6de12c92c7cb34dc8a201a6c53d9bd88a5f1" + integrity sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" string.prototype.trim@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" - integrity sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q== + version "1.2.5" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz#a587bcc8bfad8cb9829a577f5de30dd170c1682c" + integrity sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" string.prototype.trimend@^1.0.4: version "1.0.4" @@ -22212,11 +22358,11 @@ ts-node@8.9.1: yn "3.1.1" ts-node@^10.0.0: - version "10.2.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" - integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== + version "10.3.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.3.0.tgz#a797f2ed3ff50c9a5d814ce400437cb0c1c048b4" + integrity sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw== dependencies: - "@cspotcode/source-map-support" "0.6.1" + "@cspotcode/source-map-support" "0.7.0" "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" "@tsconfig/node14" "^1.0.0" @@ -22491,6 +22637,11 @@ typescript@^3.9.10: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@^4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" + integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== + ua-parser-js@^0.7.28: version "0.7.28" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31"