From 8f0aa00cfaab2291462f11aa2cb770727de2e043 Mon Sep 17 00:00:00 2001 From: krisbitney Date: Wed, 28 Jun 2023 10:34:01 -0500 Subject: [PATCH 01/41] added wrap-rust bindings dir with helpers and tests --- implementations/wrap-rust/.gitignore | 7 + implementations/wrap-rust/.nvmrc | 1 + implementations/wrap-rust/Cargo.lock | 382 ++ implementations/wrap-rust/Cargo.toml | 24 + implementations/wrap-rust/README.md | 15 + implementations/wrap-rust/jest.config.js | 15 + implementations/wrap-rust/package.json | 20 + .../wrap-rust/polywrap.deploy.yaml | 7 + implementations/wrap-rust/polywrap.graphql | 1 + implementations/wrap-rust/polywrap.yaml | 10 + .../__tests__/cases/000-sanity/input.graphql | 255 + .../cases/000-sanity/output/_else/mod.rs | 49 + .../000-sanity/output/_else/serialization.rs | 68 + .../cases/000-sanity/output/_while/mod.rs | 51 + .../000-sanity/output/another_type/mod.rs | 54 + .../output/another_type/serialization.rs | 97 + .../000-sanity/output/custom_enum/mod.rs | 51 + .../000-sanity/output/custom_map_value/mod.rs | 48 + .../output/custom_map_value/serialization.rs | 68 + .../000-sanity/output/custom_type/mod.rs | 133 + .../output/custom_type/serialization.rs | 851 +++ .../cases/000-sanity/output/entry.rs | 42 + .../cases/000-sanity/output/env/mod.rs | 51 + .../000-sanity/output/env/serialization.rs | 98 + .../cases/000-sanity/output/imported/mod.rs | 12 + .../test_import_another_object/mod.rs | 49 + .../serialization.rs | 68 + .../output/imported/test_import_enum/mod.rs | 51 + .../imported/test_import_enum_return/mod.rs | 51 + .../output/imported/test_import_env/mod.rs | 66 + .../imported/test_import_env/serialization.rs | 241 + .../output/imported/test_import_module/mod.rs | 72 + .../test_import_module/serialization.rs | 554 ++ .../output/imported/test_import_object/mod.rs | 66 + .../test_import_object/serialization.rs | 241 + .../__tests__/cases/000-sanity/output/mod.rs | 71 + .../cases/000-sanity/output/module/mod.rs | 25 + .../cases/000-sanity/output/module/module.rs | 31 + .../000-sanity/output/module/serialization.rs | 770 +++ .../cases/000-sanity/output/module/wrapped.rs | 134 + .../000-sanity/output/test_import/mod.rs | 11 + .../cases/001-module-functions/input.graphql | 11 + .../001-module-functions/output/entry.rs | 34 + .../cases/001-module-functions/output/mod.rs | 20 + .../001-module-functions/output/module/mod.rs | 17 + .../output/module/module.rs | 18 + .../output/module/serialization.rs | 201 + .../output/module/wrapped.rs | 58 + .../cases/002-object-types/input.graphql | 68 + .../002-object-types/output/_else/mod.rs | 49 + .../output/_else/serialization.rs | 68 + .../output/another_type/mod.rs | 54 + .../output/another_type/serialization.rs | 97 + .../output/custom_map_value/mod.rs | 48 + .../output/custom_map_value/serialization.rs | 68 + .../output/custom_type/mod.rs | 124 + .../output/custom_type/serialization.rs | 748 ++ .../cases/002-object-types/output/entry.rs | 24 + .../cases/002-object-types/output/mod.rs | 15 + .../wrap-rust/src/__tests__/cases/index.ts | 35 + .../wrap-rust/src/__tests__/e2e.spec.ts | 79 + .../wrap-rust/src/__tests__/output.ts | 80 + .../wrap-rust/src/__tests__/polywrap.yaml | 6 + .../wrap-rust/src/helpers/array_has_length.rs | 6 + .../wrap-rust/src/helpers/array_length.rs | 6 + .../wrap-rust/src/helpers/detect_keyword.rs | 15 + .../wrap-rust/src/helpers/is_keyword.rs | 24 + .../wrap-rust/src/helpers/is_not_first.rs | 7 + .../wrap-rust/src/helpers/is_not_last.rs | 8 + implementations/wrap-rust/src/helpers/mod.rs | 73 + .../wrap-rust/src/helpers/pretty.rs | 6 + .../src/helpers/serde_annotate_if_bytes.rs | 14 + .../helpers/serde_rename_if_case_mismatch.rs | 19 + .../wrap-rust/src/helpers/to_graphql_type.rs | 177 + .../wrap-rust/src/helpers/to_lower.rs | 25 + .../wrap-rust/src/helpers/to_upper.rs | 27 + .../wrap-rust/src/helpers/to_wasm.rs | 114 + implementations/wrap-rust/src/helpers/util.rs | 18 + implementations/wrap-rust/src/lib.rs | 255 + implementations/wrap-rust/src/renderer.rs | 54 + implementations/wrap-rust/todo | 0 implementations/wrap-rust/tsconfig.json | 28 + implementations/wrap-rust/yarn.lock | 6041 +++++++++++++++++ 83 files changed, 13750 insertions(+) create mode 100644 implementations/wrap-rust/.gitignore create mode 100644 implementations/wrap-rust/.nvmrc create mode 100644 implementations/wrap-rust/Cargo.lock create mode 100644 implementations/wrap-rust/Cargo.toml create mode 100644 implementations/wrap-rust/README.md create mode 100644 implementations/wrap-rust/jest.config.js create mode 100644 implementations/wrap-rust/package.json create mode 100644 implementations/wrap-rust/polywrap.deploy.yaml create mode 100644 implementations/wrap-rust/polywrap.graphql create mode 100644 implementations/wrap-rust/polywrap.yaml create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/input.graphql create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_while/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_enum/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/entry.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum_return/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/000-sanity/output/test_import/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/input.graphql create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/entry.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/input.graphql create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/serialization.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/entry.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/002-object-types/output/mod.rs create mode 100644 implementations/wrap-rust/src/__tests__/cases/index.ts create mode 100644 implementations/wrap-rust/src/__tests__/e2e.spec.ts create mode 100644 implementations/wrap-rust/src/__tests__/output.ts create mode 100644 implementations/wrap-rust/src/__tests__/polywrap.yaml create mode 100644 implementations/wrap-rust/src/helpers/array_has_length.rs create mode 100644 implementations/wrap-rust/src/helpers/array_length.rs create mode 100644 implementations/wrap-rust/src/helpers/detect_keyword.rs create mode 100644 implementations/wrap-rust/src/helpers/is_keyword.rs create mode 100644 implementations/wrap-rust/src/helpers/is_not_first.rs create mode 100644 implementations/wrap-rust/src/helpers/is_not_last.rs create mode 100644 implementations/wrap-rust/src/helpers/mod.rs create mode 100644 implementations/wrap-rust/src/helpers/pretty.rs create mode 100644 implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs create mode 100644 implementations/wrap-rust/src/helpers/serde_rename_if_case_mismatch.rs create mode 100644 implementations/wrap-rust/src/helpers/to_graphql_type.rs create mode 100644 implementations/wrap-rust/src/helpers/to_lower.rs create mode 100644 implementations/wrap-rust/src/helpers/to_upper.rs create mode 100644 implementations/wrap-rust/src/helpers/to_wasm.rs create mode 100644 implementations/wrap-rust/src/helpers/util.rs create mode 100644 implementations/wrap-rust/src/lib.rs create mode 100644 implementations/wrap-rust/src/renderer.rs create mode 100644 implementations/wrap-rust/todo create mode 100644 implementations/wrap-rust/tsconfig.json create mode 100644 implementations/wrap-rust/yarn.lock diff --git a/implementations/wrap-rust/.gitignore b/implementations/wrap-rust/.gitignore new file mode 100644 index 00000000..925c83ce --- /dev/null +++ b/implementations/wrap-rust/.gitignore @@ -0,0 +1,7 @@ +build +node_modules +.polywrap +target +workflows/output.json +wrap +debug \ No newline at end of file diff --git a/implementations/wrap-rust/.nvmrc b/implementations/wrap-rust/.nvmrc new file mode 100644 index 00000000..50157062 --- /dev/null +++ b/implementations/wrap-rust/.nvmrc @@ -0,0 +1 @@ +v17.9.1 \ No newline at end of file diff --git a/implementations/wrap-rust/Cargo.lock b/implementations/wrap-rust/Cargo.lock new file mode 100644 index 00000000..7714379e --- /dev/null +++ b/implementations/wrap-rust/Cargo.lock @@ -0,0 +1,382 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bigdecimal" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cpufeatures" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "handlebars" +version = "4.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +dependencies = [ + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + +[[package]] +name = "pest" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "polywrap-wasm-rs" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb675089ed7e61f0492789b0cfd197efd4b9239b7b8e2651707dee77f44e679" +dependencies = [ + "bigdecimal", + "byteorder", + "num-bigint", + "num-traits", + "serde_json", + "thiserror", +] + +[[package]] +name = "proc-macro2" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "serde" +version = "1.0.162" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.162" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "syn" +version = "2.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "ucd-trie" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wrap-rust-wrap-abi-bindgen" +version = "0.1.0" +dependencies = [ + "handlebars", + "lazy_static", + "polywrap-wasm-rs", + "regex", + "serde", + "serde_json", +] diff --git a/implementations/wrap-rust/Cargo.toml b/implementations/wrap-rust/Cargo.toml new file mode 100644 index 00000000..e3bd6dbb --- /dev/null +++ b/implementations/wrap-rust/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "wrap-rust-wrap-abi-bindgen" +version = "0.1.0" +description = "Generates Rust wrap bindings from a WRAP ABI" +authors = ["Polywrap"] +repository = "https://github.com/polywrap/wrap-abi-bindgen" +license = "MIT" +edition = "2021" + +[dependencies] +polywrap-wasm-rs = { version = "~0.10.5" } +serde = { version = "1.0", features = ["derive"] } +serde_json = { version = "1.0.39" } +handlebars = { version = "4.3.7" } +lazy_static = { version = "1.4.0" } +regex = { version = "1.8.1" } + +[lib] +crate-type = ["cdylib"] + +[profile.release] +opt-level = 's' +lto = true +panic = 'abort' diff --git a/implementations/wrap-rust/README.md b/implementations/wrap-rust/README.md new file mode 100644 index 00000000..cbce544c --- /dev/null +++ b/implementations/wrap-rust/README.md @@ -0,0 +1,15 @@ +# Polywrap Wasm Wrapper Template +A simple starter template for a Rust Wasm wrapper. For more information on how this project works, and a step by step on how to extend its behavior, see the documentation [here](https://docs.polywrap.io/). + +# How To Run + +## Install Dependencies +`nvm install && nvm use` +`yarn` + +## Codegen & Build +`yarn codegen` +`yarn build` + +## Test +`yarn test` diff --git a/implementations/wrap-rust/jest.config.js b/implementations/wrap-rust/jest.config.js new file mode 100644 index 00000000..4a4c022f --- /dev/null +++ b/implementations/wrap-rust/jest.config.js @@ -0,0 +1,15 @@ +module.exports = { + collectCoverage: false, + preset: "ts-jest", + testEnvironment: "node", + testMatch: ["**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)"], + globals: { + "ts-jest": { + tsconfig: "tsconfig.json", + diagnostics: false, + }, + }, + testPathIgnorePatterns: [ + "/.polywrap/" + ], +}; diff --git a/implementations/wrap-rust/package.json b/implementations/wrap-rust/package.json new file mode 100644 index 00000000..a653fa60 --- /dev/null +++ b/implementations/wrap-rust/package.json @@ -0,0 +1,20 @@ +{ + "name": "wrap-rust-wrap-abi-bindgen", + "private": true, + "scripts": { + "codegen": "npx polywrap codegen", + "build": "npx polywrap build", + "deploy": "npx polywrap deploy", + "test": "yarn test:codegen && jest --passWithNoTests --runInBand --verbose", + "test:codegen": "npx polywrap codegen -m ./src/__tests__/polywrap.yaml -g ./src/__tests__/wrap" + }, + "devDependencies": { + "@types/jest": "26.0.8", + "@polywrap/schema-parse": "0.10.5", + "jest": "26.6.3", + "jest-diff": "26.6.2", + "polywrap": "0.10.5", + "ts-jest": "26.5.4", + "typescript": "4.9.5" + } +} diff --git a/implementations/wrap-rust/polywrap.deploy.yaml b/implementations/wrap-rust/polywrap.deploy.yaml new file mode 100644 index 00000000..2b9ab565 --- /dev/null +++ b/implementations/wrap-rust/polywrap.deploy.yaml @@ -0,0 +1,7 @@ +format: 0.1.0 +stages: + ipfs_deploy: + package: ipfs + uri: fs/./build + config: + gatewayUri: "https://ipfs.wrappers.io" \ No newline at end of file diff --git a/implementations/wrap-rust/polywrap.graphql b/implementations/wrap-rust/polywrap.graphql new file mode 100644 index 00000000..3704ef4a --- /dev/null +++ b/implementations/wrap-rust/polywrap.graphql @@ -0,0 +1 @@ +#import * from "wrap://ens/wraps.eth:abi-bindgen@0.1" diff --git a/implementations/wrap-rust/polywrap.yaml b/implementations/wrap-rust/polywrap.yaml new file mode 100644 index 00000000..3d72001d --- /dev/null +++ b/implementations/wrap-rust/polywrap.yaml @@ -0,0 +1,10 @@ +format: 0.3.0 +project: + name: wrap-rust-wrap-abi-bindgen + type: wasm/rust +source: + module: ./Cargo.toml + schema: ./polywrap.graphql + import_abis: + - uri: wrap://ens/wraps.eth:abi-bindgen@0.1 + abi: ../../interface/build/wrap.info diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/input.graphql b/implementations/wrap-rust/src/__tests__/cases/000-sanity/input.graphql new file mode 100644 index 00000000..2755c645 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/input.graphql @@ -0,0 +1,255 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Polywrap Header END ### + +type Module @imports( + types: [ + "TestImport_Module", + "TestImport_Object", + "TestImport_AnotherObject", + "TestImport_Enum", + "TestImport_Enum_Return" + ] +) @capability( + type: "getImplementations", + uri: "testimport.uri.eth", + namespace: "TestImport" +) { + moduleMethod( + str: String! + optStr: String + en: CustomEnum! + optEnum: CustomEnum + enumArray: [CustomEnum!]! + optEnumArray: [CustomEnum] + map: Map! @annotate(type: "Map!") + mapOfArr: Map! @annotate(type: "Map!") + mapOfMap: Map! @annotate(type: "Map!>!") + mapOfObj: Map! @annotate(type: "Map!") + mapOfArrOfObj: Map! @annotate(type: "Map!") + ): Int! + + objectMethod( + object: AnotherType! + optObject: AnotherType + objectArray: [AnotherType!]! + optObjectArray: [AnotherType] + ): AnotherType @env(required: true) + + optionalEnvMethod( + object: AnotherType! + optObject: AnotherType + objectArray: [AnotherType!]! + optObjectArray: [AnotherType] + ): AnotherType @env(required: false) + + if( + if: else! + ): else! +} + +type Env { + prop: String! + optProp: String + optMap: Map @annotate(type: "Map") +} + +type CustomType { + str: String! + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + u16: UInt16! + u32: UInt32! + i: Int! + i8: Int8! + i16: Int16! + i32: Int32! + bigint: BigInt! + optBigint: BigInt + bignumber: BigNumber! + optBignumber: BigNumber + json: JSON! + optJson: JSON + bytes: Bytes! + optBytes: Bytes + boolean: Boolean! + optBoolean: Boolean + u_array: [UInt!]! + uOpt_array: [UInt!] + _opt_uOptArray: [UInt] + optStrOptArray: [String] + uArrayArray: [[UInt!]!]! + uOptArrayOptArray: [[UInt32]]! + uArrayOptArrayArray: [[[UInt32!]!]]! + crazyArray: [[[[UInt32!]]!]] + object: AnotherType! + optObject: AnotherType + objectArray: [AnotherType!]! + optObjectArray: [AnotherType] + en: CustomEnum! + optEnum: CustomEnum + enumArray: [CustomEnum!]! + optEnumArray: [CustomEnum] + map: Map! @annotate(type: "Map!") + mapOfArr: Map! @annotate(type: "Map!") + mapOfObj: Map! @annotate(type: "Map!") + mapOfArrOfObj: Map! @annotate(type: "Map!") + mapCustomValue: Map! @annotate(type: "Map!") +} + +type AnotherType { + prop: String + circular: CustomType + const: String +} + +enum CustomEnum { + STRING + BYTES +} + +type CustomMapValue { + foo: String! +} + +type else { + else: String! +} + +enum while { + for, + in, +} + +### Imported Modules START ### + +type TestImport_Module @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "Module" +) @enabled_interface { + importedMethod( + str: String! + optStr: String + u: UInt! + optU: UInt + uArrayArray: [[UInt]]! + object: TestImport_Object! + optObject: TestImport_Object + objectArray: [TestImport_Object!]! + optObjectArray: [TestImport_Object] + en: TestImport_Enum! + optEnum: TestImport_Enum + enumArray: [TestImport_Enum!]! + optEnumArray: [TestImport_Enum] + ): TestImport_Object @env(required: true) + + anotherMethod( + arg: [String!]! + ): Int32! + + returnsArrayOfEnums( + arg: String! + ): [TestImport_Enum_Return]! +} + +### Imported Modules END ### + +### Imported Objects START ### + +type TestImport_Object @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "Object" +) { + object: TestImport_AnotherObject! + optObject: TestImport_AnotherObject + objectArray: [TestImport_AnotherObject!]! + optObjectArray: [TestImport_AnotherObject] + en: TestImport_Enum! + optEnum: TestImport_Enum + enumArray: [TestImport_Enum!]! + optEnumArray: [TestImport_Enum] +} + +type TestImport_AnotherObject @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "AnotherObject" +) { + prop: String! +} + +enum TestImport_Enum @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "Enum" +) { + STRING + BYTES +} + +enum TestImport_Enum_Return @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "Enum" +) { + STRING + BYTES +} + +### Imported Objects END ### + +### Imported Envs START ### + +type TestImport_Env @imported( + uri: "testimport.uri.eth", + namespace: "TestImport", + nativeType: "Env" +) { + object: TestImport_AnotherObject! + optObject: TestImport_AnotherObject + objectArray: [TestImport_AnotherObject!]! + optObjectArray: [TestImport_AnotherObject] + en: TestImport_Enum! + optEnum: TestImport_Enum + enumArray: [TestImport_Enum!]! + optEnumArray: [TestImport_Enum] +} + +### Imported Envs END ### \ No newline at end of file diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs new file mode 100644 index 00000000..d474a4a3 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs @@ -0,0 +1,49 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_else, + read_else, + serialize_else, + write_else +}; + + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Else { + #[serde(rename = "else")] + pub _else: String, +} + +impl Else { + pub fn new() -> Else { + Else { + _else: String::new(), + } + } + + pub fn to_buffer(args: &Else) -> Result, EncodeError> { + serialize_else(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_else(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &Else, writer: &mut W) -> Result<(), EncodeError> { + write_else(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_else(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/serialization.rs new file mode 100644 index 00000000..5e048162 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/serialization.rs @@ -0,0 +1,68 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::Else; + +pub fn serialize_else(args: &Else) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: Else".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_else(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_else(args: &Else, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("else", "String", "writing property"); + writer.write_string("else")?; + writer.write_string(&args._else)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_else(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: Else".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_else(&mut reader) +} + +pub fn read_else(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _else: String = String::new(); + let mut _else_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "else" => { + reader.context().push(&field, "String", "type found, reading property"); + _else = reader.read_string()?; + _else_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_else_set { + return Err(DecodeError::MissingField("else: String.".to_string())); + } + + Ok(Else { + _else: _else, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_while/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_while/mod.rs new file mode 100644 index 00000000..a17acc23 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_while/mod.rs @@ -0,0 +1,51 @@ +use polywrap_wasm_rs::{EnumTypeError}; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum While { + _for, + _in, + _MAX_ +} + +pub fn sanitize_while_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= While::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'While': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_while_value(key: &str) -> Result { + match key { + "_for" => Ok(While::_for), + "_in" => Ok(While::_in), + "_MAX_" => Ok(While::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum 'While': {}", err))) + } +} + +pub fn get_while_key(value: While) -> Result { + if sanitize_while_value(value as i32).is_ok() { + match value { + While::_for => Ok("_for".to_string()), + While::_in => Ok("_in".to_string()), + While::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'While': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for While { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result { + match v { + x if x == While::_for as i32 => Ok(While::_for), + x if x == While::_in as i32 => Ok(While::_in), + x if x == While::_MAX_ as i32 => Ok(While::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum 'While': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs new file mode 100644 index 00000000..15091a2e --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs @@ -0,0 +1,54 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_another_type, + read_another_type, + serialize_another_type, + write_another_type +}; + +use crate::CustomType; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnotherType { + pub prop: Option, + pub circular: Option, + #[serde(rename = "const")] + pub _const: Option, +} + +impl AnotherType { + pub fn new() -> AnotherType { + AnotherType { + prop: None, + circular: None, + _const: None, + } + } + + pub fn to_buffer(args: &AnotherType) -> Result, EncodeError> { + serialize_another_type(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_another_type(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &AnotherType, writer: &mut W) -> Result<(), EncodeError> { + write_another_type(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_another_type(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/serialization.rs new file mode 100644 index 00000000..f8c50b46 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/serialization.rs @@ -0,0 +1,97 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::AnotherType; + +use crate::CustomType; + +pub fn serialize_another_type(args: &AnotherType) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: AnotherType".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_another_type(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_another_type(args: &AnotherType, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&3)?; + writer.context().push("prop", "Option", "writing property"); + writer.write_string("prop")?; + writer.write_optional_string(&args.prop)?; + writer.context().pop(); + writer.context().push("circular", "Option", "writing property"); + writer.write_string("circular")?; + if args.circular.is_some() { + CustomType::write(args.circular.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("const", "Option", "writing property"); + writer.write_string("const")?; + writer.write_optional_string(&args._const)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_another_type(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: AnotherType".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_another_type(&mut reader) +} + +pub fn read_another_type(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _prop: Option = None; + let mut _circular: Option = None; + let mut _const: Option = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "prop" => { + reader.context().push(&field, "Option", "type found, reading property"); + _prop = reader.read_optional_string()?; + reader.context().pop(); + } + "circular" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(CustomType::read(reader)?); + } else { + object = None; + } + _circular = object; + reader.context().pop(); + } + "const" => { + reader.context().push(&field, "Option", "type found, reading property"); + _const = reader.read_optional_string()?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + + Ok(AnotherType { + prop: _prop, + circular: _circular, + _const: _const, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_enum/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_enum/mod.rs new file mode 100644 index 00000000..dd8f6bb1 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_enum/mod.rs @@ -0,0 +1,51 @@ +use polywrap_wasm_rs::{EnumTypeError}; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum CustomEnum { + STRING, + BYTES, + _MAX_ +} + +pub fn sanitize_custom_enum_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= CustomEnum::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'CustomEnum': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_custom_enum_value(key: &str) -> Result { + match key { + "STRING" => Ok(CustomEnum::STRING), + "BYTES" => Ok(CustomEnum::BYTES), + "_MAX_" => Ok(CustomEnum::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum 'CustomEnum': {}", err))) + } +} + +pub fn get_custom_enum_key(value: CustomEnum) -> Result { + if sanitize_custom_enum_value(value as i32).is_ok() { + match value { + CustomEnum::STRING => Ok("STRING".to_string()), + CustomEnum::BYTES => Ok("BYTES".to_string()), + CustomEnum::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'CustomEnum': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for CustomEnum { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result { + match v { + x if x == CustomEnum::STRING as i32 => Ok(CustomEnum::STRING), + x if x == CustomEnum::BYTES as i32 => Ok(CustomEnum::BYTES), + x if x == CustomEnum::_MAX_ as i32 => Ok(CustomEnum::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum 'CustomEnum': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs new file mode 100644 index 00000000..e8c525f0 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs @@ -0,0 +1,48 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_custom_map_value, + read_custom_map_value, + serialize_custom_map_value, + write_custom_map_value +}; + + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct CustomMapValue { + pub foo: String, +} + +impl CustomMapValue { + pub fn new() -> CustomMapValue { + CustomMapValue { + foo: String::new(), + } + } + + pub fn to_buffer(args: &CustomMapValue) -> Result, EncodeError> { + serialize_custom_map_value(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_custom_map_value(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &CustomMapValue, writer: &mut W) -> Result<(), EncodeError> { + write_custom_map_value(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_custom_map_value(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/serialization.rs new file mode 100644 index 00000000..aafbc308 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/serialization.rs @@ -0,0 +1,68 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::CustomMapValue; + +pub fn serialize_custom_map_value(args: &CustomMapValue) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: CustomMapValue".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_custom_map_value(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_custom_map_value(args: &CustomMapValue, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("foo", "String", "writing property"); + writer.write_string("foo")?; + writer.write_string(&args.foo)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_custom_map_value(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: CustomMapValue".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_custom_map_value(&mut reader) +} + +pub fn read_custom_map_value(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _foo: String = String::new(); + let mut _foo_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "foo" => { + reader.context().push(&field, "String", "type found, reading property"); + _foo = reader.read_string()?; + _foo_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_foo_set { + return Err(DecodeError::MissingField("foo: String.".to_string())); + } + + Ok(CustomMapValue { + foo: _foo, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs new file mode 100644 index 00000000..a15c664d --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs @@ -0,0 +1,133 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_custom_type, + read_custom_type, + serialize_custom_type, + write_custom_type +}; + +use crate::AnotherType; +use crate::CustomEnum; +use crate::CustomMapValue; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct CustomType { + pub str: String, + pub opt_str: Option, + pub u: u32, + pub opt_u: Option, + pub u8: u8, + pub u16: u16, + pub u32: u32, + pub i: i32, + pub i8: i8, + pub i16: i16, + pub i32: i32, + pub bigint: BigInt, + pub opt_bigint: Option, + pub bignumber: BigNumber, + pub opt_bignumber: Option, + pub json: JSON::Value, + pub opt_json: Option, + pub bytes: Vec, + pub opt_bytes: Option>, + pub boolean: bool, + pub opt_boolean: Option, + pub u_array: Vec, + pub u_opt_array: Option>, + pub _opt_u_opt_array: Option>>, + pub opt_str_opt_array: Option>>, + pub u_array_array: Vec>, + pub u_opt_array_opt_array: Vec>>>, + pub u_array_opt_array_array: Vec>>>, + pub crazy_array: Option>>>>>>, + pub object: AnotherType, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, + pub en: CustomEnum, + pub opt_enum: Option, + pub enum_array: Vec, + pub opt_enum_array: Option>>, + pub map: Map, + pub map_of_arr: Map>, + pub map_of_obj: Map, + pub map_of_arr_of_obj: Map>, + pub map_custom_value: Map>, +} + +impl CustomType { + pub fn new() -> CustomType { + CustomType { + str: String::new(), + opt_str: None, + u: 0, + opt_u: None, + u8: 0, + u16: 0, + u32: 0, + i: 0, + i8: 0, + i16: 0, + i32: 0, + bigint: BigInt::default(), + opt_bigint: None, + bignumber: BigNumber::default(), + opt_bignumber: None, + json: JSON::Value::Null, + opt_json: None, + bytes: vec![], + opt_bytes: None, + boolean: false, + opt_boolean: None, + u_array: vec![], + u_opt_array: None, + _opt_u_opt_array: None, + opt_str_opt_array: None, + u_array_array: vec![], + u_opt_array_opt_array: vec![], + u_array_opt_array_array: vec![], + crazy_array: None, + object: AnotherType::new(), + opt_object: None, + object_array: vec![], + opt_object_array: None, + en: CustomEnum::_MAX_, + opt_enum: None, + enum_array: vec![], + opt_enum_array: None, + map: Map::::new(), + map_of_arr: Map::>::new(), + map_of_obj: Map::::new(), + map_of_arr_of_obj: Map::>::new(), + map_custom_value: Map::>::new(), + } + } + + pub fn to_buffer(args: &CustomType) -> Result, EncodeError> { + serialize_custom_type(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_custom_type(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &CustomType, writer: &mut W) -> Result<(), EncodeError> { + write_custom_type(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_custom_type(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/serialization.rs new file mode 100644 index 00000000..a9faa0a6 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/serialization.rs @@ -0,0 +1,851 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::CustomType; + +use crate::AnotherType; +use crate::{ + CustomEnum, + get_custom_enum_value, + sanitize_custom_enum_value +}; +use crate::CustomMapValue; + +pub fn serialize_custom_type(args: &CustomType) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: CustomType".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_custom_type(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_custom_type(args: &CustomType, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&42)?; + writer.context().push("str", "String", "writing property"); + writer.write_string("str")?; + writer.write_string(&args.str)?; + writer.context().pop(); + writer.context().push("optStr", "Option", "writing property"); + writer.write_string("optStr")?; + writer.write_optional_string(&args.opt_str)?; + writer.context().pop(); + writer.context().push("u", "u32", "writing property"); + writer.write_string("u")?; + writer.write_u32(&args.u)?; + writer.context().pop(); + writer.context().push("optU", "Option", "writing property"); + writer.write_string("optU")?; + writer.write_optional_u32(&args.opt_u)?; + writer.context().pop(); + writer.context().push("u8", "u8", "writing property"); + writer.write_string("u8")?; + writer.write_u8(&args.u8)?; + writer.context().pop(); + writer.context().push("u16", "u16", "writing property"); + writer.write_string("u16")?; + writer.write_u16(&args.u16)?; + writer.context().pop(); + writer.context().push("u32", "u32", "writing property"); + writer.write_string("u32")?; + writer.write_u32(&args.u32)?; + writer.context().pop(); + writer.context().push("i", "i32", "writing property"); + writer.write_string("i")?; + writer.write_i32(&args.i)?; + writer.context().pop(); + writer.context().push("i8", "i8", "writing property"); + writer.write_string("i8")?; + writer.write_i8(&args.i8)?; + writer.context().pop(); + writer.context().push("i16", "i16", "writing property"); + writer.write_string("i16")?; + writer.write_i16(&args.i16)?; + writer.context().pop(); + writer.context().push("i32", "i32", "writing property"); + writer.write_string("i32")?; + writer.write_i32(&args.i32)?; + writer.context().pop(); + writer.context().push("bigint", "BigInt", "writing property"); + writer.write_string("bigint")?; + writer.write_bigint(&args.bigint)?; + writer.context().pop(); + writer.context().push("optBigint", "Option", "writing property"); + writer.write_string("optBigint")?; + writer.write_optional_bigint(&args.opt_bigint)?; + writer.context().pop(); + writer.context().push("bignumber", "BigNumber", "writing property"); + writer.write_string("bignumber")?; + writer.write_bignumber(&args.bignumber)?; + writer.context().pop(); + writer.context().push("optBignumber", "Option", "writing property"); + writer.write_string("optBignumber")?; + writer.write_optional_bignumber(&args.opt_bignumber)?; + writer.context().pop(); + writer.context().push("json", "JSON::Value", "writing property"); + writer.write_string("json")?; + writer.write_json(&args.json)?; + writer.context().pop(); + writer.context().push("optJson", "Option", "writing property"); + writer.write_string("optJson")?; + writer.write_optional_json(&args.opt_json)?; + writer.context().pop(); + writer.context().push("bytes", "Vec", "writing property"); + writer.write_string("bytes")?; + writer.write_bytes(&args.bytes)?; + writer.context().pop(); + writer.context().push("optBytes", "Option>", "writing property"); + writer.write_string("optBytes")?; + writer.write_optional_bytes(&args.opt_bytes)?; + writer.context().pop(); + writer.context().push("boolean", "bool", "writing property"); + writer.write_string("boolean")?; + writer.write_bool(&args.boolean)?; + writer.context().pop(); + writer.context().push("optBoolean", "Option", "writing property"); + writer.write_string("optBoolean")?; + writer.write_optional_bool(&args.opt_boolean)?; + writer.context().pop(); + writer.context().push("u_array", "Vec", "writing property"); + writer.write_string("u_array")?; + writer.write_array(&args.u_array, |writer, item| { + writer.write_u32(item) + })?; + writer.context().pop(); + writer.context().push("uOpt_array", "Option>", "writing property"); + writer.write_string("uOpt_array")?; + writer.write_optional_array(&args.u_opt_array, |writer, item| { + writer.write_u32(item) + })?; + writer.context().pop(); + writer.context().push("_opt_uOptArray", "Option>>", "writing property"); + writer.write_string("_opt_uOptArray")?; + writer.write_optional_array(&args._opt_u_opt_array, |writer, item| { + writer.write_optional_u32(item) + })?; + writer.context().pop(); + writer.context().push("optStrOptArray", "Option>>", "writing property"); + writer.write_string("optStrOptArray")?; + writer.write_optional_array(&args.opt_str_opt_array, |writer, item| { + writer.write_optional_string(item) + })?; + writer.context().pop(); + writer.context().push("uArrayArray", "Vec>", "writing property"); + writer.write_string("uArrayArray")?; + writer.write_array(&args.u_array_array, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_u32(item) + }) + })?; + writer.context().pop(); + writer.context().push("uOptArrayOptArray", "Vec>>>", "writing property"); + writer.write_string("uOptArrayOptArray")?; + writer.write_array(&args.u_opt_array_opt_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_optional_u32(item) + }) + })?; + writer.context().pop(); + writer.context().push("uArrayOptArrayArray", "Vec>>>", "writing property"); + writer.write_string("uArrayOptArrayArray")?; + writer.write_array(&args.u_array_opt_array_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_u32(item) + }) + }) + })?; + writer.context().pop(); + writer.context().push("crazyArray", "Option>>>>>>", "writing property"); + writer.write_string("crazyArray")?; + writer.write_optional_array(&args.crazy_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_u32(item) + }) + }) + }) + })?; + writer.context().pop(); + writer.context().push("object", "AnotherType", "writing property"); + writer.write_string("object")?; + AnotherType::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + AnotherType::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + AnotherType::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + AnotherType::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + writer.context().push("en", "CustomEnum", "writing property"); + writer.write_string("en")?; + writer.write_i32(&(args.en as i32))?; + writer.context().pop(); + writer.context().push("optEnum", "Option", "writing property"); + writer.write_string("optEnum")?; + writer.write_optional_i32(&args.opt_enum.map(|f| f as i32))?; + writer.context().pop(); + writer.context().push("enumArray", "Vec", "writing property"); + writer.write_string("enumArray")?; + writer.write_array(&args.enum_array, |writer, item| { + writer.write_i32(&(*item as i32)) + })?; + writer.context().pop(); + writer.context().push("optEnumArray", "Option>>", "writing property"); + writer.write_string("optEnumArray")?; + writer.write_optional_array(&args.opt_enum_array, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + writer.context().push("map", "Map", "writing property"); + writer.write_string("map")?; + writer.write_ext_generic_map(&args.map, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_i32(value) + })?; + writer.context().pop(); + writer.context().push("mapOfArr", "Map>", "writing property"); + writer.write_string("mapOfArr")?; + writer.write_ext_generic_map(&args.map_of_arr, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + writer.write_i32(item) + }) + })?; + writer.context().pop(); + writer.context().push("mapOfObj", "Map", "writing property"); + writer.write_string("mapOfObj")?; + writer.write_ext_generic_map(&args.map_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + AnotherType::write(value, writer) + })?; + writer.context().pop(); + writer.context().push("mapOfArrOfObj", "Map>", "writing property"); + writer.write_string("mapOfArrOfObj")?; + writer.write_ext_generic_map(&args.map_of_arr_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + AnotherType::write(item, writer) + }) + })?; + writer.context().pop(); + writer.context().push("mapCustomValue", "Map>", "writing property"); + writer.write_string("mapCustomValue")?; + writer.write_ext_generic_map(&args.map_custom_value, |writer, key| { + writer.write_string(key) + }, |writer, value| { + if value.is_some() { + CustomMapValue::write(value.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_custom_type(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: CustomType".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_custom_type(&mut reader) +} + +pub fn read_custom_type(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _str: String = String::new(); + let mut _str_set = false; + let mut _opt_str: Option = None; + let mut _u: u32 = 0; + let mut _u_set = false; + let mut _opt_u: Option = None; + let mut _u8: u8 = 0; + let mut _u8_set = false; + let mut _u16: u16 = 0; + let mut _u16_set = false; + let mut _u32: u32 = 0; + let mut _u32_set = false; + let mut _i: i32 = 0; + let mut _i_set = false; + let mut _i8: i8 = 0; + let mut _i8_set = false; + let mut _i16: i16 = 0; + let mut _i16_set = false; + let mut _i32: i32 = 0; + let mut _i32_set = false; + let mut _bigint: BigInt = BigInt::default(); + let mut _bigint_set = false; + let mut _opt_bigint: Option = None; + let mut _bignumber: BigNumber = BigNumber::default(); + let mut _bignumber_set = false; + let mut _opt_bignumber: Option = None; + let mut _json: JSON::Value = JSON::Value::Null; + let mut _json_set = false; + let mut _opt_json: Option = None; + let mut _bytes: Vec = vec![]; + let mut _bytes_set = false; + let mut _opt_bytes: Option> = None; + let mut _boolean: bool = false; + let mut _boolean_set = false; + let mut _opt_boolean: Option = None; + let mut _u_array: Vec = vec![]; + let mut _u_array_set = false; + let mut _u_opt_array: Option> = None; + let mut __opt_u_opt_array: Option>> = None; + let mut _opt_str_opt_array: Option>> = None; + let mut _u_array_array: Vec> = vec![]; + let mut _u_array_array_set = false; + let mut _u_opt_array_opt_array: Vec>>> = vec![]; + let mut _u_opt_array_opt_array_set = false; + let mut _u_array_opt_array_array: Vec>>> = vec![]; + let mut _u_array_opt_array_array_set = false; + let mut _crazy_array: Option>>>>>> = None; + let mut _object: AnotherType = AnotherType::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + let mut _en: CustomEnum = CustomEnum::_MAX_; + let mut _en_set = false; + let mut _opt_enum: Option = None; + let mut _enum_array: Vec = vec![]; + let mut _enum_array_set = false; + let mut _opt_enum_array: Option>> = None; + let mut _map: Map = Map::::new(); + let mut _map_set = false; + let mut _map_of_arr: Map> = Map::>::new(); + let mut _map_of_arr_set = false; + let mut _map_of_obj: Map = Map::::new(); + let mut _map_of_obj_set = false; + let mut _map_of_arr_of_obj: Map> = Map::>::new(); + let mut _map_of_arr_of_obj_set = false; + let mut _map_custom_value: Map> = Map::>::new(); + let mut _map_custom_value_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "str" => { + reader.context().push(&field, "String", "type found, reading property"); + _str = reader.read_string()?; + _str_set = true; + reader.context().pop(); + } + "optStr" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_str = reader.read_optional_string()?; + reader.context().pop(); + } + "u" => { + reader.context().push(&field, "u32", "type found, reading property"); + _u = reader.read_u32()?; + _u_set = true; + reader.context().pop(); + } + "optU" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_u = reader.read_optional_u32()?; + reader.context().pop(); + } + "u8" => { + reader.context().push(&field, "u8", "type found, reading property"); + _u8 = reader.read_u8()?; + _u8_set = true; + reader.context().pop(); + } + "u16" => { + reader.context().push(&field, "u16", "type found, reading property"); + _u16 = reader.read_u16()?; + _u16_set = true; + reader.context().pop(); + } + "u32" => { + reader.context().push(&field, "u32", "type found, reading property"); + _u32 = reader.read_u32()?; + _u32_set = true; + reader.context().pop(); + } + "i" => { + reader.context().push(&field, "i32", "type found, reading property"); + _i = reader.read_i32()?; + _i_set = true; + reader.context().pop(); + } + "i8" => { + reader.context().push(&field, "i8", "type found, reading property"); + _i8 = reader.read_i8()?; + _i8_set = true; + reader.context().pop(); + } + "i16" => { + reader.context().push(&field, "i16", "type found, reading property"); + _i16 = reader.read_i16()?; + _i16_set = true; + reader.context().pop(); + } + "i32" => { + reader.context().push(&field, "i32", "type found, reading property"); + _i32 = reader.read_i32()?; + _i32_set = true; + reader.context().pop(); + } + "bigint" => { + reader.context().push(&field, "BigInt", "type found, reading property"); + _bigint = reader.read_bigint()?; + _bigint_set = true; + reader.context().pop(); + } + "optBigint" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_bigint = reader.read_optional_bigint()?; + reader.context().pop(); + } + "bignumber" => { + reader.context().push(&field, "BigNumber", "type found, reading property"); + _bignumber = reader.read_bignumber()?; + _bignumber_set = true; + reader.context().pop(); + } + "optBignumber" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_bignumber = reader.read_optional_bignumber()?; + reader.context().pop(); + } + "json" => { + reader.context().push(&field, "JSON::Value", "type found, reading property"); + _json = reader.read_json()?; + _json_set = true; + reader.context().pop(); + } + "optJson" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_json = reader.read_optional_json()?; + reader.context().pop(); + } + "bytes" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _bytes = reader.read_bytes()?; + _bytes_set = true; + reader.context().pop(); + } + "optBytes" => { + reader.context().push(&field, "Option>", "type found, reading property"); + _opt_bytes = reader.read_optional_bytes()?; + reader.context().pop(); + } + "boolean" => { + reader.context().push(&field, "bool", "type found, reading property"); + _boolean = reader.read_bool()?; + _boolean_set = true; + reader.context().pop(); + } + "optBoolean" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_boolean = reader.read_optional_bool()?; + reader.context().pop(); + } + "u_array" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _u_array = reader.read_array(|reader| { + reader.read_u32() + })?; + _u_array_set = true; + reader.context().pop(); + } + "uOpt_array" => { + reader.context().push(&field, "Option>", "type found, reading property"); + _u_opt_array = reader.read_optional_array(|reader| { + reader.read_u32() + })?; + reader.context().pop(); + } + "_opt_uOptArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + __opt_u_opt_array = reader.read_optional_array(|reader| { + reader.read_optional_u32() + })?; + reader.context().pop(); + } + "optStrOptArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_str_opt_array = reader.read_optional_array(|reader| { + reader.read_optional_string() + })?; + reader.context().pop(); + } + "uArrayArray" => { + reader.context().push(&field, "Vec>", "type found, reading property"); + _u_array_array = reader.read_array(|reader| { + reader.read_array(|reader| { + reader.read_u32() + }) + })?; + _u_array_array_set = true; + reader.context().pop(); + } + "uOptArrayOptArray" => { + reader.context().push(&field, "Vec>>>", "type found, reading property"); + _u_opt_array_opt_array = reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_optional_u32() + }) + })?; + _u_opt_array_opt_array_set = true; + reader.context().pop(); + } + "uArrayOptArrayArray" => { + reader.context().push(&field, "Vec>>>", "type found, reading property"); + _u_array_opt_array_array = reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_array(|reader| { + reader.read_u32() + }) + }) + })?; + _u_array_opt_array_array_set = true; + reader.context().pop(); + } + "crazyArray" => { + reader.context().push(&field, "Option>>>>>>", "type found, reading property"); + _crazy_array = reader.read_optional_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_u32() + }) + }) + }) + })?; + reader.context().pop(); + } + "object" => { + reader.context().push(&field, "AnotherType", "type found, reading property"); + let object = AnotherType::read(reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _object_array = reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + "en" => { + reader.context().push(&field, "CustomEnum", "type found, reading property"); + let mut value: CustomEnum = CustomEnum::_MAX_; + if reader.is_next_string()? { + value = get_custom_enum_value(&reader.read_string()?)?; + } else { + value = CustomEnum::try_from(reader.read_i32()?)?; + sanitize_custom_enum_value(value as i32)?; + } + _en = value; + _en_set = true; + reader.context().pop(); + } + "optEnum" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_custom_enum_value(&reader.read_string()?)?); + } else { + value = Some(CustomEnum::try_from(reader.read_i32()?)?); + sanitize_custom_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + _opt_enum = value; + reader.context().pop(); + } + "enumArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _enum_array = reader.read_array(|reader| { + let mut value: CustomEnum = CustomEnum::_MAX_; + if reader.is_next_string()? { + value = get_custom_enum_value(&reader.read_string()?)?; + } else { + value = CustomEnum::try_from(reader.read_i32()?)?; + sanitize_custom_enum_value(value as i32)?; + } + Ok(value) + })?; + _enum_array_set = true; + reader.context().pop(); + } + "optEnumArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_enum_array = reader.read_optional_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_custom_enum_value(&reader.read_string()?)?); + } else { + value = Some(CustomEnum::try_from(reader.read_i32()?)?); + sanitize_custom_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + } + "map" => { + reader.context().push(&field, "Map", "type found, reading property"); + _map = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_i32() + })?; + _map_set = true; + reader.context().pop(); + } + "mapOfArr" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_of_arr = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + reader.read_i32() + }) + })?; + _map_of_arr_set = true; + reader.context().pop(); + } + "mapOfObj" => { + reader.context().push(&field, "Map", "type found, reading property"); + _map_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _map_of_obj_set = true; + reader.context().pop(); + } + "mapOfArrOfObj" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_of_arr_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + }) + })?; + _map_of_arr_of_obj_set = true; + reader.context().pop(); + } + "mapCustomValue" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_custom_value = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(CustomMapValue::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + _map_custom_value_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_str_set { + return Err(DecodeError::MissingField("str: String.".to_string())); + } + if !_u_set { + return Err(DecodeError::MissingField("u: UInt.".to_string())); + } + if !_u8_set { + return Err(DecodeError::MissingField("u8: UInt8.".to_string())); + } + if !_u16_set { + return Err(DecodeError::MissingField("u16: UInt16.".to_string())); + } + if !_u32_set { + return Err(DecodeError::MissingField("u32: UInt32.".to_string())); + } + if !_i_set { + return Err(DecodeError::MissingField("i: Int.".to_string())); + } + if !_i8_set { + return Err(DecodeError::MissingField("i8: Int8.".to_string())); + } + if !_i16_set { + return Err(DecodeError::MissingField("i16: Int16.".to_string())); + } + if !_i32_set { + return Err(DecodeError::MissingField("i32: Int32.".to_string())); + } + if !_bigint_set { + return Err(DecodeError::MissingField("bigint: BigInt.".to_string())); + } + if !_bignumber_set { + return Err(DecodeError::MissingField("bignumber: BigNumber.".to_string())); + } + if !_json_set { + return Err(DecodeError::MissingField("json: JSON.".to_string())); + } + if !_bytes_set { + return Err(DecodeError::MissingField("bytes: Bytes.".to_string())); + } + if !_boolean_set { + return Err(DecodeError::MissingField("boolean: Boolean.".to_string())); + } + if !_u_array_set { + return Err(DecodeError::MissingField("u_array: [UInt].".to_string())); + } + if !_u_array_array_set { + return Err(DecodeError::MissingField("uArrayArray: [[UInt]].".to_string())); + } + if !_u_opt_array_opt_array_set { + return Err(DecodeError::MissingField("uOptArrayOptArray: [[UInt32]].".to_string())); + } + if !_u_array_opt_array_array_set { + return Err(DecodeError::MissingField("uArrayOptArrayArray: [[[UInt32]]].".to_string())); + } + if !_object_set { + return Err(DecodeError::MissingField("object: AnotherType.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [AnotherType].".to_string())); + } + if !_en_set { + return Err(DecodeError::MissingField("en: CustomEnum.".to_string())); + } + if !_enum_array_set { + return Err(DecodeError::MissingField("enumArray: [CustomEnum].".to_string())); + } + if !_map_set { + return Err(DecodeError::MissingField("map: Map.".to_string())); + } + if !_map_of_arr_set { + return Err(DecodeError::MissingField("mapOfArr: Map.".to_string())); + } + if !_map_of_obj_set { + return Err(DecodeError::MissingField("mapOfObj: Map.".to_string())); + } + if !_map_of_arr_of_obj_set { + return Err(DecodeError::MissingField("mapOfArrOfObj: Map.".to_string())); + } + if !_map_custom_value_set { + return Err(DecodeError::MissingField("mapCustomValue: Map.".to_string())); + } + + Ok(CustomType { + str: _str, + opt_str: _opt_str, + u: _u, + opt_u: _opt_u, + u8: _u8, + u16: _u16, + u32: _u32, + i: _i, + i8: _i8, + i16: _i16, + i32: _i32, + bigint: _bigint, + opt_bigint: _opt_bigint, + bignumber: _bignumber, + opt_bignumber: _opt_bignumber, + json: _json, + opt_json: _opt_json, + bytes: _bytes, + opt_bytes: _opt_bytes, + boolean: _boolean, + opt_boolean: _opt_boolean, + u_array: _u_array, + u_opt_array: _u_opt_array, + _opt_u_opt_array: __opt_u_opt_array, + opt_str_opt_array: _opt_str_opt_array, + u_array_array: _u_array_array, + u_opt_array_opt_array: _u_opt_array_opt_array, + u_array_opt_array_array: _u_array_opt_array_array, + crazy_array: _crazy_array, + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + en: _en, + opt_enum: _opt_enum, + enum_array: _enum_array, + opt_enum_array: _opt_enum_array, + map: _map, + map_of_arr: _map_of_arr, + map_of_obj: _map_of_obj, + map_of_arr_of_obj: _map_of_arr_of_obj, + map_custom_value: _map_custom_value, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/entry.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/entry.rs new file mode 100644 index 00000000..9a410f9c --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/entry.rs @@ -0,0 +1,42 @@ +use crate::{ + module_method_wrapped, + object_method_wrapped, + optional_env_method_wrapped, + if_wrapped +}; +use polywrap_wasm_rs::{ + abort, + invoke, + InvokeArgs, +}; +use crate::module::Module; + +#[no_mangle] +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32, env_size: u32) -> bool { + // Ensure the abort handler is properly setup + abort::wrap_abort_setup(); + + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); + let result: Vec; + + match args.method.as_str() { + "moduleMethod" => { + result = module_method_wrapped(args.args.as_slice(), env_size); + } + "objectMethod" => { + result = object_method_wrapped(args.args.as_slice(), env_size); + } + "optionalEnvMethod" => { + result = optional_env_method_wrapped(args.args.as_slice(), env_size); + } + "if" => { + result = if_wrapped(args.args.as_slice(), env_size); + } + _ => { + invoke::wrap_invoke_error(format!("Could not find invoke function {}", args.method)); + return false; + } + }; + invoke::wrap_invoke_result(result); + return true; +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs new file mode 100644 index 00000000..2a79852d --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs @@ -0,0 +1,51 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_env, + read_env, + serialize_env, + write_env +}; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Env { + pub prop: String, + pub opt_prop: Option, + pub opt_map: Option>>, +} + +impl Env { + pub fn new() -> Env { + Env { + prop: String::new(), + opt_prop: None, + opt_map: None, + } + } + + pub fn to_buffer(args: &Env) -> Result, EncodeError> { + serialize_env(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_env(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &Env, writer: &mut W) -> Result<(), EncodeError> { + write_env(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_env(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/serialization.rs new file mode 100644 index 00000000..df2a91bc --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/serialization.rs @@ -0,0 +1,98 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::Env; + +pub fn serialize_env(args: &Env) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) env-type: Env".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_env(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_env(args: &Env, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&3)?; + writer.context().push("prop", "String", "writing property"); + writer.write_string("prop")?; + writer.write_string(&args.prop)?; + writer.context().pop(); + writer.context().push("optProp", "Option", "writing property"); + writer.write_string("optProp")?; + writer.write_optional_string(&args.opt_prop)?; + writer.context().pop(); + writer.context().push("optMap", "Option>>", "writing property"); + writer.write_string("optMap")?; + writer.write_optional_ext_generic_map(&args.opt_map, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_optional_i32(value) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_env(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing env-type: Env".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_env(&mut reader) +} + +pub fn read_env(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _prop: String = String::new(); + let mut _prop_set = false; + let mut _opt_prop: Option = None; + let mut _opt_map: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "prop" => { + reader.context().push(&field, "String", "type found, reading property"); + _prop = reader.read_string()?; + _prop_set = true; + reader.context().pop(); + } + "optProp" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_prop = reader.read_optional_string()?; + reader.context().pop(); + } + "optMap" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_map = reader.read_optional_ext_generic_map(|reader| { + reader.read_string()? + }, |reader| { + reader.read_optional_i32() + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_prop_set { + return Err(DecodeError::MissingField("prop: String.".to_string())); + } + + Ok(Env { + prop: _prop, + opt_prop: _opt_prop, + opt_map: _opt_map, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/mod.rs new file mode 100644 index 00000000..6d97b84f --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/mod.rs @@ -0,0 +1,12 @@ +pub mod test_import_object; +pub use test_import_object::*; +pub mod test_import_another_object; +pub use test_import_another_object::*; +pub mod test_import_enum; +pub use test_import_enum::*; +pub mod test_import_enum_return; +pub use test_import_enum_return::*; +pub mod test_import_module; +pub use test_import_module::*; +pub mod test_import_env; +pub use test_import_env::*; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs new file mode 100644 index 00000000..838d59b7 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs @@ -0,0 +1,49 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_test_import_another_object, + read_test_import_another_object, + serialize_test_import_another_object, + write_test_import_another_object +}; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TestImportAnotherObject { + pub prop: String, +} + +impl TestImportAnotherObject { + pub const URI: &'static str = "testimport.uri.eth"; + + pub fn new() -> TestImportAnotherObject { + TestImportAnotherObject { + prop: String::new(), + } + } + + pub fn to_buffer(args: &TestImportAnotherObject) -> Result, EncodeError> { + serialize_test_import_another_object(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_test_import_another_object(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &TestImportAnotherObject, writer: &mut W) -> Result<(), EncodeError> { + write_test_import_another_object(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_test_import_another_object(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/serialization.rs new file mode 100644 index 00000000..43d97eb2 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/serialization.rs @@ -0,0 +1,68 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::TestImportAnotherObject; + +pub fn serialize_test_import_another_object(args: &TestImportAnotherObject) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported object-type: TestImportAnotherObject".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_test_import_another_object(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_test_import_another_object(args: &TestImportAnotherObject, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("prop", "String", "writing property"); + writer.write_string("prop")?; + writer.write_string(&args.prop)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_test_import_another_object(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported object-type: TestImportAnotherObject".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_test_import_another_object(&mut reader) +} + +pub fn read_test_import_another_object(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _prop: String = String::new(); + let mut _prop_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "prop" => { + reader.context().push(&field, "String", "type found, reading property"); + _prop = reader.read_string()?; + _prop_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_prop_set { + return Err(DecodeError::MissingField("prop: String.".to_string())); + } + + Ok(TestImportAnotherObject { + prop: _prop, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum/mod.rs new file mode 100644 index 00000000..e0426d64 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum/mod.rs @@ -0,0 +1,51 @@ +use polywrap_wasm_rs::EnumTypeError; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum TestImportEnum { + STRING, + BYTES, + _MAX_ +} + +pub fn sanitize_test_import_enum_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= TestImportEnum::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'TestImportEnum': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_test_import_enum_value(key: &str) -> Result { + match key { + "STRING" => Ok(TestImportEnum::STRING), + "BYTES" => Ok(TestImportEnum::BYTES), + "_MAX_" => Ok(TestImportEnum::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum 'TestImportEnum': {}", err))) + } +} + +pub fn get_test_import_enum_key(value: TestImportEnum) -> Result { + if sanitize_test_import_enum_value(value as i32).is_ok() { + match value { + TestImportEnum::STRING => Ok("STRING".to_string()), + TestImportEnum::BYTES => Ok("BYTES".to_string()), + TestImportEnum::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'TestImportEnum': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for TestImportEnum { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result { + match v { + x if x == TestImportEnum::STRING as i32 => Ok(TestImportEnum::STRING), + x if x == TestImportEnum::BYTES as i32 => Ok(TestImportEnum::BYTES), + x if x == TestImportEnum::_MAX_ as i32 => Ok(TestImportEnum::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum 'TestImportEnum': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum_return/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum_return/mod.rs new file mode 100644 index 00000000..13782642 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_enum_return/mod.rs @@ -0,0 +1,51 @@ +use polywrap_wasm_rs::EnumTypeError; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum TestImportEnumReturn { + STRING, + BYTES, + _MAX_ +} + +pub fn sanitize_test_import_enum_return_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= TestImportEnumReturn::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'TestImportEnumReturn': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_test_import_enum_return_value(key: &str) -> Result { + match key { + "STRING" => Ok(TestImportEnumReturn::STRING), + "BYTES" => Ok(TestImportEnumReturn::BYTES), + "_MAX_" => Ok(TestImportEnumReturn::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum 'TestImportEnumReturn': {}", err))) + } +} + +pub fn get_test_import_enum_return_key(value: TestImportEnumReturn) -> Result { + if sanitize_test_import_enum_return_value(value as i32).is_ok() { + match value { + TestImportEnumReturn::STRING => Ok("STRING".to_string()), + TestImportEnumReturn::BYTES => Ok("BYTES".to_string()), + TestImportEnumReturn::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum 'TestImportEnumReturn': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for TestImportEnumReturn { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result { + match v { + x if x == TestImportEnumReturn::STRING as i32 => Ok(TestImportEnumReturn::STRING), + x if x == TestImportEnumReturn::BYTES as i32 => Ok(TestImportEnumReturn::BYTES), + x if x == TestImportEnumReturn::_MAX_ as i32 => Ok(TestImportEnumReturn::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum 'TestImportEnumReturn': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs new file mode 100644 index 00000000..993de8d5 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs @@ -0,0 +1,66 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_test_import_env, + read_test_import_env, + serialize_test_import_env, + write_test_import_env +}; + +use crate::TestImportAnotherObject; +use crate::TestImportEnum; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TestImportEnv { + pub object: TestImportAnotherObject, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, + pub en: TestImportEnum, + pub opt_enum: Option, + pub enum_array: Vec, + pub opt_enum_array: Option>>, +} + +impl TestImportEnv { + pub const URI: &'static str = "testimport.uri.eth"; + + pub fn new() -> TestImportEnv { + TestImportEnv { + object: TestImportAnotherObject::new(), + opt_object: None, + object_array: vec![], + opt_object_array: None, + en: TestImportEnum::_MAX_, + opt_enum: None, + enum_array: vec![], + opt_enum_array: None, + } + } + + pub fn to_buffer(args: &TestImportEnv) -> Result, EncodeError> { + serialize_test_import_env(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_test_import_env(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &TestImportEnv, writer: &mut W) -> Result<(), EncodeError> { + write_test_import_env(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_test_import_env(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/serialization.rs new file mode 100644 index 00000000..6de6ef69 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/serialization.rs @@ -0,0 +1,241 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::TestImportEnv; + +use crate::TestImportAnotherObject; +use crate::{ + TestImportEnum, + get_test_import_enum_value, + sanitize_test_import_enum_value +}; + +pub fn serialize_test_import_env(args: &TestImportEnv) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported env-type: TestImportEnv".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_test_import_env(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_test_import_env(args: &TestImportEnv, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&8)?; + writer.context().push("object", "TestImportAnotherObject", "writing property"); + writer.write_string("object")?; + TestImportAnotherObject::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + TestImportAnotherObject::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + TestImportAnotherObject::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + TestImportAnotherObject::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + writer.context().push("en", "TestImportEnum", "writing property"); + writer.write_string("en")?; + writer.write_i32(&(args.en as i32))?; + writer.context().pop(); + writer.context().push("optEnum", "Option", "writing property"); + writer.write_string("optEnum")?; + writer.write_optional_i32(&args.opt_enum.map(|f| f as i32))?; + writer.context().pop(); + writer.context().push("enumArray", "Vec", "writing property"); + writer.write_string("enumArray")?; + writer.write_array(&args.enum_array, |writer, item| { + writer.write_i32(&(*item as i32)) + })?; + writer.context().pop(); + writer.context().push("optEnumArray", "Option>>", "writing property"); + writer.write_string("optEnumArray")?; + writer.write_optional_array(&args.opt_enum_array, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_test_import_env(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported env-type: TestImportEnv".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_test_import_env(&mut reader) +} + +pub fn read_test_import_env(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _object: TestImportAnotherObject = TestImportAnotherObject::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + let mut _en: TestImportEnum = TestImportEnum::_MAX_; + let mut _en_set = false; + let mut _opt_enum: Option = None; + let mut _enum_array: Vec = vec![]; + let mut _enum_array_set = false; + let mut _opt_enum_array: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "object" => { + reader.context().push(&field, "TestImportAnotherObject", "type found, reading property"); + let object = TestImportAnotherObject::read(reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportAnotherObject::read(reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _object_array = reader.read_array(|reader| { + let object = TestImportAnotherObject::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportAnotherObject::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + "en" => { + reader.context().push(&field, "TestImportEnum", "type found, reading property"); + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + _en = value; + _en_set = true; + reader.context().pop(); + } + "optEnum" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + _opt_enum = value; + reader.context().pop(); + } + "enumArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _enum_array = reader.read_array(|reader| { + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + Ok(value) + })?; + _enum_array_set = true; + reader.context().pop(); + } + "optEnumArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_enum_array = reader.read_optional_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_object_set { + return Err(DecodeError::MissingField("object: TestImport_AnotherObject.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [TestImport_AnotherObject].".to_string())); + } + if !_en_set { + return Err(DecodeError::MissingField("en: TestImport_Enum.".to_string())); + } + if !_enum_array_set { + return Err(DecodeError::MissingField("enumArray: [TestImport_Enum].".to_string())); + } + + Ok(TestImportEnv { + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + en: _en, + opt_enum: _opt_enum, + enum_array: _enum_array, + opt_enum_array: _opt_enum_array, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs new file mode 100644 index 00000000..d265f90a --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs @@ -0,0 +1,72 @@ +use serde::{Serialize, Deserialize}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Read, + Write, + JSON, + subinvoke, +}; +pub mod serialization; +pub use serialization::{ + deserialize_imported_method_result, + serialize_imported_method_args, + ArgsImportedMethod, + deserialize_another_method_result, + serialize_another_method_args, + ArgsAnotherMethod, + deserialize_returns_array_of_enums_result, + serialize_returns_array_of_enums_args, + ArgsReturnsArrayOfEnums +}; + +use crate::TestImportObject; +use crate::TestImportEnum; +use crate::TestImportEnumReturn; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TestImportModule { + uri: String +} + +impl TestImportModule { + pub const INTERFACE_URI: &'static str = "testimport.uri.eth"; + + pub fn new(uri: String) -> TestImportModule { + TestImportModule { uri } + } + + pub fn imported_method(&self, args: &ArgsImportedMethod) -> Result, String> { + let ref uri = self.uri; + let args = serialize_imported_method_args(args).map_err(|e| e.to_string())?; + let result = subinvoke::wrap_subinvoke( + uri.as_str(), + "importedMethod", + args, + )?; + deserialize_imported_method_result(result.as_slice()).map_err(|e| e.to_string()) + } + + pub fn another_method(&self, args: &ArgsAnotherMethod) -> Result { + let ref uri = self.uri; + let args = serialize_another_method_args(args).map_err(|e| e.to_string())?; + let result = subinvoke::wrap_subinvoke( + uri.as_str(), + "anotherMethod", + args, + )?; + deserialize_another_method_result(result.as_slice()).map_err(|e| e.to_string()) + } + + pub fn returns_array_of_enums(&self, args: &ArgsReturnsArrayOfEnums) -> Result>, String> { + let ref uri = self.uri; + let args = serialize_returns_array_of_enums_args(args).map_err(|e| e.to_string())?; + let result = subinvoke::wrap_subinvoke( + uri.as_str(), + "returnsArrayOfEnums", + args, + )?; + deserialize_returns_array_of_enums_result(result.as_slice()).map_err(|e| e.to_string()) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/serialization.rs new file mode 100644 index 00000000..92ed22e3 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/serialization.rs @@ -0,0 +1,554 @@ +use serde::{Serialize, Deserialize}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; + +use crate::TestImportObject; +use crate::{ + TestImportEnum, + get_test_import_enum_value, + sanitize_test_import_enum_value +}; +use crate::{ + TestImportEnumReturn, + get_test_import_enum_return_value, + sanitize_test_import_enum_return_value +}; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsImportedMethod { + pub str: String, + pub opt_str: Option, + pub u: u32, + pub opt_u: Option, + pub u_array_array: Vec>>>, + pub object: TestImportObject, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, + pub en: TestImportEnum, + pub opt_enum: Option, + pub enum_array: Vec, + pub opt_enum_array: Option>>, +} + +pub fn deserialize_imported_method_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: imported_method Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _str: String = String::new(); + let mut _str_set = false; + let mut _opt_str: Option = None; + let mut _u: u32 = 0; + let mut _u_set = false; + let mut _opt_u: Option = None; + let mut _u_array_array: Vec>>> = vec![]; + let mut _u_array_array_set = false; + let mut _object: TestImportObject = TestImportObject::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + let mut _en: TestImportEnum = TestImportEnum::_MAX_; + let mut _en_set = false; + let mut _opt_enum: Option = None; + let mut _enum_array: Vec = vec![]; + let mut _enum_array_set = false; + let mut _opt_enum_array: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "str" => { + reader.context().push(&field, "String", "type found, reading argument"); + _str = reader.read_string()?; + _str_set = true; + reader.context().pop(); + } + "optStr" => { + reader.context().push(&field, "Option", "type found, reading argument"); + _opt_str = reader.read_optional_string()?; + reader.context().pop(); + } + "u" => { + reader.context().push(&field, "u32", "type found, reading argument"); + _u = reader.read_u32()?; + _u_set = true; + reader.context().pop(); + } + "optU" => { + reader.context().push(&field, "Option", "type found, reading argument"); + _opt_u = reader.read_optional_u32()?; + reader.context().pop(); + } + "uArrayArray" => { + reader.context().push(&field, "Vec>>>", "type found, reading argument"); + _u_array_array = reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_optional_u32() + }) + })?; + _u_array_array_set = true; + reader.context().pop(); + } + "object" => { + reader.context().push(&field, "TestImportObject", "type found, reading argument"); + let object = TestImportObject::read(&mut reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading argument"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportObject::read(&mut reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _object_array = reader.read_array(|reader| { + let object = TestImportObject::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading argument"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportObject::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + "en" => { + reader.context().push(&field, "TestImportEnum", "type found, reading argument"); + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + _en = value; + _en_set = true; + reader.context().pop(); + } + "optEnum" => { + reader.context().push(&field, "Option", "type found, reading argument"); + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + _opt_enum = value; + reader.context().pop(); + } + "enumArray" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _enum_array = reader.read_array(|reader| { + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + Ok(value) + })?; + _enum_array_set = true; + reader.context().pop(); + } + "optEnumArray" => { + reader.context().push(&field, "Option>>", "type found, reading argument"); + _opt_enum_array = reader.read_optional_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_str_set { + return Err(DecodeError::MissingField("str: String.".to_string())); + } + if !_u_set { + return Err(DecodeError::MissingField("u: UInt.".to_string())); + } + if !_u_array_array_set { + return Err(DecodeError::MissingField("uArrayArray: [[UInt]].".to_string())); + } + if !_object_set { + return Err(DecodeError::MissingField("object: TestImport_Object.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [TestImport_Object].".to_string())); + } + if !_en_set { + return Err(DecodeError::MissingField("en: TestImport_Enum.".to_string())); + } + if !_enum_array_set { + return Err(DecodeError::MissingField("enumArray: [TestImport_Enum].".to_string())); + } + + Ok(ArgsImportedMethod { + str: _str, + opt_str: _opt_str, + u: _u, + opt_u: _opt_u, + u_array_array: _u_array_array, + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + en: _en, + opt_enum: _opt_enum, + enum_array: _enum_array, + opt_enum_array: _opt_enum_array, + }) +} + +pub fn serialize_imported_method_args(args: &ArgsImportedMethod) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: imported_method Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_imported_method_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_imported_method_args(args: &ArgsImportedMethod, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&13)?; + writer.context().push("str", "String", "writing property"); + writer.write_string("str")?; + writer.write_string(&args.str)?; + writer.context().pop(); + writer.context().push("optStr", "Option", "writing property"); + writer.write_string("optStr")?; + writer.write_optional_string(&args.opt_str)?; + writer.context().pop(); + writer.context().push("u", "u32", "writing property"); + writer.write_string("u")?; + writer.write_u32(&args.u)?; + writer.context().pop(); + writer.context().push("optU", "Option", "writing property"); + writer.write_string("optU")?; + writer.write_optional_u32(&args.opt_u)?; + writer.context().pop(); + writer.context().push("uArrayArray", "Vec>>>", "writing property"); + writer.write_string("uArrayArray")?; + writer.write_array(&args.u_array_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_optional_u32(item) + }) + })?; + writer.context().pop(); + writer.context().push("object", "TestImportObject", "writing property"); + writer.write_string("object")?; + TestImportObject::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + TestImportObject::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + TestImportObject::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + TestImportObject::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + writer.context().push("en", "TestImportEnum", "writing property"); + writer.write_string("en")?; + writer.write_i32(&(args.en as i32))?; + writer.context().pop(); + writer.context().push("optEnum", "Option", "writing property"); + writer.write_string("optEnum")?; + writer.write_optional_i32(&args.opt_enum.map(|f| f as i32))?; + writer.context().pop(); + writer.context().push("enumArray", "Vec", "writing property"); + writer.write_string("enumArray")?; + writer.write_array(&args.enum_array, |writer, item| { + writer.write_i32(&(*item as i32)) + })?; + writer.context().pop(); + writer.context().push("optEnumArray", "Option>>", "writing property"); + writer.write_string("optEnumArray")?; + writer.write_optional_array(&args.opt_enum_array, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_imported_method_result(result: &Option) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: imported_method Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_imported_method_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_imported_method_result(result: &Option, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("importedMethod", "Option", "writing result"); + if result.is_some() { + TestImportObject::write(result.as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_imported_method_result(result: &[u8]) -> Result, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: imported_method Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("importedMethod", "Option", "reading function output"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportObject::read(&mut reader)?); + } else { + object = None; + } + let res = object; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsAnotherMethod { + pub arg: Vec, +} + +pub fn deserialize_another_method_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: another_method Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _arg: Vec = vec![]; + let mut _arg_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "arg" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _arg = reader.read_array(|reader| { + reader.read_string() + })?; + _arg_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_arg_set { + return Err(DecodeError::MissingField("arg: [String].".to_string())); + } + + Ok(ArgsAnotherMethod { + arg: _arg, + }) +} + +pub fn serialize_another_method_args(args: &ArgsAnotherMethod) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: another_method Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_another_method_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_another_method_args(args: &ArgsAnotherMethod, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("arg", "Vec", "writing property"); + writer.write_string("arg")?; + writer.write_array(&args.arg, |writer, item| { + writer.write_string(item) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_another_method_result(result: &i32) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: another_method Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_another_method_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_another_method_result(result: &i32, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("anotherMethod", "i32", "writing result"); + writer.write_i32(result)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_another_method_result(result: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: another_method Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("anotherMethod", "i32", "reading function output"); + let res = reader.read_i32()?; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsReturnsArrayOfEnums { + pub arg: String, +} + +pub fn deserialize_returns_array_of_enums_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: returns_array_of_enums Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _arg: String = String::new(); + let mut _arg_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "arg" => { + reader.context().push(&field, "String", "type found, reading argument"); + _arg = reader.read_string()?; + _arg_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_arg_set { + return Err(DecodeError::MissingField("arg: String.".to_string())); + } + + Ok(ArgsReturnsArrayOfEnums { + arg: _arg, + }) +} + +pub fn serialize_returns_array_of_enums_args(args: &ArgsReturnsArrayOfEnums) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: returns_array_of_enums Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_returns_array_of_enums_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_returns_array_of_enums_args(args: &ArgsReturnsArrayOfEnums, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("arg", "String", "writing property"); + writer.write_string("arg")?; + writer.write_string(&args.arg)?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_returns_array_of_enums_result(result: &Vec>) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: returns_array_of_enums Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_returns_array_of_enums_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_returns_array_of_enums_result(result: &Vec>, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("returnsArrayOfEnums", "Vec>", "writing result"); + writer.write_array(&result, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_returns_array_of_enums_result(result: &[u8]) -> Result>, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: returns_array_of_enums Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("returnsArrayOfEnums", "Vec>", "reading function output"); + let res = reader.read_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_return_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnumReturn::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_return_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + Ok(res) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs new file mode 100644 index 00000000..ab9c3cf3 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs @@ -0,0 +1,66 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_test_import_object, + read_test_import_object, + serialize_test_import_object, + write_test_import_object +}; + +use crate::TestImportAnotherObject; +use crate::TestImportEnum; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TestImportObject { + pub object: TestImportAnotherObject, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, + pub en: TestImportEnum, + pub opt_enum: Option, + pub enum_array: Vec, + pub opt_enum_array: Option>>, +} + +impl TestImportObject { + pub const URI: &'static str = "testimport.uri.eth"; + + pub fn new() -> TestImportObject { + TestImportObject { + object: TestImportAnotherObject::new(), + opt_object: None, + object_array: vec![], + opt_object_array: None, + en: TestImportEnum::_MAX_, + opt_enum: None, + enum_array: vec![], + opt_enum_array: None, + } + } + + pub fn to_buffer(args: &TestImportObject) -> Result, EncodeError> { + serialize_test_import_object(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_test_import_object(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &TestImportObject, writer: &mut W) -> Result<(), EncodeError> { + write_test_import_object(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_test_import_object(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/serialization.rs new file mode 100644 index 00000000..691cf5d3 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/serialization.rs @@ -0,0 +1,241 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::TestImportObject; + +use crate::TestImportAnotherObject; +use crate::{ + TestImportEnum, + get_test_import_enum_value, + sanitize_test_import_enum_value +}; + +pub fn serialize_test_import_object(args: &TestImportObject) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported object-type: TestImportObject".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_test_import_object(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_test_import_object(args: &TestImportObject, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&8)?; + writer.context().push("object", "TestImportAnotherObject", "writing property"); + writer.write_string("object")?; + TestImportAnotherObject::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + TestImportAnotherObject::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + TestImportAnotherObject::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + TestImportAnotherObject::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + writer.context().push("en", "TestImportEnum", "writing property"); + writer.write_string("en")?; + writer.write_i32(&(args.en as i32))?; + writer.context().pop(); + writer.context().push("optEnum", "Option", "writing property"); + writer.write_string("optEnum")?; + writer.write_optional_i32(&args.opt_enum.map(|f| f as i32))?; + writer.context().pop(); + writer.context().push("enumArray", "Vec", "writing property"); + writer.write_string("enumArray")?; + writer.write_array(&args.enum_array, |writer, item| { + writer.write_i32(&(*item as i32)) + })?; + writer.context().pop(); + writer.context().push("optEnumArray", "Option>>", "writing property"); + writer.write_string("optEnumArray")?; + writer.write_optional_array(&args.opt_enum_array, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_test_import_object(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported object-type: TestImportObject".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_test_import_object(&mut reader) +} + +pub fn read_test_import_object(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _object: TestImportAnotherObject = TestImportAnotherObject::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + let mut _en: TestImportEnum = TestImportEnum::_MAX_; + let mut _en_set = false; + let mut _opt_enum: Option = None; + let mut _enum_array: Vec = vec![]; + let mut _enum_array_set = false; + let mut _opt_enum_array: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "object" => { + reader.context().push(&field, "TestImportAnotherObject", "type found, reading property"); + let object = TestImportAnotherObject::read(reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportAnotherObject::read(reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _object_array = reader.read_array(|reader| { + let object = TestImportAnotherObject::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(TestImportAnotherObject::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + "en" => { + reader.context().push(&field, "TestImportEnum", "type found, reading property"); + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + _en = value; + _en_set = true; + reader.context().pop(); + } + "optEnum" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + _opt_enum = value; + reader.context().pop(); + } + "enumArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _enum_array = reader.read_array(|reader| { + let mut value: TestImportEnum = TestImportEnum::_MAX_; + if reader.is_next_string()? { + value = get_test_import_enum_value(&reader.read_string()?)?; + } else { + value = TestImportEnum::try_from(reader.read_i32()?)?; + sanitize_test_import_enum_value(value as i32)?; + } + Ok(value) + })?; + _enum_array_set = true; + reader.context().pop(); + } + "optEnumArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_enum_array = reader.read_optional_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_test_import_enum_value(&reader.read_string()?)?); + } else { + value = Some(TestImportEnum::try_from(reader.read_i32()?)?); + sanitize_test_import_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_object_set { + return Err(DecodeError::MissingField("object: TestImport_AnotherObject.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [TestImport_AnotherObject].".to_string())); + } + if !_en_set { + return Err(DecodeError::MissingField("en: TestImport_Enum.".to_string())); + } + if !_enum_array_set { + return Err(DecodeError::MissingField("enumArray: [TestImport_Enum].".to_string())); + } + + Ok(TestImportObject { + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + en: _en, + opt_enum: _opt_enum, + enum_array: _enum_array, + opt_enum_array: _opt_enum_array, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/mod.rs new file mode 100644 index 00000000..d5a8b8e1 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/mod.rs @@ -0,0 +1,71 @@ +pub mod entry; +pub mod custom_type; +pub use custom_type::CustomType; +pub mod another_type; +pub use another_type::AnotherType; +pub mod custom_map_value; +pub use custom_map_value::CustomMapValue; +pub mod _else; +pub use _else::Else; +pub mod custom_enum; +pub use custom_enum::{ + get_custom_enum_key, + get_custom_enum_value, + sanitize_custom_enum_value, + CustomEnum +}; +pub mod _while; +pub use _while::{ + get_while_key, + get_while_value, + sanitize_while_value, + While +}; +pub mod env; +pub use env::Env; +pub mod imported; +pub use imported::test_import_object::TestImportObject; +pub use imported::test_import_another_object::TestImportAnotherObject; +pub use imported::test_import_enum::{ + get_test_import_enum_key, + get_test_import_enum_value, + sanitize_test_import_enum_value, + TestImportEnum +}; +pub use imported::test_import_enum_return::{ + get_test_import_enum_return_key, + get_test_import_enum_return_value, + sanitize_test_import_enum_return_value, + TestImportEnumReturn +}; +pub use imported::test_import_env::TestImportEnv; +pub use imported::test_import_module::TestImportModule; +pub mod test_import; +pub use test_import::TestImport; +pub mod module; +pub use module::{ + Module, + ModuleTrait, + deserialize_module_method_args, + serialize_module_method_result, + module_method_wrapped, + ArgsModuleMethod, + deserialize_object_method_args, + serialize_object_method_result, + object_method_wrapped, + ArgsObjectMethod, + deserialize_optional_env_method_args, + serialize_optional_env_method_result, + optional_env_method_wrapped, + ArgsOptionalEnvMethod, + deserialize_if_args, + serialize_if_result, + if_wrapped, + ArgsIf +}; + +// Override print!(...) & println!(...) macros +#[macro_export] +macro_rules! println { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } +#[macro_export] +macro_rules! print { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/mod.rs new file mode 100644 index 00000000..7823ef5b --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/mod.rs @@ -0,0 +1,25 @@ +pub mod wrapped; +pub use wrapped::{ + module_method_wrapped, + object_method_wrapped, + optional_env_method_wrapped, + if_wrapped +}; +pub mod serialization; +pub use serialization::{ + deserialize_module_method_args, + serialize_module_method_result, + ArgsModuleMethod, + deserialize_object_method_args, + serialize_object_method_result, + ArgsObjectMethod, + deserialize_optional_env_method_args, + serialize_optional_env_method_result, + ArgsOptionalEnvMethod, + deserialize_if_args, + serialize_if_result, + ArgsIf +}; + +pub mod module; +pub use module::*; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs new file mode 100644 index 00000000..f0fbdf1b --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs @@ -0,0 +1,31 @@ +use crate::{ + ArgsModuleMethod, + ArgsObjectMethod, + ArgsOptionalEnvMethod, + ArgsIf, +}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + JSON, +}; + +use crate::Env; +use crate::{ + CustomEnum, +}; +use crate::AnotherType; +use crate::Else; + +pub struct Module; + +pub trait ModuleTrait { + fn module_method(args: ArgsModuleMethod) -> Result; + + fn object_method(args: ArgsObjectMethod, env: Env) -> Result, String>; + + fn optional_env_method(args: ArgsOptionalEnvMethod, env: Option) -> Result, String>; + + fn _if(args: ArgsIf) -> Result; +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/serialization.rs new file mode 100644 index 00000000..f4146f90 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/serialization.rs @@ -0,0 +1,770 @@ +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; + +use crate::Env; +use crate::{ + CustomEnum, + get_custom_enum_value, + sanitize_custom_enum_value +}; +use crate::AnotherType; +use crate::Else; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsModuleMethod { + pub str: String, + pub opt_str: Option, + pub en: CustomEnum, + pub opt_enum: Option, + pub enum_array: Vec, + pub opt_enum_array: Option>>, + pub map: Map, + pub map_of_arr: Map>, + pub map_of_map: Map>, + pub map_of_obj: Map, + pub map_of_arr_of_obj: Map>, +} + +pub fn deserialize_module_method_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: module_method Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _str: String = String::new(); + let mut _str_set = false; + let mut _opt_str: Option = None; + let mut _en: CustomEnum = CustomEnum::_MAX_; + let mut _en_set = false; + let mut _opt_enum: Option = None; + let mut _enum_array: Vec = vec![]; + let mut _enum_array_set = false; + let mut _opt_enum_array: Option>> = None; + let mut _map: Map = Map::::new(); + let mut _map_set = false; + let mut _map_of_arr: Map> = Map::>::new(); + let mut _map_of_arr_set = false; + let mut _map_of_map: Map> = Map::>::new(); + let mut _map_of_map_set = false; + let mut _map_of_obj: Map = Map::::new(); + let mut _map_of_obj_set = false; + let mut _map_of_arr_of_obj: Map> = Map::>::new(); + let mut _map_of_arr_of_obj_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "str" => { + reader.context().push(&field, "String", "type found, reading argument"); + _str = reader.read_string()?; + _str_set = true; + reader.context().pop(); + } + "optStr" => { + reader.context().push(&field, "Option", "type found, reading argument"); + _opt_str = reader.read_optional_string()?; + reader.context().pop(); + } + "en" => { + reader.context().push(&field, "CustomEnum", "type found, reading argument"); + let mut value: CustomEnum = CustomEnum::_MAX_; + if reader.is_next_string()? { + value = get_custom_enum_value(&reader.read_string()?)?; + } else { + value = CustomEnum::try_from(reader.read_i32()?)?; + sanitize_custom_enum_value(value as i32)?; + } + _en = value; + _en_set = true; + reader.context().pop(); + } + "optEnum" => { + reader.context().push(&field, "Option", "type found, reading argument"); + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_custom_enum_value(&reader.read_string()?)?); + } else { + value = Some(CustomEnum::try_from(reader.read_i32()?)?); + sanitize_custom_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + _opt_enum = value; + reader.context().pop(); + } + "enumArray" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _enum_array = reader.read_array(|reader| { + let mut value: CustomEnum = CustomEnum::_MAX_; + if reader.is_next_string()? { + value = get_custom_enum_value(&reader.read_string()?)?; + } else { + value = CustomEnum::try_from(reader.read_i32()?)?; + sanitize_custom_enum_value(value as i32)?; + } + Ok(value) + })?; + _enum_array_set = true; + reader.context().pop(); + } + "optEnumArray" => { + reader.context().push(&field, "Option>>", "type found, reading argument"); + _opt_enum_array = reader.read_optional_array(|reader| { + let mut value: Option = None; + if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_custom_enum_value(&reader.read_string()?)?); + } else { + value = Some(CustomEnum::try_from(reader.read_i32()?)?); + sanitize_custom_enum_value(value.unwrap() as i32)?; + } + } else { + value = None; + } + Ok(value) + })?; + reader.context().pop(); + } + "map" => { + reader.context().push(&field, "Map", "type found, reading argument"); + _map = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_i32() + })?; + _map_set = true; + reader.context().pop(); + } + "mapOfArr" => { + reader.context().push(&field, "Map>", "type found, reading argument"); + _map_of_arr = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + reader.read_i32() + }) + })?; + _map_of_arr_set = true; + reader.context().pop(); + } + "mapOfMap" => { + reader.context().push(&field, "Map>", "type found, reading argument"); + _map_of_map = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_i32() + }) + })?; + _map_of_map_set = true; + reader.context().pop(); + } + "mapOfObj" => { + reader.context().push(&field, "Map", "type found, reading argument"); + _map_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _map_of_obj_set = true; + reader.context().pop(); + } + "mapOfArrOfObj" => { + reader.context().push(&field, "Map>", "type found, reading argument"); + _map_of_arr_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + }) + })?; + _map_of_arr_of_obj_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_str_set { + return Err(DecodeError::MissingField("str: String.".to_string())); + } + if !_en_set { + return Err(DecodeError::MissingField("en: CustomEnum.".to_string())); + } + if !_enum_array_set { + return Err(DecodeError::MissingField("enumArray: [CustomEnum].".to_string())); + } + if !_map_set { + return Err(DecodeError::MissingField("map: Map.".to_string())); + } + if !_map_of_arr_set { + return Err(DecodeError::MissingField("mapOfArr: Map.".to_string())); + } + if !_map_of_map_set { + return Err(DecodeError::MissingField("mapOfMap: Map>.".to_string())); + } + if !_map_of_obj_set { + return Err(DecodeError::MissingField("mapOfObj: Map.".to_string())); + } + if !_map_of_arr_of_obj_set { + return Err(DecodeError::MissingField("mapOfArrOfObj: Map.".to_string())); + } + + Ok(ArgsModuleMethod { + str: _str, + opt_str: _opt_str, + en: _en, + opt_enum: _opt_enum, + enum_array: _enum_array, + opt_enum_array: _opt_enum_array, + map: _map, + map_of_arr: _map_of_arr, + map_of_map: _map_of_map, + map_of_obj: _map_of_obj, + map_of_arr_of_obj: _map_of_arr_of_obj, + }) +} + +pub fn serialize_module_method_args(args: &ArgsModuleMethod) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: module_method Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_module_method_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_module_method_args(args: &ArgsModuleMethod, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&11)?; + writer.context().push("str", "String", "writing property"); + writer.write_string("str")?; + writer.write_string(&args.str)?; + writer.context().pop(); + writer.context().push("optStr", "Option", "writing property"); + writer.write_string("optStr")?; + writer.write_optional_string(&args.opt_str)?; + writer.context().pop(); + writer.context().push("en", "CustomEnum", "writing property"); + writer.write_string("en")?; + writer.write_i32(&(args.en as i32))?; + writer.context().pop(); + writer.context().push("optEnum", "Option", "writing property"); + writer.write_string("optEnum")?; + writer.write_optional_i32(&args.opt_enum.map(|f| f as i32))?; + writer.context().pop(); + writer.context().push("enumArray", "Vec", "writing property"); + writer.write_string("enumArray")?; + writer.write_array(&args.enum_array, |writer, item| { + writer.write_i32(&(*item as i32)) + })?; + writer.context().pop(); + writer.context().push("optEnumArray", "Option>>", "writing property"); + writer.write_string("optEnumArray")?; + writer.write_optional_array(&args.opt_enum_array, |writer, item| { + writer.write_optional_i32(&item.map(|f| f as i32)) + })?; + writer.context().pop(); + writer.context().push("map", "Map", "writing property"); + writer.write_string("map")?; + writer.write_ext_generic_map(&args.map, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_i32(value) + })?; + writer.context().pop(); + writer.context().push("mapOfArr", "Map>", "writing property"); + writer.write_string("mapOfArr")?; + writer.write_ext_generic_map(&args.map_of_arr, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + writer.write_i32(item) + }) + })?; + writer.context().pop(); + writer.context().push("mapOfMap", "Map>", "writing property"); + writer.write_string("mapOfMap")?; + writer.write_ext_generic_map(&args.map_of_map, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_ext_generic_map(value, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_i32(value) + }) + })?; + writer.context().pop(); + writer.context().push("mapOfObj", "Map", "writing property"); + writer.write_string("mapOfObj")?; + writer.write_ext_generic_map(&args.map_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + AnotherType::write(value, writer) + })?; + writer.context().pop(); + writer.context().push("mapOfArrOfObj", "Map>", "writing property"); + writer.write_string("mapOfArrOfObj")?; + writer.write_ext_generic_map(&args.map_of_arr_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + AnotherType::write(item, writer) + }) + })?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_module_method_result(result: &i32) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: module_method Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_module_method_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_module_method_result(result: &i32, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("moduleMethod", "i32", "writing result"); + writer.write_i32(result)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_module_method_result(result: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: module_method Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("moduleMethod", "i32", "reading function output"); + let res = reader.read_i32()?; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsObjectMethod { + pub object: AnotherType, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, +} + +pub fn deserialize_object_method_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: object_method Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _object: AnotherType = AnotherType::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "object" => { + reader.context().push(&field, "AnotherType", "type found, reading argument"); + let object = AnotherType::read(&mut reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading argument"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(&mut reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _object_array = reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading argument"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_object_set { + return Err(DecodeError::MissingField("object: AnotherType.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [AnotherType].".to_string())); + } + + Ok(ArgsObjectMethod { + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + }) +} + +pub fn serialize_object_method_args(args: &ArgsObjectMethod) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: object_method Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_object_method_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_object_method_args(args: &ArgsObjectMethod, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&4)?; + writer.context().push("object", "AnotherType", "writing property"); + writer.write_string("object")?; + AnotherType::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + AnotherType::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + AnotherType::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + AnotherType::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_object_method_result(result: &Option) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: object_method Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_object_method_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_object_method_result(result: &Option, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("objectMethod", "Option", "writing result"); + if result.is_some() { + AnotherType::write(result.as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_object_method_result(result: &[u8]) -> Result, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing module-type: object_method Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("objectMethod", "Option", "reading function output"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(&mut reader)?); + } else { + object = None; + } + let res = object; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsOptionalEnvMethod { + pub object: AnotherType, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, +} + +pub fn deserialize_optional_env_method_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: optional_env_method Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _object: AnotherType = AnotherType::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "object" => { + reader.context().push(&field, "AnotherType", "type found, reading argument"); + let object = AnotherType::read(&mut reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading argument"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(&mut reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading argument"); + _object_array = reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading argument"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_object_set { + return Err(DecodeError::MissingField("object: AnotherType.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [AnotherType].".to_string())); + } + + Ok(ArgsOptionalEnvMethod { + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + }) +} + +pub fn serialize_optional_env_method_args(args: &ArgsOptionalEnvMethod) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: optional_env_method Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_optional_env_method_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_optional_env_method_args(args: &ArgsOptionalEnvMethod, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&4)?; + writer.context().push("object", "AnotherType", "writing property"); + writer.write_string("object")?; + AnotherType::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + AnotherType::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + AnotherType::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + AnotherType::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_optional_env_method_result(result: &Option) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: optional_env_method Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_optional_env_method_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_optional_env_method_result(result: &Option, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("optionalEnvMethod", "Option", "writing result"); + if result.is_some() { + AnotherType::write(result.as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_optional_env_method_result(result: &[u8]) -> Result, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing module-type: optional_env_method Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("optionalEnvMethod", "Option", "reading function output"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(&mut reader)?); + } else { + object = None; + } + let res = object; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsIf { + #[serde(rename = "if")] + pub _if: Else, +} + +pub fn deserialize_if_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: if Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _if: Else = Else::new(); + let mut _if_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "if" => { + reader.context().push(&field, "Else", "type found, reading argument"); + let object = Else::read(&mut reader)?; + _if = object; + _if_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_if_set { + return Err(DecodeError::MissingField("if: else.".to_string())); + } + + Ok(ArgsIf { + _if: _if, + }) +} + +pub fn serialize_if_args(args: &ArgsIf) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: if Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_if_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_if_args(args: &ArgsIf, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("if", "Else", "writing property"); + writer.write_string("if")?; + Else::write(&args._if, writer)?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_if_result(result: &Else) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: if Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_if_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_if_result(result: &Else, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("if", "Else", "writing result"); + Else::write(&result, writer)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_if_result(result: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: if Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("if", "Else", "reading function output"); + let object = Else::read(&mut reader)?; + let res = object; + reader.context().pop(); + Ok(res) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs new file mode 100644 index 00000000..e9316ed2 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs @@ -0,0 +1,134 @@ +use polywrap_wasm_rs::{ + wrap_load_env +}; + +use crate::{ + ArgsModuleMethod, + deserialize_module_method_args, + serialize_module_method_result, + ArgsObjectMethod, + deserialize_object_method_args, + serialize_object_method_result, + ArgsOptionalEnvMethod, + deserialize_optional_env_method_args, + serialize_optional_env_method_result, + ArgsIf, + deserialize_if_args, + serialize_if_result +}; + +use crate::module::{ModuleTrait, Module}; +use crate::Env; + +pub fn module_method_wrapped(args: &[u8], env_size: u32) -> Vec { + match deserialize_module_method_args(args) { + Ok(args) => { + let result = Module::module_method(ArgsModuleMethod { + str: args.str, + opt_str: args.opt_str, + en: args.en, + opt_enum: args.opt_enum, + enum_array: args.enum_array, + opt_enum_array: args.opt_enum_array, + map: args.map, + map_of_arr: args.map_of_arr, + map_of_map: args.map_of_map, + map_of_obj: args.map_of_obj, + map_of_arr_of_obj: args.map_of_arr_of_obj, + }); + match result { + Ok(res) => { + serialize_module_method_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} + +pub fn object_method_wrapped(args: &[u8], env_size: u32) -> Vec { + if env_size == 0 { + panic!("Environment is not set, and it is required by method 'objectMethod'"); + } + + let env_buf = wrap_load_env(env_size); + let env = Env::from_buffer(&env_buf).unwrap(); + + match deserialize_object_method_args(args) { + Ok(args) => { + let result = Module::object_method(ArgsObjectMethod { + object: args.object, + opt_object: args.opt_object, + object_array: args.object_array, + opt_object_array: args.opt_object_array, + }, env); + match result { + Ok(res) => { + serialize_object_method_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} + +pub fn optional_env_method_wrapped(args: &[u8], env_size: u32) -> Vec { + let mut env: Option = None; + if env_size > 0 { + let env_buf = wrap_load_env(env_size); + env = Some(Env::from_buffer(&env_buf).unwrap()); + } + + match deserialize_optional_env_method_args(args) { + Ok(args) => { + let result = Module::optional_env_method(ArgsOptionalEnvMethod { + object: args.object, + opt_object: args.opt_object, + object_array: args.object_array, + opt_object_array: args.opt_object_array, + }, env); + match result { + Ok(res) => { + serialize_optional_env_method_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} + +pub fn if_wrapped(args: &[u8], env_size: u32) -> Vec { + match deserialize_if_args(args) { + Ok(args) => { + let result = Module::_if(ArgsIf { + _if: args._if, + }); + match result { + Ok(res) => { + serialize_if_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/test_import/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/test_import/mod.rs new file mode 100644 index 00000000..7cae6add --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/test_import/mod.rs @@ -0,0 +1,11 @@ +use polywrap_wasm_rs::wrap_get_implementations; + +pub struct TestImport {} + +impl TestImport { + const uri: &'static str = "testimport.uri.eth"; + + pub fn get_implementations() -> Vec { + wrap_get_implementations(Self::uri) + } +} \ No newline at end of file diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/input.graphql b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/input.graphql new file mode 100644 index 00000000..2d6ae2f8 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/input.graphql @@ -0,0 +1,11 @@ +type Module { + function1( + arg1: UInt32! + arg2: Boolean! + ): String! + + function2( + arg1: Int32 + arg2: Bytes + ): String +} diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/entry.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/entry.rs new file mode 100644 index 00000000..6107bf61 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/entry.rs @@ -0,0 +1,34 @@ +use crate::{ + function1_wrapped, + function2_wrapped +}; +use polywrap_wasm_rs::{ + abort, + invoke, + InvokeArgs, +}; +use crate::module::Module; + +#[no_mangle] +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32, env_size: u32) -> bool { + // Ensure the abort handler is properly setup + abort::wrap_abort_setup(); + + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); + let result: Vec; + + match args.method.as_str() { + "function1" => { + result = function1_wrapped(args.args.as_slice(), env_size); + } + "function2" => { + result = function2_wrapped(args.args.as_slice(), env_size); + } + _ => { + invoke::wrap_invoke_error(format!("Could not find invoke function {}", args.method)); + return false; + } + }; + invoke::wrap_invoke_result(result); + return true; +} diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/mod.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/mod.rs new file mode 100644 index 00000000..c8429cda --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/mod.rs @@ -0,0 +1,20 @@ +pub mod entry; +pub mod module; +pub use module::{ + Module, + ModuleTrait, + deserialize_function1_args, + serialize_function1_result, + function1_wrapped, + ArgsFunction1, + deserialize_function2_args, + serialize_function2_result, + function2_wrapped, + ArgsFunction2 +}; + +// Override print!(...) & println!(...) macros +#[macro_export] +macro_rules! println { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } +#[macro_export] +macro_rules! print { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/mod.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/mod.rs new file mode 100644 index 00000000..3e981104 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/mod.rs @@ -0,0 +1,17 @@ +pub mod wrapped; +pub use wrapped::{ + function1_wrapped, + function2_wrapped +}; +pub mod serialization; +pub use serialization::{ + deserialize_function1_args, + serialize_function1_result, + ArgsFunction1, + deserialize_function2_args, + serialize_function2_result, + ArgsFunction2 +}; + +pub mod module; +pub use module::*; diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs new file mode 100644 index 00000000..f8e19b01 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs @@ -0,0 +1,18 @@ +use crate::{ + ArgsFunction1, + ArgsFunction2, +}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + JSON, +}; + +pub struct Module; + +pub trait ModuleTrait { + fn function1(args: ArgsFunction1) -> Result; + + fn function2(args: ArgsFunction2) -> Result, String>; +} diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/serialization.rs new file mode 100644 index 00000000..ec159ca8 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/serialization.rs @@ -0,0 +1,201 @@ +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsFunction1 { + pub arg1: u32, + pub arg2: bool, +} + +pub fn deserialize_function1_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: function1 Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _arg1: u32 = 0; + let mut _arg1_set = false; + let mut _arg2: bool = false; + let mut _arg2_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "arg1" => { + reader.context().push(&field, "u32", "type found, reading argument"); + _arg1 = reader.read_u32()?; + _arg1_set = true; + reader.context().pop(); + } + "arg2" => { + reader.context().push(&field, "bool", "type found, reading argument"); + _arg2 = reader.read_bool()?; + _arg2_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_arg1_set { + return Err(DecodeError::MissingField("arg1: UInt32.".to_string())); + } + if !_arg2_set { + return Err(DecodeError::MissingField("arg2: Boolean.".to_string())); + } + + Ok(ArgsFunction1 { + arg1: _arg1, + arg2: _arg2, + }) +} + +pub fn serialize_function1_args(args: &ArgsFunction1) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: function1 Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_function1_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_function1_args(args: &ArgsFunction1, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&2)?; + writer.context().push("arg1", "u32", "writing property"); + writer.write_string("arg1")?; + writer.write_u32(&args.arg1)?; + writer.context().pop(); + writer.context().push("arg2", "bool", "writing property"); + writer.write_string("arg2")?; + writer.write_bool(&args.arg2)?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_function1_result(result: &String) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: function1 Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_function1_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_function1_result(result: &String, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("function1", "String", "writing result"); + writer.write_string(result)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_function1_result(result: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: function1 Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("function1", "String", "reading function output"); + let res = reader.read_string()?; + reader.context().pop(); + Ok(res) +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ArgsFunction2 { + pub arg1: Option, + pub arg2: Option>, +} + +pub fn deserialize_function2_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing module-type: function2 Args".to_string(); + + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + let mut _arg1: Option = None; + let mut _arg2: Option> = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "arg1" => { + reader.context().push(&field, "Option", "type found, reading argument"); + _arg1 = reader.read_optional_i32()?; + reader.context().pop(); + } + "arg2" => { + reader.context().push(&field, "Option>", "type found, reading argument"); + _arg2 = reader.read_optional_bytes()?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + + Ok(ArgsFunction2 { + arg1: _arg1, + arg2: _arg2, + }) +} + +pub fn serialize_function2_args(args: &ArgsFunction2) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: function2 Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_function2_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_function2_args(args: &ArgsFunction2, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&2)?; + writer.context().push("arg1", "Option", "writing property"); + writer.write_string("arg1")?; + writer.write_optional_i32(&args.arg1)?; + writer.context().pop(); + writer.context().push("arg2", "Option>", "writing property"); + writer.write_string("arg2")?; + writer.write_optional_bytes(&args.arg2)?; + writer.context().pop(); + Ok(()) +} + +pub fn serialize_function2_result(result: &Option) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) module-type: function2 Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_function2_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_function2_result(result: &Option, writer: &mut W) -> Result<(), EncodeError> { + writer.context().push("function2", "Option", "writing result"); + writer.write_optional_string(result)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_function2_result(result: &[u8]) -> Result, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing module-type: function2 Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + reader.context().push("function2", "Option", "reading function output"); + let res = reader.read_optional_string()?; + reader.context().pop(); + Ok(res) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs new file mode 100644 index 00000000..a72789f1 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs @@ -0,0 +1,58 @@ +use polywrap_wasm_rs::{ + wrap_load_env +}; + +use crate::{ + ArgsFunction1, + deserialize_function1_args, + serialize_function1_result, + ArgsFunction2, + deserialize_function2_args, + serialize_function2_result +}; + +use crate::module::{ModuleTrait, Module}; + +pub fn function1_wrapped(args: &[u8], env_size: u32) -> Vec { + match deserialize_function1_args(args) { + Ok(args) => { + let result = Module::function1(ArgsFunction1 { + arg1: args.arg1, + arg2: args.arg2, + }); + match result { + Ok(res) => { + serialize_function1_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} + +pub fn function2_wrapped(args: &[u8], env_size: u32) -> Vec { + match deserialize_function2_args(args) { + Ok(args) => { + let result = Module::function2(ArgsFunction2 { + arg1: args.arg1, + arg2: args.arg2, + }); + match result { + Ok(res) => { + serialize_function2_result(&res).unwrap() + } + Err(e) => { + panic!("{}", e.to_string()) + } + } + } + Err(e) => { + panic!("{}", e.to_string()) + } + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/input.graphql b/implementations/wrap-rust/src/__tests__/cases/002-object-types/input.graphql new file mode 100644 index 00000000..0aa7c068 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/input.graphql @@ -0,0 +1,68 @@ +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +type CustomType { + str: String! + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + u16: UInt16! + u32: UInt32! + i: Int! + i8: Int8! + i16: Int16! + i32: Int32! + bigint: BigInt! + optBigint: BigInt + bignumber: BigNumber! + optBignumber: BigNumber + json: JSON! + optJson: JSON + bytes: Bytes! + optBytes: Bytes + boolean: Boolean! + optBoolean: Boolean + u_array: [UInt!]! + uOpt_array: [UInt!] + _opt_uOptArray: [UInt] + optStrOptArray: [String] + uArrayArray: [[UInt!]!]! + uOptArrayOptArray: [[UInt32]]! + uArrayOptArrayArray: [[[UInt32!]!]]! + crazyArray: [[[[UInt32!]]!]] + object: AnotherType! + optObject: AnotherType + objectArray: [AnotherType!]! + optObjectArray: [AnotherType] + map: Map! @annotate(type: "Map!") + mapOfArr: Map! @annotate(type: "Map!") + mapOfObj: Map! @annotate(type: "Map!") + mapOfArrOfObj: Map! @annotate(type: "Map!") + mapCustomValue: Map! @annotate(type: "Map!") +} + +type AnotherType { + prop: String + circular: CustomType + const: String +} + +type CustomMapValue { + foo: String! +} + +type else { + else: String! +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs new file mode 100644 index 00000000..d474a4a3 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs @@ -0,0 +1,49 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_else, + read_else, + serialize_else, + write_else +}; + + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Else { + #[serde(rename = "else")] + pub _else: String, +} + +impl Else { + pub fn new() -> Else { + Else { + _else: String::new(), + } + } + + pub fn to_buffer(args: &Else) -> Result, EncodeError> { + serialize_else(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_else(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &Else, writer: &mut W) -> Result<(), EncodeError> { + write_else(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_else(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/serialization.rs new file mode 100644 index 00000000..5e048162 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/serialization.rs @@ -0,0 +1,68 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::Else; + +pub fn serialize_else(args: &Else) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: Else".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_else(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_else(args: &Else, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("else", "String", "writing property"); + writer.write_string("else")?; + writer.write_string(&args._else)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_else(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: Else".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_else(&mut reader) +} + +pub fn read_else(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _else: String = String::new(); + let mut _else_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "else" => { + reader.context().push(&field, "String", "type found, reading property"); + _else = reader.read_string()?; + _else_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_else_set { + return Err(DecodeError::MissingField("else: String.".to_string())); + } + + Ok(Else { + _else: _else, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs new file mode 100644 index 00000000..15091a2e --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs @@ -0,0 +1,54 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_another_type, + read_another_type, + serialize_another_type, + write_another_type +}; + +use crate::CustomType; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnotherType { + pub prop: Option, + pub circular: Option, + #[serde(rename = "const")] + pub _const: Option, +} + +impl AnotherType { + pub fn new() -> AnotherType { + AnotherType { + prop: None, + circular: None, + _const: None, + } + } + + pub fn to_buffer(args: &AnotherType) -> Result, EncodeError> { + serialize_another_type(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_another_type(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &AnotherType, writer: &mut W) -> Result<(), EncodeError> { + write_another_type(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_another_type(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/serialization.rs new file mode 100644 index 00000000..f8c50b46 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/serialization.rs @@ -0,0 +1,97 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::AnotherType; + +use crate::CustomType; + +pub fn serialize_another_type(args: &AnotherType) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: AnotherType".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_another_type(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_another_type(args: &AnotherType, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&3)?; + writer.context().push("prop", "Option", "writing property"); + writer.write_string("prop")?; + writer.write_optional_string(&args.prop)?; + writer.context().pop(); + writer.context().push("circular", "Option", "writing property"); + writer.write_string("circular")?; + if args.circular.is_some() { + CustomType::write(args.circular.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("const", "Option", "writing property"); + writer.write_string("const")?; + writer.write_optional_string(&args._const)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_another_type(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: AnotherType".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_another_type(&mut reader) +} + +pub fn read_another_type(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _prop: Option = None; + let mut _circular: Option = None; + let mut _const: Option = None; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "prop" => { + reader.context().push(&field, "Option", "type found, reading property"); + _prop = reader.read_optional_string()?; + reader.context().pop(); + } + "circular" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(CustomType::read(reader)?); + } else { + object = None; + } + _circular = object; + reader.context().pop(); + } + "const" => { + reader.context().push(&field, "Option", "type found, reading property"); + _const = reader.read_optional_string()?; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + + Ok(AnotherType { + prop: _prop, + circular: _circular, + _const: _const, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs new file mode 100644 index 00000000..e8c525f0 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs @@ -0,0 +1,48 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_custom_map_value, + read_custom_map_value, + serialize_custom_map_value, + write_custom_map_value +}; + + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct CustomMapValue { + pub foo: String, +} + +impl CustomMapValue { + pub fn new() -> CustomMapValue { + CustomMapValue { + foo: String::new(), + } + } + + pub fn to_buffer(args: &CustomMapValue) -> Result, EncodeError> { + serialize_custom_map_value(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_custom_map_value(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &CustomMapValue, writer: &mut W) -> Result<(), EncodeError> { + write_custom_map_value(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_custom_map_value(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/serialization.rs new file mode 100644 index 00000000..aafbc308 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/serialization.rs @@ -0,0 +1,68 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::CustomMapValue; + +pub fn serialize_custom_map_value(args: &CustomMapValue) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: CustomMapValue".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_custom_map_value(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_custom_map_value(args: &CustomMapValue, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&1)?; + writer.context().push("foo", "String", "writing property"); + writer.write_string("foo")?; + writer.write_string(&args.foo)?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_custom_map_value(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: CustomMapValue".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_custom_map_value(&mut reader) +} + +pub fn read_custom_map_value(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _foo: String = String::new(); + let mut _foo_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "foo" => { + reader.context().push(&field, "String", "type found, reading property"); + _foo = reader.read_string()?; + _foo_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_foo_set { + return Err(DecodeError::MissingField("foo: String.".to_string())); + } + + Ok(CustomMapValue { + foo: _foo, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs new file mode 100644 index 00000000..90304da9 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs @@ -0,0 +1,124 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_custom_type, + read_custom_type, + serialize_custom_type, + write_custom_type +}; + +use crate::AnotherType; +use crate::CustomMapValue; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct CustomType { + pub str: String, + pub opt_str: Option, + pub u: u32, + pub opt_u: Option, + pub u8: u8, + pub u16: u16, + pub u32: u32, + pub i: i32, + pub i8: i8, + pub i16: i16, + pub i32: i32, + pub bigint: BigInt, + pub opt_bigint: Option, + pub bignumber: BigNumber, + pub opt_bignumber: Option, + pub json: JSON::Value, + pub opt_json: Option, + pub bytes: Vec, + pub opt_bytes: Option>, + pub boolean: bool, + pub opt_boolean: Option, + pub u_array: Vec, + pub u_opt_array: Option>, + pub _opt_u_opt_array: Option>>, + pub opt_str_opt_array: Option>>, + pub u_array_array: Vec>, + pub u_opt_array_opt_array: Vec>>>, + pub u_array_opt_array_array: Vec>>>, + pub crazy_array: Option>>>>>>, + pub object: AnotherType, + pub opt_object: Option, + pub object_array: Vec, + pub opt_object_array: Option>>, + pub map: Map, + pub map_of_arr: Map>, + pub map_of_obj: Map, + pub map_of_arr_of_obj: Map>, + pub map_custom_value: Map>, +} + +impl CustomType { + pub fn new() -> CustomType { + CustomType { + str: String::new(), + opt_str: None, + u: 0, + opt_u: None, + u8: 0, + u16: 0, + u32: 0, + i: 0, + i8: 0, + i16: 0, + i32: 0, + bigint: BigInt::default(), + opt_bigint: None, + bignumber: BigNumber::default(), + opt_bignumber: None, + json: JSON::Value::Null, + opt_json: None, + bytes: vec![], + opt_bytes: None, + boolean: false, + opt_boolean: None, + u_array: vec![], + u_opt_array: None, + _opt_u_opt_array: None, + opt_str_opt_array: None, + u_array_array: vec![], + u_opt_array_opt_array: vec![], + u_array_opt_array_array: vec![], + crazy_array: None, + object: AnotherType::new(), + opt_object: None, + object_array: vec![], + opt_object_array: None, + map: Map::::new(), + map_of_arr: Map::>::new(), + map_of_obj: Map::::new(), + map_of_arr_of_obj: Map::>::new(), + map_custom_value: Map::>::new(), + } + } + + pub fn to_buffer(args: &CustomType) -> Result, EncodeError> { + serialize_custom_type(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result { + deserialize_custom_type(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &CustomType, writer: &mut W) -> Result<(), EncodeError> { + write_custom_type(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result { + read_custom_type(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/serialization.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/serialization.rs new file mode 100644 index 00000000..1757c597 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/serialization.rs @@ -0,0 +1,748 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::CustomType; + +use crate::AnotherType; +use crate::CustomMapValue; + +pub fn serialize_custom_type(args: &CustomType) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) object-type: CustomType".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_custom_type(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_custom_type(args: &CustomType, writer: &mut W) -> Result<(), EncodeError> { + writer.write_map_length(&38)?; + writer.context().push("str", "String", "writing property"); + writer.write_string("str")?; + writer.write_string(&args.str)?; + writer.context().pop(); + writer.context().push("optStr", "Option", "writing property"); + writer.write_string("optStr")?; + writer.write_optional_string(&args.opt_str)?; + writer.context().pop(); + writer.context().push("u", "u32", "writing property"); + writer.write_string("u")?; + writer.write_u32(&args.u)?; + writer.context().pop(); + writer.context().push("optU", "Option", "writing property"); + writer.write_string("optU")?; + writer.write_optional_u32(&args.opt_u)?; + writer.context().pop(); + writer.context().push("u8", "u8", "writing property"); + writer.write_string("u8")?; + writer.write_u8(&args.u8)?; + writer.context().pop(); + writer.context().push("u16", "u16", "writing property"); + writer.write_string("u16")?; + writer.write_u16(&args.u16)?; + writer.context().pop(); + writer.context().push("u32", "u32", "writing property"); + writer.write_string("u32")?; + writer.write_u32(&args.u32)?; + writer.context().pop(); + writer.context().push("i", "i32", "writing property"); + writer.write_string("i")?; + writer.write_i32(&args.i)?; + writer.context().pop(); + writer.context().push("i8", "i8", "writing property"); + writer.write_string("i8")?; + writer.write_i8(&args.i8)?; + writer.context().pop(); + writer.context().push("i16", "i16", "writing property"); + writer.write_string("i16")?; + writer.write_i16(&args.i16)?; + writer.context().pop(); + writer.context().push("i32", "i32", "writing property"); + writer.write_string("i32")?; + writer.write_i32(&args.i32)?; + writer.context().pop(); + writer.context().push("bigint", "BigInt", "writing property"); + writer.write_string("bigint")?; + writer.write_bigint(&args.bigint)?; + writer.context().pop(); + writer.context().push("optBigint", "Option", "writing property"); + writer.write_string("optBigint")?; + writer.write_optional_bigint(&args.opt_bigint)?; + writer.context().pop(); + writer.context().push("bignumber", "BigNumber", "writing property"); + writer.write_string("bignumber")?; + writer.write_bignumber(&args.bignumber)?; + writer.context().pop(); + writer.context().push("optBignumber", "Option", "writing property"); + writer.write_string("optBignumber")?; + writer.write_optional_bignumber(&args.opt_bignumber)?; + writer.context().pop(); + writer.context().push("json", "JSON::Value", "writing property"); + writer.write_string("json")?; + writer.write_json(&args.json)?; + writer.context().pop(); + writer.context().push("optJson", "Option", "writing property"); + writer.write_string("optJson")?; + writer.write_optional_json(&args.opt_json)?; + writer.context().pop(); + writer.context().push("bytes", "Vec", "writing property"); + writer.write_string("bytes")?; + writer.write_bytes(&args.bytes)?; + writer.context().pop(); + writer.context().push("optBytes", "Option>", "writing property"); + writer.write_string("optBytes")?; + writer.write_optional_bytes(&args.opt_bytes)?; + writer.context().pop(); + writer.context().push("boolean", "bool", "writing property"); + writer.write_string("boolean")?; + writer.write_bool(&args.boolean)?; + writer.context().pop(); + writer.context().push("optBoolean", "Option", "writing property"); + writer.write_string("optBoolean")?; + writer.write_optional_bool(&args.opt_boolean)?; + writer.context().pop(); + writer.context().push("u_array", "Vec", "writing property"); + writer.write_string("u_array")?; + writer.write_array(&args.u_array, |writer, item| { + writer.write_u32(item) + })?; + writer.context().pop(); + writer.context().push("uOpt_array", "Option>", "writing property"); + writer.write_string("uOpt_array")?; + writer.write_optional_array(&args.u_opt_array, |writer, item| { + writer.write_u32(item) + })?; + writer.context().pop(); + writer.context().push("_opt_uOptArray", "Option>>", "writing property"); + writer.write_string("_opt_uOptArray")?; + writer.write_optional_array(&args._opt_u_opt_array, |writer, item| { + writer.write_optional_u32(item) + })?; + writer.context().pop(); + writer.context().push("optStrOptArray", "Option>>", "writing property"); + writer.write_string("optStrOptArray")?; + writer.write_optional_array(&args.opt_str_opt_array, |writer, item| { + writer.write_optional_string(item) + })?; + writer.context().pop(); + writer.context().push("uArrayArray", "Vec>", "writing property"); + writer.write_string("uArrayArray")?; + writer.write_array(&args.u_array_array, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_u32(item) + }) + })?; + writer.context().pop(); + writer.context().push("uOptArrayOptArray", "Vec>>>", "writing property"); + writer.write_string("uOptArrayOptArray")?; + writer.write_array(&args.u_opt_array_opt_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_optional_u32(item) + }) + })?; + writer.context().pop(); + writer.context().push("uArrayOptArrayArray", "Vec>>>", "writing property"); + writer.write_string("uArrayOptArrayArray")?; + writer.write_array(&args.u_array_opt_array_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_u32(item) + }) + }) + })?; + writer.context().pop(); + writer.context().push("crazyArray", "Option>>>>>>", "writing property"); + writer.write_string("crazyArray")?; + writer.write_optional_array(&args.crazy_array, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_array(item, |writer, item| { + writer.write_optional_array(item, |writer, item| { + writer.write_u32(item) + }) + }) + }) + })?; + writer.context().pop(); + writer.context().push("object", "AnotherType", "writing property"); + writer.write_string("object")?; + AnotherType::write(&args.object, writer)?; + writer.context().pop(); + writer.context().push("optObject", "Option", "writing property"); + writer.write_string("optObject")?; + if args.opt_object.is_some() { + AnotherType::write(args.opt_object.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + writer.context().pop(); + writer.context().push("objectArray", "Vec", "writing property"); + writer.write_string("objectArray")?; + writer.write_array(&args.object_array, |writer, item| { + AnotherType::write(item, writer) + })?; + writer.context().pop(); + writer.context().push("optObjectArray", "Option>>", "writing property"); + writer.write_string("optObjectArray")?; + writer.write_optional_array(&args.opt_object_array, |writer, item| { + if item.is_some() { + AnotherType::write(item.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + writer.context().push("map", "Map", "writing property"); + writer.write_string("map")?; + writer.write_ext_generic_map(&args.map, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_i32(value) + })?; + writer.context().pop(); + writer.context().push("mapOfArr", "Map>", "writing property"); + writer.write_string("mapOfArr")?; + writer.write_ext_generic_map(&args.map_of_arr, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + writer.write_i32(item) + }) + })?; + writer.context().pop(); + writer.context().push("mapOfObj", "Map", "writing property"); + writer.write_string("mapOfObj")?; + writer.write_ext_generic_map(&args.map_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + AnotherType::write(value, writer) + })?; + writer.context().pop(); + writer.context().push("mapOfArrOfObj", "Map>", "writing property"); + writer.write_string("mapOfArrOfObj")?; + writer.write_ext_generic_map(&args.map_of_arr_of_obj, |writer, key| { + writer.write_string(key) + }, |writer, value| { + writer.write_array(value, |writer, item| { + AnotherType::write(item, writer) + }) + })?; + writer.context().pop(); + writer.context().push("mapCustomValue", "Map>", "writing property"); + writer.write_string("mapCustomValue")?; + writer.write_ext_generic_map(&args.map_custom_value, |writer, key| { + writer.write_string(key) + }, |writer, value| { + if value.is_some() { + CustomMapValue::write(value.as_ref().as_ref().unwrap(), writer) + } else { + writer.write_nil() + } + })?; + writer.context().pop(); + Ok(()) +} + +pub fn deserialize_custom_type(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing object-type: CustomType".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_custom_type(&mut reader) +} + +pub fn read_custom_type(reader: &mut R) -> Result { + let mut num_of_fields = reader.read_map_length()?; + + let mut _str: String = String::new(); + let mut _str_set = false; + let mut _opt_str: Option = None; + let mut _u: u32 = 0; + let mut _u_set = false; + let mut _opt_u: Option = None; + let mut _u8: u8 = 0; + let mut _u8_set = false; + let mut _u16: u16 = 0; + let mut _u16_set = false; + let mut _u32: u32 = 0; + let mut _u32_set = false; + let mut _i: i32 = 0; + let mut _i_set = false; + let mut _i8: i8 = 0; + let mut _i8_set = false; + let mut _i16: i16 = 0; + let mut _i16_set = false; + let mut _i32: i32 = 0; + let mut _i32_set = false; + let mut _bigint: BigInt = BigInt::default(); + let mut _bigint_set = false; + let mut _opt_bigint: Option = None; + let mut _bignumber: BigNumber = BigNumber::default(); + let mut _bignumber_set = false; + let mut _opt_bignumber: Option = None; + let mut _json: JSON::Value = JSON::Value::Null; + let mut _json_set = false; + let mut _opt_json: Option = None; + let mut _bytes: Vec = vec![]; + let mut _bytes_set = false; + let mut _opt_bytes: Option> = None; + let mut _boolean: bool = false; + let mut _boolean_set = false; + let mut _opt_boolean: Option = None; + let mut _u_array: Vec = vec![]; + let mut _u_array_set = false; + let mut _u_opt_array: Option> = None; + let mut __opt_u_opt_array: Option>> = None; + let mut _opt_str_opt_array: Option>> = None; + let mut _u_array_array: Vec> = vec![]; + let mut _u_array_array_set = false; + let mut _u_opt_array_opt_array: Vec>>> = vec![]; + let mut _u_opt_array_opt_array_set = false; + let mut _u_array_opt_array_array: Vec>>> = vec![]; + let mut _u_array_opt_array_array_set = false; + let mut _crazy_array: Option>>>>>> = None; + let mut _object: AnotherType = AnotherType::new(); + let mut _object_set = false; + let mut _opt_object: Option = None; + let mut _object_array: Vec = vec![]; + let mut _object_array_set = false; + let mut _opt_object_array: Option>> = None; + let mut _map: Map = Map::::new(); + let mut _map_set = false; + let mut _map_of_arr: Map> = Map::>::new(); + let mut _map_of_arr_set = false; + let mut _map_of_obj: Map = Map::::new(); + let mut _map_of_obj_set = false; + let mut _map_of_arr_of_obj: Map> = Map::>::new(); + let mut _map_of_arr_of_obj_set = false; + let mut _map_custom_value: Map> = Map::>::new(); + let mut _map_custom_value_set = false; + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + "str" => { + reader.context().push(&field, "String", "type found, reading property"); + _str = reader.read_string()?; + _str_set = true; + reader.context().pop(); + } + "optStr" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_str = reader.read_optional_string()?; + reader.context().pop(); + } + "u" => { + reader.context().push(&field, "u32", "type found, reading property"); + _u = reader.read_u32()?; + _u_set = true; + reader.context().pop(); + } + "optU" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_u = reader.read_optional_u32()?; + reader.context().pop(); + } + "u8" => { + reader.context().push(&field, "u8", "type found, reading property"); + _u8 = reader.read_u8()?; + _u8_set = true; + reader.context().pop(); + } + "u16" => { + reader.context().push(&field, "u16", "type found, reading property"); + _u16 = reader.read_u16()?; + _u16_set = true; + reader.context().pop(); + } + "u32" => { + reader.context().push(&field, "u32", "type found, reading property"); + _u32 = reader.read_u32()?; + _u32_set = true; + reader.context().pop(); + } + "i" => { + reader.context().push(&field, "i32", "type found, reading property"); + _i = reader.read_i32()?; + _i_set = true; + reader.context().pop(); + } + "i8" => { + reader.context().push(&field, "i8", "type found, reading property"); + _i8 = reader.read_i8()?; + _i8_set = true; + reader.context().pop(); + } + "i16" => { + reader.context().push(&field, "i16", "type found, reading property"); + _i16 = reader.read_i16()?; + _i16_set = true; + reader.context().pop(); + } + "i32" => { + reader.context().push(&field, "i32", "type found, reading property"); + _i32 = reader.read_i32()?; + _i32_set = true; + reader.context().pop(); + } + "bigint" => { + reader.context().push(&field, "BigInt", "type found, reading property"); + _bigint = reader.read_bigint()?; + _bigint_set = true; + reader.context().pop(); + } + "optBigint" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_bigint = reader.read_optional_bigint()?; + reader.context().pop(); + } + "bignumber" => { + reader.context().push(&field, "BigNumber", "type found, reading property"); + _bignumber = reader.read_bignumber()?; + _bignumber_set = true; + reader.context().pop(); + } + "optBignumber" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_bignumber = reader.read_optional_bignumber()?; + reader.context().pop(); + } + "json" => { + reader.context().push(&field, "JSON::Value", "type found, reading property"); + _json = reader.read_json()?; + _json_set = true; + reader.context().pop(); + } + "optJson" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_json = reader.read_optional_json()?; + reader.context().pop(); + } + "bytes" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _bytes = reader.read_bytes()?; + _bytes_set = true; + reader.context().pop(); + } + "optBytes" => { + reader.context().push(&field, "Option>", "type found, reading property"); + _opt_bytes = reader.read_optional_bytes()?; + reader.context().pop(); + } + "boolean" => { + reader.context().push(&field, "bool", "type found, reading property"); + _boolean = reader.read_bool()?; + _boolean_set = true; + reader.context().pop(); + } + "optBoolean" => { + reader.context().push(&field, "Option", "type found, reading property"); + _opt_boolean = reader.read_optional_bool()?; + reader.context().pop(); + } + "u_array" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _u_array = reader.read_array(|reader| { + reader.read_u32() + })?; + _u_array_set = true; + reader.context().pop(); + } + "uOpt_array" => { + reader.context().push(&field, "Option>", "type found, reading property"); + _u_opt_array = reader.read_optional_array(|reader| { + reader.read_u32() + })?; + reader.context().pop(); + } + "_opt_uOptArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + __opt_u_opt_array = reader.read_optional_array(|reader| { + reader.read_optional_u32() + })?; + reader.context().pop(); + } + "optStrOptArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_str_opt_array = reader.read_optional_array(|reader| { + reader.read_optional_string() + })?; + reader.context().pop(); + } + "uArrayArray" => { + reader.context().push(&field, "Vec>", "type found, reading property"); + _u_array_array = reader.read_array(|reader| { + reader.read_array(|reader| { + reader.read_u32() + }) + })?; + _u_array_array_set = true; + reader.context().pop(); + } + "uOptArrayOptArray" => { + reader.context().push(&field, "Vec>>>", "type found, reading property"); + _u_opt_array_opt_array = reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_optional_u32() + }) + })?; + _u_opt_array_opt_array_set = true; + reader.context().pop(); + } + "uArrayOptArrayArray" => { + reader.context().push(&field, "Vec>>>", "type found, reading property"); + _u_array_opt_array_array = reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_array(|reader| { + reader.read_u32() + }) + }) + })?; + _u_array_opt_array_array_set = true; + reader.context().pop(); + } + "crazyArray" => { + reader.context().push(&field, "Option>>>>>>", "type found, reading property"); + _crazy_array = reader.read_optional_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_array(|reader| { + reader.read_optional_array(|reader| { + reader.read_u32() + }) + }) + }) + })?; + reader.context().pop(); + } + "object" => { + reader.context().push(&field, "AnotherType", "type found, reading property"); + let object = AnotherType::read(reader)?; + _object = object; + _object_set = true; + reader.context().pop(); + } + "optObject" => { + reader.context().push(&field, "Option", "type found, reading property"); + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + _opt_object = object; + reader.context().pop(); + } + "objectArray" => { + reader.context().push(&field, "Vec", "type found, reading property"); + _object_array = reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _object_array_set = true; + reader.context().pop(); + } + "optObjectArray" => { + reader.context().push(&field, "Option>>", "type found, reading property"); + _opt_object_array = reader.read_optional_array(|reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(AnotherType::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + reader.context().pop(); + } + "map" => { + reader.context().push(&field, "Map", "type found, reading property"); + _map = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_i32() + })?; + _map_set = true; + reader.context().pop(); + } + "mapOfArr" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_of_arr = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + reader.read_i32() + }) + })?; + _map_of_arr_set = true; + reader.context().pop(); + } + "mapOfObj" => { + reader.context().push(&field, "Map", "type found, reading property"); + _map_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + let object = AnotherType::read(reader)?; + Ok(object) + })?; + _map_of_obj_set = true; + reader.context().pop(); + } + "mapOfArrOfObj" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_of_arr_of_obj = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + reader.read_array(|reader| { + let object = AnotherType::read(reader)?; + Ok(object) + }) + })?; + _map_of_arr_of_obj_set = true; + reader.context().pop(); + } + "mapCustomValue" => { + reader.context().push(&field, "Map>", "type found, reading property"); + _map_custom_value = reader.read_ext_generic_map(|reader| { + reader.read_string() + }, |reader| { + let mut object: Option = None; + if !reader.is_next_nil()? { + object = Some(CustomMapValue::read(reader)?); + } else { + object = None; + } + Ok(object) + })?; + _map_custom_value_set = true; + reader.context().pop(); + } + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + if !_str_set { + return Err(DecodeError::MissingField("str: String.".to_string())); + } + if !_u_set { + return Err(DecodeError::MissingField("u: UInt.".to_string())); + } + if !_u8_set { + return Err(DecodeError::MissingField("u8: UInt8.".to_string())); + } + if !_u16_set { + return Err(DecodeError::MissingField("u16: UInt16.".to_string())); + } + if !_u32_set { + return Err(DecodeError::MissingField("u32: UInt32.".to_string())); + } + if !_i_set { + return Err(DecodeError::MissingField("i: Int.".to_string())); + } + if !_i8_set { + return Err(DecodeError::MissingField("i8: Int8.".to_string())); + } + if !_i16_set { + return Err(DecodeError::MissingField("i16: Int16.".to_string())); + } + if !_i32_set { + return Err(DecodeError::MissingField("i32: Int32.".to_string())); + } + if !_bigint_set { + return Err(DecodeError::MissingField("bigint: BigInt.".to_string())); + } + if !_bignumber_set { + return Err(DecodeError::MissingField("bignumber: BigNumber.".to_string())); + } + if !_json_set { + return Err(DecodeError::MissingField("json: JSON.".to_string())); + } + if !_bytes_set { + return Err(DecodeError::MissingField("bytes: Bytes.".to_string())); + } + if !_boolean_set { + return Err(DecodeError::MissingField("boolean: Boolean.".to_string())); + } + if !_u_array_set { + return Err(DecodeError::MissingField("u_array: [UInt].".to_string())); + } + if !_u_array_array_set { + return Err(DecodeError::MissingField("uArrayArray: [[UInt]].".to_string())); + } + if !_u_opt_array_opt_array_set { + return Err(DecodeError::MissingField("uOptArrayOptArray: [[UInt32]].".to_string())); + } + if !_u_array_opt_array_array_set { + return Err(DecodeError::MissingField("uArrayOptArrayArray: [[[UInt32]]].".to_string())); + } + if !_object_set { + return Err(DecodeError::MissingField("object: AnotherType.".to_string())); + } + if !_object_array_set { + return Err(DecodeError::MissingField("objectArray: [AnotherType].".to_string())); + } + if !_map_set { + return Err(DecodeError::MissingField("map: Map.".to_string())); + } + if !_map_of_arr_set { + return Err(DecodeError::MissingField("mapOfArr: Map.".to_string())); + } + if !_map_of_obj_set { + return Err(DecodeError::MissingField("mapOfObj: Map.".to_string())); + } + if !_map_of_arr_of_obj_set { + return Err(DecodeError::MissingField("mapOfArrOfObj: Map.".to_string())); + } + if !_map_custom_value_set { + return Err(DecodeError::MissingField("mapCustomValue: Map.".to_string())); + } + + Ok(CustomType { + str: _str, + opt_str: _opt_str, + u: _u, + opt_u: _opt_u, + u8: _u8, + u16: _u16, + u32: _u32, + i: _i, + i8: _i8, + i16: _i16, + i32: _i32, + bigint: _bigint, + opt_bigint: _opt_bigint, + bignumber: _bignumber, + opt_bignumber: _opt_bignumber, + json: _json, + opt_json: _opt_json, + bytes: _bytes, + opt_bytes: _opt_bytes, + boolean: _boolean, + opt_boolean: _opt_boolean, + u_array: _u_array, + u_opt_array: _u_opt_array, + _opt_u_opt_array: __opt_u_opt_array, + opt_str_opt_array: _opt_str_opt_array, + u_array_array: _u_array_array, + u_opt_array_opt_array: _u_opt_array_opt_array, + u_array_opt_array_array: _u_array_opt_array_array, + crazy_array: _crazy_array, + object: _object, + opt_object: _opt_object, + object_array: _object_array, + opt_object_array: _opt_object_array, + map: _map, + map_of_arr: _map_of_arr, + map_of_obj: _map_of_obj, + map_of_arr_of_obj: _map_of_arr_of_obj, + map_custom_value: _map_custom_value, + }) +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/entry.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/entry.rs new file mode 100644 index 00000000..06de7bd9 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/entry.rs @@ -0,0 +1,24 @@ +use polywrap_wasm_rs::{ + abort, + invoke, + InvokeArgs, +}; +use crate::module::Module; + +#[no_mangle] +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32, env_size: u32) -> bool { + // Ensure the abort handler is properly setup + abort::wrap_abort_setup(); + + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); + let result: Vec; + + match args.method.as_str() { + _ => { + invoke::wrap_invoke_error(format!("Could not find invoke function {}", args.method)); + return false; + } + }; + invoke::wrap_invoke_result(result); + return true; +} diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/mod.rs new file mode 100644 index 00000000..d78baf2b --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/mod.rs @@ -0,0 +1,15 @@ +pub mod entry; +pub mod custom_type; +pub use custom_type::CustomType; +pub mod another_type; +pub use another_type::AnotherType; +pub mod custom_map_value; +pub use custom_map_value::CustomMapValue; +pub mod _else; +pub use _else::Else; + +// Override print!(...) & println!(...) macros +#[macro_export] +macro_rules! println { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } +#[macro_export] +macro_rules! print { ($($args:tt)*) => { polywrap_wasm_rs::wrap_debug_log(format!($($args)*).as_str()); } } diff --git a/implementations/wrap-rust/src/__tests__/cases/index.ts b/implementations/wrap-rust/src/__tests__/cases/index.ts new file mode 100644 index 00000000..704f98ab --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/cases/index.ts @@ -0,0 +1,35 @@ +import { Output } from "../wrap"; +import { loadOutput } from "../output"; + +import fs from "fs"; +import path from "path"; + +export interface TestCase { + name: string; + input: string; + output: Output; +} + +export function loadTestCases(): TestCase[] { + const testCases: TestCase[] = []; + const casesDirents = fs.readdirSync(__dirname, { withFileTypes: true }); + + for (const casesDirent of casesDirents) { + if (!casesDirent.isDirectory()) { + continue; + } + + const caseDir = path.join(__dirname, casesDirent.name); + const caseInputPath = path.join(caseDir, "input.graphql"); + const caseInput = fs.readFileSync(caseInputPath, "utf-8"); + const caseOutputDir = path.join(caseDir, "output"); + const caseOutput = loadOutput(caseOutputDir, ["input.graphql"]); + testCases.push({ + name: casesDirent.name, + input: caseInput, + output: caseOutput + }); + } + + return testCases; +} diff --git a/implementations/wrap-rust/src/__tests__/e2e.spec.ts b/implementations/wrap-rust/src/__tests__/e2e.spec.ts new file mode 100644 index 00000000..cbf95777 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/e2e.spec.ts @@ -0,0 +1,79 @@ +import { Output, WrapInfo, File, Directory } from "./wrap"; +import { loadTestCases, TestCase } from "./cases"; +import { orderOutput } from "./output"; + +import { PolywrapClient } from "@polywrap/client-js"; +import { parseSchema } from "@polywrap/schema-parse"; +import diff from "jest-diff"; +import path from "path"; +import fs from "fs"; + +jest.setTimeout(60000); + +describe("e2e", () => { + + const client: PolywrapClient = new PolywrapClient(); + let wrapperUri: string; + let testCases: TestCase[] = loadTestCases(); + + beforeAll(() => { + // Cache wrap URI in build dir + const dirname: string = path.resolve(__dirname); + const wrapperPath: string = path.join(dirname, "..", ".."); + wrapperUri = `fs/${wrapperPath}/build`; + }); + + for (const testCase of testCases) { + it(testCase.name, async () => { + const abi = parseSchema(testCase.input); + + const wrapInfo: WrapInfo = { + version: "0.1", + name: testCase.name, + type: "plugin", + abi: JSON.stringify(abi), + } + + const result = await client.invoke({ + uri: wrapperUri, + method: "generateBindings", + args: { wrapInfo } + }); + + if (!result.ok) fail(result.error); + + const received = orderOutput(result.value); + const expected = orderOutput(testCase.output); + + const removeWhiteSpace = (str: string): string => str.replace(/\s/g, ""); + const removeWhiteSpaceFromFiles = (files: File[]): File[] => files.map((file) => ({ + name: file.name, + data: removeWhiteSpace(file.data), + })); + const removeWhiteSpaceFromDirs = (dirs: Directory[]): Directory[] => dirs.map((dir) => ({ + name: dir.name, + dirs: removeWhiteSpaceFromDirs(dir.dirs), + files: removeWhiteSpaceFromFiles(dir.files), + })); + const removeWhiteSpaceFromOutput = (output: Output): Output => ({ + dirs: removeWhiteSpaceFromDirs(output.dirs), + files: removeWhiteSpaceFromFiles(output.files), + }); + const receivedWithoutWhiteSpace = removeWhiteSpaceFromOutput(received) + const expectedWithoutWhiteSpace = removeWhiteSpaceFromOutput(expected) + + const debugDir = path.join(__dirname, "debug", testCase.name); + const receivedPath = path.join(debugDir, "received.json"); + const expectedPath = path.join(debugDir, "expected.json"); + fs.mkdirSync(debugDir, { recursive: true }); + fs.writeFileSync(receivedPath, JSON.stringify(received, null, 2)); + fs.writeFileSync(expectedPath, JSON.stringify(expected, null, 2)); + + const differences = diff(expectedWithoutWhiteSpace, receivedWithoutWhiteSpace, { expand: false }); + + if (differences && !differences.includes("Compared values have no visual difference")) { + fail(differences); + } + }); + } +}); diff --git a/implementations/wrap-rust/src/__tests__/output.ts b/implementations/wrap-rust/src/__tests__/output.ts new file mode 100644 index 00000000..d0d8b12e --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/output.ts @@ -0,0 +1,80 @@ +import { Output, File, Directory } from "./wrap"; + +import fs from "fs"; +import path from "path"; + +export function orderOutput(output: Output): Output { + orderDirectory(output); + return output; +} + +function orderDirectory(directory: Output | Directory): void { + directory.dirs.sort((a, b) => a.name > b.name ? -1 : 1); + directory.files.sort((a, b) => a.name > b.name ? -1 : 1); + for (const dir of directory.dirs) { + orderDirectory(dir); + } +} + +export function loadOutput(dir: string, ignore: string[]): Output { + const output: Output = { + files: [], + dirs: [] + }; + + const outputDirents = fs.readdirSync(dir, { withFileTypes: true }); + + for (const outputDirent of outputDirents) { + if (ignore.includes(outputDirent.name)) { + continue; + } + + if (outputDirent.isDirectory()) { + output.dirs.push(loadDirectory(dir, outputDirent.name, ignore)); + } else { + output.files.push(loadFile(dir, outputDirent.name)); + } + } + + return output; +} + +function loadFile(dir: string, name: string): File { + const filePath = path.join(dir, name); + const fileData = fs.readFileSync(filePath, "utf-8"); + return { + name: name, + data: fileData + }; +} + +function loadDirectory(dir: string, name: string, ignore: string[]): Directory { + const directory: Directory = { + name: name, + files: [], + dirs: [] + }; + const directoryPath = path.join(dir, name); + const directoryEnts = fs.readdirSync( + directoryPath, + { withFileTypes: true } + ); + + for (const directoryEnt of directoryEnts) { + if (ignore.includes(directoryEnt.name)) { + continue; + } + + if (directoryEnt.isDirectory()) { + directory.dirs.push( + loadDirectory(directoryPath, directoryEnt.name, ignore) + ); + } else { + directory.files.push( + loadFile(directoryPath, directoryEnt.name) + ); + } + } + + return directory; +} diff --git a/implementations/wrap-rust/src/__tests__/polywrap.yaml b/implementations/wrap-rust/src/__tests__/polywrap.yaml new file mode 100644 index 00000000..655f8c41 --- /dev/null +++ b/implementations/wrap-rust/src/__tests__/polywrap.yaml @@ -0,0 +1,6 @@ +format: 0.3.0 +project: + name: test-types + type: app/typescript +source: + schema: ../../../../interface/polywrap.graphql diff --git a/implementations/wrap-rust/src/helpers/array_has_length.rs b/implementations/wrap-rust/src/helpers/array_has_length.rs new file mode 100644 index 00000000..e24aa2dc --- /dev/null +++ b/implementations/wrap-rust/src/helpers/array_has_length.rs @@ -0,0 +1,6 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(array_has_length: |arr: Value| { + arr.is_array() && arr.as_array().unwrap().len() > 0 +}); diff --git a/implementations/wrap-rust/src/helpers/array_length.rs b/implementations/wrap-rust/src/helpers/array_length.rs new file mode 100644 index 00000000..75819d16 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/array_length.rs @@ -0,0 +1,6 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(array_length: |arr: Value| { + arr.as_array().unwrap().len() +}); diff --git a/implementations/wrap-rust/src/helpers/detect_keyword.rs b/implementations/wrap-rust/src/helpers/detect_keyword.rs new file mode 100644 index 00000000..df90e81e --- /dev/null +++ b/implementations/wrap-rust/src/helpers/detect_keyword.rs @@ -0,0 +1,15 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; +use crate::helpers::is_keyword::_is_keyword; + +handlebars_helper!(detect_keyword: |val: Value| { + let type_val = val.as_str().unwrap(); + _detect_keyword(type_val) +}); + +pub fn _detect_keyword(type_val: &str) -> String { + if _is_keyword(type_val) { + return format!("_{}", type_val); + } + type_val.to_string() +} \ No newline at end of file diff --git a/implementations/wrap-rust/src/helpers/is_keyword.rs b/implementations/wrap-rust/src/helpers/is_keyword.rs new file mode 100644 index 00000000..39ea1da4 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/is_keyword.rs @@ -0,0 +1,24 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(is_keyword: |val: Value| { + let s = val.as_str().unwrap(); + _is_keyword(s) +}); + +pub fn _is_keyword(s: &str) -> bool { + match s { + "as" | "break" | "const" | "continue" | "crate" + | "else" | "enum" | "extern" | "false" | "fn" + | "for" | "if" | "impl" | "in" | "let" | "loop" + | "match" | "mod" | "move" | "mut" | "pub" | "ref" + | "return" | "self" | "Self" | "static" | "struct" | "super" + | "trait" | "true" | "type" | "unsafe" | "use" | "where" + | "while" | "async" | "await" | "dyn" | "abstract" + | "become" | "box" | "Box" | "do" | "final" | "macro" + | "override" | "priv" | "typeof" | "unsized" + | "virtual" | "yield" | "try" | "macro_rules" + | "union" => true, + _ => false, + } +} diff --git a/implementations/wrap-rust/src/helpers/is_not_first.rs b/implementations/wrap-rust/src/helpers/is_not_first.rs new file mode 100644 index 00000000..3a6b8957 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/is_not_first.rs @@ -0,0 +1,7 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(is_not_first: |index: Value| { + let index_u64 = index.as_u64().unwrap(); + index_u64 != 0 +}); diff --git a/implementations/wrap-rust/src/helpers/is_not_last.rs b/implementations/wrap-rust/src/helpers/is_not_last.rs new file mode 100644 index 00000000..be543cf4 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/is_not_last.rs @@ -0,0 +1,8 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(is_not_last: |index: Value, array: Value| { + let index_u64 = index.as_u64().unwrap(); + let array_len = array.as_array().unwrap().len() as u64; + array_len != (index_u64 + 1) +}); diff --git a/implementations/wrap-rust/src/helpers/mod.rs b/implementations/wrap-rust/src/helpers/mod.rs new file mode 100644 index 00000000..961d012a --- /dev/null +++ b/implementations/wrap-rust/src/helpers/mod.rs @@ -0,0 +1,73 @@ +use handlebars::Handlebars; + +mod array_has_length; +mod array_length; +mod detect_keyword; +mod is_keyword; +mod is_not_first; +mod is_not_last; +mod pretty; +mod serde_annotate_if_bytes; +mod serde_rename_if_case_mismatch; +mod to_graphql_type; +mod to_lower; +mod to_upper; +mod to_wasm; + +// helpers for helpers +mod util; + +pub fn register(handlebars: &mut Handlebars) -> () { + handlebars.register_helper( + "array_has_length", + Box::new(array_has_length::array_has_length) + ); + handlebars.register_helper( + "array_length", + Box::new(array_length::array_length) + ); + handlebars.register_helper( + "detect_keyword", + Box::new(detect_keyword::detect_keyword) + ); + handlebars.register_helper( + "is_keyword", + Box::new(is_keyword::is_keyword) + ); + handlebars.register_helper( + "is_not_first", + Box::new(is_not_first::is_not_first) + ); + handlebars.register_helper( + "is_not_last", + Box::new(is_not_last::is_not_last) + ); + handlebars.register_helper( + "pretty", + Box::new(pretty::pretty) + ); + handlebars.register_helper( + "serde_annotate_if_bytes", + Box::new(serde_annotate_if_bytes::serde_annotate_if_bytes) + ); + handlebars.register_helper( + "serde_rename_if_case_mismatch", + Box::new(serde_rename_if_case_mismatch::serde_rename_if_case_mismatch) + ); + handlebars.register_helper( + "to_graphql_type", + Box::new(to_graphql_type::to_graphql_type) + ); + handlebars.register_helper( + "to_lower", + Box::new(to_lower::to_lower) + ); + handlebars.register_helper( + "to_upper", + Box::new(to_upper::to_upper) + ); + handlebars.register_helper( + "to_wasm", + Box::new(to_wasm::to_wasm) + ); +} diff --git a/implementations/wrap-rust/src/helpers/pretty.rs b/implementations/wrap-rust/src/helpers/pretty.rs new file mode 100644 index 00000000..1c6e6e92 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/pretty.rs @@ -0,0 +1,6 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(pretty: |value: Value| { + serde_json::to_string_pretty(&value).unwrap() +}); diff --git a/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs b/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs new file mode 100644 index 00000000..2305b54b --- /dev/null +++ b/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs @@ -0,0 +1,14 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; + +handlebars_helper!(serde_annotate_if_bytes: |val: Value| { + let name = val.as_str().unwrap(); + _serde_annotate_if_bytes(name) +}); + +pub fn _serde_annotate_if_bytes(val: &str) -> String { + if val == "Bytes" { + return "#[serde(with = \"serde_bytes\")]\n ".to_string(); + } + "".to_string() +} diff --git a/implementations/wrap-rust/src/helpers/serde_rename_if_case_mismatch.rs b/implementations/wrap-rust/src/helpers/serde_rename_if_case_mismatch.rs new file mode 100644 index 00000000..e5691421 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/serde_rename_if_case_mismatch.rs @@ -0,0 +1,19 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; +use crate::helpers::is_keyword::_is_keyword; + +handlebars_helper!(serde_rename_if_case_mismatch: |val: Value| { + let name = val.as_str().unwrap(); + _serde_rename_if_case_mismatch(name) +}); + +pub fn _serde_rename_if_case_mismatch(val: &str) -> String { + if has_uppercase(val) || _is_keyword(val) { + return format!("#[serde(rename = \"{}\")]\n ", val); + } + "".to_string() +} + +fn has_uppercase(value: &str) -> bool { + value != value.to_lowercase() +} \ No newline at end of file diff --git a/implementations/wrap-rust/src/helpers/to_graphql_type.rs b/implementations/wrap-rust/src/helpers/to_graphql_type.rs new file mode 100644 index 00000000..e7fb171c --- /dev/null +++ b/implementations/wrap-rust/src/helpers/to_graphql_type.rs @@ -0,0 +1,177 @@ +use handlebars::handlebars_helper; +use serde_json::{Value, Map}; + +#[derive(Debug)] +pub enum DefinitionKind { + Generic = 0, + Object = 1 << 0, + Any = 1 << 1, + Scalar = 1 << 2, + Enum = 1 << 3, + Array = ((1 << 4) as u32 | DefinitionKind::Any as u32) as isize, + Property = ((1 << 5) as u32 | DefinitionKind::Any as u32) as isize, + Method = 1 << 6, + Module = 1 << 7, + ImportedModule = 1 << 8, + ImportedEnum = ((1 << 9) as u32 | DefinitionKind::Enum as u32) as isize, + ImportedObject = ((1 << 10) as u32 | DefinitionKind::Object as u32) as isize, + InterfaceImplemented = 1 << 11, + UnresolvedObjectOrEnum = 1 << 12, + ObjectRef = 1 << 13, + EnumRef = 1 << 14, + Interface = 1 << 15, + Env = 1 << 16, + MapKey = 1 << 17, + Map = ((1 << 18) as u32 | DefinitionKind::Any as u32) as isize, + ImportedEnv = 1 << 19, +} + +impl From for DefinitionKind { + fn from(value: u32) -> Self { + match value { + v if v == Self::Generic as u32 => Self::Generic, + v if v == Self::Object as u32 => Self::Object, + v if v == Self::Any as u32 => Self::Any, + v if v == Self::Scalar as u32 => Self::Scalar, + v if v == Self::Enum as u32 => Self::Enum, + v if v == Self::Array as u32 => Self::Array, + v if v == Self::Property as u32 => Self::Property, + v if v == Self::Method as u32 => Self::Method, + v if v == Self::Module as u32 => Self::Module, + v if v == Self::ImportedModule as u32 => Self::ImportedModule, + v if v == Self::ImportedEnum as u32 => Self::ImportedEnum, + v if v == Self::ImportedObject as u32 => Self::ImportedObject, + v if v == Self::InterfaceImplemented as u32 => Self::InterfaceImplemented, + v if v == Self::UnresolvedObjectOrEnum as u32 => Self::UnresolvedObjectOrEnum, + v if v == Self::ObjectRef as u32 => Self::ObjectRef, + v if v == Self::EnumRef as u32 => Self::EnumRef, + v if v == Self::Interface as u32 => Self::Interface, + v if v == Self::Env as u32 => Self::Env, + v if v == Self::MapKey as u32 => Self::MapKey, + v if v == Self::Map as u32 => Self::Map, + v if v == Self::ImportedEnv as u32 => Self::ImportedEnv, + _ => panic!("Invalid value for DefinitionKind"), + } + } +} + +fn apply_required(type_str: &str, required: bool) -> String { + format!("{}{}", type_str, match required { + true => "!", + false => "" + }) +} + +fn any_to_graphql(any: &Map, prefixed: bool) -> String { + if let Some(object) = any.get("object") { + return to_graphql_type_fn(object.as_object().unwrap(), prefixed); + } else if let Some(array) = any.get("array") { + return to_graphql_type_fn(array.as_object().unwrap(), prefixed); + } else if let Some(scalar) = any.get("scalar") { + return to_graphql_type_fn(scalar.as_object().unwrap(), prefixed); + } else if let Some(enum_value) = any.get("enum") { + return to_graphql_type_fn(enum_value.as_object().unwrap(), prefixed); + } else if let Some(map) = any.get("map") { + return to_graphql_type_fn(map.as_object().unwrap(), prefixed); + } else { + panic!("anyToGraphQL: Any type is invalid."); + } +} + +pub fn to_graphql_type_fn(obj: &Map, prefixed: bool) -> String { + let type_str = obj.get("type").unwrap().as_str().unwrap(); + let required = match obj.get("required") { + Some(x) => x.as_bool().unwrap(), + None => false + }; + let kind = DefinitionKind::from(obj.get("kind").unwrap().as_u64().unwrap() as u32); + + match kind { + DefinitionKind::Object + | DefinitionKind::ObjectRef + | DefinitionKind::Scalar + | DefinitionKind::ImportedObject => apply_required(type_str, required), + DefinitionKind::Enum + | DefinitionKind::EnumRef + | DefinitionKind::ImportedEnum => { + if prefixed { + apply_required(format!("Enum_{}", type_str).as_str(), required) + } else { + apply_required(type_str, required) + } + } + DefinitionKind::Any | DefinitionKind::Property => { + any_to_graphql(obj, prefixed) + } + DefinitionKind::Array => { + if let Some(item) = obj.get("item") { + apply_required(format!("[{}]", to_graphql_type_fn(item.as_object().unwrap(), prefixed)).as_str(), required) + } else { + panic!( + "toGraphQL: ArrayDefinition's item type is undefined.\n{:?}", + obj + ); + } + } + DefinitionKind::Map => { + if let Some(key) = obj.get("key") { + if let Some(value) = obj.get("value") { + apply_required( + format!( + "Map<{}, {}>", + to_graphql_type_fn(key.as_object().unwrap(), prefixed), + to_graphql_type_fn(value.as_object().unwrap(), prefixed) + ).as_str(), + required, + ) + } else { + panic!( + "toGraphQL: MapDefinition's value type is undefined.\n{:?}", + obj + ); + } + } else { + panic!( + "toGraphQL: MapDefinition's key type is undefined.\n{:?}", + obj + ); + } + } + DefinitionKind::Method => { + if let Some(return_type) = obj.get("returnType") { + let arguments = obj.get("arguments").unwrap(); + let result = format!( + "{}(\n {}\n): {}", + obj.get("name").unwrap().as_str().unwrap(), + arguments + .as_array().unwrap() + .into_iter() + .map(|arg| { + let arg_obj = arg.as_object().unwrap(); + format!("{}: {}", arg_obj.get("name").unwrap().as_str().unwrap(), to_graphql_type_fn(arg_obj, prefixed)) + }) + .collect::>() + .join("\n "), + to_graphql_type_fn(return_type.as_object().unwrap(), prefixed) + ); + result + } else { + panic!( + "toGraphQL: MethodDefinition's return type is undefined.\n{:?}", + obj + ); + } + } + DefinitionKind::Module => obj.get("type").unwrap().as_str().unwrap().to_string(), + DefinitionKind::ImportedModule => obj.get("type").unwrap().as_str().unwrap().to_string(), + _ => panic!( + "toGraphQL: Unrecognized DefinitionKind.\n{:?}", + obj + ), + } +} + +handlebars_helper!(to_graphql_type: |value: Value| { + let obj = value.as_object().unwrap(); + to_graphql_type_fn(&obj, true) +}); diff --git a/implementations/wrap-rust/src/helpers/to_lower.rs b/implementations/wrap-rust/src/helpers/to_lower.rs new file mode 100644 index 00000000..81794c9e --- /dev/null +++ b/implementations/wrap-rust/src/helpers/to_lower.rs @@ -0,0 +1,25 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; +use crate::helpers::util::{insert_at, replace_at}; + +handlebars_helper!(to_lower: |val: Value| { + let str = val.as_str().unwrap(); + _to_lower(str) +}); + +pub fn _to_lower(s: &str) -> String { + let mut result = s.to_string(); + let mut i = 0; + while i < result.len() { + let char = result.chars().nth(i).unwrap(); + if char.is_uppercase() { + let lower = char.to_lowercase().collect::(); + result = replace_at(&result, i, &lower); + if i != 0 && result.chars().nth(i - 1).unwrap() != '_' { + result = insert_at(&result, i, "_"); + } + } + i += 1; + } + result +} diff --git a/implementations/wrap-rust/src/helpers/to_upper.rs b/implementations/wrap-rust/src/helpers/to_upper.rs new file mode 100644 index 00000000..21bd1268 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/to_upper.rs @@ -0,0 +1,27 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; +use crate::helpers::util::{remove_at, replace_at}; + +handlebars_helper!(to_upper: |val: Value| { + let str = val.as_str().unwrap(); + _to_upper(str) +}); + +pub fn _to_upper(s: &str) -> String { + let mut result = s.to_string(); + let first_char = result.chars().nth(0).unwrap(); + let first_upper = first_char.to_uppercase().collect::(); + result = replace_at(&result, 0, &first_upper); + let mut i = 0; + while i < result.len() { + if let Some('_') = result.chars().nth(i) { + if let Some(next_char) = result.chars().nth(i + 1) { + let next_char_upper = next_char.to_uppercase().collect::(); + result = replace_at(&result, i + 1, &next_char_upper); + result = remove_at(&result, i); + } + } + i += 1; + } + result +} diff --git a/implementations/wrap-rust/src/helpers/to_wasm.rs b/implementations/wrap-rust/src/helpers/to_wasm.rs new file mode 100644 index 00000000..8b4a4ee0 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/to_wasm.rs @@ -0,0 +1,114 @@ +use handlebars::handlebars_helper; +use serde_json::{Value}; +use regex::Regex; +use crate::helpers::detect_keyword::_detect_keyword; +use crate::helpers::to_upper::_to_upper; + +handlebars_helper!(to_wasm: |val: Value| { + let type_val = val.as_str().unwrap(); + _to_wasm(type_val) +}); + +pub fn _to_wasm(value: &str) -> String { + let mut res = value.to_string(); + let mut optional = false; + if res.ends_with("!") { + res.pop(); + } else { + optional = true; + } + + if res.starts_with("[") { + return _to_wasm_array(&res, optional).unwrap(); + } + + if res.starts_with("Map<") { + return _to_wasm_map(&res, optional).unwrap(); + } + + res = match res.as_str() { + "Int" | "Int32" => "i32".to_string(), + "Int8" => "i8".to_string(), + "Int16" => "i16".to_string(), + "Int64" => "i64".to_string(), + "UInt" | "UInt32" => "u32".to_string(), + "UInt8" => "u8".to_string(), + "UInt16" => "u16".to_string(), + "UInt64" => "u64".to_string(), + "String" => "String".to_string(), + "Boolean" => "bool".to_string(), + "Bytes" => "Vec".to_string(), + "BigInt" => "BigInt".to_string(), + "BigNumber" => "BigNumber".to_string(), + "JSON" => "JSON::Value".to_string(), + _ => { + if res.starts_with("Enum_") { + res = res.replacen("Enum_", "", 1); + } + res = _to_upper(&res); + _detect_keyword(&res) + } + }; + + _apply_optional(&res, optional) +} + +pub fn _to_wasm_array(value: &str, optional: bool) -> Result { + let maybe_captures = match Regex::new(r"(\[)([\[\]A-Za-z0-9_.!]+)(\])") { + Ok(re) => re.captures(value), + Err(err) => return Err(format!("Error while compiling Regex: {}", err.to_string())), + }; + + let captures = match maybe_captures { + Some(caps) => caps, + None => return Err(format!("Invalid Array: {}", value)), + }; + + if captures.len() != 4 { + return Err(format!("Invalid Array: {}", value)); + } + + match captures.get(2) { + Some(match_value) => { + let wasm_type = _to_wasm(match_value.as_str()); + let wasm_array = format!("Vec<{}>", wasm_type); + Ok(_apply_optional(&wasm_array, optional)) + }, + None => Err(format!("Invalid Array: {}", value)), + } +} + +pub fn _to_wasm_map(value: &str, optional: bool) -> Result { + let first_open_bracket_idx = match value.find('<') { + Some(idx) => idx, + None => return Err(format!("Invalid Map: {}", value)), + }; + let last_close_bracket_idx = match value.rfind('>') { + Some(idx) => idx, + None => return Err(format!("Invalid Map: {}", value)), + }; + + let key_val_types = &value[(first_open_bracket_idx + 1)..last_close_bracket_idx]; + + let first_comma_idx = match key_val_types.find(',') { + Some(idx) => idx, + None => return Err(format!("Invalid Map: {}", value)), + }; + + let key_type = key_val_types[..first_comma_idx].trim(); + let val_type = key_val_types[(first_comma_idx + 1)..].trim(); + + let wasm_key_type = _to_wasm(key_type); + let wasm_val_type = _to_wasm(val_type); + + let wasm_map = format!("Map<{}, {}>", wasm_key_type, wasm_val_type); + Ok(_apply_optional(&wasm_map, optional)) +} + +pub fn _apply_optional(value: &str, optional: bool) -> String { + return if optional { + format!("Option<{}>", value) + } else { + value.to_string() + } +} \ No newline at end of file diff --git a/implementations/wrap-rust/src/helpers/util.rs b/implementations/wrap-rust/src/helpers/util.rs new file mode 100644 index 00000000..1e4c8c89 --- /dev/null +++ b/implementations/wrap-rust/src/helpers/util.rs @@ -0,0 +1,18 @@ +pub fn replace_at(s: &str, idx: usize, replacement: &str) -> String { + let start = s[..idx].to_string(); + let end = s[idx + replacement.len()..].to_string(); + format!("{}{}{}", start, replacement, end) +} + +pub fn insert_at(s: &str, idx: usize, insert: &str) -> String { + let start = s[..idx].to_string(); + let end = s[idx..].to_string(); + format!("{}{}{}", start, insert, end) +} + +pub fn remove_at(s: &str, idx: usize) -> String { + let start = s[..idx].to_string(); + let end = s[idx + 1..].to_string(); + format!("{}{}", start, end) +} + diff --git a/implementations/wrap-rust/src/lib.rs b/implementations/wrap-rust/src/lib.rs new file mode 100644 index 00000000..07b5690a --- /dev/null +++ b/implementations/wrap-rust/src/lib.rs @@ -0,0 +1,255 @@ +#[macro_use] +extern crate lazy_static; + +pub mod wrap; +pub use wrap::*; + +pub mod partials; +pub mod templates; +pub mod helpers; +mod renderer; +use renderer::Renderer; + +impl ModuleTrait for Module { + fn generate_bindings(args: ArgsGenerateBindings) -> Result { + let version = &args.wrap_info.version; + + // First, ensure version is "0.1" + if version != "0.1" { + return Err( + format!("Unsupported ABI Version - {}; Supported - 0.1", version) + ); + } + + let wrap_info = args.wrap_info; + let renderer = Renderer::new(); + let mut output = Output::new(); + + output.files.push(File { + name: "mod.rs".to_string(), + data: renderer.render( + "mod.rs", + &wrap_info.abi + ) + }); + + output.files.push(File { + name: "entry.rs".to_string(), + data: renderer.render( + "entry.rs", + &wrap_info.abi + ) + }); + + let abi = wrap_info.abi.as_object().unwrap(); + + if let Some(object_types) = abi.get("objectTypes") { + let objects = object_types.as_array().unwrap(); + + for object in objects.iter() { + let dir = Directory { + name: object.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("object_type/mod.rs", object) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("object_type/serialization.rs", object) + } + ), + dirs: vec!() + }; + output.dirs.push(dir); + } + } + + if let Some(module_type) = abi.get("moduleType") { + let dir = Directory { + name: "Module".to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("module_type/mod.rs", module_type) + }, + File { + name: "module.rs".to_string(), + data: renderer.render("module_type/module.rs", module_type) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("module_type/serialization.rs", module_type) + }, + File { + name: "wrapped.rs".to_string(), + data: renderer.render("module_type/wrapped.rs", module_type) + }, + ), + dirs: vec!() + }; + output.dirs.push(dir); + } + + if let Some(enum_types) = abi.get("enumTypes") { + let enums = enum_types.as_array().unwrap(); + + for it in enums.iter() { + let dir = Directory { + name: it.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("enum_type/mod.rs", it) + }, + ), + dirs: vec!() + }; + output.dirs.push(dir); + } + } + + + + if let Some(interface_types) = abi.get("interfaceTypes") { + let interfaces = interface_types.as_array().unwrap(); + + for it in interfaces.iter() { + let dir = Directory { + name: it.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("interface_type/mod.rs", it) + }, + ), + dirs: vec!() + }; + output.dirs.push(dir); + } + } + + // imported dirs go within subdirectory + let mut imported = Directory { + name: "imported".to_string(), + files: vec![], + dirs: vec![], + }; + + if let Some(imported_object_types) = abi.get("importedObjectTypes") { + let objects = imported_object_types.as_array().unwrap(); + + for object in objects.iter() { + let dir = Directory { + name: object.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("imported/object_type/mod.rs", object) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("imported/object_type/serialization.rs", object) + } + ), + dirs: vec!() + }; + imported.dirs.push(dir); + } + } + + if let Some(imported_module_types) = abi.get("importedModuleTypes") { + let modules = imported_module_types.as_array().unwrap(); + + for it in modules.iter() { + let dir = Directory { + name: it.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("imported/module_type/mod.rs", it) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("imported/module_type/serialization.rs", it) + } + ), + dirs: vec!() + }; + imported.dirs.push(dir); + } + } + + if let Some(imported_enum_types) = abi.get("importedEnumTypes") { + let enums = imported_enum_types.as_array().unwrap(); + + for it in enums.iter() { + let dir = Directory { + name: it.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("imported/enum_type/mod.rs", it) + }, + ), + dirs: vec!() + }; + imported.dirs.push(dir); + } + } + + if let Some(imported_env_types) = abi.get("importedEnvTypes") { + let envs = imported_env_types.as_array().unwrap(); + + for it in envs.iter() { + let dir = Directory { + name: it.get("type").unwrap().as_str().unwrap().to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("imported/env_type/mod.rs", it) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("imported/env_type/serialization.rs", it) + } + ), + dirs: vec!() + }; + imported.dirs.push(dir); + } + } + + // add imported dirs to output + if abi.get("importedObjectTypes").is_some() || + abi.get("importedModuleTypes").is_some() || + abi.get("importedEnumTypes").is_some() || + abi.get("importedEnvTypes").is_some() { + imported.files.push(File { + name: "mod.rs".to_string(), + data: renderer.render("imported/mod.rs", &wrap_info.abi) + }); + output.dirs.push(imported); + } + + if let Some(env_type) = abi.get("envType") { + let dir = Directory { + name: "Env".to_string(), + files: vec!( + File { + name: "mod.rs".to_string(), + data: renderer.render("env_type/mod.rs", env_type) + }, + File { + name: "serialization.rs".to_string(), + data: renderer.render("env_type/serialization.rs", env_type) + }, + ), + dirs: vec!() + }; + output.dirs.push(dir); + } + + Ok(output) + } +} diff --git a/implementations/wrap-rust/src/renderer.rs b/implementations/wrap-rust/src/renderer.rs new file mode 100644 index 00000000..cf1775f2 --- /dev/null +++ b/implementations/wrap-rust/src/renderer.rs @@ -0,0 +1,54 @@ +use handlebars::{ + Handlebars, + no_escape +}; +use serde::Serialize; + +use crate::partials; +use crate::templates; +use crate::helpers; + +pub struct Renderer<'reg> { + instance: Handlebars<'reg> +} + +impl<'reg> Renderer<'reg> { + pub fn new() -> Renderer<'reg> { + let mut handlebars: Handlebars = Handlebars::new(); + + // Remove the HTML escape function + handlebars.register_escape_fn(no_escape); + + // Register all partials + let partials = partials::load_partials(); + for partial in partials.iter() { + handlebars.register_partial( + &partial.name, + &partial.source + ).unwrap(); + } + + // Register all templates + let templates = templates::load_templates(); + for template in templates.iter() { + handlebars.register_template_string( + &template.name, + &template.source + ).unwrap(); + } + + // Register all helpers + helpers::register(&mut handlebars); + + Renderer { + instance: handlebars + } + } + + pub fn render(self: &Renderer<'reg>, name: &str, data: &T) -> String + where + T: Serialize, + { + self.instance.render(name, data).unwrap() + } +} diff --git a/implementations/wrap-rust/todo b/implementations/wrap-rust/todo new file mode 100644 index 00000000..e69de29b diff --git a/implementations/wrap-rust/tsconfig.json b/implementations/wrap-rust/tsconfig.json new file mode 100644 index 00000000..75bfa86f --- /dev/null +++ b/implementations/wrap-rust/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "lib": [ + "es2015", + "es5", + "dom" + ], + "esModuleInterop": true, + "outDir": "build", + "moduleResolution": "node", + "declaration": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": false, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "module": "commonjs", + "sourceMap": true, + "target": "es5", + "resolveJsonModule": true, + "strictNullChecks": true, + "experimentalDecorators": true + }, + "typeAcquisition": { "include": ["jest"] } +} \ No newline at end of file diff --git a/implementations/wrap-rust/yarn.lock b/implementations/wrap-rust/yarn.lock new file mode 100644 index 00000000..958cd3c0 --- /dev/null +++ b/implementations/wrap-rust/yarn.lock @@ -0,0 +1,6041 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@apidevtools/json-schema-ref-parser@9.0.9": + version "9.0.9" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" + integrity sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" + integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/compat-data@^7.21.5": + version "7.21.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.7.tgz#61caffb60776e49a57ba61a88f02bedd8714f6bc" + integrity sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA== + +"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.5": + version "7.21.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.8.tgz#2a8c7f0f53d60100ba4c32470ba0281c92aa9aa4" + integrity sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.21.4" + "@babel/generator" "^7.21.5" + "@babel/helper-compilation-targets" "^7.21.5" + "@babel/helper-module-transforms" "^7.21.5" + "@babel/helpers" "^7.21.5" + "@babel/parser" "^7.21.8" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.0" + +"@babel/generator@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.5.tgz#c0c0e5449504c7b7de8236d99338c3e2a340745f" + integrity sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w== + dependencies: + "@babel/types" "^7.21.5" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz#631e6cc784c7b660417421349aac304c94115366" + integrity sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w== + dependencies: + "@babel/compat-data" "^7.21.5" + "@babel/helper-validator-option" "^7.21.0" + browserslist "^4.21.3" + lru-cache "^5.1.1" + semver "^6.3.0" + +"@babel/helper-environment-visitor@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz#c769afefd41d171836f7cb63e295bedf689d48ba" + integrity sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ== + +"@babel/helper-function-name@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" + integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== + dependencies: + "@babel/template" "^7.20.7" + "@babel/types" "^7.21.0" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-imports@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" + integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== + dependencies: + "@babel/types" "^7.21.4" + +"@babel/helper-module-transforms@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz#d937c82e9af68d31ab49039136a222b17ac0b420" + integrity sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw== + dependencies: + "@babel/helper-environment-visitor" "^7.21.5" + "@babel/helper-module-imports" "^7.21.4" + "@babel/helper-simple-access" "^7.21.5" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.19.1" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz#345f2377d05a720a4e5ecfa39cbf4474a4daed56" + integrity sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg== + +"@babel/helper-simple-access@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee" + integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg== + dependencies: + "@babel/types" "^7.21.5" + +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" + integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== + +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/helper-validator-option@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" + integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== + +"@babel/helpers@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.5.tgz#5bac66e084d7a4d2d9696bdf0175a93f7fb63c08" + integrity sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA== + dependencies: + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.5", "@babel/parser@^7.21.8": + version "7.21.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.8.tgz#642af7d0333eab9c0ad70b14ac5e76dbde7bfdf8" + integrity sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/template@^7.20.7", "@babel/template@^7.3.3": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" + integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.5.tgz#ad22361d352a5154b498299d523cf72998a4b133" + integrity sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw== + dependencies: + "@babel/code-frame" "^7.21.4" + "@babel/generator" "^7.21.5" + "@babel/helper-environment-visitor" "^7.21.5" + "@babel/helper-function-name" "^7.21.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.21.5" + "@babel/types" "^7.21.5" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" + integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== + dependencies: + "@babel/helper-string-parser" "^7.21.5" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@cnakazawa/watch@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + +"@dorgjelli/graphql-schema-cycles@1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@dorgjelli/graphql-schema-cycles/-/graphql-schema-cycles-1.1.4.tgz#31f230c61f624f7c2ceca7e18fad8b2cb07d392f" + integrity sha512-U5ARitMQWKjOAvwn1+0Z52R9sbNe1wpbgAbj2hOfRFb/vupfPlRwZLbuUZAlotMpkoxbTbk+GRmoiNzGcJfyHw== + dependencies: + graphql "15.5.0" + graphql-json-transform "^1.1.0-alpha.0" + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.6.1", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.6.2", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.6.1", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.6.1", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.6.1", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.6.2", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.6.1", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.6.1", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.6.1", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.6.2", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.6.1", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.6.1", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.6.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" + integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/networks@^5.6.3", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.6.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.6.8": + version "5.6.8" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" + integrity sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/base64" "^5.6.1" + "@ethersproject/basex" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/networks" "^5.6.3" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/web" "^5.6.1" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/providers@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" + integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.6.1", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.6.1", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.6.1", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.6.2", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.6.1", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" + integrity sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/hdnode" "^5.6.2" + "@ethersproject/json-wallets" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/wordlists" "^5.6.1" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" + integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/web@^5.6.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.6.1", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@fetsorn/opentelemetry-console-exporter@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@fetsorn/opentelemetry-console-exporter/-/opentelemetry-console-exporter-0.0.3.tgz#c137629fecc610c7667e68b528926e498e152c0b" + integrity sha512-+UDrzHANOPcp0+47xK7dqeKIlYSh5a5WpFaswzM9S2MnjQfP0zOysAunWFRb6CFYSj1hTeFotYYXr8tYbyBpoA== + +"@formatjs/ecma402-abstract@1.6.2": + version "1.6.2" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.6.2.tgz#9d064a2cf790769aa6721e074fb5d5c357084bb9" + integrity sha512-aLBODrSRhHaL/0WdQ0T2UsGqRbdtRRHqqrs4zwNQoRsGBEtEAvlj/rgr6Uea4PSymVJrbZBoAyECM2Z3Pq4i0g== + dependencies: + tslib "^2.1.0" + +"@formatjs/intl-datetimeformat@3.2.12": + version "3.2.12" + resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-3.2.12.tgz#c9b2e85f0267ee13ea615a8991995da3075e3b13" + integrity sha512-qvY5+dl3vlgH0iWRXwl8CG9UkSVB5uP2+HH//fyZZ01G4Ww5rxMJmia1SbUqatpoe/dX+Z+aLejCqUUyugyL2g== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + tslib "^2.1.0" + +"@formatjs/intl-displaynames@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-4.0.10.tgz#5bbd1bbcd64a036b4be27798b650c864dcf4466a" + integrity sha512-KmYJQHynGnnMeqIWVXhbzCMcEC8lg1TfGVdcO9May6paDT+dksZoOBQc741t7iXi/YVO/wXEZdmXhUNX7ODZug== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + tslib "^2.1.0" + +"@formatjs/intl-listformat@5.0.10": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-5.0.10.tgz#9f8c4ad5e8a925240e151ba794c41fba01f742cc" + integrity sha512-FLtrtBPfBoeteRlYcHvThYbSW2YdJTllR0xEnk6cr/6FRArbfPRYMzDpFYlESzb5g8bpQMKZy+kFQ6V2Z+5KaA== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + tslib "^2.1.0" + +"@formatjs/intl-relativetimeformat@8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-8.1.2.tgz#119f3dce97458991f86bf34a736880e4a7bc1697" + integrity sha512-LZUxbc9GHVGmDc4sqGAXugoxhvZV7EG2lG2c0aKERup2ixvmDMbbEN3iEEr5aKkP7YyGxXxgqDn2dwg7QCPR6Q== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + tslib "^2.1.0" + +"@formatjs/intl@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-1.8.2.tgz#6090e6c1826a92e70668dfe08b4ba30127ea3a85" + integrity sha512-9xHoNKPv4qQIQ5AVfpQbIPZanz50i7oMtZWrd6Fz7Q2GM/5uhBr9mrCrY1tz/+diP7uguKmhj1IweLYaxY3DTQ== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + "@formatjs/intl-datetimeformat" "3.2.12" + "@formatjs/intl-displaynames" "4.0.10" + "@formatjs/intl-listformat" "5.0.10" + "@formatjs/intl-relativetimeformat" "8.1.2" + fast-memoize "^2.5.2" + intl-messageformat "9.5.2" + intl-messageformat-parser "6.4.2" + tslib "^2.1.0" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" + integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^26.6.2" + jest-util "^26.6.2" + slash "^3.0.0" + +"@jest/core@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" + integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== + dependencies: + "@jest/console" "^26.6.2" + "@jest/reporters" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-changed-files "^26.6.2" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-resolve-dependencies "^26.6.3" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + jest-watcher "^26.6.2" + micromatch "^4.0.2" + p-each-series "^2.1.0" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" + integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== + dependencies: + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + +"@jest/fake-timers@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" + integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== + dependencies: + "@jest/types" "^26.6.2" + "@sinonjs/fake-timers" "^6.0.1" + "@types/node" "*" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" + +"@jest/globals@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" + integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== + dependencies: + "@jest/environment" "^26.6.2" + "@jest/types" "^26.6.2" + expect "^26.6.2" + +"@jest/reporters@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" + integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.3" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^26.6.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^4.0.1" + terminal-link "^2.0.0" + v8-to-istanbul "^7.0.0" + optionalDependencies: + node-notifier "^8.0.0" + +"@jest/source-map@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" + integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.4" + source-map "^0.6.0" + +"@jest/test-result@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" + integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== + dependencies: + "@jest/console" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" + integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== + dependencies: + "@jest/test-result" "^26.6.2" + graceful-fs "^4.2.4" + jest-haste-map "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^26.6.2" + 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 "^26.6.2" + jest-regex-util "^26.0.0" + jest-util "^26.6.2" + micromatch "^4.0.2" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + +"@jest/types@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" + integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@1.4.14": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" + integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + dependencies: + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" + +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + +"@msgpack/msgpack@2.7.2": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@msgpack/msgpack/-/msgpack-2.7.2.tgz#f34b8aa0c49f0dd55eb7eba577081299cbf3f90b" + integrity sha512-rYEi46+gIzufyYUAoHDnRzkWGxajpD9vVXFQ3g1vbjrBm6P7MBmm+s/fqPa46sxa+8FOUdEuRQKaugo5a4JWpw== + +"@multiformats/base-x@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" + integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw== + +"@opentelemetry/api-metrics@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.32.0.tgz#0f09f78491a4b301ddf54a8b8a38ffa99981f645" + integrity sha512-g1WLhpG8B6iuDyZJFRGsR+JKyZ94m5LEmY2f+duEJ9Xb4XRlLHrZvh6G34OH6GJ8iDHxfHb/sWjJ1ZpkI9yGMQ== + dependencies: + "@opentelemetry/api" "^1.0.0" + +"@opentelemetry/api@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.2.0.tgz#89ef99401cde6208cff98760b67663726ef26686" + integrity sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g== + +"@opentelemetry/api@^1.0.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.4.1.tgz#ff22eb2e5d476fbc2450a196e40dd243cc20c28f" + integrity sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA== + +"@opentelemetry/core@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.6.0.tgz#c55f8ab7496acef7dbd8c4eedef6a4d4a0143c95" + integrity sha512-MsEhsyCTfYme6frK8/AqEWwbS9SB3Ta5bjgz4jPQJjL7ijUM3JiLVvqh/kHo1UlUjbUbLmGG7jA5Nw4d7SMcLQ== + dependencies: + "@opentelemetry/semantic-conventions" "1.6.0" + +"@opentelemetry/exporter-trace-otlp-http@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.32.0.tgz#55773290a221855c4e8c422e8fb5e7ff4aa5f04e" + integrity sha512-8n44NDoEFoYG3mMToZxNyUKkHSGfzSShw6I2V5FApcH7rid20LmKiNuzc7lACneDIZBld+GGpLRuFhWniW8JhA== + dependencies: + "@opentelemetry/core" "1.6.0" + "@opentelemetry/otlp-exporter-base" "0.32.0" + "@opentelemetry/otlp-transformer" "0.32.0" + "@opentelemetry/resources" "1.6.0" + "@opentelemetry/sdk-trace-base" "1.6.0" + +"@opentelemetry/otlp-exporter-base@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.32.0.tgz#37dde162835a8fd23fa040f07e2938deb335fc4b" + integrity sha512-Dscxu4VNKrkD1SwGKdc7bAtLViGFJC8ah6Dr/vZn22NFHXSa53lSzDdTKeSTNNWH9sCGu/65LS45VMd4PsRvwQ== + dependencies: + "@opentelemetry/core" "1.6.0" + +"@opentelemetry/otlp-transformer@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.32.0.tgz#652c8f4c56c95f7d7ec39e20573b885d27ca13f1" + integrity sha512-PFAqfKgJpTOZryPe1UMm7R578PLxsK0wCAuKSt6m8v1bN/4DO8DX4HD7k3mYGZVU5jNg8tVZSwyIpY6ryrHDMQ== + dependencies: + "@opentelemetry/api-metrics" "0.32.0" + "@opentelemetry/core" "1.6.0" + "@opentelemetry/resources" "1.6.0" + "@opentelemetry/sdk-metrics" "0.32.0" + "@opentelemetry/sdk-trace-base" "1.6.0" + +"@opentelemetry/resources@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.6.0.tgz#9756894131b9b0dfbcc0cecb5d4bd040d9c1b09d" + integrity sha512-07GlHuq72r2rnJugYVdGumviQvfrl8kEPidkZSVoseLVfIjV7nzxxt5/vqs9pK7JItWOrvjRdr/jTBVayFBr/w== + dependencies: + "@opentelemetry/core" "1.6.0" + "@opentelemetry/semantic-conventions" "1.6.0" + +"@opentelemetry/sdk-metrics@0.32.0": + version "0.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-0.32.0.tgz#463cd3a2b267f044db9aaab85887a171710345a0" + integrity sha512-zC9RCOIsXRqOHWmWfcxArtDHbip2/jaIH1yu/OKau/shDZYFluAxY6zAEYIb4YEAzKKEF+fpaoRgpodDWNGVGA== + dependencies: + "@opentelemetry/api-metrics" "0.32.0" + "@opentelemetry/core" "1.6.0" + "@opentelemetry/resources" "1.6.0" + lodash.merge "4.6.2" + +"@opentelemetry/sdk-trace-base@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.6.0.tgz#8b1511c0b0f3e6015e345f5ed4a683adf03e3e3c" + integrity sha512-yx/uuzHdT0QNRSEbCgXHc0GONk90uvaFcPGaNowIFSl85rTp4or4uIIMkG7R8ckj8xWjDSjsaztH6yQxoZrl5g== + dependencies: + "@opentelemetry/core" "1.6.0" + "@opentelemetry/resources" "1.6.0" + "@opentelemetry/semantic-conventions" "1.6.0" + +"@opentelemetry/sdk-trace-web@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.6.0.tgz#ef243e3e1102b53bc0afa93c29c18fc7e2f66e52" + integrity sha512-iOgmygvooaZm4Vi6mh5FM7ubj/e+MqDn8cDPCNfk6V8Q2yWj0co8HKWPFo0RoxSLYyPaFnEEXOXWWuE4OTwLKw== + dependencies: + "@opentelemetry/core" "1.6.0" + "@opentelemetry/sdk-trace-base" "1.6.0" + "@opentelemetry/semantic-conventions" "1.6.0" + +"@opentelemetry/semantic-conventions@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.6.0.tgz#ed410c9eb0070491cff9fe914246ce41f88d6f74" + integrity sha512-aPfcBeLErM/PPiAuAbNFLN5sNbZLc3KZlar27uohllN8Zs6jJbHyJU1y7cMA6W/zuq+thkaG8mujiS+3iD/FWQ== + +"@polywrap/asyncify-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/asyncify-js/-/asyncify-js-0.10.0.tgz#0570ce34501e91710274285b6b4740f1094f08a3" + integrity sha512-/ZhREKykF1hg5H/mm8vQHqv7MSedfCnwzbsNwYuLmH/IUtQi2t7NyD2XXavSLq5PFOHA/apPueatbSFTeIgBdA== + +"@polywrap/client-config-builder-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/client-config-builder-js/-/client-config-builder-js-0.10.0.tgz#e583f32dca97dfe0b9575db244fdad74a4f42d6f" + integrity sha512-9hZd5r/5rkLoHdeB76NDUNOYcUCzS+b8WjCI9kv5vNQiOR83dZnW3rTnQmcXOWWErRY70h6xvAQWWQ1WrW/SpQ== + dependencies: + "@polywrap/concurrent-plugin-js" "~0.10.0-pre" + "@polywrap/core-js" "0.10.0" + "@polywrap/ethereum-provider-js" "npm:@polywrap/ethereum-provider-js@~0.3.0" + "@polywrap/ethereum-provider-js-v1" "npm:@polywrap/ethereum-provider-js@~0.2.4" + "@polywrap/file-system-plugin-js" "~0.10.0-pre" + "@polywrap/http-plugin-js" "~0.10.0-pre" + "@polywrap/logger-plugin-js" "0.10.0-pre.10" + "@polywrap/uri-resolver-extensions-js" "0.10.0" + "@polywrap/uri-resolvers-js" "0.10.0" + "@polywrap/wasm-js" "0.10.0" + base64-to-uint8array "1.0.0" + +"@polywrap/client-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/client-js/-/client-js-0.10.0.tgz#607c24cd65c03f57ca8325f4a8ecc02a5485c993" + integrity sha512-wRr4HZ7a4oLrKuw8CchM5JYcE8er43GGKQnhtf/ylld5Q7FpNpfzhsi8eWknORugQYuvR3CSG7qZey4Ijgj6qQ== + dependencies: + "@polywrap/client-config-builder-js" "0.10.0" + "@polywrap/core-client-js" "0.10.0" + "@polywrap/core-js" "0.10.0" + "@polywrap/msgpack-js" "0.10.0" + "@polywrap/plugin-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/tracing-js" "0.10.0" + "@polywrap/uri-resolver-extensions-js" "0.10.0" + "@polywrap/uri-resolvers-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/concurrent-plugin-js@~0.10.0-pre": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/concurrent-plugin-js/-/concurrent-plugin-js-0.10.0.tgz#662e49976f75f30632b302d515bd22c7643afc44" + integrity sha512-sc11ffs34ScBHPB9uHFZuTmF8yPtZT81sBpBj7f4MlmrRDxtJS56Y7k/qL6L1xuwsnmeFipi5JGau1CcBaYmJQ== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/msgpack-js" "0.10.0" + "@polywrap/plugin-js" "0.10.0" + +"@polywrap/core-client-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/core-client-js/-/core-client-js-0.10.0.tgz#bec91479d1294ca86b7fa77f5ed407dab4d2a0b4" + integrity sha512-Sv1fVHM/5ynobtT2N25jbXOKNju1y0Wk4TwFnTJXrAUcARrRMoAfmwLVfTwrqRZ2OjWMQ/AWTc7ziNBtH5dNAg== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/msgpack-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/tracing-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/core-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/core-js/-/core-js-0.10.0.tgz#5ddc31ff47019342659a2208eec05299b072b216" + integrity sha512-fx9LqRFnxAxLOhDK4M+ymrxMnXQbwuNPMLjCk5Ve5CPa9RFms0/Fzvj5ayMLidZSPSt/dLISkbDgW44vfv6wwA== + dependencies: + "@polywrap/result" "0.10.0" + "@polywrap/tracing-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/core-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/core-js/-/core-js-0.10.0-pre.10.tgz#3209dbcd097d3533574f1231c10ef633c2466d5c" + integrity sha512-a/1JtfrHafRh2y0XgK5dNc82gVzjCbXSdKof7ojDghCSRSHUxTw/cJ+pcLrPJhrsTi7VfTM0BFjw3/wC5RutuA== + dependencies: + "@polywrap/result" "0.10.0-pre.10" + "@polywrap/tracing-js" "0.10.0-pre.10" + "@polywrap/wrap-manifest-types-js" "0.10.0-pre.10" + +"@polywrap/ethereum-provider-js-v1@npm:@polywrap/ethereum-provider-js@~0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@polywrap/ethereum-provider-js/-/ethereum-provider-js-0.2.4.tgz#3df1a6548da191618bb5cae7928c7427e69e0030" + integrity sha512-64xRnniboxxHNZ4/gD6SS4T+QmJPUMbIYZ2hyLODb2QgH3qDBiU+i4gdiQ/BL3T8Sn/0iOxvTIgZalVDJRh2iw== + dependencies: + "@ethersproject/address" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@polywrap/core-js" "0.10.0-pre.10" + "@polywrap/plugin-js" "0.10.0-pre.10" + ethers "5.7.0" + +"@polywrap/ethereum-provider-js@npm:@polywrap/ethereum-provider-js@~0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@polywrap/ethereum-provider-js/-/ethereum-provider-js-0.3.1.tgz#ffdb9425c819ee76d3e3d5ade7d1b044077037e0" + integrity sha512-El2d3gE2CFdGNzKQhO+IPP79lhyQmkAGlpQadaW/EDyFDjERLckYDLPrwUCXG0agUcQZcNY1nHn2hknumw/yWg== + dependencies: + "@ethersproject/address" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@polywrap/core-js" "0.10.0" + "@polywrap/plugin-js" "0.10.0" + ethers "5.7.0" + +"@polywrap/file-system-plugin-js@~0.10.0-pre": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/file-system-plugin-js/-/file-system-plugin-js-0.10.0.tgz#7814e0b1c0bb170ab85500f67aca6af4c17ec19f" + integrity sha512-QWDpeVBACeK8PqZUwby/zlozG/07fpvJN5kQtw5e7ha4K5blX1j1i6ixgLKlYyQsaaTBxS6aAF3C0ryt4BsJcQ== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/plugin-js" "0.10.0" + +"@polywrap/http-plugin-js@~0.10.0-pre": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/http-plugin-js/-/http-plugin-js-0.10.0.tgz#930ec9dbaa762b71d8905ad02a77d5d574707642" + integrity sha512-t/yvoOAGUwsuS37ZQkkBZOogNbeJadtHwitMMA6XGs1jDANP1Xim/xWXWBYC3W1YJ8pbUeO8bHZHTBaJ7SC0cA== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/plugin-js" "0.10.0" + axios "0.21.4" + form-data "4.0.0" + +"@polywrap/logger-plugin-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/logger-plugin-js/-/logger-plugin-js-0.10.0-pre.10.tgz#de4a995c083edc26d72abb7420628b40d81efed2" + integrity sha512-6wBgBvphQRI+LP22+xi1KPcCq4B9dUMB/ZAXOpVTb/X/fOqdNBOS1LTXV+BtCe2KfdqGS6DKIXwGITcMOxIDCg== + dependencies: + "@polywrap/core-js" "0.10.0-pre.10" + "@polywrap/plugin-js" "0.10.0-pre.10" + +"@polywrap/logging-js@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/logging-js/-/logging-js-0.10.5.tgz#0624c871751e81c444de42d9f96d0beb60b46236" + integrity sha512-7bOvPDjAnEyfe16gxCLQ9R9UnCHT9WS2qqwKAGtTJCAsI+frFRIa//IszJzFNRfmDFGbpcl3AfQxSZHmZ3GrWw== + +"@polywrap/msgpack-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/msgpack-js/-/msgpack-js-0.10.0.tgz#7303da87ed7bc21858f0ef392aec575c5da6df63" + integrity sha512-xt2Rkad1MFXuBlOKg9N/Tl3LTUFmE8iviwUiHXDU7ClQyYSsZ/NVAAfm0rXJktmBWB8c0/N7CgcFqJTI+XsQVQ== + dependencies: + "@msgpack/msgpack" "2.7.2" + +"@polywrap/msgpack-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/msgpack-js/-/msgpack-js-0.10.0-pre.10.tgz#ac15d960dba2912f7ed657634f873e3c22c71843" + integrity sha512-z+lMVYKIYRyDrRDW5jFxt8Q6rVXBfMohI48Ht79X9DU1g6FdJInxhgXwVnUUQfrgtVoSgDLChdFlqnpi2JkEaQ== + dependencies: + "@msgpack/msgpack" "2.7.2" + +"@polywrap/os-js@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/os-js/-/os-js-0.10.5.tgz#b9ecae978f69edc341aedec1867161d1e609eb3a" + integrity sha512-Xh7KqCQy2aEoHDGQE5eV2ykCDjhCRzUVryiF+P/HbfxG//bW6Wte4e97H4tcuD8RkApYVaGjmUTAlvX+g+26AQ== + +"@polywrap/plugin-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/plugin-js/-/plugin-js-0.10.0.tgz#e3bc81bf7832df9c84a4a319515228b159a05ba5" + integrity sha512-f0bjAKnveSu7u68NzWznYLWlzWo4MT8D6fudAF/wlV6S6R1euNJtIb8CTpAzfs6N173f81fzM/4OLS0pSYWdgQ== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/msgpack-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/tracing-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/plugin-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/plugin-js/-/plugin-js-0.10.0-pre.10.tgz#090c1963f40ab862a09deda8c18e6d522fd2e3f2" + integrity sha512-J/OEGEdalP83MnO4bBTeqC7eX+NBMQq6TxmUf68iNIydl8fgN7MNB7+koOTKdkTtNzrwXOnhavHecdSRZxuhDA== + dependencies: + "@polywrap/core-js" "0.10.0-pre.10" + "@polywrap/msgpack-js" "0.10.0-pre.10" + "@polywrap/result" "0.10.0-pre.10" + "@polywrap/tracing-js" "0.10.0-pre.10" + "@polywrap/wrap-manifest-types-js" "0.10.0-pre.10" + +"@polywrap/polywrap-manifest-schemas@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-schemas/-/polywrap-manifest-schemas-0.10.5.tgz#52630cf6fd5cb37143c283e1b846f479d1386eaa" + integrity sha512-Av3uu6nufqqM44lHfw1dc/1SJrLjQwE4ezEMajRLYhP5TXhgjAeFSMRUhBTzv0gHCIzK0rYIyrNBPra8hKEQBw== + +"@polywrap/polywrap-manifest-types-js@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-types-js/-/polywrap-manifest-types-js-0.10.5.tgz#c9f8749052123fe6b2bed8c2a9a80f437ff9adf6" + integrity sha512-ip1ld2CsMrUk4DnhXImHcnkVslVqxoT3UTH6YI4JnKgV/m0PKXXOll3ZfYPnFfkZMTbbOeBeuKRfb+j0dRzz6g== + dependencies: + "@polywrap/logging-js" "0.10.5" + "@polywrap/polywrap-manifest-schemas" "0.10.5" + jsonschema "1.4.0" + semver "7.5.0" + yaml "2.2.2" + +"@polywrap/result@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/result/-/result-0.10.0.tgz#712339223fba524dfabfb0bf868411f357d52e34" + integrity sha512-IxTBfGP89/OPNlUPMkjOrdYt/hwyvgI7TsYap6S35MHo4pXkR9mskzrHJ/AGE5DyGqP81CIIJNSYfooF97KY3A== + +"@polywrap/result@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/result/-/result-0.10.0-pre.10.tgz#6e88ac447d92d8a10c7e7892a6371af29a072240" + integrity sha512-SqNnEbXky4dFXgps2B2juFShq1024do0f1HLUbuj3MlIPp5aW9g9sfBslsy3YTnpg2QW7LFVT15crrJMgbowIQ== + +"@polywrap/schema-bind@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/schema-bind/-/schema-bind-0.10.5.tgz#9e209cda45df101b66076b57da403d1480e65ab1" + integrity sha512-7/pej+HHoqpzC8mXAcvk2m3GLCeQ0Rld3g9C26ffElvTB4nBqEBCNbOdZJn1/BSIzQEGq+D6kZAsCJRs/kBTkg== + dependencies: + "@polywrap/os-js" "0.10.5" + "@polywrap/schema-parse" "0.10.5" + "@polywrap/wrap-manifest-types-js" "0.10.0" + mustache "4.0.1" + +"@polywrap/schema-compose@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/schema-compose/-/schema-compose-0.10.5.tgz#e3f8580ae16888868c961f3c2b705cf2b4302e5b" + integrity sha512-gxr7Bbr3c1kefvyFOJxGK5om01sOibYm3hG8H6bijXTOMEtGLDLyzTJMok9IXzKvu7X8Pdm2yG9C1X73cuvJRw== + dependencies: + "@polywrap/schema-parse" "0.10.5" + "@polywrap/wrap-manifest-types-js" "0.10.0" + graphql "15.5.0" + mustache "4.0.1" + +"@polywrap/schema-parse@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@polywrap/schema-parse/-/schema-parse-0.10.5.tgz#7a67d975fa66f7d051adb3adbc78ae3a98e8a09b" + integrity sha512-jtqPjS1LzYhtchZwivNcAND+l3ILcLtnMkZlcnMMTfbgEc6tWJRLiCS6JlHnQK+BuxccSW5G8Khxwde6HPCvYg== + dependencies: + "@dorgjelli/graphql-schema-cycles" "1.1.4" + "@polywrap/wrap-manifest-types-js" "0.10.0" + graphql "15.5.0" + +"@polywrap/tracing-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/tracing-js/-/tracing-js-0.10.0.tgz#31d7ca9cc73a1dbd877fc684000652aa2c22acdc" + integrity sha512-077oN9VfbCNsYMRjX9NA6D1vFV+Y3TH92LjZATKQ2W2fRx/IGRARamAjhNfR4qRKstrOCd9D4E2DmaqFax3QIg== + dependencies: + "@fetsorn/opentelemetry-console-exporter" "0.0.3" + "@opentelemetry/api" "1.2.0" + "@opentelemetry/exporter-trace-otlp-http" "0.32.0" + "@opentelemetry/resources" "1.6.0" + "@opentelemetry/sdk-trace-base" "1.6.0" + "@opentelemetry/sdk-trace-web" "1.6.0" + +"@polywrap/tracing-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/tracing-js/-/tracing-js-0.10.0-pre.10.tgz#f50fb01883dcba4217a1711718aa53f3dd61cb1c" + integrity sha512-6wFw/zANVPG0tWMTSxwDzIpABVSSR9wO4/XxhCnKKgXwW6YANhtLj86uSRMTWqXeX2rpHwpMoWh4MDgYeAf+ng== + dependencies: + "@fetsorn/opentelemetry-console-exporter" "0.0.3" + "@opentelemetry/api" "1.2.0" + "@opentelemetry/exporter-trace-otlp-http" "0.32.0" + "@opentelemetry/resources" "1.6.0" + "@opentelemetry/sdk-trace-base" "1.6.0" + "@opentelemetry/sdk-trace-web" "1.6.0" + +"@polywrap/uri-resolver-extensions-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/uri-resolver-extensions-js/-/uri-resolver-extensions-js-0.10.0.tgz#ef0012e9b2231be44b0739f57b023a1c009c1b2b" + integrity sha512-mP8nLESuQFImhxeEV646m4qzJ1rc3d2LLgly9vPFUffXM7YMfJriL0nYNTzbyvZbhvH7PHfeEQ/m5DZFADMc7w== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/uri-resolvers-js" "0.10.0" + "@polywrap/wasm-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/uri-resolvers-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0.tgz#d80163666a5110a4a7bd36be7e0961364af761ce" + integrity sha512-lZP+sN4lnp8xRklYWkrAJFECFNXDsBawGqVk7jUrbcw1CX8YODHyDEB0dSV8vN30DMP4h70W7V4QeNwPiE1EzQ== + dependencies: + "@polywrap/core-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/wasm-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/wasm-js/-/wasm-js-0.10.0.tgz#6947b44669514cc0cb0653db8278f40631c45c7d" + integrity sha512-kI0Q9DQ/PlA0BTEj+Mye4fdt/aLh07l8YHjhbXQheuu46mcZuG9vfgnn78eug9c7wjGEECxlsK+B4hy/FPgYxQ== + dependencies: + "@polywrap/asyncify-js" "0.10.0" + "@polywrap/core-js" "0.10.0" + "@polywrap/msgpack-js" "0.10.0" + "@polywrap/result" "0.10.0" + "@polywrap/tracing-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + +"@polywrap/wrap-manifest-types-js@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@polywrap/wrap-manifest-types-js/-/wrap-manifest-types-js-0.10.0.tgz#f009a69d1591ee770dd13d67989d88f51e345d36" + integrity sha512-T3G/7NvNTuS1XyguRggTF4k7/h7yZCOcCbbUOTVoyVNfiNUY31hlrNZaFL4iriNqQ9sBDl9x6oRdOuFB7L9mlw== + dependencies: + "@apidevtools/json-schema-ref-parser" "9.0.9" + jsonschema "1.4.0" + semver "7.4.0" + +"@polywrap/wrap-manifest-types-js@0.10.0-pre.10": + version "0.10.0-pre.10" + resolved "https://registry.yarnpkg.com/@polywrap/wrap-manifest-types-js/-/wrap-manifest-types-js-0.10.0-pre.10.tgz#81b339f073c48880b34f06f151aa41373f442f88" + integrity sha512-Hgsa6nJIh0cCqKO14ufjAsN0WEKuLuvFBfBycjoRLfkwD3fcxP/xrvWgE2NRSvwQ77aV6PGMbhlSMDGI5jahrw== + dependencies: + "@apidevtools/json-schema-ref-parser" "9.0.9" + jsonschema "1.4.0" + semver "7.3.8" + +"@sinonjs/commons@^1.7.0": + version "1.8.6" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" + integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" + integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" + integrity sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" + integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": + version "7.18.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.5.tgz#c107216842905afafd3b6e774f6f935da6f5db80" + integrity sha512-enCvTL8m/EHS/zIvJno9nE+ndYPh1/oNFzRYRmtUqJICG2VnCSBzMLW5VN2KCQU91f23tsNKR8v7VJJQMatl7Q== + dependencies: + "@babel/types" "^7.3.0" + +"@types/graceful-fs@^4.1.2": + version "4.1.6" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" + integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + +"@types/istanbul-lib-report@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^1.1.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" + integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== + dependencies: + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-report" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@26.0.8": + version "26.0.8" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.8.tgz#f5c5559cf25911ce227f7ce30f1f160f24966369" + integrity sha512-eo3VX9jGASSuv680D4VQ89UmuLZneNxv2MCZjfwlInav05zXVJTzfc//lavdV0GPwSxsXJTy2jALscB7Acqg0g== + dependencies: + jest-diff "^25.2.1" + pretty-format "^25.2.1" + +"@types/json-schema@^7.0.6": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/node@*": + version "20.1.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.2.tgz#8fd63447e3f99aba6c3168fd2ec4580d5b97886f" + integrity sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g== + +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + +"@types/prettier@^2.0.0": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + +"@types/stack-utils@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + +"@types/yargs-parser@*": + version "21.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + +"@types/yargs@^15.0.0": + version "15.0.15" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.15.tgz#e609a2b1ef9e05d90489c2f5f45bbfb2be092158" + integrity sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg== + dependencies: + "@types/yargs-parser" "*" + +"@types/yauzl@^2.9.1": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" + integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== + dependencies: + "@types/node" "*" + +"@zxing/text-encoding@0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" + integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== + +abab@^2.0.3, abab@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + +acorn@^7.1.1: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.2.4: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.0, ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +any-signal@^2.0.0, any-signal@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-2.1.2.tgz#8d48270de0605f8b218cf9abe8e9c6a0e7418102" + integrity sha512-B+rDnWasMi/eWcajPcCWSlYc7muXOrcYrqgyzcdKisl2H/WTlQ0gip1KyQfr0ZlxJdsuWCj/LWwQm7fhyhRfIQ== + dependencies: + abort-controller "^3.0.0" + native-abort-controller "^1.0.3" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@^3.0.3, anymatch@~3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +axios@0.21.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" + integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== + dependencies: + follow-redirects "^1.14.0" + +axios@0.21.4: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== + dependencies: + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + +babel-plugin-istanbul@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== + dependencies: + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.8: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base64-to-uint8array@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64-to-uint8array/-/base64-to-uint8array-1.0.0.tgz#725f9e9886331b43785cadd807e76803d5494e05" + integrity sha512-drjWQcees55+XQSVHYxiUF05Fj6ko3XJUoxykZEXbm0BMmNz2ieWiZGJ+6TFWnjN2saucG6pI13LS92O4kaiAg== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +bignumber.js@^9.0.0: + version "9.1.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" + integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +bl@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +blob-to-it@^1.0.1: + 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.3" + +bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +borc@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/borc/-/borc-2.1.2.tgz#6ce75e7da5ce711b963755117dd1b187f6f8cf19" + integrity sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w== + dependencies: + bignumber.js "^9.0.0" + buffer "^5.5.0" + commander "^2.15.0" + ieee754 "^1.1.13" + iso-url "~0.4.7" + json-text-sequence "~0.1.0" + readable-stream "^3.6.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-process-hrtime@^1.0.0: + version "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.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== + +browserslist@^4.21.3: + version "4.21.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" + integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== + dependencies: + caniuse-lite "^1.0.30001449" + electron-to-chromium "^1.4.284" + node-releases "^2.0.8" + update-browserslist-db "^1.0.10" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +buffer-from@1.x, buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer@^5.4.3, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +buffer@^6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" + integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001449: + version "1.0.30001486" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz#56a08885228edf62cbe1ac8980f2b5dae159997e" + integrity sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg== + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== + dependencies: + rsvp "^4.8.4" + +chalk@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cids@^1.0.0: + version "1.1.9" + resolved "https://registry.yarnpkg.com/cids/-/cids-1.1.9.tgz#402c26db5c07059377bcd6fb82f2a24e7f2f4a4f" + integrity sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg== + dependencies: + multibase "^4.0.1" + multicodec "^3.0.1" + multihashes "^4.0.1" + uint8arrays "^3.0.0" + +cjs-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" + integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" + integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.2.0.tgz#6e21014b2ed90d8b7c9647230d8b7a94a4a419a9" + integrity sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w== + +commander@^2.15.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +content-hash@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== + +copyfiles@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" + integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg== + dependencies: + glob "^7.0.5" + minimatch "^3.0.3" + mkdirp "^1.0.4" + noms "0.0.0" + through2 "^2.0.1" + untildify "^4.0.0" + yargs "^16.1.0" + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decimal.js@^10.2.1: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +decode-uri-component@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-properties@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +delimit-stream@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/delimit-stream/-/delimit-stream-0.1.0.tgz#9b8319477c0e5f8aeb3ce357ae305fc25ea1cd2b" + integrity sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" + integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== + +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== + +dns-over-http-resolver@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz#194d5e140a42153f55bb79ac5a64dd2768c36af9" + integrity sha512-miDiVSI6KSNbi4SVifzO/reD8rMnxgrlnkrlkugOLQpWQTe2qMdHsZp5DmfKjxNE+/T3VAAYLQUZMv9SMr6+AA== + dependencies: + debug "^4.3.1" + native-fetch "^3.0.0" + receptacle "^1.3.2" + +docker-compose@0.23.17: + version "0.23.17" + resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.23.17.tgz#8816bef82562d9417dc8c790aa4871350f93a2ba" + integrity sha512-YJV18YoYIcxOdJKeFcCFihE6F4M2NExWM/d4S1ITcS9samHKnNUihz9kjggr0dNtsrbpFNc7/Yzd19DWs+m1xg== + dependencies: + yaml "^1.10.2" + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + +electron-fetch@^1.7.2: + version "1.9.1" + resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.9.1.tgz#e28bfe78d467de3f2dec884b1d72b8b05322f30f" + integrity sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA== + dependencies: + encoding "^0.1.13" + +electron-to-chromium@^1.4.284: + version "1.4.388" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.388.tgz#ec0d1be823d5b14da56d91ec5c57e84b4624ea45" + integrity sha512-xZ0y4zjWZgp65okzwwt00f2rYibkFPHUv9qBz+Vzn8cB9UXIo9Zc6Dw81LJYhhNt0G/vR1OJEfStZ49NKl0YxQ== + +elliptic@6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emittery@^0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" + integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +err-code@^2.0.0, err-code@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + +err-code@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-3.0.1.tgz#a444c7b992705f2b120ee320b09972eef331c920" + integrity sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +ethers@5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" + integrity sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.0" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.0" + "@ethersproject/wordlists" "5.7.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +exec-sh@^0.3.2: + version "0.3.6" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" + integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expect@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" + integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== + dependencies: + "@jest/types" "^26.6.2" + ansi-styles "^4.0.0" + jest-get-type "^26.3.0" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-regex-util "^26.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + +fast-fifo@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.2.0.tgz#2ee038da2468e8623066dee96958b0c1763aa55a" + integrity sha512-NcvQXt7Cky1cNau15FWy64IjuO8X0JijhTBBrJj1YlxlDfRkJXNaK9RFUjwpfDPzMdv7wB38jr53l9tkNLxnWg== + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fast-memoize@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" + integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +follow-redirects@^1.14.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + +form-data@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== + dependencies: + map-cache "^0.2.2" + +fs-extra@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + +fs-extra@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.1.2, fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-iterator@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-iterator/-/get-iterator-1.0.2.tgz#cd747c02b4c084461fac14f48f6b45a80ed25c82" + integrity sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg== + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.0.0, get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== + +glob-parent@~5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globalthis@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphql-json-transform@^1.1.0-alpha.0: + version "1.1.0-alpha.0" + resolved "https://registry.yarnpkg.com/graphql-json-transform/-/graphql-json-transform-1.1.0-alpha.0.tgz#fb0c88d24840067e6c55ac64bbc8d4e5de245d2d" + integrity sha512-I6lR/lYEezSz4iru0f7a/wR8Rzi3pCafk7S0bX2b/WQOtK0vKabxLShGBXIslsi0arMehIjvOPHJl7MpOUqj0w== + +graphql@15.5.0: + version "15.5.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" + integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +ieee754@^1.1.13, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +intl-messageformat-parser@6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-6.4.2.tgz#e2d28c3156c27961ead9d613ca55b6a155078d7d" + integrity sha512-IVNGy24lNEYr/KPWId5tF3KXRHFFbMgzIMI4kUonNa/ide2ywUYyBuOUro1IBGZJqjA2ncBVUyXdYKlMfzqpAA== + dependencies: + "@formatjs/ecma402-abstract" "1.6.2" + tslib "^2.1.0" + +intl-messageformat@9.5.2: + version "9.5.2" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-9.5.2.tgz#e72d32152c760b7411e413780e462909987c005a" + integrity sha512-sBGXcSQLyBuBA/kzAYhTpzhzkOGfSwGIau2W6FuwLZk0JE+VF3C+y0077FhVDOcRSi60iSfWzT8QC3Z7//dFxw== + dependencies: + fast-memoize "^2.5.2" + intl-messageformat-parser "6.4.2" + tslib "^2.1.0" + +invert-kv@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-3.0.1.tgz#a93c7a3d4386a1dc8325b97da9bb1620c0282523" + integrity sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw== + +ip-regex@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + +ipfs-core-utils@^0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/ipfs-core-utils/-/ipfs-core-utils-0.5.4.tgz#c7fa508562086be65cebb51feb13c58abbbd3d8d" + integrity sha512-V+OHCkqf/263jHU0Fc9Rx/uDuwlz3PHxl3qu6a5ka/mNi6gucbFuI53jWsevCrOOY9giWMLB29RINGmCV5dFeQ== + dependencies: + any-signal "^2.0.0" + blob-to-it "^1.0.1" + browser-readablestream-to-it "^1.0.1" + cids "^1.0.0" + err-code "^2.0.3" + ipfs-utils "^5.0.0" + it-all "^1.0.4" + it-map "^1.0.4" + it-peekable "^1.0.1" + multiaddr "^8.0.0" + multiaddr-to-uri "^6.0.0" + parse-duration "^0.4.4" + timeout-abort-controller "^1.1.1" + uint8arrays "^1.1.0" + +ipfs-http-client@48.1.3: + version "48.1.3" + resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-48.1.3.tgz#d9b91b1f65d54730de92290d3be5a11ef124b400" + integrity sha512-+JV4cdMaTvYN3vd4r6+mcVxV3LkJXzc4kn2ToVbObpVpdqmG34ePf1KlvFF8A9gjcel84WpiP5xCEV/IrisPBA== + dependencies: + any-signal "^2.0.0" + bignumber.js "^9.0.0" + cids "^1.0.0" + debug "^4.1.1" + form-data "^3.0.0" + ipfs-core-utils "^0.5.4" + ipfs-utils "^5.0.0" + ipld-block "^0.11.0" + ipld-dag-cbor "^0.17.0" + ipld-dag-pb "^0.20.0" + ipld-raw "^6.0.0" + it-last "^1.0.4" + it-map "^1.0.4" + it-tar "^1.2.2" + it-to-stream "^0.1.2" + merge-options "^2.0.0" + multiaddr "^8.0.0" + multibase "^3.0.0" + multicodec "^2.0.1" + multihashes "^3.0.1" + nanoid "^3.1.12" + native-abort-controller "~0.0.3" + parse-duration "^0.4.4" + stream-to-it "^0.2.2" + uint8arrays "^1.1.0" + +ipfs-utils@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ipfs-utils/-/ipfs-utils-5.0.1.tgz#7c0053d5e77686f45577257a73905d4523e6b4f7" + integrity sha512-28KZPgO4Uf5duT2ORLAYfboUp98iUshDD7yRAfbNxNAR8Dtidfn6o20rZfoXnkri2zKBVIPlJkuCPmPJB+6erg== + dependencies: + abort-controller "^3.0.0" + any-signal "^2.1.0" + buffer "^6.0.1" + electron-fetch "^1.7.2" + err-code "^2.0.0" + fs-extra "^9.0.1" + is-electron "^2.2.0" + iso-url "^1.0.0" + it-glob "0.0.10" + it-to-stream "^0.1.2" + merge-options "^2.0.0" + nanoid "^3.1.3" + native-abort-controller "0.0.3" + native-fetch "^2.0.0" + node-fetch "^2.6.0" + stream-to-it "^0.2.0" + +ipld-block@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/ipld-block/-/ipld-block-0.11.1.tgz#c3a7b41aee3244187bd87a73f980e3565d299b6e" + integrity sha512-sDqqLqD5qh4QzGq6ssxLHUCnH4emCf/8F8IwjQM2cjEEIEHMUj57XhNYgmGbemdYPznUhffxFGEHsruh5+HQRw== + dependencies: + cids "^1.0.0" + +ipld-dag-cbor@^0.17.0: + version "0.17.1" + resolved "https://registry.yarnpkg.com/ipld-dag-cbor/-/ipld-dag-cbor-0.17.1.tgz#842e6c250603e5791049168831a425ec03471fb1" + integrity sha512-Bakj/cnxQBdscORyf4LRHxQJQfoaY8KWc7PWROQgX+aw5FCzBt8ga0VM/59K+ABOznsqNvyLR/wz/oYImOpXJw== + dependencies: + borc "^2.1.2" + cids "^1.0.0" + is-circular "^1.0.2" + multicodec "^3.0.1" + multihashing-async "^2.0.0" + uint8arrays "^2.1.3" + +ipld-dag-pb@^0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/ipld-dag-pb/-/ipld-dag-pb-0.20.0.tgz#025c0343aafe6cb9db395dd1dc93c8c60a669360" + integrity sha512-zfM0EdaolqNjAxIrtpuGKvXxWk5YtH9jKinBuQGTcngOsWFQhyybGCTJHGNGGtRjHNJi2hz5Udy/8pzv4kcKyg== + dependencies: + cids "^1.0.0" + class-is "^1.1.0" + multicodec "^2.0.0" + multihashing-async "^2.0.0" + protons "^2.0.0" + reset "^0.1.0" + run "^1.4.0" + stable "^0.1.8" + uint8arrays "^1.0.0" + +ipld-raw@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/ipld-raw/-/ipld-raw-6.0.0.tgz#74d947fcd2ce4e0e1d5bb650c1b5754ed8ea6da0" + integrity sha512-UK7fjncAzs59iu/o2kwYtb8jgTtW6B+cNWIiNpAJkfRwqoMk1xD/6i25ktzwe4qO8gQgoR9RxA5ibC23nq8BLg== + dependencies: + cids "^1.0.0" + multicodec "^2.0.0" + multihashing-async "^2.0.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.3: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +is-circular@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-circular/-/is-circular-1.0.2.tgz#2e0ab4e9835f4c6b0ea2b9855a84acd501b8366c" + integrity sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA== + +is-core-module@^2.11.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" + integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-electron@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-electron/-/is-electron-2.2.2.tgz#3778902a2044d76de98036f5dc58089ac4d80bb9" + integrity sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg== + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-ip@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" + integrity sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q== + dependencies: + ip-regex "^4.0.0" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-typed-array@^1.1.10, is-typed-array@^1.1.3: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +iso-constants@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/iso-constants/-/iso-constants-0.1.2.tgz#3d2456ed5aeaa55d18564f285ba02a47a0d885b4" + integrity sha512-OTCM5ZCQsHBCI4Wdu4tSxvDIkmDHd5EwJDps5mKqnQnWJSKlnwMs3EDZ4n3Fh1tmkWkDlyd2vCDbEYuPbyrUNQ== + +iso-url@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" + integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== + +iso-url@~0.4.7: + version "0.4.7" + resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-0.4.7.tgz#de7e48120dae46921079fe78f325ac9e9217a385" + integrity sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog== + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + +istanbul-lib-instrument@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + 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.1.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" + integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +it-all@^1.0.4: + 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@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/it-concat/-/it-concat-1.0.3.tgz#84db9376e4c77bf7bc1fd933bb90f184e7cef32b" + integrity sha512-sjeZQ1BWQ9U/W2oI09kZgUyvSWzQahTkOkLIsnEPgyqZFaF9ME5gV6An4nMjlyhXKWQMKEakQU8oRHs2SdmeyA== + dependencies: + bl "^4.0.0" + +it-glob@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/it-glob/-/it-glob-0.0.10.tgz#4defd9286f693847c3ff483d2ff65f22e1359ad8" + integrity sha512-p1PR15djgPV7pxdLOW9j4WcJdla8+91rJdUU2hU2Jm68vkxpIEXK55VHBeH8Lvqh2vqLtM83t8q4BuJxue6niA== + dependencies: + fs-extra "^9.0.1" + minimatch "^3.0.4" + +it-last@^1.0.4: + 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.6" + resolved "https://registry.yarnpkg.com/it-map/-/it-map-1.0.6.tgz#6aa547e363eedcf8d4f69d8484b450bc13c9882c" + integrity sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ== + +it-peekable@^1.0.1: + 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@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/it-reader/-/it-reader-2.1.0.tgz#b1164be343f8538d8775e10fb0339f61ccf71b0f" + integrity sha512-hSysqWTO9Tlwc5EGjVf8JYZzw0D2FsxD/g+eNNWrez9zODxWt6QlN6JAMmycK72Mv4jHEKEXoyzUN4FYGmJaZw== + dependencies: + bl "^4.0.0" + +it-tar@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/it-tar/-/it-tar-1.2.2.tgz#8d79863dad27726c781a4bcc491f53c20f2866cf" + integrity sha512-M8V4a9I+x/vwXTjqvixcEZbQZHjwDIb8iUQ+D4M2QbhAdNs3WKVSl+45u5/F2XFx6jYMFOGzMVlKNK/uONgNIA== + dependencies: + bl "^4.0.0" + buffer "^5.4.3" + iso-constants "^0.1.2" + it-concat "^1.0.0" + it-reader "^2.0.0" + p-defer "^3.0.0" + +it-to-stream@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/it-to-stream/-/it-to-stream-0.1.2.tgz#7163151f75b60445e86b8ab1a968666acaacfe7b" + integrity sha512-DTB5TJRZG3untmZehcaFN0kGWl2bNv7tnJRgQHAO9QEt8jfvVRrebZtnD5NZd4SCj4WVPjl0LSrugNWE/UaZRQ== + dependencies: + buffer "^5.6.0" + fast-fifo "^1.0.0" + get-iterator "^1.0.2" + p-defer "^3.0.0" + p-fifo "^1.0.0" + readable-stream "^3.6.0" + +jest-changed-files@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" + integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== + dependencies: + "@jest/types" "^26.6.2" + execa "^4.0.0" + throat "^5.0.0" + +jest-cli@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" + integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== + dependencies: + "@jest/core" "^26.6.3" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + import-local "^3.0.2" + is-ci "^2.0.0" + jest-config "^26.6.3" + jest-util "^26.6.2" + jest-validate "^26.6.2" + prompts "^2.0.1" + yargs "^15.4.1" + +jest-config@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" + integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^26.6.3" + "@jest/types" "^26.6.2" + babel-jest "^26.6.3" + chalk "^4.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + jest-environment-jsdom "^26.6.2" + jest-environment-node "^26.6.2" + jest-get-type "^26.3.0" + jest-jasmine2 "^26.6.3" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + micromatch "^4.0.2" + pretty-format "^26.6.2" + +jest-diff@26.6.2, jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== + dependencies: + chalk "^4.0.0" + diff-sequences "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-diff@^25.2.1: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" + integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== + dependencies: + chalk "^3.0.0" + diff-sequences "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + +jest-docblock@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" + integrity sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w== + dependencies: + detect-newline "^3.0.0" + +jest-each@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" + integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + jest-get-type "^26.3.0" + jest-util "^26.6.2" + pretty-format "^26.6.2" + +jest-environment-jsdom@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" + integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== + dependencies: + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + jest-util "^26.6.2" + jsdom "^16.4.0" + +jest-environment-node@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" + integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== + dependencies: + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + jest-util "^26.6.2" + +jest-get-type@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" + integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== + +jest-get-type@^26.3.0: + version "26.3.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" + integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== + +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== + dependencies: + "@jest/types" "^26.6.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^26.0.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + +jest-jasmine2@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" + integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^26.6.2" + is-generator-fn "^2.0.0" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" + throat "^5.0.0" + +jest-leak-detector@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" + integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== + dependencies: + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== + dependencies: + chalk "^4.0.0" + jest-diff "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-message-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" + integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/types" "^26.6.2" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.2" + pretty-format "^26.6.2" + slash "^3.0.0" + stack-utils "^2.0.2" + +jest-mock@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" + integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" + integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== + +jest-resolve-dependencies@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" + integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== + dependencies: + "@jest/types" "^26.6.2" + jest-regex-util "^26.0.0" + jest-snapshot "^26.6.2" + +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.2" + jest-util "^26.6.2" + read-pkg-up "^7.0.1" + resolve "^1.18.1" + slash "^3.0.0" + +jest-runner@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" + integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.7.1" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-config "^26.6.3" + jest-docblock "^26.0.0" + jest-haste-map "^26.6.2" + jest-leak-detector "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + jest-runtime "^26.6.3" + jest-util "^26.6.2" + jest-worker "^26.6.2" + source-map-support "^0.5.6" + throat "^5.0.0" + +jest-runtime@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" + integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/globals" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + cjs-module-lexer "^0.6.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^15.4.1" + +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + +jest-snapshot@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" + integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^26.6.2" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.0.0" + chalk "^4.0.0" + expect "^26.6.2" + graceful-fs "^4.2.4" + jest-diff "^26.6.2" + jest-get-type "^26.3.0" + jest-haste-map "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + natural-compare "^1.4.0" + pretty-format "^26.6.2" + semver "^7.3.2" + +jest-util@^26.1.0, jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== + dependencies: + "@jest/types" "^26.6.2" + camelcase "^6.0.0" + chalk "^4.0.0" + jest-get-type "^26.3.0" + leven "^3.1.0" + pretty-format "^26.6.2" + +jest-watcher@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" + integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== + dependencies: + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + jest-util "^26.6.2" + string-length "^4.0.1" + +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +jest@26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" + integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== + dependencies: + "@jest/core" "^26.6.3" + import-local "^3.0.2" + jest-cli "^26.6.3" + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsdom@^16.4.0: + version "16.7.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-text-sequence@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.1.1.tgz#a72f217dc4afc4629fff5feb304dc1bd51a2f3d2" + integrity sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w== + dependencies: + delimit-stream "0.1.0" + +json5@2.x, json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +lcid@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-3.1.1.tgz#9030ec479a058fc36b5e8243ebaac8b6ac582fd0" + integrity sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg== + dependencies: + invert-kv "^3.0.0" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.merge@4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@4.x, lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +map-age-cleaner@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== + dependencies: + object-visit "^1.0.0" + +mem@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/mem/-/mem-5.1.1.tgz#7059b67bf9ac2c924c9f1cff7155a064394adfb3" + integrity sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw== + dependencies: + map-age-cleaner "^0.1.3" + mimic-fn "^2.1.0" + p-is-promise "^2.1.0" + +merge-options@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-2.0.0.tgz#36ca5038badfc3974dbde5e58ba89d3df80882c3" + integrity sha512-S7xYIeWHl2ZUKF7SDeBhGg6rfv5bKxVBdk95s/I7wVF8d+hjLSztJ/B271cnUiF6CAFduEQ5Zn3HYwAjT16DlQ== + dependencies: + is-plain-obj "^2.0.0" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@*: + version "9.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56" + integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.1.1, minimist@^1.2.0: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@1.x, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multiaddr-to-uri@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/multiaddr-to-uri/-/multiaddr-to-uri-6.0.0.tgz#8f08a75c6eeb2370d5d24b77b8413e3f0fa9bcc0" + integrity sha512-OjpkVHOXEmIKMO8WChzzQ7aZQcSQX8squxmvtDbRpy7/QNmJ3Z7jv6qyD74C28QtaeNie8O8ngW2AkeiMmKP7A== + dependencies: + multiaddr "^8.0.0" + +multiaddr@^8.0.0: + version "8.1.2" + resolved "https://registry.yarnpkg.com/multiaddr/-/multiaddr-8.1.2.tgz#74060ff8636ba1c01b2cf0ffd53950b852fa9b1f" + integrity sha512-r13IzW8+Sv9zab9Gt8RPMIN2WkptIPq99EpAzg4IbJ/zTELhiEwXWr9bAmEatSCI4j/LSA6ESJzvz95JZ+ZYXQ== + dependencies: + cids "^1.0.0" + class-is "^1.1.0" + dns-over-http-resolver "^1.0.0" + err-code "^2.0.3" + is-ip "^3.1.0" + multibase "^3.0.0" + uint8arrays "^1.1.0" + varint "^5.0.0" + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@^3.0.0, multibase@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-3.1.2.tgz#59314e1e2c35d018db38e4c20bb79026827f0f2f" + integrity sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw== + dependencies: + "@multiformats/base-x" "^4.0.1" + web-encoding "^1.0.6" + +multibase@^4.0.1: + version "4.0.6" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-4.0.6.tgz#6e624341483d6123ca1ede956208cb821b440559" + integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ== + dependencies: + "@multiformats/base-x" "^4.0.1" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multicodec@^2.0.0, multicodec@^2.0.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-2.1.3.tgz#b9850635ad4e2a285a933151b55b4a2294152a5d" + integrity sha512-0tOH2Gtio39uO41o+2xl9UhRkCWxU5ZmZSbFCh/OjGzkWJI8e6lkN/s4Mj1YfyWoBod+2+S3W+6wO6nhkwN8pA== + dependencies: + uint8arrays "1.1.0" + varint "^6.0.0" + +multicodec@^3.0.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-3.2.1.tgz#82de3254a0fb163a107c1aab324f2a91ef51efb2" + integrity sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw== + dependencies: + uint8arrays "^3.0.0" + varint "^6.0.0" + +multiformats@^9.4.2: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +multihashes@^3.0.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-3.1.2.tgz#ffa5e50497aceb7911f7b4a3b6cada9b9730edfc" + integrity sha512-AP4IoV/YzkNrfbQKZE3OMPibrmy350OmCd6cJkwyM8oExaXIlOY4UnOOVSQtAEuq/LR01XfXKCESidzZvSwHCQ== + dependencies: + multibase "^3.1.0" + uint8arrays "^2.0.5" + varint "^6.0.0" + +multihashes@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-4.0.3.tgz#426610539cd2551edbf533adeac4c06b3b90fb05" + integrity sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA== + dependencies: + multibase "^4.0.1" + uint8arrays "^3.0.0" + varint "^5.0.2" + +multihashing-async@^2.0.0: + version "2.1.4" + resolved "https://registry.yarnpkg.com/multihashing-async/-/multihashing-async-2.1.4.tgz#26dce2ec7a40f0e7f9e732fc23ca5f564d693843" + integrity sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg== + dependencies: + blakejs "^1.1.0" + err-code "^3.0.0" + js-sha3 "^0.8.0" + multihashes "^4.0.1" + murmurhash3js-revisited "^3.0.0" + uint8arrays "^3.0.0" + +murmurhash3js-revisited@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz#6bd36e25de8f73394222adc6e41fa3fac08a5869" + integrity sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g== + +mustache@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.0.1.tgz#d99beb031701ad433338e7ea65e0489416c854a2" + integrity sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA== + +nanoid@^3.1.12, nanoid@^3.1.3: + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +native-abort-controller@0.0.3, native-abort-controller@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/native-abort-controller/-/native-abort-controller-0.0.3.tgz#4c528a6c9c7d3eafefdc2c196ac9deb1a5edf2f8" + integrity sha512-YIxU5nWqSHG1Xbu3eOu3pdFRD882ivQpIcu6AiPVe2oSVoRbfYW63DVkZm3g1gHiMtZSvZzF6THSzTGEBYl8YA== + dependencies: + globalthis "^1.0.1" + +native-abort-controller@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/native-abort-controller/-/native-abort-controller-1.0.4.tgz#39920155cc0c18209ff93af5bc90be856143f251" + integrity sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ== + +native-fetch@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-2.0.1.tgz#319d53741a7040def92d5dc8ea5fe9416b1fad89" + integrity sha512-gv4Bea+ga9QdXINurpkEqun3ap3vnB+WYoe4c8ddqUYEH7B2h6iD39RF8uVN7OwmSfMY3RDxkvBnoI4e2/vLXQ== + dependencies: + globalthis "^1.0.1" + +native-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-3.0.0.tgz#06ccdd70e79e171c365c75117959cf4fe14a09bb" + integrity sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-fetch@^2.6.0: + version "2.6.11" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" + integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w== + dependencies: + whatwg-url "^5.0.0" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-notifier@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.2.tgz#f3167a38ef0d2c8a866a83e318c1ba0efeb702c5" + integrity sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg== + dependencies: + growly "^1.3.0" + is-wsl "^2.2.0" + semver "^7.3.2" + shellwords "^0.1.1" + uuid "^8.3.0" + which "^2.0.2" + +node-releases@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" + integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== + +noms@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" + integrity sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow== + dependencies: + inherits "^2.0.1" + readable-stream "~1.0.31" + +normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== + dependencies: + path-key "^2.0.0" + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.2.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.4.tgz#fd59d5e904e8e1f03c25a7d5a15cfa16c714a1e5" + integrity sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g== + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +os-locale@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-5.0.0.tgz#6d26c1d95b6597c5d5317bf5fba37eccec3672e0" + integrity sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA== + dependencies: + execa "^4.0.0" + lcid "^3.0.0" + mem "^5.0.0" + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== + +p-defer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" + integrity sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw== + +p-each-series@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" + integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== + +p-fifo@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-fifo/-/p-fifo-1.0.0.tgz#e29d5cf17c239ba87f51dde98c1d26a9cfe20a63" + integrity sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A== + dependencies: + fast-fifo "^1.0.0" + p-defer "^3.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== + +p-is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-duration@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-0.4.4.tgz#11c0f51a689e97d06c57bd772f7fda7dc013243c" + integrity sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg== + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.1: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +polywrap@0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/polywrap/-/polywrap-0.10.5.tgz#e49faaa0d917df6779c2cad0d70a3941bccc1f07" + integrity sha512-1/dQCiI+JQH55hO0fsT3RX3p5vCDV8tdjzFeJLQRU7WolKaN9qTw0GFo1PThnnIdpFLMp+jtDCPAgImmamZqJQ== + dependencies: + "@apidevtools/json-schema-ref-parser" "9.0.9" + "@ethersproject/providers" "5.6.8" + "@ethersproject/wallet" "5.6.2" + "@formatjs/intl" "1.8.2" + "@polywrap/asyncify-js" "0.10.0" + "@polywrap/client-config-builder-js" "0.10.0" + "@polywrap/client-js" "0.10.0" + "@polywrap/core-js" "0.10.0" + "@polywrap/ethereum-provider-js-v1" "npm:@polywrap/ethereum-provider-js@~0.2.4" + "@polywrap/logging-js" "0.10.5" + "@polywrap/os-js" "0.10.5" + "@polywrap/polywrap-manifest-types-js" "0.10.5" + "@polywrap/result" "0.10.0" + "@polywrap/schema-bind" "0.10.5" + "@polywrap/schema-compose" "0.10.5" + "@polywrap/schema-parse" "0.10.5" + "@polywrap/uri-resolver-extensions-js" "0.10.0" + "@polywrap/uri-resolvers-js" "0.10.0" + "@polywrap/wasm-js" "0.10.0" + "@polywrap/wrap-manifest-types-js" "0.10.0" + axios "0.21.2" + chalk "4.1.0" + chokidar "3.5.1" + commander "9.2.0" + content-hash "2.5.2" + copyfiles "2.4.1" + docker-compose "0.23.17" + extract-zip "2.0.1" + form-data "4.0.0" + fs-extra "9.0.1" + ipfs-http-client "48.1.3" + json-schema "0.4.0" + jsonschema "1.4.0" + mustache "4.0.1" + os-locale "5.0.0" + regex-parser "2.2.11" + rimraf "3.0.2" + toml "3.0.0" + typescript "4.9.5" + yaml "2.2.2" + yesno "0.4.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +pretty-format@^25.2.1, pretty-format@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" + integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== + dependencies: + "@jest/types" "^25.5.0" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^16.12.0" + +pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== + dependencies: + "@jest/types" "^26.6.2" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^17.0.1" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +prompts@^2.0.1: + 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" + +protocol-buffers-schema@^3.3.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz#77bc75a48b2ff142c1ad5b5b90c94cd0fa2efd03" + integrity sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw== + +protons@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/protons/-/protons-2.0.3.tgz#94f45484d04b66dfedc43ad3abff1e8907994bb2" + integrity sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA== + dependencies: + protocol-buffers-schema "^3.3.1" + signed-varint "^2.0.1" + uint8arrays "^3.0.0" + varint "^5.0.0" + +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +react-is@^16.12.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~1.0.31: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +receptacle@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/receptacle/-/receptacle-1.3.2.tgz#a7994c7efafc7a01d0e2041839dab6c4951360d2" + integrity sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A== + dependencies: + ms "^2.1.1" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regex-parser@2.2.11: + version "2.2.11" + resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" + integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +reset@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/reset/-/reset-0.1.0.tgz#9fc7314171995ae6cb0b7e58b06ce7522af4bafb" + integrity sha512-RF7bp2P2ODreUPA71FZ4DSK52gNLJJ8dSwA1nhOCoC0mI4KZ4D/W6zhd2nfBqX/JlR+QZ/iUqAYPjq1UQU8l0Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== + +resolve@^1.10.0, resolve@^1.18.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +retimer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/retimer/-/retimer-2.0.0.tgz#e8bd68c5e5a8ec2f49ccb5c636db84c04063bbca" + integrity sha512-KLXY85WkEq2V2bKex/LOO1ViXVn2KGYe4PYysAdYdjmraYIUsVkXu8O4am+8+5UbaaGl1qho4aqAAPHNQ4GSbg== + +rimraf@3.0.2, rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + +run@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/run/-/run-1.4.0.tgz#e17d9e9043ab2fe17776cb299e1237f38f0b4ffa" + integrity sha512-962oBW07IjQ9SizyMHdoteVbDKt/e2nEsnTRZ0WjK/zs+jfQQICqH0qj0D5lqZNuy0JkbzfA6IOqw0Sk7C3DlQ== + dependencies: + minimatch "*" + +safe-buffer@^5.0.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + +scrypt-js@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +"semver@2 || 3 || 4 || 5", semver@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +semver@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.4.0.tgz#8481c92feffc531ab1e012a8ffc15bdd3a0f4318" + integrity sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw== + dependencies: + lru-cache "^6.0.0" + +semver@7.5.0, semver@7.x, semver@^7.3.2: + version "7.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" + integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== + dependencies: + lru-cache "^6.0.0" + +semver@^6.0.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signed-varint@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/signed-varint/-/signed-varint-2.0.1.tgz#50a9989da7c98c2c61dad119bc97470ef8528129" + integrity sha512-abgDPg1106vuZZOvw7cFwdCABddfJRz5akcCcchzTbhyhYnsG31y4AlZEgp315T7W3nQq5P4xeOm186ZiPVFzw== + dependencies: + varint "~5.0.0" + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.6: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.3: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stable@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== + +stack-utils@^2.0.2: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stream-to-it@^0.2.0, stream-to-it@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" + integrity sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ== + dependencies: + get-iterator "^1.0.2" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" + integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +terminal-link@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" + integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== + dependencies: + ansi-escapes "^4.2.1" + supports-hyperlinks "^2.0.0" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +throat@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" + integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== + +through2@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +timeout-abort-controller@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/timeout-abort-controller/-/timeout-abort-controller-1.1.1.tgz#2c3c3c66f13c783237987673c276cbd7a9762f29" + integrity sha512-BsF9i3NAJag6T0ZEjki9j654zoafI2X6ayuNd6Tp8+Ul6Tr5s4jo973qFeiWrRSweqvskC+AHDKUmIW4b7pdhQ== + dependencies: + abort-controller "^3.0.0" + retimer "^2.0.0" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toml@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + +tough-cookie@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" + integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-jest@26.5.4: + version "26.5.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.4.tgz#207f4c114812a9c6d5746dd4d1cdf899eafc9686" + integrity sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg== + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + jest-util "^26.1.0" + json5 "2.x" + lodash "4.x" + make-error "1.x" + mkdirp "1.x" + semver "7.x" + yargs-parser "20.x" + +tslib@^2.1.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typescript@4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +uint8arrays@1.1.0, uint8arrays@^1.0.0, uint8arrays@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-1.1.0.tgz#d034aa65399a9fd213a1579e323f0b29f67d0ed2" + integrity sha512-cLdlZ6jnFczsKf5IH1gPHTtcHtPGho5r4CvctohmQjw8K7Q3gFdfIGHxSTdTaCKrL4w09SsPRJTqRS0drYeszA== + dependencies: + multibase "^3.0.0" + web-encoding "^1.0.2" + +uint8arrays@^2.0.5, uint8arrays@^2.1.3: + version "2.1.10" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-2.1.10.tgz#34d023c843a327c676e48576295ca373c56e286a" + integrity sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A== + dependencies: + multiformats "^9.4.2" + +uint8arrays@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== + dependencies: + multiformats "^9.4.2" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + +update-browserslist-db@^1.0.10: + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +util@^0.12.3: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + +uuid@^8.3.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-to-istanbul@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1" + integrity sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0, varint@^5.0.2, varint@~5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +varint@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" + integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== + +w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + +walker@^1.0.7, walker@~1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +web-encoding@^1.0.2, web-encoding@^1.0.6: + version "1.1.5" + resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.1.5.tgz#fc810cf7667364a6335c939913f5051d3e0c4864" + integrity sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA== + dependencies: + util "^0.12.3" + optionalDependencies: + "@zxing/text-encoding" "0.9.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + +which-typed-array@^1.1.2: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073" + integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA== + +yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yargs-parser@20.x, yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^15.4.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yargs@^16.1.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yesno@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/yesno/-/yesno-0.4.0.tgz#5d674f14d339f0bd4b0edc47f899612c74fcd895" + integrity sha512-tdBxmHvbXPBKYIg81bMCB7bVeDmHkRzk5rVJyYYXurwKkHq/MCd8rz4HSJUP7hW0H2NlXiq8IFiWvYKEHhlotA== From 1606e133dcdeae81bac01a1eb19d3437e6812827 Mon Sep 17 00:00:00 2001 From: krisbitney Date: Mon, 3 Jul 2023 13:26:59 -0500 Subject: [PATCH 02/41] added mod and entry for wrap-rust bindings --- .../src/partials/$deserialize_array.mustache | 23 ++ .../$deserialize_array_nobox.mustache | 23 ++ .../src/partials/$deserialize_enum.mustache | 22 ++ .../partials/$deserialize_map_value.mustache | 23 ++ .../$deserialize_map_value_nobox.mustache | 23 ++ .../src/partials/$deserialize_object.mustache | 11 + .../$deserialize_object_nobox.mustache | 11 + .../$deserialize_object_refmut.mustache | 11 + .../src/partials/$serialize_array.mustache | 21 ++ .../src/partials/$serialize_enum.mustache | 6 + .../partials/$serialize_map_value.mustache | 35 +++ .../src/partials/$serialize_object.mustache | 10 + .../wrap-rust/src/templates/entry_rs.rs | 53 ++++ .../src/templates/enum-type/mod-rs.mustache | 55 ++++ .../src/templates/env-type/mod-rs.mustache | 54 ++++ .../env-type/serialization-rs.mustache | 169 +++++++++++ .../imported/enum-type/mod-rs.mustache | 55 ++++ .../imported/env-type/mod-rs.mustache | 59 ++++ .../env-type/serialization-rs.mustache | 169 +++++++++++ .../src/templates/imported/mod-rs.mustache | 16 ++ .../imported/module-type/mod-rs.mustache | 85 ++++++ .../module-type/serialization-rs.mustache | 268 +++++++++++++++++ .../imported/object-type/mod-rs.mustache | 59 ++++ .../object-type/serialization-rs.mustache | 169 +++++++++++ .../templates/interface-type/mod-rs.mustache | 23 ++ .../wrap-rust/src/templates/mod.rs | 38 +++ .../wrap-rust/src/templates/mod_rs.rs | 74 +++++ .../src/templates/module-type/mod-rs.mustache | 21 ++ .../templates/module-type/module-rs.mustache | 37 +++ .../module-type/serialization-rs.mustache | 269 ++++++++++++++++++ .../templates/module-type/wrapped-rs.mustache | 71 +++++ .../src/templates/object-type/mod-rs.mustache | 55 ++++ .../src/templates/object-type/mod_rs.rs | 70 +++++ .../object-type/serialization-rs.mustache | 169 +++++++++++ 34 files changed, 2257 insertions(+) create mode 100644 implementations/wrap-rust/src/partials/$deserialize_array.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_array_nobox.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_enum.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_map_value.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_map_value_nobox.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_object.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_object_nobox.mustache create mode 100644 implementations/wrap-rust/src/partials/$deserialize_object_refmut.mustache create mode 100644 implementations/wrap-rust/src/partials/$serialize_array.mustache create mode 100644 implementations/wrap-rust/src/partials/$serialize_enum.mustache create mode 100644 implementations/wrap-rust/src/partials/$serialize_map_value.mustache create mode 100644 implementations/wrap-rust/src/partials/$serialize_object.mustache create mode 100644 implementations/wrap-rust/src/templates/entry_rs.rs create mode 100644 implementations/wrap-rust/src/templates/enum-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/env-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/env-type/serialization-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/enum-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/env-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/env-type/serialization-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/module-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/module-type/serialization-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/object-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/imported/object-type/serialization-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/interface-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/mod.rs create mode 100644 implementations/wrap-rust/src/templates/mod_rs.rs create mode 100644 implementations/wrap-rust/src/templates/module-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/module-type/module-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/module-type/serialization-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/module-type/wrapped-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/object-type/mod-rs.mustache create mode 100644 implementations/wrap-rust/src/templates/object-type/mod_rs.rs create mode 100644 implementations/wrap-rust/src/templates/object-type/serialization-rs.mustache diff --git a/implementations/wrap-rust/src/partials/$deserialize_array.mustache b/implementations/wrap-rust/src/partials/$deserialize_array.mustache new file mode 100644 index 00000000..677e8785 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_array.mustache @@ -0,0 +1,23 @@ +{{#scalar}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}() +{{/scalar}} +{{#array}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array}} +}) +{{/array}} +{{#map}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() +}, |reader| { + {{> deserialize_map_value}} +}) +{{/map}} +{{#enum}} +{{> deserialize_enum}} +Ok(value) +{{/enum}} +{{#object}} +{{> deserialize_object}} +Ok(object) +{{/object}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$deserialize_array_nobox.mustache b/implementations/wrap-rust/src/partials/$deserialize_array_nobox.mustache new file mode 100644 index 00000000..3ff7fb4f --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_array_nobox.mustache @@ -0,0 +1,23 @@ +{{#scalar}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}() +{{/scalar}} +{{#array}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} +}) +{{/array}} +{{#map}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() +}, |reader| { + {{> deserialize_map_value_nobox}} +}) +{{/map}} +{{#enum}} +{{> deserialize_enum}} +Ok(value) +{{/enum}} +{{#object}} +{{> deserialize_object_nobox}} +Ok(object) +{{/object}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$deserialize_enum.mustache b/implementations/wrap-rust/src/partials/$deserialize_enum.mustache new file mode 100644 index 00000000..1371fe10 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_enum.mustache @@ -0,0 +1,22 @@ +{{#required}} +let mut value: {{detect_keyword (to_upper type)}} = {{detect_keyword (to_upper type)}}::_MAX_; +if reader.is_next_string()? { + value = get_{{to_lower type}}_value(&reader.read_string()?)?; +} else { + value = {{detect_keyword (to_upper type)}}::try_from(reader.read_i32()?)?; + sanitize_{{to_lower type}}_value(value as i32)?; +} +{{/required}} +{{^required}} +let mut value: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; +if !reader.is_next_nil()? { + if reader.is_next_string()? { + value = Some(get_{{to_lower type}}_value(&reader.read_string()?)?); + } else { + value = Some({{detect_keyword (to_upper type)}}::try_from(reader.read_i32()?)?); + sanitize_{{to_lower type}}_value(value.unwrap() as i32)?; + } +} else { + value = None; +} +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$deserialize_map_value.mustache b/implementations/wrap-rust/src/partials/$deserialize_map_value.mustache new file mode 100644 index 00000000..85fa4c84 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_map_value.mustache @@ -0,0 +1,23 @@ +{{#scalar}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}() +{{/scalar}} +{{#array}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array}} +}) +{{/array}} +{{#map}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() +}, |reader| { + {{> deserialize_map_value}} +}) +{{/map}} +{{#enum}} +{{> deserialize_enum}} +Ok(value) +{{/enum}} +{{#object}} +{{> deserialize_object}} +Ok(object) +{{/object}} diff --git a/implementations/wrap-rust/src/partials/$deserialize_map_value_nobox.mustache b/implementations/wrap-rust/src/partials/$deserialize_map_value_nobox.mustache new file mode 100644 index 00000000..6147316f --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_map_value_nobox.mustache @@ -0,0 +1,23 @@ +{{#scalar}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}() +{{/scalar}} +{{#array}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} +}) +{{/array}} +{{#map}} +reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() +}, |reader| { + {{> deserialize_map_value_nobox}} +}) +{{/map}} +{{#enum}} +{{> deserialize_enum}} +Ok(value) +{{/enum}} +{{#object}} +{{> deserialize_object_nobox}} +Ok(object) +{{/object}} diff --git a/implementations/wrap-rust/src/partials/$deserialize_object.mustache b/implementations/wrap-rust/src/partials/$deserialize_object.mustache new file mode 100644 index 00000000..2fc5e619 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_object.mustache @@ -0,0 +1,11 @@ +{{#required}} +let object = Box::new({{detect_keyword (to_upper type)}}::read(reader)?); +{{/required}} +{{^required}} +let mut object: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; +if !reader.is_next_nil()? { + object = Some(Box::new({{detect_keyword (to_upper type)}}::read(reader)?)); +} else { + object = None; +} +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$deserialize_object_nobox.mustache b/implementations/wrap-rust/src/partials/$deserialize_object_nobox.mustache new file mode 100644 index 00000000..332c75d7 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_object_nobox.mustache @@ -0,0 +1,11 @@ +{{#required}} +let object = {{detect_keyword (to_upper type)}}::read(reader)?; +{{/required}} +{{^required}} +let mut object: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; +if !reader.is_next_nil()? { + object = Some({{detect_keyword (to_upper type)}}::read(reader)?); +} else { + object = None; +} +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$deserialize_object_refmut.mustache b/implementations/wrap-rust/src/partials/$deserialize_object_refmut.mustache new file mode 100644 index 00000000..9ddb420e --- /dev/null +++ b/implementations/wrap-rust/src/partials/$deserialize_object_refmut.mustache @@ -0,0 +1,11 @@ +{{#required}} +let object = {{detect_keyword (to_upper type)}}::read(&mut reader)?; +{{/required}} +{{^required}} +let mut object: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; +if !reader.is_next_nil()? { + object = Some({{detect_keyword (to_upper type)}}::read(&mut reader)?); +} else { + object = None; +} +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$serialize_array.mustache b/implementations/wrap-rust/src/partials/$serialize_array.mustache new file mode 100644 index 00000000..793cd623 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$serialize_array.mustache @@ -0,0 +1,21 @@ +{{#scalar}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(item) +{{/scalar}} +{{#array}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(item, |writer, item| { + {{> serialize_array}} +}) +{{/array}} +{{#map}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(item, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) +}, |writer, value| { + {{> serialize_map_value}} +}) +{{/map}} +{{#enum}} +{{> serialize_enum}} +{{/enum}} +{{#object}} +{{> serialize_object}} +{{/object}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$serialize_enum.mustache b/implementations/wrap-rust/src/partials/$serialize_enum.mustache new file mode 100644 index 00000000..5ada8b40 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$serialize_enum.mustache @@ -0,0 +1,6 @@ +{{#required}} +writer.write_i32(&(*item as i32)) +{{/required}} +{{^required}} +writer.write_optional_i32(&item.map(|f| f as i32)) +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/partials/$serialize_map_value.mustache b/implementations/wrap-rust/src/partials/$serialize_map_value.mustache new file mode 100644 index 00000000..592bd624 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$serialize_map_value.mustache @@ -0,0 +1,35 @@ +{{#scalar}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(value) +{{/scalar}} +{{#array}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(value, |writer, item| { + {{> serialize_array}} +}) +{{/array}} +{{#map}} +writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(value, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) +}, |writer, value| { + {{> serialize_map_value}} +}) +{{/map}} +{{#enum}} +{{#required}} +writer.write_i32(&(*value as i32)) +{{/required}} +{{^required}} +writer.write_optional_i32(&value.map(|f| f as i32)) +{{/required}} +{{/enum}} +{{#object}} +{{#required}} +{{detect_keyword (to_upper type)}}::write(value, writer) +{{/required}} +{{^required}} +if value.is_some() { + {{detect_keyword (to_upper type)}}::write(value.as_ref().as_ref().unwrap(), writer) +} else { + writer.write_nil() +} +{{/required}} +{{/object}} diff --git a/implementations/wrap-rust/src/partials/$serialize_object.mustache b/implementations/wrap-rust/src/partials/$serialize_object.mustache new file mode 100644 index 00000000..2c1d1ff1 --- /dev/null +++ b/implementations/wrap-rust/src/partials/$serialize_object.mustache @@ -0,0 +1,10 @@ +{{#required}} +{{detect_keyword (to_upper type)}}::write(item, writer) +{{/required}} +{{^required}} +if item.is_some() { + {{detect_keyword (to_upper type)}}::write(item.as_ref().as_ref().unwrap(), writer) +} else { + writer.write_nil() +} +{{/required}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/templates/entry_rs.rs b/implementations/wrap-rust/src/templates/entry_rs.rs new file mode 100644 index 00000000..7d7bb895 --- /dev/null +++ b/implementations/wrap-rust/src/templates/entry_rs.rs @@ -0,0 +1,53 @@ +lazy_static! { + static ref NAME: String = "entry.rs".to_string(); + static ref SOURCE: String = r#"{{#with moduleType}} +{{#if (array_has_length methods)}} +use crate::{ + {{#each methods}} + {{to_lower name}}_wrapped{{#if (is_not_last @index ../methods)}},{{/if}} + {{/each}} +}; +{{/if}} +{{/with}} +use polywrap_wasm_rs::{ + abort, + invoke, + InvokeArgs, +}; +use crate::module::Module; + +#[no_mangle] +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32, env_size: u32) -> bool { + // Ensure the abort handler is properly setup + abort::wrap_abort_setup(); + + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); + let result: Vec; + + match args.method.as_str() { + {{#with moduleType}} + {{#each methods}} + "{{name}}" => { + result = {{to_lower name}}_wrapped(args.args.as_slice(), env_size); + } + {{/each}} + {{/with}} + _ => { + invoke::wrap_invoke_error(format!("Could not find invoke function {}", args.method)); + return false; + } + }; + invoke::wrap_invoke_result(result); + return true; +} +"#.to_string(); +} + +use super::Template; + +pub fn load() -> Template { + Template { + name: &*NAME, + source: &*SOURCE + } +} diff --git a/implementations/wrap-rust/src/templates/enum-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/enum-type/mod-rs.mustache new file mode 100644 index 00000000..c41f71a3 --- /dev/null +++ b/implementations/wrap-rust/src/templates/enum-type/mod-rs.mustache @@ -0,0 +1,55 @@ +use polywrap_wasm_rs::{EnumTypeError}; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum {{detect_keyword (to_upper type)}} { + {{#constants}} + {{#serdeKeyword}}{{to_lower name}}{{/serdeKeyword}}{{#detectKeyword}}{{.}}{{/detectKeyword}}, + {{/constants}} + _MAX_ +} + +pub fn sanitize_{{to_lower type}}_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= {{detect_keyword (to_upper type)}}::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_{{to_lower type}}_value(key: &str) -> Result<{{detect_keyword (to_upper type)}}, EnumTypeError> { + match key { + {{#constants}} + "{{#detectKeyword}}{{.}}{{/detectKeyword}}" => Ok({{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}}), + {{/constants}} + "_MAX_" => Ok({{detect_keyword (to_upper type)}}::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum '{{detect_keyword (to_upper type)}}': {}", err))) + } +} + +pub fn get_{{to_lower type}}_key(value: {{detect_keyword (to_upper type)}}) -> Result { + if sanitize_{{to_lower type}}_value(value as i32).is_ok() { + match value { + {{#constants}} + {{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}} => Ok("{{#detectKeyword}}{{.}}{{/detectKeyword}}".to_string()), + {{/constants}} + {{detect_keyword (to_upper type)}}::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for {{detect_keyword (to_upper type)}} { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result<{{detect_keyword (to_upper type)}}, Self::Error> { + match v { + {{#constants}} + x if x == {{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}} as i32 => Ok({{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}}), + {{/constants}} + x if x == {{detect_keyword (to_upper type)}}::_MAX_ as i32 => Ok({{detect_keyword (to_upper type)}}::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/templates/env-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/env-type/mod-rs.mustache new file mode 100644 index 00000000..24debf42 --- /dev/null +++ b/implementations/wrap-rust/src/templates/env-type/mod-rs.mustache @@ -0,0 +1,54 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_{{to_lower type}}, + read_{{to_lower type}}, + serialize_{{to_lower type}}, + write_{{to_lower type}} +}; +{{#propertyDeps}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/propertyDeps}} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct {{detect_keyword (to_upper type)}} { + {{#properties}} + {{#serdeKeyword}}{{to_lower name}}{{/serdeKeyword}}pub {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}}, + {{/properties}} +} + +impl {{detect_keyword (to_upper type)}} { + pub fn new() -> {{detect_keyword (to_upper type)}} { + {{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}, + {{/properties}} + } + } + + pub fn to_buffer(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + serialize_{{to_lower type}}(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + deserialize_{{to_lower type}}(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + write_{{to_lower type}}(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + read_{{to_lower type}}(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/templates/env-type/serialization-rs.mustache b/implementations/wrap-rust/src/templates/env-type/serialization-rs.mustache new file mode 100644 index 00000000..55541a44 --- /dev/null +++ b/implementations/wrap-rust/src/templates/env-type/serialization-rs.mustache @@ -0,0 +1,169 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::{{detect_keyword (to_upper type)}}; +{{#propertyDeps.length}} + +{{/propertyDeps.length}}{{#propertyDeps}} +{{^isEnum}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/isEnum}} +{{#isEnum}} +use crate::{ + {{detect_keyword (to_upper type)}}, + get_{{to_lower type}}_value, + sanitize_{{to_lower type}}_value +}; +{{/isEnum}} +{{/propertyDeps}} + +pub fn serialize_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) env-type: {{detect_keyword (to_upper type)}}".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_{{to_lower type}}(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} + writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} + {{#properties}} + writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); + writer.write_string("{{name}}")?; + {{#scalar}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}})?; + {{/scalar}} + {{#array}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, item| { + {{> serialize_array}} + })?; + {{/array}} + {{#map}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) + }, |writer, value| { + {{> serialize_map_value}} + })?; + {{/map}} + {{#object}} + {{#required}} + {{detect_keyword (to_upper type)}}::write(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, writer)?; + {{/required}} + {{^required}} + if args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.is_some() { + {{detect_keyword (to_upper type)}}::write(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + {{/required}} + {{/object}} + {{#enum}} + {{#required}} + writer.write_i32(&(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}} as i32))?; + {{/required}} + {{^required}} + writer.write_optional_i32(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.map(|f| f as i32))?; + {{/required}} + {{/enum}} + writer.context().pop(); + {{/properties}} + Ok(()) +} + +pub fn deserialize_{{to_lower type}}(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing env-type: {{detect_keyword (to_upper type)}}".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_{{to_lower type}}(&mut reader) +} + +pub fn read_{{to_lower type}}(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut num_of_fields = reader.read_map_length()?; + + {{#properties}} + {{^object}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/object}} + {{#object}} + {{#required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/required}} + {{^required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; + {{/required}} + {{/object}} + {{#required}} + let mut _{{to_lower name}}_set = false; + {{/required}} + {{/properties}} + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + {{#properties}} + "{{name}}" => { + reader.context().push(&field, "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "type found, reading property"); + {{#scalar}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}()?; + {{/scalar}} + {{#array}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} + })?; + {{/array}} + {{#map}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}()? + }, |reader| { + {{> deserialize_map_value_nobox}} + })?; + {{/map}} + {{#enum}} + {{> deserialize_enum}} + _{{to_lower name}} = value; + {{/enum}} + {{#object}} + {{> deserialize_object_nobox}} + _{{to_lower name}} = object; + {{/object}} + {{#required}} + _{{to_lower name}}_set = true; + {{/required}} + reader.context().pop(); + } + {{/properties}} + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + {{#properties}} + {{#required}} + if !_{{to_lower name}}_set { + return Err(DecodeError::MissingField("{{name}}: {{type}}.".to_string())); + } + {{/required}} + {{/properties}} + + Ok({{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: _{{to_lower name}}, + {{/properties}} + }) +} diff --git a/implementations/wrap-rust/src/templates/imported/enum-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/imported/enum-type/mod-rs.mustache new file mode 100644 index 00000000..acfadb50 --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/enum-type/mod-rs.mustache @@ -0,0 +1,55 @@ +use polywrap_wasm_rs::EnumTypeError; +use serde::{Serialize, Deserialize}; +use std::convert::TryFrom; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize)] +pub enum {{detect_keyword (to_upper type)}} { + {{#constants}} + {{#serdeKeyword}}{{to_lower name}}{{/serdeKeyword}}{{#detectKeyword}}{{.}}{{/detectKeyword}}, + {{/constants}} + _MAX_ +} + +pub fn sanitize_{{to_lower type}}_value(value: i32) -> Result<(), EnumTypeError> { + if value < 0 && value >= {{detect_keyword (to_upper type)}}::_MAX_ as i32 { + return Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", value.to_string()))); + } + Ok(()) +} + +pub fn get_{{to_lower type}}_value(key: &str) -> Result<{{detect_keyword (to_upper type)}}, EnumTypeError> { + match key { + {{#constants}} + "{{#detectKeyword}}{{.}}{{/detectKeyword}}" => Ok({{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}}), + {{/constants}} + "_MAX_" => Ok({{detect_keyword (to_upper type)}}::_MAX_), + err => Err(EnumTypeError::EnumProcessingError(format!("Invalid key for enum '{{detect_keyword (to_upper type)}}': {}", err))) + } +} + +pub fn get_{{to_lower type}}_key(value: {{detect_keyword (to_upper type)}}) -> Result { + if sanitize_{{to_lower type}}_value(value as i32).is_ok() { + match value { + {{#constants}} + {{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}} => Ok("{{#detectKeyword}}{{.}}{{/detectKeyword}}".to_string()), + {{/constants}} + {{detect_keyword (to_upper type)}}::_MAX_ => Ok("_MAX_".to_string()), + } + } else { + Err(EnumTypeError::EnumProcessingError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", (value as i32).to_string()))) + } +} + +impl TryFrom for {{detect_keyword (to_upper type)}} { + type Error = EnumTypeError; + + fn try_from(v: i32) -> Result<{{detect_keyword (to_upper type)}}, Self::Error> { + match v { + {{#constants}} + x if x == {{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}} as i32 => Ok({{detect_keyword (to_upper type)}}::{{#detectKeyword}}{{.}}{{/detectKeyword}}), + {{/constants}} + x if x == {{detect_keyword (to_upper type)}}::_MAX_ as i32 => Ok({{detect_keyword (to_upper type)}}::_MAX_), + _ => Err(EnumTypeError::ParseEnumError(format!("Invalid value for enum '{{detect_keyword (to_upper type)}}': {}", (v as i32).to_string()))), + } + } +} diff --git a/implementations/wrap-rust/src/templates/imported/env-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/imported/env-type/mod-rs.mustache new file mode 100644 index 00000000..8f518fb7 --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/env-type/mod-rs.mustache @@ -0,0 +1,59 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_{{to_lower type}}, + read_{{to_lower type}}, + serialize_{{to_lower type}}, + write_{{to_lower type}} +}; +{{#propertyDeps.length}} + +{{#propertyDeps}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/propertyDeps}} +{{/propertyDeps.length}} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct {{detect_keyword (to_upper type)}} { + {{#properties}} + pub {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}}, + {{/properties}} +} + +impl {{detect_keyword (to_upper type)}} { + pub const URI: &'static str = "{{uri}}"; + + pub fn new() -> {{detect_keyword (to_upper type)}} { + {{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}, + {{/properties}} + } + } + + pub fn to_buffer(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + serialize_{{to_lower type}}(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + deserialize_{{to_lower type}}(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + write_{{to_lower type}}(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + read_{{to_lower type}}(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/templates/imported/env-type/serialization-rs.mustache b/implementations/wrap-rust/src/templates/imported/env-type/serialization-rs.mustache new file mode 100644 index 00000000..c103307c --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/env-type/serialization-rs.mustache @@ -0,0 +1,169 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::{{detect_keyword (to_upper type)}}; +{{#propertyDeps.length}} + +{{/propertyDeps.length}}{{#propertyDeps}} +{{^isEnum}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/isEnum}} +{{#isEnum}} +use crate::{ + {{detect_keyword (to_upper type)}}, + get_{{to_lower type}}_value, + sanitize_{{to_lower type}}_value +}; +{{/isEnum}} +{{/propertyDeps}} + +pub fn serialize_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported env-type: {{to_upper type}}".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_{{to_lower type}}(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} + writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} + {{#properties}} + writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); + writer.write_string("{{name}}")?; + {{#scalar}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}})?; + {{/scalar}} + {{#array}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, item| { + {{> serialize_array}} + })?; + {{/array}} + {{#map}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) + }, |writer, value| { + {{> serialize_map_value}} + })?; + {{/map}} + {{#object}} + {{#required}} + {{detect_keyword (to_upper type)}}::write(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, writer)?; + {{/required}} + {{^required}} + if args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.is_some() { + {{detect_keyword (to_upper type)}}::write(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + {{/required}} + {{/object}} + {{#enum}} + {{#required}} + writer.write_i32(&(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}} as i32))?; + {{/required}} + {{^required}} + writer.write_optional_i32(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.map(|f| f as i32))?; + {{/required}} + {{/enum}} + writer.context().pop(); + {{/properties}} + Ok(()) +} + +pub fn deserialize_{{to_lower type}}(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing imported env-type: {{to_upper type}}".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_{{to_lower type}}(&mut reader) +} + +pub fn read_{{to_lower type}}(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut num_of_fields = reader.read_map_length()?; + + {{#properties}} + {{^object}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/object}} + {{#object}} + {{#required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/required}} + {{^required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; + {{/required}} + {{/object}} + {{#required}} + let mut _{{to_lower name}}_set = false; + {{/required}} + {{/properties}} + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + {{#properties}} + "{{name}}" => { + reader.context().push(&field, "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "type found, reading property"); + {{#scalar}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}()?; + {{/scalar}} + {{#array}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} + })?; + {{/array}} + {{#map}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}()? + }, |reader| { + {{> deserialize_map_value_nobox}} + })?; + {{/map}} + {{#enum}} + {{> deserialize_enum}} + _{{to_lower name}} = value; + {{/enum}} + {{#object}} + {{> deserialize_object_nobox}} + _{{to_lower name}} = object; + {{/object}} + {{#required}} + _{{to_lower name}}_set = true; + {{/required}} + reader.context().pop(); + } + {{/properties}} + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + {{#properties}} + {{#required}} + if !_{{to_lower name}}_set { + return Err(DecodeError::MissingField("{{name}}: {{type}}.".to_string())); + } + {{/required}} + {{/properties}} + + Ok({{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: _{{to_lower name}}, + {{/properties}} + }) +} diff --git a/implementations/wrap-rust/src/templates/imported/mod-rs.mustache b/implementations/wrap-rust/src/templates/imported/mod-rs.mustache new file mode 100644 index 00000000..1d525e72 --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/mod-rs.mustache @@ -0,0 +1,16 @@ +{{#each importedObjectTypes}} +pub mod {{to_lower type}}; +pub use {{to_lower type}}::*; +{{/each}} +{{#each importedEnumTypes}} +pub mod {{to_lower type}}; +pub use {{to_lower type}}::*; +{{/each}} +{{#each importedModuleTypes}} +pub mod {{to_lower type}}; +pub use {{to_lower type}}::*; +{{/each}} +{{#each importedEnvTypes}} +pub mod {{to_lower type}}; +pub use {{to_lower type}}::*; +{{/each}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/templates/imported/module-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/imported/module-type/mod-rs.mustache new file mode 100644 index 00000000..02703b8a --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/module-type/mod-rs.mustache @@ -0,0 +1,85 @@ +use serde::{Serialize, Deserialize}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Read, + Write, + JSON, + subinvoke, +}; +pub mod serialization; +{{#methods.length}} +pub use serialization::{ + {{#each methods}} + deserialize_{{to_lower name}}_result, + serialize_{{to_lower name}}_args, + Args{{to_upper name}}{{#if (is_not_last @index ../methods)}},{{/if}} + {{/each}} +}; +{{/methods.length}} +{{#propertyDeps.length}} + +{{#propertyDeps}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/propertyDeps}} +{{/propertyDeps.length}} + +{{^isInterface}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct {{detect_keyword (to_upper type)}} {} + +impl {{detect_keyword (to_upper type)}} { + pub const URI: &'static str = "{{uri}}"; + + pub fn new() -> {{detect_keyword (to_upper type)}} { + {{detect_keyword (to_upper type)}} {} + } + + {{#each methods}} + pub fn {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}(args: &Args{{to_upper name}}) -> Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, String> { + let uri = {{#parent}}{{to_upper type}}{{/parent}}::URI; + let args = serialize_{{to_lower name}}_args(args).map_err(|e| e.to_string())?; + let result = subinvoke::wrap_subinvoke( + uri, + "{{name}}", + args, + )?; + deserialize_{{to_lower name}}_result(result.as_slice()).map_err(|e| e.to_string()) + } + {{^last}} + + {{/last}} + {{/each}} +} +{{/isInterface}} +{{#isInterface}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct {{detect_keyword (to_upper type)}} { + {{#isInterface}}uri: String{{/isInterface}} +} + +impl {{detect_keyword (to_upper type)}} { + pub const INTERFACE_URI: &'static str = "{{uri}}"; + + pub fn new(uri: String) -> {{detect_keyword (to_upper type)}} { + {{detect_keyword (to_upper type)}} { uri } + } + + {{#each methods}} + pub fn {{to_lower name}}(&self, args: &Args{{to_upper name}}) -> Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, String> { + let ref uri = self.uri; + let args = serialize_{{to_lower name}}_args(args).map_err(|e| e.to_string())?; + let result = subinvoke::wrap_subinvoke( + uri.as_str(), + "{{name}}", + args, + )?; + deserialize_{{to_lower name}}_result(result.as_slice()).map_err(|e| e.to_string()) + } + {{^last}} + + {{/last}} + {{/each}} +} +{{/isInterface}} \ No newline at end of file diff --git a/implementations/wrap-rust/src/templates/imported/module-type/serialization-rs.mustache b/implementations/wrap-rust/src/templates/imported/module-type/serialization-rs.mustache new file mode 100644 index 00000000..3e476a8b --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/module-type/serialization-rs.mustache @@ -0,0 +1,268 @@ +{{#methods.length}} +use serde::{Serialize, Deserialize}; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +{{#propertyDeps.length}} + +{{#propertyDeps}} +{{^isEnum}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/isEnum}} +{{#isEnum}} +use crate::{ + {{detect_keyword (to_upper type)}}, + get_{{to_lower type}}_value, + sanitize_{{to_lower type}}_value +}; +{{/isEnum}} +{{/propertyDeps}} +{{/propertyDeps.length}} + +{{#each methods}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Args{{to_upper name}} { + {{#arguments}} + {{#serdeKeyword}}{{to_lower name}}{{/serdeKeyword}}pub {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}}, + {{/arguments}} +} + +pub fn deserialize_{{to_lower name}}_args(args: &[u8]) -> Result { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: {{to_lower name}} Args".to_string(); + + {{#arguments.length}} + let mut reader = ReadDecoder::new(args, context); + let mut num_of_fields = reader.read_map_length()?; + + {{#arguments}} + {{^object}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/object}} + {{#object}} + {{#required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/required}} + {{^required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; + {{/required}} + {{/object}} + {{#required}} + let mut _{{to_lower name}}_set = false; + {{/required}} + {{/arguments}} + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + {{#arguments}} + "{{name}}" => { + reader.context().push(&field, "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "type found, reading argument"); + {{#scalar}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}()?; + {{/scalar}} + {{#array}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} + })?; + {{/array}} + {{#map}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() + }, |reader| { + {{> deserialize_map_value_nobox}} + })?; + {{/map}} + {{#enum}} + {{> deserialize_enum}} + _{{to_lower name}} = value; + {{/enum}} + {{#object}} + {{> deserialize_object_refmut}} + _{{to_lower name}} = object; + {{/object}} + {{#required}} + _{{to_lower name}}_set = true; + {{/required}} + reader.context().pop(); + } + {{/arguments}} + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + {{#arguments}} + {{#required}} + if !_{{to_lower name}}_set { + return Err(DecodeError::MissingField("{{name}}: {{type}}.".to_string())); + } + {{/required}} + {{/arguments}} + {{/arguments.length}} + + Ok(Args{{to_upper name}} { + {{#arguments}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: _{{to_lower name}}, + {{/arguments}} + }) +} + +pub fn serialize_{{to_lower name}}_args(args: &Args{{to_upper name}}) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: {{to_lower name}} Args".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_{{to_lower name}}_args(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_{{to_lower name}}_args(args: &Args{{to_upper name}}, writer: &mut W) -> Result<(), EncodeError> { + {{#arguments.length}} + writer.write_map_length(&{{arguments.length}})?; + {{/arguments.length}} + {{^arguments}} + writer.write_map_length(&0)?; + {{/arguments}} + {{#arguments}} + writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); + writer.write_string("{{name}}")?; + {{#scalar}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}})?; + {{/scalar}} + {{#array}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, item| { + {{> serialize_array}} + })?; + {{/array}} + {{#map}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) + }, |writer, value| { + {{> serialize_map_value}} + })?; + {{/map}} + {{#enum}} + {{#required}} + writer.write_i32(&(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}} as i32))?; + {{/required}} + {{^required}} + writer.write_optional_i32(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.map(|f| f as i32))?; + {{/required}} + {{/enum}} + {{#object}} + {{#required}} + {{detect_keyword (to_upper type)}}::write(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, writer)?; + {{/required}} + {{^required}} + if args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.is_some() { + {{detect_keyword (to_upper type)}}::write(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + {{/required}} + {{/object}} + writer.context().pop(); + {{/arguments}} + Ok(()) +} + +pub fn serialize_{{to_lower name}}_result(result: {{#return}}&{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported module-type: {{to_lower name}} Result".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_{{to_lower name}}_result(result, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_{{to_lower name}}_result(result: {{#return}}&{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, writer: &mut W) -> Result<(), EncodeError> { + {{#return}} + writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing result"); + {{#scalar}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(result)?; + {{/scalar}} + {{#array}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&result, |writer, item| { + {{> serialize_array}} + })?; + {{/array}} + {{#map}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&result, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) + }, |writer, value| { + {{> serialize_map_value}} + })?; + {{/map}} + {{#enum}} + {{#required}} + writer.write_i32(&(*result as i32))?; + {{/required}} + {{^required}} + writer.write_optional_i32(&result.map(|f| f as i32))?; + {{/required}} + {{/enum}} + {{#object}} + {{#required}} + {{detect_keyword (to_upper type)}}::write(&result, writer)?; + {{/required}} + {{^required}} + if result.is_some() { + {{detect_keyword (to_upper type)}}::write(result.as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + {{/required}} + {{/object}} + writer.context().pop(); + {{/return}} + Ok(()) +} + +pub fn deserialize_{{to_lower name}}_result(result: &[u8]) -> Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing imported module-type: {{to_lower name}} Result".to_string(); + let mut reader = ReadDecoder::new(result, context); + + {{#return}} + reader.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "reading function output"); + {{#scalar}} + let res = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}()?; + {{/scalar}} + {{#array}} + let res = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} + })?; + {{/array}} + {{#map}} + let res = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() + }, |reader| { + {{> deserialize_map_value_nobox}} + })?; + {{/map}} + {{#enum}} + {{> deserialize_enum}} + let res = value; + {{/enum}} + {{#object}} + {{> deserialize_object_refmut}} + let res = object; + {{/object}} + {{/return}} + reader.context().pop(); + Ok(res) +} +{{^last}} + +{{/last}} +{{/each}} +{{/methods.length}} diff --git a/implementations/wrap-rust/src/templates/imported/object-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/imported/object-type/mod-rs.mustache new file mode 100644 index 00000000..b2f3ec58 --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/object-type/mod-rs.mustache @@ -0,0 +1,59 @@ +use serde::{Serialize, Deserialize}; +pub mod serialization; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + DecodeError, + EncodeError, + Read, + Write, + JSON, +}; +pub use serialization::{ + deserialize_{{to_lower type}}, + read_{{to_lower type}}, + serialize_{{to_lower type}}, + write_{{to_lower type}} +}; +{{#propertyDeps.length}} + +{{#propertyDeps}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/propertyDeps}} +{{/propertyDeps.length}} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct {{detect_keyword (to_upper type)}} { + {{#properties}} + {{#serdeKeyword}}{{to_lower name}}{{/serdeKeyword}}pub {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}}, + {{/properties}} +} + +impl {{detect_keyword (to_upper type)}} { + pub const URI: &'static str = "{{uri}}"; + + pub fn new() -> {{detect_keyword (to_upper type)}} { + {{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}, + {{/properties}} + } + } + + pub fn to_buffer(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + serialize_{{to_lower type}}(args).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn from_buffer(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + deserialize_{{to_lower type}}(args).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } + + pub fn write(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + write_{{to_lower type}}(args, writer).map_err(|e| EncodeError::TypeWriteError(e.to_string())) + } + + pub fn read(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + read_{{to_lower type}}(reader).map_err(|e| DecodeError::TypeReadError(e.to_string())) + } +} diff --git a/implementations/wrap-rust/src/templates/imported/object-type/serialization-rs.mustache b/implementations/wrap-rust/src/templates/imported/object-type/serialization-rs.mustache new file mode 100644 index 00000000..203c9a2d --- /dev/null +++ b/implementations/wrap-rust/src/templates/imported/object-type/serialization-rs.mustache @@ -0,0 +1,169 @@ +use std::convert::TryFrom; +use polywrap_wasm_rs::{ + BigInt, + BigNumber, + Map, + Context, + DecodeError, + EncodeError, + Read, + ReadDecoder, + Write, + WriteEncoder, + JSON, +}; +use crate::{{detect_keyword (to_upper type)}}; +{{#propertyDeps.length}} + +{{/propertyDeps.length}}{{#propertyDeps}} +{{^isEnum}} +use {{crate}}::{{detect_keyword (to_upper type)}}; +{{/isEnum}} +{{#isEnum}} +use crate::{ + {{detect_keyword (to_upper type)}}, + get_{{to_lower type}}_value, + sanitize_{{to_lower type}}_value +}; +{{/isEnum}} +{{/propertyDeps}} + +pub fn serialize_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}) -> Result, EncodeError> { + let mut encoder_context = Context::new(); + encoder_context.description = "Serializing (encoding) imported object-type: {{to_upper type}}".to_string(); + let mut encoder = WriteEncoder::new(&[], encoder_context); + write_{{to_lower type}}(args, &mut encoder)?; + Ok(encoder.get_buffer()) +} + +pub fn write_{{to_lower type}}(args: &{{detect_keyword (to_upper type)}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} + writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} + {{#properties}} + writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); + writer.write_string("{{name}}")?; + {{#scalar}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}})?; + {{/scalar}} + {{#array}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, item| { + {{> serialize_array}} + })?; + {{/array}} + {{#map}} + writer.write_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, |writer, key| { + writer.write_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}(key) + }, |writer, value| { + {{> serialize_map_value}} + })?; + {{/map}} + {{#object}} + {{#required}} + {{detect_keyword (to_upper type)}}::write(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}, writer)?; + {{/required}} + {{^required}} + if args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.is_some() { + {{detect_keyword (to_upper type)}}::write(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.as_ref().as_ref().unwrap(), writer)?; + } else { + writer.write_nil()?; + } + {{/required}} + {{/object}} + {{#enum}} + {{#required}} + writer.write_i32(&(args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}} as i32))?; + {{/required}} + {{^required}} + writer.write_optional_i32(&args.{{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}.map(|f| f as i32))?; + {{/required}} + {{/enum}} + writer.context().pop(); + {{/properties}} + Ok(()) +} + +pub fn deserialize_{{to_lower type}}(args: &[u8]) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut context = Context::new(); + context.description = "Deserializing imported object-type: {{to_upper type}}".to_string(); + let mut reader = ReadDecoder::new(args, context); + read_{{to_lower type}}(&mut reader) +} + +pub fn read_{{to_lower type}}(reader: &mut R) -> Result<{{detect_keyword (to_upper type)}}, DecodeError> { + let mut num_of_fields = reader.read_map_length()?; + + {{#properties}} + {{^object}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/object}} + {{#object}} + {{#required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = {{#toWasmInit}}{{toGraphQLType}}{{/toWasmInit}}; + {{/required}} + {{^required}} + let mut _{{to_lower name}}: {{#toWasm}}{{toGraphQLType}}{{/toWasm}} = None; + {{/required}} + {{/object}} + {{#required}} + let mut _{{to_lower name}}_set = false; + {{/required}} + {{/properties}} + + while num_of_fields > 0 { + num_of_fields -= 1; + let field = reader.read_string()?; + + match field.as_str() { + {{#properties}} + "{{name}}" => { + reader.context().push(&field, "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "type found, reading property"); + {{#scalar}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}()?; + {{/scalar}} + {{#array}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + {{> deserialize_array_nobox}} + })?; + {{/array}} + {{#map}} + _{{to_lower name}} = reader.read_{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}(|reader| { + reader.read_{{#key}}{{#toLower}}{{#toMsgPack}}{{toGraphQLType}}{{/toMsgPack}}{{/toLower}}{{/key}}() + }, |reader| { + {{> deserialize_map_value_nobox}} + })?; + {{/map}} + {{#enum}} + {{> deserialize_enum}} + _{{to_lower name}} = value; + {{/enum}} + {{#object}} + {{> deserialize_object_nobox}} + _{{to_lower name}} = object; + {{/object}} + {{#required}} + _{{to_lower name}}_set = true; + {{/required}} + reader.context().pop(); + } + {{/properties}} + err => return Err(DecodeError::UnknownFieldName(err.to_string())), + } + } + {{#properties}} + {{#required}} + if !_{{to_lower name}}_set { + return Err(DecodeError::MissingField("{{name}}: {{type}}.".to_string())); + } + {{/required}} + {{/properties}} + + Ok({{detect_keyword (to_upper type)}} { + {{#properties}} + {{#detectKeyword}}{{to_lower name}}{{/detectKeyword}}: _{{to_lower name}}, + {{/properties}} + }) +} diff --git a/implementations/wrap-rust/src/templates/interface-type/mod-rs.mustache b/implementations/wrap-rust/src/templates/interface-type/mod-rs.mustache new file mode 100644 index 00000000..780b0abd --- /dev/null +++ b/implementations/wrap-rust/src/templates/interface-type/mod-rs.mustache @@ -0,0 +1,23 @@ +{{#capabilities}} +{{#getImplementations}} +{{#enabled}} +use polywrap_wasm_rs::wrap_get_implementations; +{{/enabled}} +{{/getImplementations}} +{{/capabilities}} + +pub struct {{detect_keyword (to_upper namespace)}} {} + +impl {{detect_keyword (to_upper namespace)}} { + const uri: &'static str = "{{uri}}"; + + {{#capabilities}} + {{#getImplementations}} + {{#enabled}} + pub fn get_implementations() -> Vec { + wrap_get_implementations(Self::uri) + } + {{/enabled}} + {{/getImplementations}} + {{/capabilities}} +} \ No newline at end of file diff --git a/implementations/wrap-rust/src/templates/mod.rs b/implementations/wrap-rust/src/templates/mod.rs new file mode 100644 index 00000000..012fe10a --- /dev/null +++ b/implementations/wrap-rust/src/templates/mod.rs @@ -0,0 +1,38 @@ +mod entry_rs; +mod mod_rs; +mod enum_type; +mod env_type; +mod interface_type; +mod module_type; +mod object_type; +mod imported; + +pub struct Template { + pub name: &'static str, + pub source: &'static str, +} + +pub fn load_templates() -> Vec