diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f79bcad..7b9d807f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added ### Removed ### Changed +### Fixed + +## 2024-04-09: v0.16.0-dev.2 +### Changed - Upgrade to latest JS client. - Set allowed origins for admin websockets in Tryorama conductors and when attaching app websockets. - Pass origin when connecting admin and app websockets. -### Fixed ## 2024-02-28: v0.16.0-dev.1 ### Changed diff --git a/Cargo.lock b/Cargo.lock index e87c5655..8a09bebb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -149,9 +149,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" @@ -182,15 +182,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -223,8 +214,8 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -274,9 +265,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" [[package]] name = "cfg-if" @@ -298,15 +289,15 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -317,7 +308,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags 1.2.1", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap", "unicode-width", @@ -538,8 +529,8 @@ checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "strsim 0.10.0", "syn 1.0.109", ] @@ -552,9 +543,9 @@ checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -564,7 +555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core 0.14.4", - "quote 1.0.35", + "quote 1.0.36", "syn 1.0.109", ] @@ -575,8 +566,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", - "quote 1.0.35", - "syn 2.0.58", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -592,14 +583,20 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + [[package]] name = "derivative" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -610,28 +607,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "rustc_version", "syn 1.0.109", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", ] @@ -649,15 +637,15 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if 1.0.0", ] @@ -677,8 +665,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -698,9 +686,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ "darling 0.20.8", - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -790,9 +778,9 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -895,7 +883,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap 2.2.6", "slab", "tokio", @@ -920,9 +908,9 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hdi" -version = "0.4.0-beta-dev.33" +version = "0.4.0-beta-dev.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8004daeef35f31fbcdab99788d9329675830be1801f49824c5ded2c0b10bf34" +checksum = "efe35d8a7150f89f54d6a2c61320bfaf70af9d5d0dd5726b2ce68e802fcab2e4" dependencies = [ "getrandom", "hdk_derive", @@ -938,9 +926,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.3.0-beta-dev.37" +version = "0.3.0-beta-dev.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c4738bce1eff73c94ff739623f5bc81a8602266dceb5bb9be30435e41334b" +checksum = "700ef8595eac45e31a61b1f1af054c247156fddc52dd31ba3902acd8d17c5db3" dependencies = [ "getrandom", "hdi", @@ -958,17 +946,17 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.3.0-beta-dev.31" +version = "0.3.0-beta-dev.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d64043a1d8d40b709cc1a553fe61d2ddd863f30a946e689f4329635281b93771" +checksum = "7a5e5079e25d0a796ec6c36e413f8e478fe30d3379a1f6007589cc95a098d0c0" dependencies = [ "darling 0.14.4", "heck 0.4.1", "holochain_integrity_types", "paste", "proc-macro-error", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -1028,9 +1016,9 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.3.0-beta-dev.30" +version = "0.3.0-beta-dev.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33a5018e18ea42bfba68f1eb7b0596a18c7d02c1a6d13cd7b5c713c8fbfb4fe" +checksum = "e611469e28b0c5491c54ab090be43c427558759cc28d0936e285d3ef2b35497d" dependencies = [ "holo_hash", "holochain_secure_primitive", @@ -1087,7 +1075,7 @@ version = "0.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3e0cf02005cbf0f514476d40e02125b26df6d4922d7a2c48a84fc588539d71" dependencies = [ - "quote 1.0.35", + "quote 1.0.36", "syn 1.0.109", ] @@ -1136,9 +1124,9 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.3.0-beta-dev.32" +version = "0.3.0-beta-dev.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb3cb97f3dc2a5d406a933ee228ddd18140906a720c3303af9d229d312f81ad" +checksum = "2cb29f72bb7216e5258f8965fcf13d169aad8676a82e09e770ebe51ee32cb6ef" dependencies = [ "derive_more", "holo_hash", @@ -1178,6 +1166,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1185,7 +1184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -1212,7 +1211,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -1232,7 +1231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", "rustls", "tokio", @@ -1304,15 +1303,6 @@ dependencies = [ "hashbrown 0.14.3", ] -[[package]] -name = "input_buffer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" -dependencies = [ - "bytes", -] - [[package]] name = "integrity" version = "0.1.0" @@ -1588,12 +1578,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.1.5" @@ -1646,26 +1630,6 @@ dependencies = [ "ucd-trie", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -1691,8 +1655,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", "version_check", ] @@ -1703,8 +1667,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "version_check", ] @@ -1719,9 +1683,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" dependencies = [ "unicode-ident", ] @@ -1741,8 +1705,8 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -1757,11 +1721,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 1.0.79", + "proc-macro2 1.0.80", ] [[package]] @@ -1826,7 +1790,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", ] [[package]] @@ -1876,7 +1840,7 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6b6ebd13bc009aef9cd476c1310d49ac354d36e240cf1bd753290f3dc7199a7" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "libc", "mach2", "windows-sys 0.52.0", @@ -1903,7 +1867,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -1972,16 +1936,16 @@ version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] [[package]] name = "rmp" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" +checksum = "bddb316f4b9cae1a3e89c02f1926d557d1142d0d2e684b038c11c1b77705229a" dependencies = [ "byteorder", "num-traits", @@ -2111,11 +2075,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.3.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2209,16 +2173,16 @@ version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "indexmap 2.2.6", "itoa", @@ -2240,26 +2204,24 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.8" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] -name = "sha-1" -version = "0.10.1" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -2278,10 +2240,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e63e6744142336dfb606fe2b068afa2e1cca1ee6a5d8377277a92945d81fa331" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "itertools", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -2337,8 +2299,8 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -2405,8 +2367,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "rustversion", "syn 1.0.109", ] @@ -2444,19 +2406,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.58" +version = "2.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "unicode-ident", ] @@ -2472,7 +2434,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -2518,8 +2480,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58071dc2471840e9f374eeb0f6e405a31bccb3cc5d59bb4598f02cafc274b5c4" dependencies = [ "cargo_metadata", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "serde", "strum_macros", ] @@ -2533,8 +2495,8 @@ dependencies = [ "darling 0.14.4", "if_chain", "lazy_static", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "subprocess", "syn 1.0.109", "test-fuzz-internal", @@ -2552,7 +2514,7 @@ dependencies = [ "hex", "num-traits", "serde", - "sha-1 0.10.1", + "sha-1", "test-fuzz-internal", ] @@ -2580,9 +2542,9 @@ version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -2624,9 +2586,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -2641,13 +2603,12 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.14.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e96bb520beab540ab664bd5a9cfeaa1fcd846fa68c830b42e2c8963071251d2" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", - "pin-project", "tokio", "tungstenite", ] @@ -2702,9 +2663,9 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", ] [[package]] @@ -2751,19 +2712,18 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.13.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8dada8c1a3aeca77d6b51a4f1314e0f4b8e438b7b1b71e3ddaca8080e4093" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", - "http", + "data-encoding", + "http 1.1.0", "httparse", - "input_buffer", "log", "rand", - "sha-1 0.9.8", + "sha1", "thiserror", "url", "utf-8", @@ -2832,8 +2792,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e7e85a0596447f0f2ac090e16bc4c516c6fe91771fb0c0ccf7fa3dae896b9c" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -2922,9 +2882,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", "wasm-bindgen-shared", ] @@ -2946,7 +2906,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ - "quote 1.0.35", + "quote 1.0.36", "wasm-bindgen-macro-support", ] @@ -2956,9 +2916,9 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.35", - "syn 2.0.58", + "proc-macro2 1.0.80", + "quote 1.0.36", + "syn 2.0.59", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3059,8 +3019,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c782d80401edb08e1eba206733f7859db6c997fc5a7f5fb44edc3ecd801468f6" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.79", - "quote 1.0.35", + "proc-macro2 1.0.80", + "quote 1.0.36", "syn 1.0.109", ] @@ -3186,7 +3146,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3217,7 +3177,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3237,17 +3197,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3258,9 +3219,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3276,9 +3237,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3294,9 +3255,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3312,9 +3279,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3330,9 +3297,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3342,9 +3309,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -3360,9 +3327,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winreg" diff --git a/crates/trycp_server/Cargo.toml b/crates/trycp_server/Cargo.toml index d98bb570..5ce11925 100644 --- a/crates/trycp_server/Cargo.toml +++ b/crates/trycp_server/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["holochain", "holo", "p2p", "network", "simulation"] homepage = "https://github.com/holochain/tryorama" documentation = "https://github.com/holochain/tryorma/crates/trycp_server" repository = "https://github.com/holochain/tryorma" -authors = [ "Holochain Core Dev Team " ] +authors = ["Holochain Core Dev Team "] edition = "2021" [dependencies] @@ -15,13 +15,22 @@ futures = "0.3" nix = { version = "0.28", features = ["signal"] } once_cell = "1.5.0" parking_lot = "0.12" -reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls-tls-native-roots"] } +reqwest = { version = "0.11", default-features = false, features = [ + "blocking", + "json", + "rustls-tls-native-roots", +] } rmp-serde = "=0.15.5" serde = { version = "1.0.181", features = ["derive"] } serde_bytes = "0.11" slab = "0.4" snafu = "0.6" structopt = "0.2" -tokio = { version = "1.24", features = ["macros", "rt-multi-thread", "process", "fs"]} -tokio-tungstenite = "0.14" +tokio = { version = "1.24", features = [ + "macros", + "rt-multi-thread", + "process", + "fs", +] } +tokio-tungstenite = "0.21" url = "2" diff --git a/crates/trycp_server/src/admin_call.rs b/crates/trycp_server/src/admin_call.rs index 965cc8a9..e950eff1 100644 --- a/crates/trycp_server/src/admin_call.rs +++ b/crates/trycp_server/src/admin_call.rs @@ -4,7 +4,7 @@ use snafu::{OptionExt, ResultExt, Snafu}; use tokio::time::error::Elapsed; use tokio_tungstenite::tungstenite::{ self, - handshake::client::Request, + client::IntoClientRequest, protocol::{frame::coding::CloseCode, CloseFrame, WebSocketConfig}, Message, }; @@ -30,17 +30,18 @@ pub(crate) async fn admin_call(id: String, message: Vec) -> Result, .map(|player| player.admin_port) .context(PlayerNotConfigured { id })?; - let addr = format!("127.0.0.1:{port}"); + let addr = format!("localhost:{port}"); let stream = tokio::net::TcpStream::connect(addr.clone()) .await .context(TcpConnect)?; let uri = format!("ws://{}", addr); - let request = Request::builder() - .uri(uri.clone()) - // needed for admin websocket connection to be accepted - .header("origin", "trycp-admin") - .body(()) - .expect("request to be valid"); + let mut request = uri.clone().into_client_request().expect("not a valid URI"); + // needed for admin websocket connection to be accepted + request.headers_mut().insert( + "origin", + "trycp-admin".parse().expect("invalid origin header value"), + ); + request.body(); println!("Establishing admin interface with {:?}", uri); @@ -114,21 +115,26 @@ async fn call( .context(NoResponse)? .context(ReceiveResponse)?; match ws_message { - Message::Close(_) => { - return Err(CallError::NoResponse) - } + Message::Close(_) => return Err(CallError::NoResponse), Message::Binary(ws_data) => { return Ok(ws_data); } Message::Ping(p) => { - ws_stream.send(Message::Pong(p)).await.context(SendRequest)?; + ws_stream + .send(Message::Pong(p)) + .await + .context(SendRequest)?; } _ => { - return Err(CallError::UnexpectedResponseType { response: ws_message }); + return Err(CallError::UnexpectedResponseType { + response: ws_message, + }); } } } - }).await.context(ResponseTimeout)??; + }) + .await + .context(ResponseTimeout)??; let message: HolochainMessage = rmp_serde::from_slice(&ws_data) .with_context(|| DeserializeResponse { response: ws_data })?; diff --git a/crates/trycp_server/src/app_interface.rs b/crates/trycp_server/src/app_interface.rs index 6e3e9b1f..213814ef 100644 --- a/crates/trycp_server/src/app_interface.rs +++ b/crates/trycp_server/src/app_interface.rs @@ -4,7 +4,7 @@ use futures::{future, SinkExt, StreamExt, TryStreamExt}; use once_cell::sync::Lazy; use slab::Slab; use snafu::{IntoError, OptionExt, ResultExt, Snafu}; -use tokio_tungstenite::tungstenite::handshake::client::Request; +use tokio_tungstenite::tungstenite::client::IntoClientRequest; use tokio_tungstenite::tungstenite::protocol::WebSocketConfig; use tokio_tungstenite::tungstenite::{self, protocol::CloseFrame}; use tokio_tungstenite::tungstenite::{protocol::frame::coding::CloseCode, Message}; @@ -48,17 +48,20 @@ pub(crate) async fn connect( return Ok(()); } - let addr = format!("127.0.0.1:{port}"); + let addr = format!("localhost:{port}"); let stream = tokio::net::TcpStream::connect(addr.clone()) .await .context(TcpConnect)?; let uri = format!("ws://{}", addr); - let request = Request::builder() - .uri(uri.clone()) - // needed for admin websocket connection to be accepted - .header("origin", "tryorama-interface") - .body(()) - .expect("request to be valid"); + let mut request = uri.clone().into_client_request().expect("not a valid URI"); + // needed for app websocket connection to be accepted + request.headers_mut().insert( + "origin", + "tryorama-interface" + .parse() + .expect("invalid origin header value"), + ); + request.body(); println!("Establishing app interface with {:?}", uri); diff --git a/docs/tryorama.allowed_origin.md b/docs/tryorama.allowed_origin.md deleted file mode 100644 index fb1cbddc..00000000 --- a/docs/tryorama.allowed_origin.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [ALLOWED\_ORIGIN](./tryorama.allowed_origin.md) - -## ALLOWED\_ORIGIN variable - -**Signature:** - -```typescript -ALLOWED_ORIGIN = "tryorama-interface" -``` diff --git a/docs/tryorama.md b/docs/tryorama.md index 1be2e403..a69ac269 100644 --- a/docs/tryorama.md +++ b/docs/tryorama.md @@ -984,15 +984,6 @@ Description -[ALLOWED\_ORIGIN](./tryorama.allowed_origin.md) - - - - - - - - [DEFAULT\_PARTIAL\_PLAYER\_CONFIG](./tryorama.default_partial_player_config.md) diff --git a/flake.lock b/flake.lock index 3d1ca833..aeb08cbb 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1712161287, - "narHash": "sha256-izcly9+JWv15F70SK5DcyZyuMomO4+HmvoQ0CWh3J3M=", + "lastModified": 1712710944, + "narHash": "sha256-ye4bu3XgmufPZWwd2RCBkdkyV9dCVAx4CLiL8QKgixg=", "owner": "holochain", "repo": "holochain", - "rev": "a87b7b6280bd913d7ac88841810d2013864c0959", + "rev": "28dce06eef726cc7320637ab76ffe6f2798b12b8", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.0-beta-dev.44", + "ref": "holochain-0.3.0-beta-dev.45", "repo": "holochain", "type": "github" } @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1712604001, - "narHash": "sha256-Xw5PQAGR70WsSSsZmZbjk65DXiTQKKuQOWIg2kZ5Dwo=", + "lastModified": 1713293217, + "narHash": "sha256-C/6X3DJCKWdWZZRVHi/44NRXjzj3UJJmVYAv7aI+WMM=", "owner": "holochain", "repo": "holochain", - "rev": "fe5b6c462fcd64515c86d277cf2c87d961df79ff", + "rev": "3e966e98acc027a2808e0a2ccb2e3b5d09b2e472", "type": "github" }, "original": { @@ -254,11 +254,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712439257, - "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", "type": "github" }, "original": { @@ -332,11 +332,11 @@ ] }, "locked": { - "lastModified": 1712542394, - "narHash": "sha256-UZebDBECRSrJqw4K+LxZ6qFdYnScu6q1XCwqtsu1cas=", + "lastModified": 1713233539, + "narHash": "sha256-dPGrCy5ttx6E3bUOmDynY/cAotRqvoIAimZlbv+Zr1w=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ece8bdb3c3b58def25f204b9a1261dee55d7c9c0", + "rev": "847bc25ebab8dc72a86d2b1f0c088740eebbb1b8", "type": "github" }, "original": { @@ -348,11 +348,11 @@ "scaffolding": { "flake": false, "locked": { - "lastModified": 1712589090, - "narHash": "sha256-neMBujjSEsOI0/MT1JpYnjtMq4tKHloCbYd8w6ARAKQ=", + "lastModified": 1712841191, + "narHash": "sha256-96bq4Yo50p8Nu1CmsnmEOjGDHM8+ak8x+7mZ7vFtZHo=", "owner": "holochain", "repo": "scaffolding", - "rev": "55b17239fb7aa80d6afce24479bb2b7ef18c5b6b", + "rev": "63a2c7966c21abff1c0397fbf4fde7329d0092cd", "type": "github" }, "original": { @@ -386,11 +386,11 @@ }, "locked": { "dir": "versions/weekly", - "lastModified": 1712604001, - "narHash": "sha256-Xw5PQAGR70WsSSsZmZbjk65DXiTQKKuQOWIg2kZ5Dwo=", + "lastModified": 1713293217, + "narHash": "sha256-C/6X3DJCKWdWZZRVHi/44NRXjzj3UJJmVYAv7aI+WMM=", "owner": "holochain", "repo": "holochain", - "rev": "fe5b6c462fcd64515c86d277cf2c87d961df79ff", + "rev": "3e966e98acc027a2808e0a2ccb2e3b5d09b2e472", "type": "github" }, "original": { diff --git a/package-lock.json b/package-lock.json index 812a6761..6543af18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@holochain/tryorama", - "version": "0.16.0-dev.1", + "version": "0.16.0-dev.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@holochain/tryorama", - "version": "0.16.0-dev.1", + "version": "0.16.0-dev.3", "license": "MIT", "dependencies": { - "@holochain/client": "^0.17.0-dev.8", + "@holochain/client": "^0.17.0-dev.9", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", @@ -547,9 +547,9 @@ } }, "node_modules/@holochain/client": { - "version": "0.17.0-dev.8", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.17.0-dev.8.tgz", - "integrity": "sha512-npFoEoQd5Pai1a6B5sB0azbO9fEoZgGTY4k74cHCbtLS31Q0dSIwhrxTO6+XUVt2eyq64l6t4hJljCYIqGZVjQ==", + "version": "0.17.0-dev.9", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.17.0-dev.9.tgz", + "integrity": "sha512-/s4TiMAliB5XUEgs/lWVfx1xAXsjtkKDSd7cveWuHKUf2BiZ+eqk1Mt1UMXrkILAwpSpdFLknDHM7rNhXlk2nQ==", "dependencies": { "@bitgo/blake2b": "^3.2.4", "@holochain/serialization": "^0.1.0-beta-rc.3", @@ -630,16 +630,16 @@ } }, "node_modules/@microsoft/api-documenter": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.24.1.tgz", - "integrity": "sha512-DX332aznb5SWpOLGuymvzg2OZsQ5+dCbSm8yvVYqTylDgSAiPouvKrdlWPoEeicuLU8wzxSl3xv7DMb6xgYwPw==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.24.2.tgz", + "integrity": "sha512-q03DXLBj7nzAzLyLRAVklBynqKgSFI/JBmrhF/mEEIpg8orNo4qKXWO1RSkD2IYrqvZV63b13mcUPYgcFdifQA==", "dev": true, "dependencies": { - "@microsoft/api-extractor-model": "7.28.13", + "@microsoft/api-extractor-model": "7.28.14", "@microsoft/tsdoc": "0.14.2", - "@rushstack/node-core-library": "4.0.2", - "@rushstack/terminal": "0.10.0", - "@rushstack/ts-command-line": "4.19.1", + "@rushstack/node-core-library": "4.1.0", + "@rushstack/terminal": "0.10.1", + "@rushstack/ts-command-line": "4.19.2", "js-yaml": "~3.13.1", "resolve": "~1.22.1" }, @@ -648,18 +648,18 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.43.0", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.43.0.tgz", - "integrity": "sha512-GFhTcJpB+MI6FhvXEI9b2K0snulNLWHqC/BbcJtyNYcKUiw7l3Lgis5ApsYncJ0leALX7/of4XfmXk+maT111w==", + "version": "7.43.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.43.1.tgz", + "integrity": "sha512-ohg40SsvFFgzHFAtYq5wKJc8ZDyY46bphjtnSvhSSlXpPTG7GHwyyXkn48UZiUCBwr2WC7TRC1Jfwz7nreuiyQ==", "dev": true, "dependencies": { - "@microsoft/api-extractor-model": "7.28.13", + "@microsoft/api-extractor-model": "7.28.14", "@microsoft/tsdoc": "0.14.2", "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "4.0.2", + "@rushstack/node-core-library": "4.1.0", "@rushstack/rig-package": "0.5.2", - "@rushstack/terminal": "0.10.0", - "@rushstack/ts-command-line": "4.19.1", + "@rushstack/terminal": "0.10.1", + "@rushstack/ts-command-line": "4.19.2", "lodash": "~4.17.15", "minimatch": "~3.0.3", "resolve": "~1.22.1", @@ -672,14 +672,14 @@ } }, "node_modules/@microsoft/api-extractor-model": { - "version": "7.28.13", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.13.tgz", - "integrity": "sha512-39v/JyldX4MS9uzHcdfmjjfS6cYGAoXV+io8B5a338pkHiSt+gy2eXQ0Q7cGFJ7quSa1VqqlMdlPrB6sLR/cAw==", + "version": "7.28.14", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.14.tgz", + "integrity": "sha512-Bery/c8A8SsKPSvA82cTTuy/+OcxZbLRmKhPkk91/AJOQzxZsShcrmHFAGeiEqSIrv1nPZ3tKq9kfMLdCHmsqg==", "dev": true, "dependencies": { "@microsoft/tsdoc": "0.14.2", "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "4.0.2" + "@rushstack/node-core-library": "4.1.0" } }, "node_modules/@microsoft/api-extractor/node_modules/typescript": { @@ -770,9 +770,9 @@ } }, "node_modules/@rushstack/node-core-library": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-4.0.2.tgz", - "integrity": "sha512-hyES82QVpkfQMeBMteQUnrhASL/KHPhd7iJ8euduwNJG4mu2GSOKybf0rOEjOm1Wz7CwJEUm9y0yD7jg2C1bfg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-4.1.0.tgz", + "integrity": "sha512-qz4JFBZJCf1YN5cAXa1dP6Mki/HrsQxc/oYGAGx29dF2cwF2YMxHoly0FBhMw3IEnxo5fMj0boVfoHVBkpkx/w==", "dev": true, "dependencies": { "fs-extra": "~7.0.1", @@ -802,12 +802,12 @@ } }, "node_modules/@rushstack/terminal": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.10.0.tgz", - "integrity": "sha512-UbELbXnUdc7EKwfH2sb8ChqNgapUOdqcCIdQP4NGxBpTZV2sQyeekuK3zmfQSa/MN+/7b4kBogl2wq0vpkpYGw==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.10.1.tgz", + "integrity": "sha512-C6Vi/m/84IYJTkfzmXr1+W8Wi3MmBjVF/q3za91Gb3VYjKbpALHVxY6FgH625AnDe5Z0Kh4MHKWA3Z7bqgAezA==", "dev": true, "dependencies": { - "@rushstack/node-core-library": "4.0.2", + "@rushstack/node-core-library": "4.1.0", "supports-color": "~8.1.1" }, "peerDependencies": { @@ -820,12 +820,12 @@ } }, "node_modules/@rushstack/ts-command-line": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.1.tgz", - "integrity": "sha512-J7H768dgcpG60d7skZ5uSSwyCZs/S2HrWP1Ds8d1qYAyaaeJmpmmLr9BVw97RjFzmQPOYnoXcKA4GkqDCkduQg==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.2.tgz", + "integrity": "sha512-cqmXXmBEBlzo9WtyUrHtF9e6kl0LvBY7aTSVX4jfnBfXWZQWnPq9JTFPlQZ+L/ZwjZ4HrNwQsOVvhe9oOucZkw==", "dev": true, "dependencies": { - "@rushstack/terminal": "0.10.0", + "@rushstack/terminal": "0.10.1", "@types/argparse": "1.0.38", "argparse": "~1.0.9", "string-argv": "~0.3.1" @@ -864,9 +864,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", - "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -1556,12 +1556,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/deep-equal/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -1764,12 +1758,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-get-iterator/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -3038,6 +3026,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3286,12 +3280,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mock-property/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3714,12 +3702,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", diff --git a/package.json b/package.json index c064fc90..7dc16e87 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@holochain/tryorama", "description": "Toolset to manage Holochain conductors and facilitate running test scenarios", - "version": "0.16.0-dev.1", + "version": "0.16.0-dev.3", "author": "Holochain Foundation", "license": "MIT", "keywords": [ @@ -42,7 +42,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@holochain/client": "^0.17.0-dev.8", + "@holochain/client": "^0.17.0-dev.9", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", diff --git a/ts/src/common.ts b/ts/src/common.ts index e6a283fd..84737084 100644 --- a/ts/src/common.ts +++ b/ts/src/common.ts @@ -20,7 +20,10 @@ import { const BOOTSTRAP_SERVER_STARTUP_STRING = "HC BOOTSTRAP - ADDR: "; const SIGNALING_SERVER_STARTUP_STRING = "HC SIGNAL - ADDR: "; -export const ALLOWED_ORIGIN = "tryorama-interface"; +/** + * @internal + */ +export const _ALLOWED_ORIGIN = "tryorama-interface"; /** * Spawn a signalling server to enable connections between conductors. diff --git a/ts/src/local/conductor.ts b/ts/src/local/conductor.ts index 5078fb36..b8ab1704 100644 --- a/ts/src/local/conductor.ts +++ b/ts/src/local/conductor.ts @@ -20,11 +20,11 @@ import { v4 as uuidv4 } from "uuid"; import { makeLogger } from "../logger.js"; import { AgentsAppsOptions, AppOptions, IConductor } from "../types.js"; -import { ALLOWED_ORIGIN } from "../common.js"; +import { _ALLOWED_ORIGIN } from "../common.js"; const logger = makeLogger("Local Conductor"); -const HOST_URL = new URL("ws://127.0.0.1"); +const HOST_URL = new URL("ws://localhost"); const DEFAULT_TIMEOUT = 60000; const LAIR_PASSWORD = "lair-password"; @@ -276,7 +276,7 @@ export class Conductor implements IConductor { private async connectAdminWs() { this._adminWs = await AdminWebsocket.connect({ url: this.adminApiUrl, - wsClientOptions: { origin: ALLOWED_ORIGIN }, + wsClientOptions: { origin: _ALLOWED_ORIGIN }, defaultTimeout: this.timeout, }); logger.debug(`connected to Admin API @ ${this.adminApiUrl.href}\n`); @@ -291,7 +291,7 @@ export class Conductor implements IConductor { async attachAppInterface(request?: AttachAppInterfaceRequest) { request = request ?? { port: await getPort({ port: portNumbers(30000, 40000) }), - allowed_origins: ALLOWED_ORIGIN, + allowed_origins: _ALLOWED_ORIGIN, }; logger.debug(`attaching App API to port ${request.port}\n`); const { port } = await this.adminWs().attachAppInterface(request); @@ -310,7 +310,7 @@ export class Conductor implements IConductor { appApiUrl.port = port.toString(); const appWs = await AppWebsocket.connect({ url: appApiUrl, - wsClientOptions: { origin: ALLOWED_ORIGIN }, + wsClientOptions: { origin: _ALLOWED_ORIGIN }, defaultTimeout: this.timeout, }); @@ -342,7 +342,7 @@ export class Conductor implements IConductor { appApiUrl.port = port.toString(); const appAgentWs = await AppAgentWebsocket.connect(appId, { url: appApiUrl, - wsClientOptions: { origin: ALLOWED_ORIGIN }, + wsClientOptions: { origin: _ALLOWED_ORIGIN }, defaultTimeout: this.timeout, }); diff --git a/ts/src/trycp/conductor/conductor.ts b/ts/src/trycp/conductor/conductor.ts index 5df1708f..e9bea54b 100644 --- a/ts/src/trycp/conductor/conductor.ts +++ b/ts/src/trycp/conductor/conductor.ts @@ -84,7 +84,7 @@ import { TRYCP_SUCCESS_RESPONSE, } from "../types.js"; import { deserializeZomeResponsePayload } from "../util.js"; -import { ALLOWED_ORIGIN } from "../../common.js"; +import { _ALLOWED_ORIGIN } from "../../common.js"; const logger = makeLogger("TryCP conductor"); const HOLO_SIGNALING_SERVER = new URL("wss://signal.holo.host"); @@ -555,7 +555,7 @@ export class TryCpConductor implements IConductor { */ const attachAppInterface = async (request?: AttachAppInterfaceRequest) => { request = { - allowed_origins: request?.allowed_origins ?? ALLOWED_ORIGIN, + allowed_origins: request?.allowed_origins ?? _ALLOWED_ORIGIN, port: request?.port ?? (await getPort({ port: portNumbers(30000, 40000) })), }; diff --git a/ts/test/trycp/client.ts b/ts/test/trycp/client.ts index a7d9a112..3165217b 100644 --- a/ts/test/trycp/client.ts +++ b/ts/test/trycp/client.ts @@ -2,7 +2,7 @@ import assert from "node:assert/strict"; import { Buffer } from "node:buffer"; import { URL } from "node:url"; import test from "tape-promise/tape.js"; -import { ALLOWED_ORIGIN, enableAndGetAgentApp } from "../../src/common.js"; +import { _ALLOWED_ORIGIN, enableAndGetAgentApp } from "../../src/common.js"; import { createTryCpConductor, DEFAULT_PARTIAL_PLAYER_CONFIG, @@ -254,7 +254,7 @@ test("TryCP Server - Admin API - connect app interface", async (t) => { const { port } = await conductor .adminWs() - .attachAppInterface({ allowed_origins: ALLOWED_ORIGIN }); + .attachAppInterface({ allowed_origins: _ALLOWED_ORIGIN }); t.ok(typeof port === "number"); const connectAppInterfaceResponse = await conductor.connectAppInterface(port); @@ -285,7 +285,7 @@ test("TryCP Server - App API - get app info", async (t) => { }); const adminWs = conductor.adminWs(); const { port } = await adminWs.attachAppInterface({ - allowed_origins: ALLOWED_ORIGIN, + allowed_origins: _ALLOWED_ORIGIN, }); await conductor.connectAppInterface(port); const appWs = await conductor.connectAppWs(port);