diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd549c1..ca93e08f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added ### Removed ### Changed +- **BREAKING** Update enum serialization to match [changed Conductor API serialization format](https://github.com/holochain/holochain/blob/develop/crates/holochain/CHANGELOG.md#040-dev1). ### Fixed ## 2024-04-29: v0.16.0-dev.6 diff --git a/Cargo.lock b/Cargo.lock index c366b821..617f7f55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -872,9 +872,9 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hdi" -version = "0.4.0-beta-dev.36" +version = "0.5.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f825dde020258d4af03ea8c0d899d8000ccac86da32f2233ce7abf4629639378" +checksum = "367fb15bb6f1bf07c73dd3da85830a2fe2a37de5eceac5a0450e241222b0d9be" dependencies = [ "getrandom", "hdk_derive", @@ -890,9 +890,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.3.0-beta-dev.41" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3d886617f1d75d33ca49fbabf297b2829d1c7c9339564b82e4a1f4fa3d24f8" +checksum = "08966c37dccd8a205b22799f6143b25455378a7ac8b8af0a8826c6f2dc5c0070" dependencies = [ "getrandom", "hdi", @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.3.0-beta-dev.34" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eef3b13c4bda147be17280e1d6e0cd7838f58775dddd85268386b3ac83b5501" +checksum = "6d73ba220510d0b83c0fe717d20b763f343229d0e59b248796f7a8ae94bb0b69" dependencies = [ "darling 0.14.4", "heck 0.5.0", @@ -968,9 +968,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "holo_hash" -version = "0.3.0-beta-dev.28" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6e4370993eb87c131fea8637c29a976942172cc62476537f3a6d91e78c57ee" +checksum = "439389b876b16eeddb280e4daf68002c8792103e40ed332bb9bef6a898f7a367" dependencies = [ "base64", "blake2b_simd", @@ -986,9 +986,9 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.3.0-beta-dev.33" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d7a2fa9e6928f15f0b927de47f004a822e2d16f83c5851dc40fdb45b8f337" +checksum = "9c204c0e9f64f0c04e4980df7049e99dac459311d81298f352e1e2e38946ecf8" dependencies = [ "holo_hash", "holochain_secure_primitive", @@ -1003,9 +1003,9 @@ dependencies = [ [[package]] name = "holochain_nonce" -version = "0.3.0-beta-dev.27" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6f4c40ab91b6e5ac3b006a3c542888f37ae7527e55e8e22608b3acfe607b0f" +checksum = "abf025d865d391e4388e24382f8da70e13a4395348e5a250fa82051ae44b70c8" dependencies = [ "getrandom", "holochain_secure_primitive", @@ -1014,9 +1014,9 @@ dependencies = [ [[package]] name = "holochain_secure_primitive" -version = "0.3.0-beta-dev.23" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7701cf72c29cc7ccd0ef02e00e5091ad120d24619e948af1277011583eb566a" +checksum = "c9c9cbba8effd767423fd69a65e4c4458f359b62aca46f2e3527406958cf26c7" dependencies = [ "paste", "serde", @@ -1025,9 +1025,9 @@ dependencies = [ [[package]] name = "holochain_serialized_bytes" -version = "0.0.53" +version = "0.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7a5fc7c745a107f8ebcb04caab7a6b7a8463e2811f07ced19c281977583de7" +checksum = "fad1068180811f3a23c340894cb98b0710244ffac76427664239545f162619c5" dependencies = [ "holochain_serialized_bytes_derive", "rmp-serde", @@ -1040,9 +1040,9 @@ dependencies = [ [[package]] name = "holochain_serialized_bytes_derive" -version = "0.0.53" +version = "0.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3e0cf02005cbf0f514476d40e02125b26df6d4922d7a2c48a84fc588539d71" +checksum = "71cc7f19017233d644abc4a23cbe19220effc05aea057f93db1be00348b89464" dependencies = [ "quote 1.0.36", "syn 1.0.109", @@ -1050,9 +1050,9 @@ dependencies = [ [[package]] name = "holochain_util" -version = "0.3.0-beta-dev.8" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c206aa2904cca055a7db01248c9e6ff2a2b14fedcd6673a8a739a3d6c46ab74e" +checksum = "d9e2622406b6150319518901f1d4ecbb58a3f16ec097cba3ac898a18ff7900c1" dependencies = [ "cfg-if", "colored", @@ -1064,9 +1064,9 @@ dependencies = [ [[package]] name = "holochain_wasmer_common" -version = "0.0.92" +version = "0.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72007fd2a72d77e76ffa494e5847bf6e893e25e73fe1d1de902e1b8d5033a64e" +checksum = "5e77c4d54b5bf86dfa0266588d43fc913b0442799f34c8fc04b0e8eda0260bd4" dependencies = [ "holochain_serialized_bytes", "serde", @@ -1078,9 +1078,9 @@ dependencies = [ [[package]] name = "holochain_wasmer_guest" -version = "0.0.92" +version = "0.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c429e84a19ee446f47541a6fed10e1a4376a8a8ba6d3dbff7d07e4a7bb4c85f" +checksum = "10fcb10d7d455c5222a13b2343e2a438bcbbf3f97ef79f16c9e01203f6616dd0" dependencies = [ "holochain_serialized_bytes", "holochain_wasmer_common", @@ -1092,9 +1092,9 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.3.0-beta-dev.36" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "116df2a3484fa77f251ca381f36cb6eba6403df577cad84aa0ed75f564e0fe88" +checksum = "1ab039f61375d1aa5b33de73971ae176775040e8aad8f65ec72cf274ce50b178" dependencies = [ "derive_more", "holo_hash", @@ -1336,9 +1336,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.3.0-beta-dev.21" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c26a2c48ad26f4be9c941b5e25a2a644b18fc9dcfca5e2ee3927610e8a5451" +checksum = "7d7fbce2d113aaf0eb99076d5a77f3acb659350aef8dc76235de8a134f4ddbbf" dependencies = [ "base64", "derive_more", @@ -1351,9 +1351,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.3.0-beta-dev.23" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49e275b16bae4db37bb5ef83f32d8426d04c387bcac3937841d4676436a80a5" +checksum = "f5600ee3a3b4d282f87dddc24262640d9ee267621ae9f6f7eda8483f4e46b360" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", @@ -1362,9 +1362,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.3.0-beta-dev.20" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071b2a8e6d47ef82fdab408083dd609d938c2944fb824412ec5d48f8795d31dd" +checksum = "e0a1c38460330340f036390bfe0aba67a4f0608635079439061b87c4a528bd8e" dependencies = [ "derive_more", "gcollections", @@ -1376,9 +1376,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.3.0-beta-dev.10" +version = "0.4.0-dev.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a046548b0a5922f552352206dd33072f080907bd2939b0cce20178b464448c3" +checksum = "504c201124264754c22e577db2184db79767cf47a63817f902a6a461e82d8cb8" dependencies = [ "chrono", "serde", @@ -1953,9 +1953,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "0.15.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" dependencies = [ "byteorder", "rmp", @@ -2131,9 +2131,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -2169,9 +2169,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -2929,9 +2929,9 @@ dependencies = [ [[package]] name = "wasmer" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce45cc009177ca345a6d041f9062305ad467d15e7d41494f5b81ab46d62d7a58" +checksum = "4014573f108a246858299eb230031e268316fd57207bd2e8afc79b20fc7ce983" dependencies = [ "bytes", "cfg-if", @@ -2945,6 +2945,7 @@ dependencies = [ "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", "wasmer-compiler", "wasmer-compiler-cranelift", @@ -2957,9 +2958,9 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e044f6140c844602b920deb4526aea3cc9c0d7cf23f00730bb9b2034669f522a" +checksum = "3a77bfe259f08e8ec9e77f8f772ebfb4149f799d1f637231c5a5a6a90c447256" dependencies = [ "backtrace", "bytes", @@ -2984,9 +2985,9 @@ dependencies = [ [[package]] name = "wasmer-compiler-cranelift" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ce02358eb44a149d791c1d6648fb7f8b2f99cd55e3c4eef0474653ec8cc889" +checksum = "9280c47ebc754f95357745a38a995dd766f149e16b26e1b7e35741eb23c03d12" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -3003,9 +3004,9 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c782d80401edb08e1eba206733f7859db6c997fc5a7f5fb44edc3ecd801468f6" +checksum = "e9352877c4f07fc59146d21b56ae6dc469caf342587f49c81b4fbeafead31972" dependencies = [ "proc-macro-error", "proc-macro2 1.0.81", @@ -3015,9 +3016,9 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd09e80d4d74bb9fd0ce6c3c106b1ceba1a050f9948db9d9b78ae53c172d6157" +checksum = "749214b6170f2b2fbbfe5b7e7f8d381e64930ac4122f3abceb33cde0292d45d2" dependencies = [ "bytecheck", "enum-iterator", @@ -3031,9 +3032,9 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "4.2.4" +version = "4.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcd8a4fd36414a7b6a003dbfbd32393bce3e155d715dd877c05c1b7a41d224d" +checksum = "300215479de0deeb453e95aeb1b9c8ffd9bc7d9bd27c5f9e8a184e54db4d31a9" dependencies = [ "backtrace", "cc", @@ -3059,12 +3060,13 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.95.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", - "url", + "bitflags 2.5.0", + "indexmap 2.2.6", + "semver 1.0.22", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b6e8259b..3636aedd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ members = [ resolver = "2" [workspace.dependencies] -hdi = "0.4.0-beta-dev.36" -hdk = "0.3.0-beta-dev.41" -serde = "1.0.181" +hdi = "0.5.0-dev.1" +hdk = "0.4.0-dev.1" +serde = "1.0.192" [profile.dev] opt-level = "z" diff --git a/README.md b/README.md index 7b9e4bef..f262b5f4 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,12 @@ npm install @holochain/tryorama ## Compatibility -**Tryorama v0.11.x** is compatible with **JS client v0.13.x** and **Holochain v0.1.x**. - -**Tryorama v0.15.x** is compatible with **JS client v0.16.x** and **Holochain v0.2.x**. +**Tryorama v0.17.x** is compatible with **JS client v0.18.x** and **Holochain v0.4.x**. **Tryorama v0.16.x** is compatible with **JS client v0.17.x** and **Holochain v0.3.x**. +**Tryorama v0.15.x** is compatible with **JS client v0.16.x** and **Holochain v0.2.x**. + ## Example With a few lines of code you can start testing your Holochain application. The diff --git a/crates/trycp_server/Cargo.toml b/crates/trycp_server/Cargo.toml index 588c9e38..dd2eeffa 100644 --- a/crates/trycp_server/Cargo.toml +++ b/crates/trycp_server/Cargo.toml @@ -20,8 +20,8 @@ reqwest = { version = "0.12", default-features = false, features = [ "json", "rustls-tls-native-roots", ] } -rmp-serde = "=0.15.5" -serde = { version = "1.0.181", features = ["derive"] } +rmp-serde = "1.1" +serde = { version = "1.0.192", features = ["derive"] } serde_bytes = "0.11" slab = "0.4" snafu = "0.6" diff --git a/flake.lock b/flake.lock index 5819d0b1..3ec37578 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1714046698, - "narHash": "sha256-vGOWRJXR64qXRe4MCg13xNyww904KPFvYZIQyRhuPsU=", + "lastModified": 1714578487, + "narHash": "sha256-R0nmeZEEkHBCPmLiuWpx54qjGrrbay4b0QxxIJXsn2o=", "owner": "holochain", "repo": "holochain", - "rev": "b48562aa081b1dd177ec43035650262fbdb40d0e", + "rev": "f64ad12ccb5e3c872f5588a32437f03fef0b154b", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.0-beta-dev.48", + "ref": "holochain-0.4.0-dev.1", "repo": "holochain", "type": "github" } @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1714172196, - "narHash": "sha256-frE3cULICMy3cBLmn1NmeJdR7Lw3tqb4rPbitrxU3y4=", + "lastModified": 1714741020, + "narHash": "sha256-RLv97XHe/Rk7/X7cFIUb4+igc7jAfHmMcu7j740dvEo=", "owner": "holochain", "repo": "holochain", - "rev": "95709523c94e8f02ebce5fa11cf2cf507d6e7400", + "rev": "c863c05b44632db5d3761ec256f43932371925fd", "type": "github" }, "original": { @@ -223,11 +223,11 @@ "launcher": { "flake": false, "locked": { - "lastModified": 1713340250, - "narHash": "sha256-J8dcl4TiUB93/08oO2Bh0qG6Qi+udbm6JrmPB92NZyU=", + "lastModified": 1714396970, + "narHash": "sha256-I/Vpxtg8cwhrrD5JugEgE4Qk8fZR6VewGm5FX69vbm0=", "owner": "holochain", "repo": "launcher", - "rev": "f7b7aabd3c3ef16edd391b0b94c4223a2de98d5b", + "rev": "b96d5aa790bf0da0a8f0c44741276f7f9c4b6b41", "type": "github" }, "original": { @@ -254,11 +254,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714076141, - "narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", + "lastModified": 1714635257, + "narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856", + "rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f", "type": "github" }, "original": { @@ -332,11 +332,11 @@ ] }, "locked": { - "lastModified": 1714097613, - "narHash": "sha256-044xbpBszupqN3nl/CGOCJtTQ4O6Aca81mJpX45i8/I=", + "lastModified": 1714702555, + "narHash": "sha256-/NoUbE5S5xpK1FU3nlHhQ/tL126+JcisXdzy3Ng4pDU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "2a42c742ab04b61d9b2f1edf392842cf9f27ebfd", + "rev": "7f0e3ef7b7fbed78e12e5100851175d28af4b7c6", "type": "github" }, "original": { @@ -386,11 +386,11 @@ }, "locked": { "dir": "versions/weekly", - "lastModified": 1714172196, - "narHash": "sha256-frE3cULICMy3cBLmn1NmeJdR7Lw3tqb4rPbitrxU3y4=", + "lastModified": 1714741020, + "narHash": "sha256-RLv97XHe/Rk7/X7cFIUb4+igc7jAfHmMcu7j740dvEo=", "owner": "holochain", "repo": "holochain", - "rev": "95709523c94e8f02ebce5fa11cf2cf507d6e7400", + "rev": "c863c05b44632db5d3761ec256f43932371925fd", "type": "github" }, "original": { diff --git a/package-lock.json b/package-lock.json index 66ee93b7..d913be30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@holochain/tryorama", - "version": "0.16.0-dev.6", + "version": "0.17.0-dev.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@holochain/tryorama", - "version": "0.16.0-dev.6", + "version": "0.17.0-dev.0", "license": "MIT", "dependencies": { - "@holochain/client": "^0.17.0-dev.12", + "@holochain/client": "^0.18.0-dev.0", "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.12", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.17.0-dev.12.tgz", - "integrity": "sha512-aEOkD4wtFeHAv5AiEkBfsiGeAujCyQf1yfvmtcdERnv73zgZhxCiZ0ZrEi46kdJhRHMXX/1Qkqo6VY8afrepfQ==", + "version": "0.18.0-dev.0", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.18.0-dev.0.tgz", + "integrity": "sha512-xQ4J5rG+t1aJrtzZK8BsJYLsYHgG4zoUvsmoUuiKZcvVRlxPldX+p6rWYWz0JuDxlTE5hjmJmBTPWXd+WVHGNw==", "dependencies": { "@bitgo/blake2b": "^3.2.4", "@holochain/serialization": "^0.1.0-beta-rc.3", diff --git a/package.json b/package.json index 6190aac3..8a7dd86a 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.6", + "version": "0.17.0-dev.0", "author": "Holochain Foundation", "license": "MIT", "keywords": [ @@ -43,7 +43,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@holochain/client": "^0.17.0-dev.12", + "@holochain/client": "^0.18.0-dev.0", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", diff --git a/ts/src/trycp/conductor/conductor.ts b/ts/src/trycp/conductor/conductor.ts index 0ac82827..cdcde6b1 100644 --- a/ts/src/trycp/conductor/conductor.ts +++ b/ts/src/trycp/conductor/conductor.ts @@ -367,10 +367,10 @@ export class TryCpConductor implements IConductor { request: RegisterDnaRequest & DnaSource ): Promise => { const response = await this.callAdminApi({ - type: { register_dna: null }, + type: "register_dna", data: request, }); - assert("dna_registered" in response.type); + assert(response.type === "dna_registered"); return (response as AdminApiResponseDnaRegistered).data; }; @@ -384,10 +384,10 @@ export class TryCpConductor implements IConductor { dnaHash: GetDnaDefinitionRequest ): Promise => { const response = await this.callAdminApi({ - type: { get_dna_definition: null }, + type: "get_dna_definition", data: dnaHash, }); - assert("dna_definition_returned" in response.type); + assert(response.type === "dna_definition_returned"); return (response as AdminApiResponseDnasDefinitionReturned).data; }; @@ -401,10 +401,10 @@ export class TryCpConductor implements IConductor { request: GrantZomeCallCapabilityRequest ) => { const response = await this.callAdminApi({ - type: { grant_zome_call_capability: null }, + type: "grant_zome_call_capability", data: request, }); - assert("zome_call_capability_granted" in response.type); + assert(response.type === "zome_call_capability_granted"); }; /** @@ -414,9 +414,9 @@ export class TryCpConductor implements IConductor { */ const generateAgentPubKey = async (): Promise => { const response = await this.callAdminApi({ - type: { generate_agent_pub_key: null }, + type: "generate_agent_pub_key", }); - assert("agent_pub_key_generated" in response.type); + assert(response.type === "agent_pub_key_generated"); return (response as AdminApiResponseAgentPubKeyGenerated).data; }; @@ -428,10 +428,10 @@ export class TryCpConductor implements IConductor { */ const installApp = async (data: InstallAppRequest) => { const response = await this.callAdminApi({ - type: { install_app: null }, + type: "install_app", data, }); - assert("app_installed" in response.type); + assert(response.type === "app_installed"); return (response as AdminApiResponseAppInstalled).data; }; @@ -443,10 +443,10 @@ export class TryCpConductor implements IConductor { */ const enableApp = async (request: EnableAppRequest) => { const response = await this.callAdminApi({ - type: { enable_app: null }, + type: "enable_app", data: request, }); - assert("app_enabled" in response.type); + assert(response.type === "app_enabled"); return (response as AdminApiResponseAppEnabled).data; }; @@ -458,10 +458,10 @@ export class TryCpConductor implements IConductor { */ const disableApp = async (request: DisableAppRequest) => { const response = await this.callAdminApi({ - type: { disable_app: null }, + type: "disable_app", data: request, }); - assert("app_disabled" in response.type); + assert(response.type === "app_disabled"); return (response as AdminApiResponseAppDisabled).data; }; @@ -473,10 +473,10 @@ export class TryCpConductor implements IConductor { */ const startApp = async (request: StartAppRequest) => { const response = await this.callAdminApi({ - type: { start_app: null }, + type: "start_app", data: request, }); - assert("app_started" in response.type); + assert(response.type === "app_started"); return (response as AdminApiResponseAppStarted).data; }; @@ -488,10 +488,10 @@ export class TryCpConductor implements IConductor { */ const uninstallApp = async (request: UninstallAppRequest) => { const response = await this.callAdminApi({ - type: { uninstall_app: null }, + type: "uninstall_app", data: request, }); - assert("app_uninstalled" in response.type); + assert(response.type === "app_uninstalled"); return (response as AdminApiResponseAppUninstalled).data; }; @@ -503,10 +503,10 @@ export class TryCpConductor implements IConductor { */ const updateCoordinators = async (request: UpdateCoordinatorsRequest) => { const response = await this.callAdminApi({ - type: { update_coordinators: null }, + type: "update_coordinators", data: request, }); - assert("coordinators_updated" in response.type); + assert(response.type === "coordinators_updated"); return (response as AdminApiResponseCoordinatorsUpdated).data; }; @@ -518,10 +518,10 @@ export class TryCpConductor implements IConductor { */ const listApps = async (request: ListAppsRequest) => { const response = await this.callAdminApi({ - type: { list_apps: null }, + type: "list_apps", data: request, }); - assert("apps_listed" in response.type); + assert(response.type === "apps_listed"); return (response as AdminApiResponseAppsListed).data; }; @@ -532,9 +532,9 @@ export class TryCpConductor implements IConductor { */ const listCellIds = async () => { const response = await this.callAdminApi({ - type: { list_cell_ids: null }, + type: "list_cell_ids", }); - assert("cell_ids_listed" in response.type); + assert(response.type === "cell_ids_listed"); return (response as AdminApiResponseCellIdsListed).data; }; @@ -544,8 +544,8 @@ export class TryCpConductor implements IConductor { * @returns A list of all installed DNAs' role ids. */ const listDnas = async () => { - const response = await this.callAdminApi({ type: { list_dnas: null } }); - assert("dnas_listed" in response.type); + const response = await this.callAdminApi({ type: "list_dnas" }); + assert(response.type === "dnas_listed"); return (response as AdminApiResponseDnasListed).data; }; @@ -562,10 +562,10 @@ export class TryCpConductor implements IConductor { request?.port ?? (await getPort({ port: portNumbers(30000, 40000) })), }; const response = await this.callAdminApi({ - type: { attach_app_interface: null }, + type: "attach_app_interface", data: request, }); - assert("app_interface_attached" in response.type); + assert(response.type === "app_interface_attached"); return { port: (response as AdminApiResponseAppInterfaceAttached).data.port, }; @@ -578,9 +578,9 @@ export class TryCpConductor implements IConductor { */ const listAppInterfaces = async () => { const response = await this.callAdminApi({ - type: { list_app_interfaces: null }, + type: "list_app_interfaces", }); - assert("app_interfaces_listed" in response.type); + assert(response.type === "app_interfaces_listed"); return (response as AdminApiResponseAppInterfacesListed).data; }; @@ -592,12 +592,12 @@ export class TryCpConductor implements IConductor { */ const agentInfo = async (req: AgentInfoRequest) => { const response = await this.callAdminApi({ - type: { agent_info: null }, + type: "agent_info", data: { cell_id: req.cell_id || null, }, }); - assert("agent_info" in response.type); + assert(response.type === "agent_info"); return (response as AdminApiResponseAgentInfo).data; }; @@ -608,10 +608,10 @@ export class TryCpConductor implements IConductor { */ const addAgentInfo = async (request: AddAgentInfoRequest) => { const response = await this.callAdminApi({ - type: { add_agent_info: null }, + type: "add_agent_info", data: request, }); - assert("agent_info_added" in response.type); + assert(response.type === "agent_info_added"); }; /** @@ -621,10 +621,10 @@ export class TryCpConductor implements IConductor { */ const deleteCloneCell = async (request: DeleteCloneCellRequest) => { const response = await this.callAdminApi({ - type: { delete_clone_cell: null }, + type: "delete_clone_cell", data: request, }); - assert("clone_cell_deleted" in response.type); + assert(response.type === "clone_cell_deleted"); }; /** @@ -635,11 +635,11 @@ export class TryCpConductor implements IConductor { */ const dumpState = async (request: DumpStateRequest) => { const response = await this.callAdminApi({ - type: { dump_state: null }, + type: "dump_state", data: request, }); assert("data" in response); - assert(typeof response.data === "string"); + assert(response.type === "state_dumped"); const stateDump = JSON.parse(response.data.replace(/\\n/g, "")); return stateDump as [FullStateDump, string]; }; @@ -652,10 +652,10 @@ export class TryCpConductor implements IConductor { */ const dumpFullState = async (request: DumpFullStateRequest) => { const response = await this.callAdminApi({ - type: { dump_full_state: null }, + type: "dump_full_state", data: request, }); - assert("full_state_dumped" in response.type); + assert(response.type === "full_state_dumped"); return (response as AdminApiResponseFullStateDumped).data; }; @@ -667,10 +667,10 @@ export class TryCpConductor implements IConductor { */ const dumpNetworkStats = async (request: DumpNetworkStatsRequest) => { const response = await this.callAdminApi({ - type: { dump_network_stats: null }, + type: "dump_network_stats", data: request, }); - assert("network_stats_dumped" in response.type); + assert(response.type === "network_stats_dumped"); return (response as AdminApiResponseNetworkStatsDumped).data; }; @@ -682,10 +682,10 @@ export class TryCpConductor implements IConductor { */ const storageInfo = async (request: StorageInfoRequest) => { const response = await this.callAdminApi({ - type: { storage_info: null }, + type: "storage_info", data: request, }); - assert("storage_info" in response.type); + assert(response.type === "storage_info"); return (response as AdminApiResponseStorageInfo).data; }; @@ -693,10 +693,10 @@ export class TryCpConductor implements IConductor { request: IssueAppAuthenticationTokenRequest ) => { const response = await this.callAdminApi({ - type: { issue_app_authentication_token: null }, + type: "issue_app_authentication_token", data: request, }); - assert("app_authentication_token_issued" in response.type); + assert(response.type === "app_authentication_token_issued"); return (response as AdminApiResponseAppAuthenticationTokenIssued).data; }; @@ -743,7 +743,7 @@ export class TryCpConductor implements IConductor { const [keyPair, signingKey] = await generateSigningKeyPair(); const capSecret = await grantSigningKey( cellId, - functions || { [GrantedFunctionsType.All]: null }, + functions || GrantedFunctionsType.All, signingKey ); setSigningCredentials(cellId, { capSecret, keyPair, signingKey }); @@ -810,9 +810,9 @@ export class TryCpConductor implements IConductor { */ const appInfo = async () => { const response = await this.callAppApi(port, { - type: { app_info: null }, + type: "app_info", }); - assert("app_info" in response.type); + assert(response.type === "app_info"); return (response as AppApiResponseAppInfo).data; }; @@ -845,7 +845,7 @@ export class TryCpConductor implements IConductor { signedRequest = signedZomeCall; } const response = await this.callAppApi(port, { - type: { call_zome: null }, + type: "call_zome", data: signedRequest, }); assert("data" in response); @@ -865,10 +865,10 @@ export class TryCpConductor implements IConductor { */ const createCloneCell = async (request: CreateCloneCellRequest) => { const response = await this.callAppApi(port, { - type: { create_clone_cell: null }, + type: "create_clone_cell", data: request, }); - assert("clone_cell_created" in response.type); + assert(response.type === "clone_cell_created"); return (response as AppApiResponseCloneCellCreated).data; }; @@ -881,10 +881,10 @@ export class TryCpConductor implements IConductor { */ const enableCloneCell = async (request: EnableCloneCellRequest) => { const response = await this.callAppApi(port, { - type: { enable_clone_cell: null }, + type: "enable_clone_cell", data: request, }); - assert("clone_cell_enabled" in response.type); + assert(response.type === "clone_cell_enabled"); return (response as AppApiResponseCloneCellEnabled).data; }; @@ -896,10 +896,10 @@ export class TryCpConductor implements IConductor { */ const disableCloneCell = async (request: DisableCloneCellRequest) => { const response = await this.callAppApi(port, { - type: { disable_clone_cell: null }, + type: "disable_clone_cell", data: request, }); - assert("clone_cell_disabled" in response.type); + assert(response.type === "clone_cell_disabled"); return (response as AppApiResponseCloneCellDisabled).data; }; @@ -911,10 +911,10 @@ export class TryCpConductor implements IConductor { */ const networkInfo = async (request: NetworkInfoRequest) => { const response = await this.callAppApi(port, { - type: { network_info: null }, + type: "network_info", data: request, }); - assert("network_info" in response.type); + assert(response.type === "network_info"); return (response as AppApiResponseNetworkInfo).data; }; diff --git a/ts/src/trycp/trycp-client.ts b/ts/src/trycp/trycp-client.ts index 61492fa4..4ee6db7a 100644 --- a/ts/src/trycp/trycp-client.ts +++ b/ts/src/trycp/trycp-client.ts @@ -127,8 +127,8 @@ export class TryCpClient { responseReject(responseWrapper.response[_TryCpResponseResult.Err]); } else { logger.error( - "unknown response type", - JSON.stringify(responseWrapper, null, 4) + "unknown response type:\n" + + JSON.stringify(responseWrapper, null, 4) ); throw new Error("Unknown response type"); } @@ -270,7 +270,7 @@ export class TryCpClient { deserializeApiResponse(response); // when the request fails, the response's type is "error" - if ("error" in deserializedApiResponse.type) { + if (deserializedApiResponse.type === "error") { const errorMessage = `error response from Admin API\n${JSON.stringify( (deserializedApiResponse as ApiErrorResponse).data, null, @@ -312,7 +312,7 @@ export class TryCpClient { if ( debugLog.type === "call_app_interface" && "data" in debugLog.message && - "call_zome" in debugLog.message.type + debugLog.message.type === "call_zome" ) { const messageData = debugLog.message.data as CallZomeRequestSigned; debugLog.message.data = Object.assign(debugLog.message.data, { diff --git a/ts/src/trycp/types.ts b/ts/src/trycp/types.ts index 5551b4fb..d4ccf295 100644 --- a/ts/src/trycp/types.ts +++ b/ts/src/trycp/types.ts @@ -190,8 +190,8 @@ export type _TryCpResponse = _TryCpResponseSuccess | _TryCpResponseError; * @internal */ export enum _TryCpResponseResult { - Ok = "0", - Err = "1", + Ok = "Ok", + Err = "Err", } /** @@ -256,7 +256,7 @@ export type TryCpApiResponse = * @public */ export interface ApiErrorResponse { - type: { error: null }; + type: "error"; data: { type: string; data: string }; } @@ -317,7 +317,7 @@ export type RequestCallAppInterfaceMessage = * @public */ export interface RequestCallZome { - type: { call_zome: null }; + type: "call_zome"; data: CallZomeRequestSigned; } @@ -327,7 +327,7 @@ export interface RequestCallZome { * @public */ export interface RequestAppInfo { - type: { app_info: null }; + type: "app_info"; } /** @@ -336,7 +336,7 @@ export interface RequestAppInfo { * @public */ export interface RequestCreateCloneCell { - type: { create_clone_cell: null }; + type: "create_clone_cell"; data: CreateCloneCellRequest; } @@ -346,7 +346,7 @@ export interface RequestCreateCloneCell { * @public */ export interface RequestDisableCloneCell { - type: { disable_clone_cell: null }; + type: "disable_clone_cell"; data: DisableCloneCellRequest; } @@ -356,7 +356,7 @@ export interface RequestDisableCloneCell { * @public */ export interface RequestEnableCloneCell { - type: { enable_clone_cell: null }; + type: "enable_clone_cell"; data: EnableCloneCellRequest; } @@ -366,7 +366,7 @@ export interface RequestEnableCloneCell { * @public */ export interface RequestNetworkInfo { - type: { network_info: null }; + type: "network_info"; data: NetworkInfoRequest; } @@ -397,7 +397,7 @@ export type AppApiResponse = * @public */ export interface AppApiResponseAppInfo { - type: { app_info: null }; + type: "app_info"; data: AppInfoResponse; } @@ -405,7 +405,7 @@ export interface AppApiResponseAppInfo { * @public */ export interface AppApiResponseZomeCall { - type: { zome_call: null }; + type: "zome_call"; data: Uint8Array; } @@ -413,7 +413,7 @@ export interface AppApiResponseZomeCall { * @public */ export interface AppApiResponseCloneCellCreated { - type: { clone_cell_created: null }; + type: "clone_cell_created"; data: CreateCloneCellResponse; } @@ -421,7 +421,7 @@ export interface AppApiResponseCloneCellCreated { * @public */ export interface AppApiResponseCloneCellEnabled { - type: { clone_cell_enabled: null }; + type: "clone_cell_enabled"; data: EnableCloneCellResponse; } @@ -429,7 +429,7 @@ export interface AppApiResponseCloneCellEnabled { * @public */ export interface AppApiResponseCloneCellDisabled { - type: { clone_cell_disabled: null }; + type: "clone_cell_disabled"; data: DisableCloneCellResponse; } @@ -437,7 +437,7 @@ export interface AppApiResponseCloneCellDisabled { * @public */ export interface AppApiResponseNetworkInfo { - type: { network_info: null }; + type: "network_info"; data: NetworkInfoResponse; } @@ -459,32 +459,31 @@ export interface RequestCallAdminInterface { * * @public */ -export interface RequestAdminInterfaceMessageType { - add_agent_info?: null; - agent_info?: null; - attach_app_interface?: null; - connect_app_interface?: null; - delete_clone_cell?: null; - disable_app?: null; - dump_full_state?: null; - dump_network_stats?: null; - dump_state?: null; - enable_app?: null; - generate_agent_pub_key?: null; - get_dna_definition?: null; - grant_zome_call_capability?: null; - install_app?: null; - list_apps?: null; - list_app_interfaces?: null; - list_cell_ids?: null; - list_dnas?: null; - register_dna?: null; - start_app?: null; - storage_info?: null; - uninstall_app?: null; - update_coordinators?: null; - issue_app_authentication_token?: null; -} +export type RequestAdminInterfaceMessageType = + | "add_agent_info" + | "agent_info" + | "attach_app_interface" + | "connect_app_interface" + | "delete_clone_cell" + | "disable_app" + | "dump_full_state" + | "dump_network_stats" + | "dump_state" + | "enable_app" + | "generate_agent_pub_key" + | "get_dna_definition" + | "grant_zome_call_capability" + | "install_app" + | "list_apps" + | "list_app_interfaces" + | "list_cell_ids" + | "list_dnas" + | "register_dna" + | "start_app" + | "storage_info" + | "uninstall_app" + | "update_coordinators" + | "issue_app_authentication_token"; /** * All possible calls to the Admin API. @@ -492,7 +491,7 @@ export interface RequestAdminInterfaceMessageType { * @public */ export interface RequestAdminInterfaceMessage { - type: { [key in keyof RequestAdminInterfaceMessageType]: null }; + type: RequestAdminInterfaceMessageType; data?: | AddAgentInfoRequest | AgentInfoRequest @@ -549,7 +548,7 @@ export type AdminApiResponse = * @public */ export interface AdminApiResponseAgentInfo { - type: { agent_info: null }; + type: "agent_info"; data: AgentInfoResponse; } @@ -559,7 +558,7 @@ export interface AdminApiResponseAgentInfo { * @public */ export interface RequestDeleteCloneCell { - type: { delete_clone_cell: null }; + type: "delete_clone_cell"; data: DeleteCloneCellRequest; } @@ -567,7 +566,7 @@ export interface RequestDeleteCloneCell { * @public */ export interface AdminApiResponseDnaRegistered { - type: { dna_registered: null }; + type: "dna_registered"; data: HoloHash; } @@ -575,7 +574,7 @@ export interface AdminApiResponseDnaRegistered { * @public */ export interface AdminApiResponseFullStateDumped { - type: { full_state_dumped: null }; + type: "full_state_dumped"; data: FullStateDump; } @@ -583,7 +582,7 @@ export interface AdminApiResponseFullStateDumped { * @public */ export interface AdminApiResponseNetworkStatsDumped { - type: { network_stats_dumped: null }; + type: "network_stats_dumped"; data: DumpNetworkStatsResponse; } @@ -591,7 +590,7 @@ export interface AdminApiResponseNetworkStatsDumped { * @public */ export interface AdminApiResponseStorageInfo { - type: { storage_info: null }; + type: "storage_info"; data: StorageInfoResponse; } @@ -599,7 +598,7 @@ export interface AdminApiResponseStorageInfo { * @public */ export interface AdminApiResponseAppAuthenticationTokenIssued { - type: { app_authentication_token_issued: null }; + type: "app_authentication_token_issued"; data: IssueAppAuthenticationTokenResponse; } @@ -607,7 +606,7 @@ export interface AdminApiResponseAppAuthenticationTokenIssued { * @public */ export interface AdminApiResponseStateDumped { - type: { state_dumped: null }; + type: "state_dumped"; data: DumpStateResponse; } @@ -615,14 +614,14 @@ export interface AdminApiResponseStateDumped { * @public */ export interface AdminApiResponseZomeCallCapabilityGranted { - type: { zome_call_capability_granted: null }; + type: "zome_call_capability_granted"; } /** * @public */ export interface AdminApiResponseAgentPubKeyGenerated { - type: { agent_pub_key_generated: null }; + type: "agent_pub_key_generated"; data: HoloHash; } @@ -630,7 +629,7 @@ export interface AdminApiResponseAgentPubKeyGenerated { * @public */ export interface AdminApiResponseAppInstalled { - type: { app_installed: null }; + type: "app_installed"; data: AppInfo; } @@ -638,7 +637,7 @@ export interface AdminApiResponseAppInstalled { * @public */ export interface AdminApiResponseAppEnabled { - type: { app_enabled: null }; + type: "app_enabled"; data: EnableAppResponse; } @@ -646,7 +645,7 @@ export interface AdminApiResponseAppEnabled { * @public */ export interface AdminApiResponseAppDisabled { - type: { app_disabled: null }; + type: "app_disabled"; data: DisableAppResponse; } @@ -654,7 +653,7 @@ export interface AdminApiResponseAppDisabled { * @public */ export interface AdminApiResponseAppStarted { - type: { app_started: null }; + type: "app_started"; data: StartAppResponse; } @@ -662,7 +661,7 @@ export interface AdminApiResponseAppStarted { * @public */ export interface AdminApiResponseAppUninstalled { - type: { app_uninstalled: null }; + type: "app_uninstalled"; data: UninstallAppResponse; } @@ -670,7 +669,7 @@ export interface AdminApiResponseAppUninstalled { * @public */ export interface AdminApiResponseCoordinatorsUpdated { - type: { coordinators_updated: null }; + type: "coordinators_updated"; data: UpdateCoordinatorsResponse; } @@ -678,7 +677,7 @@ export interface AdminApiResponseCoordinatorsUpdated { * @public */ export interface AdminApiResponseAppsListed { - type: { apps_listed: null }; + type: "apps_listed"; data: ListAppsResponse; } @@ -686,7 +685,7 @@ export interface AdminApiResponseAppsListed { * @public */ export interface AdminApiResponseAppInterfacesListed { - type: { app_interfaces_listed: null }; + type: "app_interfaces_listed"; data: ListAppInterfacesResponse; } @@ -694,7 +693,7 @@ export interface AdminApiResponseAppInterfacesListed { * @public */ export interface AdminApiResponseCellIdsListed { - type: { cell_ids_listed: null }; + type: "cell_ids_listed"; data: ListCellIdsResponse; } @@ -702,7 +701,7 @@ export interface AdminApiResponseCellIdsListed { * @public */ export interface AdminApiResponseDnasDefinitionReturned { - type: { dna_definition_returned: null }; + type: "dna_definition_returned"; data: DnaDefinition; } @@ -710,7 +709,7 @@ export interface AdminApiResponseDnasDefinitionReturned { * @public */ export interface AdminApiResponseDnasListed { - type: { dnas_listed: null }; + type: "dnas_listed"; data: ListDnasResponse; } @@ -718,7 +717,7 @@ export interface AdminApiResponseDnasListed { * @public */ export interface AdminApiResponseAppInterfaceAttached { - type: { app_interface_attached: null }; + type: "app_interface_attached"; data: AttachAppInterfaceResponse; } @@ -726,12 +725,12 @@ export interface AdminApiResponseAppInterfaceAttached { * @public */ export interface AdminApiResponseAgentInfoAdded { - type: { agent_info_added: null }; + type: "agent_info_added"; } /** * @public */ export interface AdminApiResponseCloneCellDeleted { - type: { clone_cell_deleted: null }; + type: "clone_cell_deleted"; } diff --git a/ts/test/fixture/zomes/integrity/Cargo.toml b/ts/test/fixture/zomes/integrity/Cargo.toml index 7206d71a..396128e7 100644 --- a/ts/test/fixture/zomes/integrity/Cargo.toml +++ b/ts/test/fixture/zomes/integrity/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"] name = "integrity" [dependencies] -chrono = {version = "0.4.27", default-features = false} -getrandom = {version = "0.2", features = ["custom"]} -hdi = {workspace = true} -serde = {workspace = true} +chrono = { version = "0.4", default-features = false } +getrandom = { version = "0.2", features = ["custom"] } +hdi = { workspace = true } +serde = { workspace = true } diff --git a/ts/test/local/conductor.ts b/ts/test/local/conductor.ts index 99d94420..fbcf034d 100644 --- a/ts/test/local/conductor.ts +++ b/ts/test/local/conductor.ts @@ -102,7 +102,7 @@ test("Local Conductor - get app info with app ws", async (t) => { const appWs = await conductor.connectAppWs(issued.token, port); const appInfo = await appWs.appInfo(); assert(appInfo); - t.deepEqual(appInfo.status, { running: null }); + t.deepEqual(appInfo.status, "running"); await conductor.shutDown(); await stopLocalServices(servicesProcess); await cleanAllConductors(); @@ -123,7 +123,7 @@ test("Local Conductor - get app info with app agent ws", async (t) => { .issueAppAuthenticationToken({ installed_app_id: app.installed_app_id }); const appWs = await conductor.connectAppWs(issued.token, port); const appInfo = await appWs.appInfo(); - t.deepEqual(appInfo.status, { running: null }); + t.deepEqual(appInfo.status, "running"); await conductor.shutDown(); await stopLocalServices(servicesProcess); await cleanAllConductors(); diff --git a/ts/test/trycp/client.ts b/ts/test/trycp/client.ts index 4230eeb3..a870e9ba 100644 --- a/ts/test/trycp/client.ts +++ b/ts/test/trycp/client.ts @@ -48,7 +48,7 @@ test("TryCP Server - non-existent call throws", async (t) => { await localTryCpServer.stop(); }); -test("TryCP Server - download DNA from web", async (t) => { +test.only("TryCP Server - download DNA from web", async (t) => { const localTryCpServer = await TryCpServer.start(); const tryCpClient = await createTryCpClient(); @@ -59,6 +59,7 @@ test("TryCP Server - download DNA from web", async (t) => { type: "download_dna", url, }); + console.log("actual url", actualUrl); t.ok(typeof actualUrl === "string" && actualUrl.endsWith(expectedUrl)); await tryCpClient.close(); @@ -306,7 +307,7 @@ test("TryCP Server - App API - get app info", async (t) => { const appInfo = await appWs.appInfo(); assert(appInfo); - t.deepEqual(appInfo.status, { running: null }); + t.deepEqual(appInfo.status, "running"); await conductor.disconnectAppInterface(port); await conductor.shutDown(); diff --git a/ts/test/trycp/conductor.ts b/ts/test/trycp/conductor.ts index a3a2c746..74cecfa2 100644 --- a/ts/test/trycp/conductor.ts +++ b/ts/test/trycp/conductor.ts @@ -373,7 +373,7 @@ test("TryCP Conductor - create and read an entry using the entry zome", async (t }); t.deepEqual( enabledAppResponse.app.status, - { running: null }, + "running", "enabled app response matches 'running'" ); @@ -545,7 +545,7 @@ test("TryCP Conductor - create and read an entry using the entry zome, 1 conduct }); t.deepEqual( enabledAppResponse1.app.status, - { running: null }, + "running", "enabled app response 1 matches 'running'" ); const enabledAppResponse2 = await conductor.adminWs().enableApp({ @@ -553,7 +553,7 @@ test("TryCP Conductor - create and read an entry using the entry zome, 1 conduct }); t.deepEqual( enabledAppResponse2.app.status, - { running: null }, + "running", "enabled app response 2 matches 'running'" );