diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index 060e1e3ae..d76d19e53 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -51,7 +51,7 @@ jobs: key: wasm-cargo-cache - name: Install wasm-bindgen-cli - run: cargo install wasm-bindgen-cli --version 0.2.95 + run: cargo install wasm-bindgen-cli --version 0.2.105 - name: Build run: ./build.sh -r diff --git a/Cargo.lock b/Cargo.lock index 3f7de5098..e237893e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "generic-array", ] @@ -41,9 +41,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -135,9 +135,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" dependencies = [ "base64ct", - "blake2", + "blake2 0.10.6", + "cpufeatures", + "password-hash 0.5.0", + "zeroize", +] + +[[package]] +name = "argon2" +version = "0.6.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d911686206fdd816a61ed5226535997149b0fc7726e37fee46f407c9ff82ed87" +dependencies = [ + "base64ct", + "blake2 0.11.0-rc.2", "cpufeatures", - "password-hash", + "password-hash 0.6.0-rc.1", "zeroize", ] @@ -350,8 +363,9 @@ dependencies = [ [[package]] name = "bitwarden-api-api" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ + "async-trait", "reqwest", "serde", "serde_json", @@ -364,8 +378,9 @@ dependencies = [ [[package]] name = "bitwarden-api-identity" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ + "async-trait", "reqwest", "serde", "serde_json", @@ -387,7 +402,7 @@ dependencies = [ [[package]] name = "bitwarden-cli" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "clap", "color-eyre", @@ -398,30 +413,30 @@ dependencies = [ [[package]] name = "bitwarden-core" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "async-trait", - "base64", "bitwarden-api-api", "bitwarden-api-identity", "bitwarden-crypto", + "bitwarden-encoding", "bitwarden-error", "bitwarden-state", "bitwarden-uuid", "chrono", "getrandom 0.2.16", "log", - "rand", + "rand 0.8.5", "reqwest", "rustls", "rustls-platform-verifier", - "schemars 0.8.22", + "schemars 1.0.5", "serde", "serde_bytes", "serde_json", "serde_qs", "serde_repr", - "thiserror 2.0.17", + "thiserror 1.0.69", "uuid", "zeroize", "zxcvbn", @@ -430,11 +445,11 @@ dependencies = [ [[package]] name = "bitwarden-crypto" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "aes", - "argon2", - "base64", + "argon2 0.6.0-rc.1", + "bitwarden-encoding", "bitwarden-error", "cbc", "chacha20poly1305", @@ -447,28 +462,39 @@ dependencies = [ "num-bigint", "num-traits", "pbkdf2", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", "rsa", - "schemars 0.8.22", + "schemars 1.0.5", "serde", "serde_bytes", "serde_repr", "sha1", "sha2", "subtle", - "thiserror 2.0.17", + "thiserror 1.0.69", "typenum", "uuid", "zeroize", "zeroizing-alloc", ] +[[package]] +name = "bitwarden-encoding" +version = "1.0.0" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" +dependencies = [ + "data-encoding", + "data-encoding-macro", + "serde", + "thiserror 1.0.69", +] + [[package]] name = "bitwarden-error" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "bitwarden-error-macro", ] @@ -476,7 +502,7 @@ dependencies = [ [[package]] name = "bitwarden-error-macro" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "darling 0.20.11", "proc-macro2", @@ -487,17 +513,17 @@ dependencies = [ [[package]] name = "bitwarden-generators" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "bitwarden-core", "bitwarden-crypto", "bitwarden-error", - "rand", + "rand 0.8.5", "reqwest", - "schemars 0.8.22", + "schemars 1.0.5", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 1.0.69", ] [[package]] @@ -506,7 +532,7 @@ version = "0.3.0" dependencies = [ "bitwarden", "log", - "schemars 0.8.22", + "schemars 1.0.5", "serde", "serde_json", "tokio", @@ -538,17 +564,17 @@ dependencies = [ [[package]] name = "bitwarden-sm" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "bitwarden-api-api", "bitwarden-core", "bitwarden-crypto", "chrono", "log", - "schemars 0.8.22", + "schemars 1.0.5", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 1.0.69", "uuid", "validator", ] @@ -556,16 +582,38 @@ dependencies = [ [[package]] name = "bitwarden-state" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "async-trait", - "thiserror 2.0.17", + "bitwarden-error", + "bitwarden-threading", + "indexed-db", + "js-sys", + "rusqlite", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tsify", +] + +[[package]] +name = "bitwarden-threading" +version = "1.0.0" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" +dependencies = [ + "bitwarden-error", + "log", + "serde", + "thiserror 1.0.69", + "tokio", + "tokio-util", ] [[package]] name = "bitwarden-uuid" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "bitwarden-uuid-macro", ] @@ -573,7 +621,7 @@ dependencies = [ [[package]] name = "bitwarden-uuid-macro" version = "1.0.0" -source = "git+https://github.com/bitwarden/sdk-internal.git?rev=49d027c1f5144d6d319e3cab56782f8b844cd8c2#49d027c1f5144d6d319e3cab56782f8b844cd8c2" +source = "git+https://github.com/bitwarden/sdk-internal.git?rev=9574dcc1f5916e73e54cf16e18be456c937a1b99#9574dcc1f5916e73e54cf16e18be456c937a1b99" dependencies = [ "quote", "syn", @@ -583,7 +631,7 @@ dependencies = [ name = "bitwarden-wasm" version = "0.1.0" dependencies = [ - "argon2", + "argon2 0.5.3", "bitwarden-json", "chrono", "console_error_panic_hook", @@ -602,7 +650,16 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest", + "digest 0.10.7", +] + +[[package]] +name = "blake2" +version = "0.11.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edac47499deef695d9431bf241c75ea29f4cf3dcb78d39e19b31515e4ad3b08" +dependencies = [ + "digest 0.11.0-rc.3", ] [[package]] @@ -614,6 +671,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.11.0-rc.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9ef36a6fcdb072aa548f3da057640ec10859eb4e91ddf526ee648d50c76a949" +dependencies = [ + "hybrid-array", +] + [[package]] name = "block-padding" version = "0.3.3" @@ -704,9 +770,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.43" +version = "1.2.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2" +checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3" dependencies = [ "find-msvc-tools", "shlex", @@ -801,16 +867,16 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "inout", "zeroize", ] [[package]] name = "clap" -version = "4.5.50" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", "clap_derive", @@ -818,9 +884,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.50" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", @@ -830,9 +896,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.59" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2348487adcd4631696ced64ccdb40d38ac4d31cae7f2eec8817fcea1b9d1c43c" +checksum = "8e602857739c5a4291dfa33b5a298aeac9006185229a700e5810a3ef7272d971" dependencies = [ "clap", ] @@ -1108,10 +1174,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8235645834fbc6832939736ce2f2d08192652269e11010a6240f61b908a1c6" +dependencies = [ + "hybrid-array", +] + [[package]] name = "ctor" version = "0.2.9" @@ -1131,7 +1206,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest", + "digest 0.10.7", "fiat-crypto", "rustc_version", "subtle", @@ -1219,6 +1294,32 @@ dependencies = [ "syn", ] +[[package]] +name = "data-encoding" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" + +[[package]] +name = "data-encoding-macro" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47ce6c96ea0102f01122a185683611bd5ac8d99e62bc59dd12e6bda344ee673d" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" +dependencies = [ + "data-encoding", + "syn", +] + [[package]] name = "der" version = "0.7.10" @@ -1277,9 +1378,20 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", - "crypto-common", + "crypto-common 0.1.6", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac89f8a64533a9b0eaa73a68e424db0fb1fd6271c74cc0125336a05f090568d" +dependencies = [ + "block-buffer 0.11.0-rc.5", + "crypto-common 0.2.0-rc.4", "subtle", ] @@ -1348,7 +1460,7 @@ checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core", + "rand_core 0.6.4", "serde", "sha2", "subtle", @@ -1449,6 +1561,18 @@ dependencies = [ "uuid", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fancy-regex" version = "0.13.0" @@ -1505,6 +1629,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1529,6 +1659,17 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "futures-sink" version = "0.3.31" @@ -1548,9 +1689,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", + "futures-macro", "futures-task", "pin-project-lite", "pin-utils", + "slab", ] [[package]] @@ -1602,9 +1745,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasip2", + "wasm-bindgen", ] [[package]] @@ -1662,12 +1807,30 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + [[package]] name = "hashbrown" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + [[package]] name = "heck" version = "0.5.0" @@ -1695,7 +1858,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1753,6 +1916,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hybrid-array" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "1.7.0" @@ -1798,6 +1970,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ + "base64", "bytes", "futures-channel", "futures-core", @@ -1805,9 +1978,11 @@ dependencies = [ "http", "http-body", "hyper", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", - "socket2 0.6.1", + "socket2", "tokio", "tower-service", "tracing", @@ -1839,9 +2014,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", @@ -1852,9 +2027,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -1865,11 +2040,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1880,42 +2054,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -1956,6 +2126,20 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" +[[package]] +name = "indexed-db" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f4ecbb6cd50773303683617a93fc2782267d2c94546e9545ec4190eb69aa1a" +dependencies = [ + "futures-channel", + "futures-util", + "pin-project-lite", + "scoped-tls", + "thiserror 2.0.17", + "web-sys", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -2021,6 +2205,16 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_ci" version = "1.2.0" @@ -2105,10 +2299,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2153,6 +2348,17 @@ dependencies = [ "libc", ] +[[package]] +name = "libsqlite3-sys" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -2161,9 +2367,9 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "litrs" @@ -2186,6 +2392,12 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "matchers" version = "0.2.0" @@ -2363,17 +2575,16 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +checksum = "82c79c15c05d4bf82b6f5ef163104cc81a760d8e874d38ac50ab67c8877b647b" dependencies = [ - "byteorder", "lazy_static", "libm", "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "smallvec", "zeroize", ] @@ -2489,7 +2700,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "password-hash" +version = "0.6.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee14c44aa1c04c22c4d4532c4fa2cdd5b6d31c2514a5898530d889fc2fc2737" +dependencies = [ + "base64ct", + "rand_core 0.9.3", "subtle", ] @@ -2508,7 +2730,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -2559,6 +2781,12 @@ dependencies = [ "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + [[package]] name = "plist" version = "1.8.0" @@ -2600,9 +2828,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -2756,31 +2984,34 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", "rustls", - "socket2 0.5.10", + "socket2", "thiserror 2.0.17", "tokio", "tracing", + "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ "bytes", - "getrandom 0.2.16", - "rand", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", "ring", "rustc-hash", "rustls", @@ -2801,7 +3032,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.1", + "socket2", "tracing", "windows-sys 0.60.2", ] @@ -2828,8 +3059,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -2839,7 +3080,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -2851,6 +3102,15 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rayon" version = "1.11.0" @@ -2942,9 +3202,9 @@ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ "base64", "bytes", @@ -2957,17 +3217,13 @@ dependencies = [ "hyper", "hyper-rustls", "hyper-util", - "ipnet", "js-sys", "log", - "mime", "mime_guess", - "once_cell", "percent-encoding", "pin-project-lite", "quinn", "rustls", - "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", @@ -2976,12 +3232,12 @@ dependencies = [ "tokio", "tokio-rustls", "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-registry", ] [[package]] @@ -3020,19 +3276,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" dependencies = [ "const-oid", - "digest", + "digest 0.10.7", "num-bigint-dig", "num-integer", "num-traits", "pkcs1", "pkcs8", - "rand_core", + "rand_core 0.6.4", "signature", "spki", "subtle", "zeroize", ] +[[package]] +name = "rusqlite" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" +dependencies = [ + "bitflags 2.10.0", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc-demangle" version = "0.1.26" @@ -3093,20 +3363,11 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" dependencies = [ "web-time", "zeroize", @@ -3141,9 +3402,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.7" +version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ "ring", "rustls-pki-types", @@ -3180,21 +3441,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "schemars" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" -dependencies = [ - "chrono", - "dyn-clone", - "indexmap 1.9.3", - "schemars_derive", - "serde", - "serde_json", - "uuid", -] - [[package]] name = "schemars" version = "0.9.0" @@ -3209,21 +3455,24 @@ dependencies = [ [[package]] name = "schemars" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +checksum = "1317c3bf3e7df961da95b0a56a172a02abead31276215a0497241a7624b487ce" dependencies = [ + "chrono", "dyn-clone", "ref-cast", + "schemars_derive", "serde", "serde_json", + "uuid", ] [[package]] name = "schemars_derive" -version = "0.8.22" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +checksum = "5f760a6150d45dd66ec044983c124595ae76912e77ed0b44124cb3e415cce5d9" dependencies = [ "proc-macro2", "quote", @@ -3251,7 +3500,7 @@ dependencies = [ "bitwarden", "bitwarden-json", "itertools 0.13.0", - "schemars 0.8.22", + "schemars 1.0.5", "serde_json", ] @@ -3294,6 +3543,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.19" @@ -3341,6 +3601,7 @@ version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ + "indexmap 2.12.0", "itoa", "memchr", "ryu", @@ -3414,7 +3675,7 @@ dependencies = [ "indexmap 1.9.3", "indexmap 2.12.0", "schemars 0.9.0", - "schemars 1.0.4", + "schemars 1.0.5", "serde_core", "serde_json", "serde_with_macros", @@ -3454,7 +3715,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -3465,7 +3726,7 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -3519,8 +3780,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", - "rand_core", + "digest 0.10.7", + "rand_core 0.6.4", ] [[package]] @@ -3541,16 +3802,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.1" @@ -3786,9 +4037,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -3821,7 +4072,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -3849,9 +4100,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -3923,9 +4174,12 @@ checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags 2.10.0", "bytes", + "futures-util", "http", "http-body", + "iri-string", "pin-project-lite", + "tower", "tower-layer", "tower-service", "tracing", @@ -4021,6 +4275,30 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tsify" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ec5505497c87f1c050b4392d3f11b49a04537fcb9dc0da57bc0af168a6331f2" +dependencies = [ + "serde", + "serde-wasm-bindgen", + "tsify-macros", + "wasm-bindgen", +] + +[[package]] +name = "tsify-macros" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc2c44dc9fe4baf55b88e032621b7a11b215a1f0a7de8d0aa04367207d915bc" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", +] + [[package]] name = "typenum" version = "1.18.0" @@ -4035,9 +4313,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-segmentation" @@ -4069,7 +4347,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "subtle", ] @@ -4111,9 +4389,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.16.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ "getrandom 0.3.4", "js-sys", @@ -4157,6 +4435,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" @@ -4199,49 +4483,37 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", "once_cell", + "rustversion", "serde", "serde_json", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4249,33 +4521,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-bindgen-test" -version = "0.3.45" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d381749acb0943d357dcbd8f0b100640679883fcdeeef04def49daf8d33a5426" +checksum = "bfc379bfb624eb59050b509c13e77b4eb53150c350db69628141abce842f2373" dependencies = [ - "console_error_panic_hook", "js-sys", "minicov", - "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test-macro", @@ -4283,9 +4556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.45" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" +checksum = "085b2df989e1e6f9620c1311df6c996e83fe16f57792b272ce1e024ac16a90f1" dependencies = [ "proc-macro2", "quote", @@ -4294,9 +4567,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -4314,9 +4587,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d651ec480de84b762e7be71e6efa7461699c19d9e2c272c8d93455f567786e" +checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" dependencies = [ "rustls-pki-types", ] @@ -4395,7 +4668,7 @@ dependencies = [ "windows-interface 0.59.3", "windows-link", "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-strings", ] [[package]] @@ -4448,17 +4721,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -4468,15 +4730,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.4.1" @@ -4486,16 +4739,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.5.1" @@ -4813,9 +5056,9 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xterm-color" @@ -4825,11 +5068,10 @@ checksum = "4de5f056fb9dc8b7908754867544e26145767187aaac5a98495e88ad7cb8a80f" [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -4837,9 +5079,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -4916,9 +5158,9 @@ checksum = "ebff5e6b81c1c7dca2d0bd333b2006da48cb37dbcae5a8da888f31fcb3c19934" [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -4927,9 +5169,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -4938,9 +5180,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c21b61c55..dd70b55d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,14 +18,14 @@ keywords = ["bitwarden"] # Define dependencies that are expected to be consistent across all crates [workspace.dependencies] bitwarden = { path = "crates/bitwarden", version = "=1.0.0" } -bitwarden-cli = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "49d027c1f5144d6d319e3cab56782f8b844cd8c2" } -bitwarden-core = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "49d027c1f5144d6d319e3cab56782f8b844cd8c2" } -bitwarden-crypto = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "49d027c1f5144d6d319e3cab56782f8b844cd8c2" } -bitwarden-generators = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "49d027c1f5144d6d319e3cab56782f8b844cd8c2" } -bitwarden-sm = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "49d027c1f5144d6d319e3cab56782f8b844cd8c2" } +bitwarden-cli = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "9574dcc1f5916e73e54cf16e18be456c937a1b99" } +bitwarden-core = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "9574dcc1f5916e73e54cf16e18be456c937a1b99" } +bitwarden-crypto = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "9574dcc1f5916e73e54cf16e18be456c937a1b99" } +bitwarden-generators = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "9574dcc1f5916e73e54cf16e18be456c937a1b99" } +bitwarden-sm = { git = "https://github.com/bitwarden/sdk-internal.git", rev = "9574dcc1f5916e73e54cf16e18be456c937a1b99" } log = "0.4.20" -schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] } +schemars = { version = ">=1.0.0, <2.0", features = ["uuid1", "chrono04"] } tokio = { version = "1.36.0", features = ["macros"] } [workspace.lints.clippy] diff --git a/about.toml b/about.toml index 947a556d1..f4f471ce9 100644 --- a/about.toml +++ b/about.toml @@ -11,6 +11,7 @@ accepted = [ "Unicode-DFS-2016", "Unicode-3.0", "OpenSSL", + "Zlib", ] # Ring has all the licenses combined into a single file, which causes cargo about to diff --git a/crates/bitwarden-json/src/response.rs b/crates/bitwarden-json/src/response.rs index b76d97aa6..e729e8417 100644 --- a/crates/bitwarden-json/src/response.rs +++ b/crates/bitwarden-json/src/response.rs @@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(rename_all = "camelCase", deny_unknown_fields)] +#[schemars(rename = "Response_for_{T}")] pub struct Response { /// Whether or not the SDK request succeeded. pub success: bool, diff --git a/crates/bitwarden-wasm/Cargo.toml b/crates/bitwarden-wasm/Cargo.toml index 3cb6182b0..b75698505 100644 --- a/crates/bitwarden-wasm/Cargo.toml +++ b/crates/bitwarden-wasm/Cargo.toml @@ -18,6 +18,7 @@ crate-type = ["cdylib"] argon2 = { version = ">=0.5.0, <0.6", features = [ "alloc", "zeroize", + "std", ], default-features = false } bitwarden-json = { path = "../bitwarden-json", features = ["secrets"] } console_error_panic_hook = "0.1.7" @@ -26,11 +27,11 @@ js-sys = "0.3.68" log = "0.4.20" serde = { version = "1.0.196", features = ["derive"] } # When upgrading wasm-bindgen, make sure to update the version in the workflows! -wasm-bindgen = { version = "=0.2.95", features = ["serde-serialize"] } -wasm-bindgen-futures = "0.4.41" +wasm-bindgen = { version = "=0.2.105", features = ["serde-serialize"] } +wasm-bindgen-futures = "0.4.45" [dev-dependencies] -wasm-bindgen-test = "0.3.41" +wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] chrono = { version = ">=0.4.26, <0.5", features = [ diff --git a/crates/bitwarden/README.md b/crates/bitwarden/README.md index e45a53edd..6340b8f2b 100644 --- a/crates/bitwarden/README.md +++ b/crates/bitwarden/README.md @@ -36,6 +36,7 @@ async fn test() -> Result<()> { api_url: "https://api.bitwarden.com".to_string(), user_agent: "Bitwarden Rust-SDK".to_string(), device_type: DeviceType::SDK, + bitwarden_client_version: Some(env!("CARGO_PKG_VERSION").to_string()), }; let mut client = Client::new(Some(settings)); diff --git a/crates/bitwarden/src/lib.rs b/crates/bitwarden/src/lib.rs index 552e89bbe..75c9f72d0 100644 --- a/crates/bitwarden/src/lib.rs +++ b/crates/bitwarden/src/lib.rs @@ -33,6 +33,7 @@ //! api_url: "https://api.bitwarden.com".to_string(), //! user_agent: "Bitwarden Rust-SDK".to_string(), //! device_type: DeviceType::SDK, +//! bitwarden_client_version: Some(env!("CARGO_PKG_VERSION").to_string()), //! }; //! let mut client = Client::new(Some(settings)); //! diff --git a/crates/bws/src/command/project.rs b/crates/bws/src/command/project.rs index 442b82d60..228173d13 100644 --- a/crates/bws/src/command/project.rs +++ b/crates/bws/src/command/project.rs @@ -1,5 +1,5 @@ use bitwarden::{ - Client, + Client, OrganizationId, secrets_manager::{ ClientProjectsExt, projects::{ @@ -19,7 +19,7 @@ use crate::{ pub(crate) async fn process_command( command: ProjectCommand, client: Client, - organization_id: Uuid, + organization_id: OrganizationId, output_settings: OutputSettings, ) -> Result<()> { match command { @@ -37,12 +37,14 @@ pub(crate) async fn process_command( pub(crate) async fn list( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, output_settings: OutputSettings, ) -> Result<()> { let projects = client .projects() - .list(&ProjectsListRequest { organization_id }) + .list(&ProjectsListRequest { + organization_id: organization_id.into(), + }) .await? .data; serialize_response(projects, output_settings); @@ -66,14 +68,14 @@ pub(crate) async fn get( pub(crate) async fn create( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, name: String, output_settings: OutputSettings, ) -> Result<()> { let project = client .projects() .create(&ProjectCreateRequest { - organization_id, + organization_id: organization_id.into(), name, }) .await?; @@ -84,7 +86,7 @@ pub(crate) async fn create( pub(crate) async fn edit( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, project_id: Uuid, name: String, output_settings: OutputSettings, @@ -93,7 +95,7 @@ pub(crate) async fn edit( .projects() .update(&ProjectPutRequest { id: project_id, - organization_id, + organization_id: organization_id.into(), name, }) .await?; diff --git a/crates/bws/src/command/run.rs b/crates/bws/src/command/run.rs index ea36ded17..426a1c10d 100644 --- a/crates/bws/src/command/run.rs +++ b/crates/bws/src/command/run.rs @@ -5,7 +5,7 @@ use std::{ }; use bitwarden::{ - Client, + Client, OrganizationId, secrets_manager::{ ClientSecretsExt, secrets::{SecretIdentifiersByProjectRequest, SecretIdentifiersRequest, SecretsGetRequest}, @@ -26,7 +26,7 @@ const WINDOWS_ESSENTIAL_VARS: &[&str] = &["SystemRoot", "ComSpec", "windir"]; pub(crate) async fn run( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, project_id: Option, uuids_as_keynames: bool, no_inherit_env: bool, @@ -67,7 +67,9 @@ pub(crate) async fn run( } else { client .secrets() - .list(&SecretIdentifiersRequest { organization_id }) + .list(&SecretIdentifiersRequest { + organization_id: organization_id.into(), + }) .await? }; diff --git a/crates/bws/src/command/secret.rs b/crates/bws/src/command/secret.rs index 1652017ce..8c96792b0 100644 --- a/crates/bws/src/command/secret.rs +++ b/crates/bws/src/command/secret.rs @@ -1,5 +1,5 @@ use bitwarden::{ - Client, + Client, OrganizationId, secrets_manager::{ ClientSecretsExt, secrets::{ @@ -37,7 +37,7 @@ pub(crate) struct SecretEditCommandModel { pub(crate) async fn process_command( command: SecretCommand, client: Client, - organization_id: Uuid, + organization_id: OrganizationId, output_settings: OutputSettings, ) -> Result<()> { match command { @@ -91,7 +91,7 @@ pub(crate) async fn process_command( pub(crate) async fn list( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, project_id: Option, output_settings: OutputSettings, ) -> Result<()> { @@ -103,7 +103,9 @@ pub(crate) async fn list( } else { client .secrets() - .list(&SecretIdentifiersRequest { organization_id }) + .list(&SecretIdentifiersRequest { + organization_id: organization_id.into(), + }) .await? }; @@ -139,14 +141,14 @@ pub(crate) async fn get( pub(crate) async fn create( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, secret: SecretCreateCommandModel, output_settings: OutputSettings, ) -> Result<()> { let secret = client .secrets() .create(&SecretCreateRequest { - organization_id, + organization_id: organization_id.into(), key: secret.key, value: secret.value, note: secret.note.unwrap_or_default(), @@ -160,7 +162,7 @@ pub(crate) async fn create( pub(crate) async fn edit( client: Client, - organization_id: Uuid, + organization_id: OrganizationId, secret: SecretEditCommandModel, output_settings: OutputSettings, ) -> Result<()> { @@ -173,7 +175,7 @@ pub(crate) async fn edit( .secrets() .update(&SecretPutRequest { id: secret.id, - organization_id, + organization_id: organization_id.into(), key: secret.key.unwrap_or(old_secret.key), value: secret.value.unwrap_or(old_secret.value), note: secret.note.unwrap_or(old_secret.note), diff --git a/crates/bws/test.sh b/crates/bws/test.sh index 3f0bab7d5..f3bcb665e 100755 --- a/crates/bws/test.sh +++ b/crates/bws/test.sh @@ -9,8 +9,8 @@ run_test() { test_command="$2" if [ "$BUILD_FROM_SOURCE" -eq 1 ]; then - ./target/release/bws --version >/dev/null || cargo build --bin bws --quiet --release - modified_command=$(echo "$test_command" | sed 's/bws/.\/target\/release\/bws/') + ./target/debug/bws --version >/dev/null || cargo build --bin bws --quiet + modified_command=$(echo "$test_command" | sed 's/bws/.\/target\/debug\/bws/') else modified_command="$test_command" fi diff --git a/crates/sdk-schemas/src/main.rs b/crates/sdk-schemas/src/main.rs index a5d38ca4d..68cb4932e 100644 --- a/crates/sdk-schemas/src/main.rs +++ b/crates/sdk-schemas/src/main.rs @@ -1,7 +1,7 @@ use std::{fs::File, io::Write}; use anyhow::Result; -use schemars::{JsonSchema, schema::RootSchema, schema_for}; +use schemars::{JsonSchema, Schema, schema_for}; /// Creates a json schema file for any type passed in using Schemars. The filename and path of the /// generated schema file is derived from the namespace passed into the macro or supplied as the @@ -68,7 +68,7 @@ macro_rules! write_schema_for { }; } -fn write_schema(schema: RootSchema, dir_path: String, type_name: String) -> Result<()> { +fn write_schema(schema: Schema, dir_path: String, type_name: String) -> Result<()> { let file_name = type_name .split("::") .last() diff --git a/languages/cpp/src/Projects.cpp b/languages/cpp/src/Projects.cpp index b2fa1c688..de058a95e 100644 --- a/languages/cpp/src/Projects.cpp +++ b/languages/cpp/src/Projects.cpp @@ -101,7 +101,7 @@ ProjectsDeleteResponse Projects::deleteProjects(const std::vector/dev/null 2>&1; then - echo "Error: python3 is required but not installed" >&2 - exit 1 - fi + if ! command -v python3 >/dev/null 2>&1; then + echo "Error: python3 is required but not installed" >&2 + exit 1 + fi - if ! command -v uv >/dev/null 2>&1; then - echo "Error: uv is required but not installed" >&2 - exit 1 - fi + if ! command -v uv >/dev/null 2>&1; then + echo "Error: uv is required but not installed" >&2 + exit 1 + fi - if [ ! -f "bitwarden_sdk/schemas.py" ]; then - echo "Error: schemas.py not found. Please run ./setup.sh first" - exit 1 - fi + if [ ! -f "bitwarden_sdk/schemas.py" ]; then + echo "Error: schemas.py not found. Please run ./setup.sh first" + exit 1 + fi - echo "✓ All requirements met" + echo "✓ All requirements met" } source_venv() { - # for Windows compatibility... - set -x - source "$TMP_DIR/.venv-$python_version/bin/activate" || source "$TMP_DIR/.venv-$python_version/Scripts/activate" || { - echo "Error: Failed to activate virtual environment for $python_version" >&2 - ls -halR "$TMP_DIR/.venv-$python_version" || true - exit 1 - } - set +x + # for Windows compatibility... + set -x + source "$TMP_DIR/.venv-$python_version/bin/activate" || source "$TMP_DIR/.venv-$python_version/Scripts/activate" || { + echo "Error: Failed to activate virtual environment for $python_version" >&2 + ls -halR "$TMP_DIR/.venv-$python_version" || true + exit 1 + } + set +x } # Install Python dependencies setup_python_environment() { - python_version=$1 - echo "Setting up Python virtual environment $python_version..." + python_version=$1 + echo "Setting up Python virtual environment $python_version..." - # Create virtual environment if it doesn't exist - if [ ! -d "$TMP_DIR/.venv-$python_version" ]; then - uv venv "$TMP_DIR/.venv-$python_version" --python "$python_version" - echo "✓ Created Python virtual environment for $python_version" - fi + # Create virtual environment if it doesn't exist + if [ ! -d "$TMP_DIR/.venv-$python_version" ]; then + uv venv "$TMP_DIR/.venv-$python_version" --python "$python_version" + echo "✓ Created Python virtual environment for $python_version" + fi - # Activate virtual environment - source_venv + # Activate virtual environment + source_venv - # Upgrade pip and install maturin - uv pip install --upgrade pip + # Upgrade pip and install maturin + uv pip install --upgrade pip } # Build the Python package build_package() { - python_version=$1 - echo "Building Python package for $python_version..." - - # Activate virtual environment - source_venv - - # Build the package in development mode - if [ "$(uname -s)" = "Linux" ]; then - # Linux requires patchelf for binary compatibility - uv pip install .[dev-linux] - else - uv pip install .[dev] - fi - echo "✓ Built Python package" + python_version=$1 + echo "Building Python package for $python_version..." + + # Activate virtual environment + source_venv + + # Build the package in development mode + if [ "$(uname -s)" = "Linux" ]; then + # Linux requires patchelf for binary compatibility + uv pip install .[dev-linux] + else + uv pip install .[dev] + fi + + maturin develop + echo "✓ Built Python package" } # Run the CRUD test script run_crud_test() { - echo "Running CRUD test for Python $python_version..." + echo "Running CRUD test for Python $python_version..." - # Activate virtual environment - source_venv + # Activate virtual environment + source_venv - # Run the CRUD test - python3 test/crud.py + # Run the CRUD test + python3 test/crud.py } # Main test function main() { - check_requirements - for python_version in $PYTHON_VERSIONS; do - setup_python_environment "$python_version" - build_package "$python_version" - run_crud_test "$python_version" - done + check_requirements + for python_version in $PYTHON_VERSIONS; do + setup_python_environment "$python_version" + build_package "$python_version" + run_crud_test "$python_version" + done } main "$@" diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 93d7e0eb0..6b47b22bd 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -17,134 +17,134 @@ export STATE_FILE="${TMP_DIR}/state" # input: bws, or any of the lanaguages in ./languages # output: a build directory build_directory() { - local language="$1" + local language="$1" - if [ "$language" = "bws" ]; then - echo "$REPO_ROOT/crates/bws" - else - echo "$REPO_ROOT/languages/$language" - fi + if [ "$language" = "bws" ]; then + echo "$REPO_ROOT/crates/bws" + else + echo "$REPO_ROOT/languages/$language" + fi } common_setup() { - npm install >/dev/null - npm run schemas >/dev/null - cargo build --quiet --release >/dev/null + npm install >/dev/null + npm run schemas >/dev/null + cargo build --quiet >/dev/null } # Start fake server in background start_fake_server() { - local port="${SM_FAKE_SERVER_PORT:-3000}" - - # Check if server is already running - if curl -s "http://localhost:$port/health" >/dev/null 2>&1; then - echo "✓ Fake server already running on port $port" - return 0 - fi - - echo "Starting fake server on port $port..." - cargo build -p fake-server >/dev/null - SM_FAKE_SERVER_PORT="$port" cargo run -p fake-server >/dev/null 2>&1 & - FAKE_SERVER_PID=$! - - # Wait for server to be ready - local max_attempts=30 - local attempt=0 - while [ $attempt -lt $max_attempts ]; do - if curl -s "http://localhost:$port/health" >/dev/null 2>&1; then - echo "✓ Fake server is ready" - return 0 - fi - sleep 1 - attempt=$((attempt + 1)) - done - - echo "Error: Fake server failed to start within 30 seconds" - kill $FAKE_SERVER_PID 2>/dev/null || true - exit 1 + local port="${SM_FAKE_SERVER_PORT:-3000}" + + # Check if server is already running + if curl -s "http://localhost:$port/health" >/dev/null 2>&1; then + echo "✓ Fake server already running on port $port" + return 0 + fi + + echo "Starting fake server on port $port..." + cargo build -p fake-server >/dev/null + SM_FAKE_SERVER_PORT="$port" cargo run -p fake-server >/dev/null 2>&1 & + FAKE_SERVER_PID=$! + + # Wait for server to be ready + local max_attempts=30 + local attempt=0 + while [ $attempt -lt $max_attempts ]; do + if curl -s "http://localhost:$port/health" >/dev/null 2>&1; then + echo "✓ Fake server is ready" + return 0 + fi + sleep 1 + attempt=$((attempt + 1)) + done + + echo "Error: Fake server failed to start within 30 seconds" + kill $FAKE_SERVER_PID 2>/dev/null || true + exit 1 } # Stop fake server stop_fake_server() { - if [ -n "${FAKE_SERVER_PID:-}" ]; then - echo "Stopping fake server..." - kill "$FAKE_SERVER_PID" 2>/dev/null || true - wait "$FAKE_SERVER_PID" 2>/dev/null || true - fi + if [ -n "${FAKE_SERVER_PID:-}" ]; then + echo "Stopping fake server..." + kill "$FAKE_SERVER_PID" 2>/dev/null || true + wait "$FAKE_SERVER_PID" 2>/dev/null || true + fi } # Cleanup function cleanup() { - stop_fake_server + stop_fake_server } main() { - local action="$1" - local language="$2" - local dir - - dir="$(build_directory "$language")" - - # Set up cleanup trap - trap cleanup EXIT - - case "$action" in - all) - common_setup - pushd "$dir" >/dev/null || { - echo "Failed to change directory to $dir" - exit 1 - } - source ./setup.sh - start_fake_server - ./test.sh - popd >/dev/null || { - echo "Failed to return to previous directory" - exit 1 - } - ;; - setup) - common_setup - - # Check if setup.sh exists in $dir - if [ ! -f "$dir/setup.sh" ]; then - echo "Error: setup.sh not found in $dir" - exit 1 - fi - - pushd "$dir" >/dev/null || { - echo "Failed to change directory to $dir" - exit 1 - } - source ./setup.sh - popd >/dev/null || { - echo "Failed to return to previous directory" - exit 1 - } - ;; - test) - if [ ! -f "$dir/test.sh" ]; then - echo "Error: test.sh not found in $dir" - exit 1 - fi - - pushd "$dir" >/dev/null || { - echo "Failed to change directory to $dir" - exit 1 - } - start_fake_server - ./test.sh - popd >/dev/null || { - echo "Failed to return to previous directory" - exit 1 - } - ;; - *) - echo "Usage: $0 {all|setup|test} " - echo "Available languages: bws, python, csharp, java, js, etc." - exit 1 - ;; - esac + local action="$1" + local language="$2" + local dir + + dir="$(build_directory "$language")" + + # Set up cleanup trap + trap cleanup EXIT + + case "$action" in + all) + common_setup + pushd "$dir" >/dev/null || { + echo "Failed to change directory to $dir" + exit 1 + } + source ./setup.sh + start_fake_server + ./test.sh + popd >/dev/null || { + echo "Failed to return to previous directory" + exit 1 + } + ;; + setup) + common_setup + + # Check if setup.sh exists in $dir + if [ ! -f "$dir/setup.sh" ]; then + echo "Error: setup.sh not found in $dir" + exit 1 + fi + + pushd "$dir" >/dev/null || { + echo "Failed to change directory to $dir" + exit 1 + } + source ./setup.sh + popd >/dev/null || { + echo "Failed to return to previous directory" + exit 1 + } + ;; + test) + if [ ! -f "$dir/test.sh" ]; then + echo "Error: test.sh not found in $dir" + exit 1 + fi + + pushd "$dir" >/dev/null || { + echo "Failed to change directory to $dir" + exit 1 + } + start_fake_server + ./test.sh + popd >/dev/null || { + echo "Failed to return to previous directory" + exit 1 + } + ;; + *) + echo "Usage: $0 {all|setup|test} " + echo "Available languages: bws, python, csharp, java, js, etc." + exit 1 + ;; + esac } main "$@" diff --git a/support/scripts/schemas.ts b/support/scripts/schemas.ts index 873a9de7d..b81783750 100644 --- a/support/scripts/schemas.ts +++ b/support/scripts/schemas.ts @@ -16,7 +16,7 @@ async function main() { "schema", { name: "SchemaTypes", - uris: ["support/schemas/schema_types/SchemaTypes.json#/definitions/"], + uris: ["support/schemas/schema_types/SchemaTypes.json#/$defs/"], }, () => new JSONSchemaInput(new FetchingJSONSchemaStore()), ); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..90e87f4c3 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "moduleResolution": "node", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true + }, + "ts-node": { + "esm": false, + "compilerOptions": { + "module": "commonjs" + } + } +}