From 25e1e0243aad0e70b19da8390dd8e94bf9a95bb8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:09:13 +0200 Subject: [PATCH 01/17] Update Rust crate toml to 0.8.0 (#237) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Cargo.lock | 10 +++++----- crates/bws/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 981a39428..1c7e7be57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -533,7 +533,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.7.8", + "toml 0.8.0", "uuid", ] @@ -3235,9 +3235,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" dependencies = [ "serde", "serde_spanned", @@ -3256,9 +3256,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" dependencies = [ "indexmap 2.0.0", "serde", diff --git a/crates/bws/Cargo.toml b/crates/bws/Cargo.toml index 48fadc605..ed4dc3b91 100644 --- a/crates/bws/Cargo.toml +++ b/crates/bws/Cargo.toml @@ -35,7 +35,7 @@ serde_yaml = "0.9" supports-color = "2.0.0" thiserror = "1.0.40" tokio = { version = "1.28.2", features = ["rt-multi-thread", "macros"] } -toml = "0.7.4" +toml = "0.8.0" uuid = { version = "^1.3.3", features = ["serde"] } bitwarden = { path = "../bitwarden", version = "0.3.0", features = ["secrets"] } From ec5e913705906175443dfdb1fddae58d5225fdd8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:20:21 +0200 Subject: [PATCH 02/17] Lock file maintenance (#240) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Cargo.lock | 84 +++++++++++----------- crates/bitwarden-napi/package-lock.json | 6 +- languages/js_webassembly/package-lock.json | 54 +++++++------- package-lock.json | 12 ++-- 4 files changed, 78 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1c7e7be57..d682a9410 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -156,7 +156,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -209,7 +209,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -492,9 +492,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bw" @@ -619,9 +619,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", @@ -680,7 +680,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -914,7 +914,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f34ba9a9bcb8645379e9de8cb3ecfcf4d1c85ba66d90deb3259206fa5aa193b" dependencies = [ "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -1274,7 +1274,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -1707,9 +1707,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -2055,7 +2055,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -2244,9 +2244,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -2626,9 +2626,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "chrono", "dyn-clone", @@ -2641,9 +2641,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -2680,7 +2680,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -2745,7 +2745,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -2761,9 +2761,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -2800,7 +2800,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -2953,9 +2953,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -3043,9 +3043,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -3116,7 +3116,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -3184,7 +3184,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -3197,7 +3197,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -3323,9 +3323,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" @@ -3344,9 +3344,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3430,7 +3430,7 @@ version = "0.24.1" source = "git+https://github.com/mozilla/uniffi-rs?rev=53d5ac7274d8b4d66ad35b68cb6e2d89898f96af#53d5ac7274d8b4d66ad35b68cb6e2d89898f96af" dependencies = [ "quote", - "syn 2.0.32", + "syn 2.0.37", ] [[package]] @@ -3460,7 +3460,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.32", + "syn 2.0.37", "toml 0.5.11", "uniffi_build", "uniffi_meta", @@ -3620,7 +3620,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -3654,7 +3654,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/crates/bitwarden-napi/package-lock.json b/crates/bitwarden-napi/package-lock.json index 1e7d96e63..4383da1a7 100644 --- a/crates/bitwarden-napi/package-lock.json +++ b/crates/bitwarden-napi/package-lock.json @@ -95,9 +95,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", - "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==", + "version": "20.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", + "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", "dev": true, "peer": true }, diff --git a/languages/js_webassembly/package-lock.json b/languages/js_webassembly/package-lock.json index 446d378f3..962a13941 100644 --- a/languages/js_webassembly/package-lock.json +++ b/languages/js_webassembly/package-lock.json @@ -88,9 +88,9 @@ "dev": true }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.3.tgz", + "integrity": "sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==", "dev": true, "dependencies": { "@types/connect": "*", @@ -98,9 +98,9 @@ } }, "node_modules/@types/bonjour": { - "version": "3.5.10", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", - "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", + "version": "3.5.11", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.11.tgz", + "integrity": "sha512-isGhjmBtLIxdHBDl2xGwUzEM8AOyOvWsADWq7rqirdi/ZQoHnLWErHvsThcEzTX8juDRiZtzp2Qkv5bgNh6mAg==", "dev": true, "dependencies": { "@types/node": "*" @@ -182,24 +182,24 @@ "dev": true }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.2.tgz", + "integrity": "sha512-lPG6KlZs88gef6aD85z3HNkztpj7w2R7HmR3gygjfXCQmsLloWNARFkMuzKiiY8FGdh1XDpgBdrSf4aKDiA7Kg==", "dev": true }, "node_modules/@types/http-proxy": { - "version": "1.17.11", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.11.tgz", - "integrity": "sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==", + "version": "1.17.12", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.12.tgz", + "integrity": "sha512-kQtujO08dVtQ2wXAuSFfk9ASy3sug4+ogFR8Kd8UgP8PEuc1/G/8yjYRmp//PcDNJEUKOza/MrQu15bouEUCiw==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", "dev": true }, "node_modules/@types/mime": { @@ -209,9 +209,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", - "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==", + "version": "20.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", + "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", "dev": true }, "node_modules/@types/qs": { @@ -823,9 +823,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001532", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001532.tgz", - "integrity": "sha512-FbDFnNat3nMnrROzqrsg314zhqN5LGQ1kyyMk2opcrwGbVGpHRhgCWtAgD5YJUqNAiQ+dklreil/c3Qf1dfCTw==", + "version": "1.0.30001535", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001535.tgz", + "integrity": "sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==", "dev": true, "funding": [ { @@ -1251,9 +1251,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.513", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz", - "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==", + "version": "1.4.523", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz", + "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==", "dev": true }, "node_modules/encodeurl": { @@ -2923,9 +2923,9 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", diff --git a/package-lock.json b/package-lock.json index 747505123..4e48c7540 100644 --- a/package-lock.json +++ b/package-lock.json @@ -363,9 +363,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", - "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==", + "version": "20.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", + "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", "dev": true, "peer": true }, @@ -581,9 +581,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", - "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", + "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", "dev": true, "engines": { "node": ">=6" From 76396a2fbfdb86c268326a5f5f47be1e8b797656 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:49:48 -0400 Subject: [PATCH 03/17] Update Swatinem/rust-cache action to v2.7.0 (#238) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-android.yml | 4 ++-- .github/workflows/build-cli.yml | 4 ++-- .github/workflows/build-napi.yml | 2 +- .github/workflows/build-rust-crates.yml | 4 ++-- .github/workflows/direct-minimal-versions.yml | 2 +- .github/workflows/generate_schemas.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/publish-rust-crates.yml | 2 +- .github/workflows/release-cli.yml | 2 +- .github/workflows/rust-test.yml | 4 ++-- .github/workflows/version-bump.yml | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 0ce608471..c5e3f1fee 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -33,7 +33,7 @@ jobs: toolchain: 1.67.0 # https://github.com/cross-rs/cross/issues/1222 - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: ${{ matrix.settings.target }}-cargo @@ -75,7 +75,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: cargo-combine-cache diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index e55a6c4ad..0d79e9831 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -69,7 +69,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }} @@ -163,7 +163,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: cargo-cli-about diff --git a/.github/workflows/build-napi.yml b/.github/workflows/build-napi.yml index 26a8ecffb..a571a9ed2 100644 --- a/.github/workflows/build-napi.yml +++ b/.github/workflows/build-napi.yml @@ -67,7 +67,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }} diff --git a/.github/workflows/build-rust-crates.yml b/.github/workflows/build-rust-crates.yml index 9edea77cf..08b745069 100644 --- a/.github/workflows/build-rust-crates.yml +++ b/.github/workflows/build-rust-crates.yml @@ -43,7 +43,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Build run: cargo build -p ${{ matrix.package }} --release @@ -73,7 +73,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Install cargo-release run: cargo install cargo-release diff --git a/.github/workflows/direct-minimal-versions.yml b/.github/workflows/direct-minimal-versions.yml index 518e37e23..ce5d8f525 100644 --- a/.github/workflows/direct-minimal-versions.yml +++ b/.github/workflows/direct-minimal-versions.yml @@ -45,7 +45,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: key: dmv-${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }} diff --git a/.github/workflows/generate_schemas.yml b/.github/workflows/generate_schemas.yml index 037d4ac67..cc5f5c9e5 100644 --- a/.github/workflows/generate_schemas.yml +++ b/.github/workflows/generate_schemas.yml @@ -31,7 +31,7 @@ jobs: run: npm ci - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: NPM Schemas run: npm run schemas diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 97d6bfe41..735b6e95f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Cargo fmt run: cargo fmt --check diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index d94b66a2d..c38e2822a 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -120,7 +120,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Install cargo-release run: cargo install cargo-release diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index adbc4b32a..d393b9d22 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -145,7 +145,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Install cargo-release run: cargo install cargo-release diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 425735719..d92a54ba5 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -44,7 +44,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Test run: cargo test --all-features @@ -65,7 +65,7 @@ jobs: targets: wasm32-unknown-unknown - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Check run: cargo check -p bitwarden-wasm --target wasm32-unknown-unknown diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index e3f743074..e7421bde6 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -37,7 +37,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Install cargo-release run: cargo install cargo-edit From 25d857e15b69b1545a432211a6eaac9215e11c6c Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 21 Sep 2023 09:59:37 +0200 Subject: [PATCH 04/17] [SM-938] Change secrets manager to use proper dates (#242) --- crates/bitwarden/src/error.rs | 2 ++ .../projects/project_response.rs | 18 +++++++++++------- .../secrets_manager/secrets/secret_response.rs | 17 +++++++++++------ crates/bws/src/render.rs | 9 +++------ 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/crates/bitwarden/src/error.rs b/crates/bitwarden/src/error.rs index cd742f810..6a9b0d8aa 100644 --- a/crates/bitwarden/src/error.rs +++ b/crates/bitwarden/src/error.rs @@ -40,6 +40,8 @@ pub enum Error { Io(#[from] std::io::Error), #[error(transparent)] InvalidBase64(#[from] base64::DecodeError), + #[error(transparent)] + Chrono(#[from] chrono::ParseError), #[error("Received error message from server: [{}] {}", .status, .message)] ResponseContent { status: StatusCode, message: String }, diff --git a/crates/bitwarden/src/secrets_manager/projects/project_response.rs b/crates/bitwarden/src/secrets_manager/projects/project_response.rs index 52980c45f..b8c82806b 100644 --- a/crates/bitwarden/src/secrets_manager/projects/project_response.rs +++ b/crates/bitwarden/src/secrets_manager/projects/project_response.rs @@ -1,4 +1,5 @@ use bitwarden_api_api::models::ProjectResponseModel; +use chrono::{DateTime, Utc}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -12,12 +13,11 @@ use crate::{ #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ProjectResponse { - pub object: String, pub id: Uuid, pub organization_id: Uuid, pub name: String, - pub creation_date: String, - pub revision_date: String, + pub creation_date: DateTime, + pub revision_date: DateTime, } impl ProjectResponse { @@ -34,14 +34,18 @@ impl ProjectResponse { .decrypt(enc, &Some(organization_id))?; Ok(ProjectResponse { - object: "project".to_owned(), - id: response.id.ok_or(Error::MissingFields)?, organization_id, name, - creation_date: response.creation_date.ok_or(Error::MissingFields)?, - revision_date: response.revision_date.ok_or(Error::MissingFields)?, + creation_date: response + .creation_date + .ok_or(Error::MissingFields)? + .parse()?, + revision_date: response + .revision_date + .ok_or(Error::MissingFields)? + .parse()?, }) } } diff --git a/crates/bitwarden/src/secrets_manager/secrets/secret_response.rs b/crates/bitwarden/src/secrets_manager/secrets/secret_response.rs index 635d1e3c0..a7fe49200 100644 --- a/crates/bitwarden/src/secrets_manager/secrets/secret_response.rs +++ b/crates/bitwarden/src/secrets_manager/secrets/secret_response.rs @@ -1,6 +1,7 @@ use bitwarden_api_api::models::{ BaseSecretResponseModel, BaseSecretResponseModelListResponseModel, SecretResponseModel, }; +use chrono::{DateTime, Utc}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -14,7 +15,6 @@ use crate::{ #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SecretResponse { - pub object: String, pub id: Uuid, pub organization_id: Uuid, pub project_id: Option, @@ -23,8 +23,8 @@ pub struct SecretResponse { pub value: String, pub note: String, - pub creation_date: String, - pub revision_date: String, + pub creation_date: DateTime, + pub revision_date: DateTime, } impl SecretResponse { @@ -73,7 +73,6 @@ impl SecretResponse { .and_then(|p| p.id); Ok(SecretResponse { - object: "secret".to_owned(), id: response.id.ok_or(Error::MissingFields)?, organization_id: org_id.ok_or(Error::MissingFields)?, project_id: project, @@ -81,8 +80,14 @@ impl SecretResponse { value, note, - creation_date: response.creation_date.ok_or(Error::MissingFields)?, - revision_date: response.revision_date.ok_or(Error::MissingFields)?, + creation_date: response + .creation_date + .ok_or(Error::MissingFields)? + .parse()?, + revision_date: response + .revision_date + .ok_or(Error::MissingFields)? + .parse()?, }) } } diff --git a/crates/bws/src/render.rs b/crates/bws/src/render.rs index 7a7822113..4f2a32e9a 100644 --- a/crates/bws/src/render.rs +++ b/crates/bws/src/render.rs @@ -1,5 +1,5 @@ use bitwarden::secrets_manager::{projects::ProjectResponse, secrets::SecretResponse}; -use chrono::DateTime; +use chrono::{DateTime, Utc}; use clap::ValueEnum; use comfy_table::Table; use serde::Serialize; @@ -105,11 +105,8 @@ impl, const N: usize> TableSerialize for Vec { } } -fn format_date(date: &str) -> String { - DateTime::parse_from_rfc3339(date) - .unwrap() - .format("%Y-%m-%d %H:%M:%S") - .to_string() +fn format_date(date: &DateTime) -> String { + date.format("%Y-%m-%d %H:%M:%S").to_string() } impl TableSerialize<3> for ProjectResponse { From 251987685c8768cbe98fd5c6a42f06eedff4f27e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:33:37 +0200 Subject: [PATCH 05/17] Update dtolnay/rust-toolchain digest to 439cf60 (#239) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-android.yml | 4 ++-- .github/workflows/build-cli.yml | 4 ++-- .github/workflows/build-napi.yml | 2 +- .github/workflows/build-rust-crates.yml | 4 ++-- .github/workflows/direct-minimal-versions.yml | 2 +- .github/workflows/generate_schemas.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/publish-rust-crates.yml | 2 +- .github/workflows/release-cli.yml | 2 +- .github/workflows/rust-test.yml | 4 ++-- .github/workflows/version-bump.yml | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index c5e3f1fee..f723859a6 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: 1.67.0 # https://github.com/cross-rs/cross/issues/1222 @@ -70,7 +70,7 @@ jobs: fetch-depth: 0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 0d79e9831..3a0ab6213 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -63,7 +63,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable targets: ${{ matrix.settings.target }} @@ -158,7 +158,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/build-napi.yml b/.github/workflows/build-napi.yml index a571a9ed2..e9a8f49a5 100644 --- a/.github/workflows/build-napi.yml +++ b/.github/workflows/build-napi.yml @@ -61,7 +61,7 @@ jobs: cache-dependency-path: crates/bitwarden-napi/package-lock.json - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable targets: ${{ matrix.settings.target }} diff --git a/.github/workflows/build-rust-crates.yml b/.github/workflows/build-rust-crates.yml index 08b745069..c7d5aaf85 100644 --- a/.github/workflows/build-rust-crates.yml +++ b/.github/workflows/build-rust-crates.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable targets: ${{ matrix.settings.target }} @@ -67,7 +67,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable targets: ${{ matrix.settings.target }} diff --git a/.github/workflows/direct-minimal-versions.yml b/.github/workflows/direct-minimal-versions.yml index ce5d8f525..41a5e4b68 100644 --- a/.github/workflows/direct-minimal-versions.yml +++ b/.github/workflows/direct-minimal-versions.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: nightly targets: ${{ matrix.settings.target }} diff --git a/.github/workflows/generate_schemas.yml b/.github/workflows/generate_schemas.yml index cc5f5c9e5..1f75ee483 100644 --- a/.github/workflows/generate_schemas.yml +++ b/.github/workflows/generate_schemas.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 735b6e95f..03f4fb4e0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index c38e2822a..7ba18cc57 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -115,7 +115,7 @@ jobs: secrets: "cratesio-api-token" - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index d393b9d22..d80fc1f7a 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -140,7 +140,7 @@ jobs: secrets: "cratesio-api-token" - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index d92a54ba5..877cbbbc0 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable targets: wasm32-unknown-unknown diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index e7421bde6..0944f969a 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Install rust - uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable From 0185899f1479a945d4df6b74784e701071ad58d2 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 21 Sep 2023 16:33:20 +0200 Subject: [PATCH 06/17] Change maven artifactId to sdk-android (#235) * Remove github_actor * Use custom git commands instead * Grab from cargo file instead * Add workflow for cleaning up old packages * Only specify min-versions-to-keep * Update name --------- Co-authored-by: Matt Bishop --- .github/workflows/build-android.yml | 15 +------------- .github/workflows/delete-old-packages.yml | 25 +++++++++++++++++++++++ languages/kotlin/app/build.gradle | 2 +- languages/kotlin/sdk/build.gradle | 24 +++++++++++++++------- 4 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/delete-old-packages.yml diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index f723859a6..579392c8e 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -101,23 +101,10 @@ jobs: working-directory: languages/kotlin run: ./build-schemas.sh - - name: Login to Azure - CI Subscription - uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 - with: - creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} - - - name: Retrieve bot secrets - id: retrieve-bot-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e - with: - keyvault: bitwarden-ci - secrets: "github-pat-bitwarden-devops-bot-packages-scope" - - name: Publish uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc # v2.8.0 with: arguments: sdk:publish build-root-directory: languages/kotlin env: - GITHUB_ACTOR: "bitwarden-devops-bot" - GITHUB_TOKEN: ${{ steps.retrieve-bot-secrets.outputs.github-pat-bitwarden-devops-bot-packages-scope }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/delete-old-packages.yml b/.github/workflows/delete-old-packages.yml new file mode 100644 index 000000000..517560ede --- /dev/null +++ b/.github/workflows/delete-old-packages.yml @@ -0,0 +1,25 @@ +--- +name: Delete old packages + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + delete: + name: Cleanup Android SDK + runs-on: ubuntu-22.04 + steps: + - uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4.1.1 + with: + package-name: com.bitwarden.sdk-android + package-type: maven + min-versions-to-keep: 25 + + # Ignore versions only containing version numbers + ignore-versions: '^\\d*\\.\\d*\\.\\d*$' diff --git a/languages/kotlin/app/build.gradle b/languages/kotlin/app/build.gradle index 2b7bc0255..709e32889 100644 --- a/languages/kotlin/app/build.gradle +++ b/languages/kotlin/app/build.gradle @@ -48,7 +48,7 @@ android { } dependencies { - // implementation 'com.bitwarden.sdk' + // implementation 'com.bitwarden.sdk-android' implementation project(':sdk') implementation 'androidx.core:core-ktx:1.8.0' diff --git a/languages/kotlin/sdk/build.gradle b/languages/kotlin/sdk/build.gradle index 3d164e094..5b8637f83 100644 --- a/languages/kotlin/sdk/build.gradle +++ b/languages/kotlin/sdk/build.gradle @@ -2,7 +2,6 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' id 'maven-publish' - id 'com.palantir.git-version' version '3.0.0' } android { @@ -42,14 +41,25 @@ publishing { publications { maven(MavenPublication) { groupId = 'com.bitwarden' - artifactId = 'sdk' + artifactId = 'sdk-android' - def details = versionDetails() + // Determine the version from the git history. + // + // PRs: use the branch name. + // Master: Grab it from `crates/bitwarden/Cargo.toml` - if (details.branchName == null) { - version = "master-SNAPSHOT" + def branchName = "git branch --show-current".execute().text.trim() + + if (branchName == null) { + def content = ['grep', '-o', '^version = ".*"', '../../crates/bitwarden/Cargo.toml'].execute().text.trim() + def match = ~/version = "(.*)"/ + def matcher = match.matcher(content) + matcher.find() + + version = "${matcher.group(1)}-SNAPSHOT" } else { - version "${details.branchName.replaceAll('/', '-')}-SNAPSHOT" + // branchName-SNAPSHOT + version = "${branchName.replaceAll('/', '-')}-SNAPSHOT" } afterEvaluate { @@ -60,7 +70,7 @@ publishing { repositories { maven { name = "GitHubPackages" - url = "https://maven.pkg.github.com/bitwarden/sdk-maven" + url = "https://maven.pkg.github.com/bitwarden/sdk" credentials { username = System.getenv("GITHUB_ACTOR") password = System.getenv("GITHUB_TOKEN") From 58dbf9b6da32a0dea1a68c09b5282dc654b0d6ef Mon Sep 17 00:00:00 2001 From: Matt Bishop Date: Thu, 21 Sep 2023 13:28:12 -0400 Subject: [PATCH 07/17] Check for master branch with Maven builds (#246) --- languages/kotlin/sdk/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/kotlin/sdk/build.gradle b/languages/kotlin/sdk/build.gradle index 5b8637f83..3fb6956e2 100644 --- a/languages/kotlin/sdk/build.gradle +++ b/languages/kotlin/sdk/build.gradle @@ -50,7 +50,7 @@ publishing { def branchName = "git branch --show-current".execute().text.trim() - if (branchName == null) { + if (branchName == "master") { def content = ['grep', '-o', '^version = ".*"', '../../crates/bitwarden/Cargo.toml'].execute().text.trim() def match = ~/version = "(.*)"/ def matcher = match.matcher(content) From 662a92dab241e754f6243727b2ab8d87174b9dd5 Mon Sep 17 00:00:00 2001 From: Boris Bujak Date: Thu, 21 Sep 2023 20:32:07 +0200 Subject: [PATCH 08/17] .NET wrapper for SDK (#193) Co-authored-by: Boris Bujak Co-authored-by: Oscar Hinton --- .github/workflows/build-dotnet.yml | 78 +++++ .../workflows/build-rust-cross-platform.yml | 48 +++ .github/workflows/generate_schemas.yml | 2 +- .github/workflows/publish-dotnet.yml | 69 ++++ .gitignore | 2 +- .vscode/launch.json | 2 +- .vscode/settings.json | 1 + .vscode/tasks.json | 2 +- languages/csharp/.editorconfig | 125 ++++++++ .../Bitwarden.Sdk.Samples.csproj | 14 + .../csharp/Bitwarden.Sdk.Samples/Program.cs | 30 ++ .../csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj | 73 +++++ .../Bitwarden.Sdk/BitwardenAuthException.cs | 13 + .../csharp/Bitwarden.Sdk/BitwardenClient.cs | 39 +++ .../Bitwarden.Sdk/BitwardenException.cs | 13 + .../csharp/Bitwarden.Sdk/BitwardenLibrary.cs | 31 ++ .../Bitwarden.Sdk/BitwardenSafeHandle.cs | 17 + .../csharp/Bitwarden.Sdk/BitwardenSettings.cs | 15 + .../csharp/Bitwarden.Sdk/CommandRunner.cs | 20 ++ .../csharp/Bitwarden.Sdk/ProjectsClient.cs | 94 ++++++ .../csharp/Bitwarden.Sdk/SecretsClient.cs | 113 +++++++ languages/csharp/Bitwarden.Sdk/bitwarden.png | Bin 0 -> 878 bytes languages/csharp/Bitwarden.sln | 22 ++ languages/csharp/BitwardenSdk.cs | 75 ----- languages/csharp/LICENSE.txt | 295 ++++++++++++++++++ languages/csharp/Program.cs | 6 - languages/csharp/README.md | 71 ++++- languages/csharp/bitwardenSdk.csproj | 42 --- languages/csharp/global.json | 6 + support/scripts/schemas.ts | 2 +- 30 files changed, 1183 insertions(+), 137 deletions(-) create mode 100644 .github/workflows/build-dotnet.yml create mode 100644 .github/workflows/build-rust-cross-platform.yml create mode 100644 .github/workflows/publish-dotnet.yml create mode 100644 languages/csharp/.editorconfig create mode 100644 languages/csharp/Bitwarden.Sdk.Samples/Bitwarden.Sdk.Samples.csproj create mode 100644 languages/csharp/Bitwarden.Sdk.Samples/Program.cs create mode 100644 languages/csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenClient.cs create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenException.cs create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenSafeHandle.cs create mode 100644 languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs create mode 100644 languages/csharp/Bitwarden.Sdk/CommandRunner.cs create mode 100644 languages/csharp/Bitwarden.Sdk/ProjectsClient.cs create mode 100644 languages/csharp/Bitwarden.Sdk/SecretsClient.cs create mode 100644 languages/csharp/Bitwarden.Sdk/bitwarden.png create mode 100644 languages/csharp/Bitwarden.sln delete mode 100644 languages/csharp/BitwardenSdk.cs create mode 100644 languages/csharp/LICENSE.txt delete mode 100644 languages/csharp/Program.cs delete mode 100644 languages/csharp/bitwardenSdk.csproj create mode 100644 languages/csharp/global.json diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml new file mode 100644 index 000000000..9d0ab1dce --- /dev/null +++ b/.github/workflows/build-dotnet.yml @@ -0,0 +1,78 @@ +name: Build .NET SDK + +on: + pull_request: + branches: + - master + +jobs: + generate_schemas: + uses: ./.github/workflows/generate_schemas.yml + + build_rust: + uses: ./.github/workflows/build-rust-cross-platform.yml + + build_dotnet: + name: Build .NET + runs-on: ubuntu-22.04 + needs: + - generate_schemas + - build_rust + + steps: + - name: Checkout Repository + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - name: Download C# schemas artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.cs + path: languages/csharp/Bitwarden.Sdk + + - name: Set up .NET Core + uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 + with: + global-json-file: languages/csharp/global.json + + - name: Download x86_64-apple-darwin files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-apple-darwin + path: languages/csharp/Bitwarden.Sdk/macos-x64 + + - name: Download aarch64-apple-darwin files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-aarch64-apple-darwin + path: languages/csharp/Bitwarden.Sdk/macos-arm64 + + - name: Download x86_64-unknown-linux-gnu files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-unknown-linux-gnu + path: languages/csharp/Bitwarden.Sdk/ubuntu-x64 + + - name: Download x86_64-pc-windows-msvc files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-pc-windows-msvc + path: languages/csharp/Bitwarden.Sdk/windows-x64 + + - name: Build .NET 6 Project + working-directory: languages/csharp/Bitwarden.Sdk + run: | + dotnet restore + dotnet build --configuration Release + + - name: Pack NuGet Package + env: + VERSION: 0.0.1 + run: dotnet pack --configuration Release -p:PackageID=Bitwarden.Sdk -p:Version=${VERSION} --output ./nuget-output /nologo /v:n + working-directory: languages/csharp/Bitwarden.Sdk + + - name: Upload NuGet package + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: Bitwarden.Sdk.0.0.1.nupkg + path: | + ./languages/csharp/Bitwarden.Sdk/nuget-output/*.nupkg diff --git a/.github/workflows/build-rust-cross-platform.yml b/.github/workflows/build-rust-cross-platform.yml new file mode 100644 index 000000000..d287cf061 --- /dev/null +++ b/.github/workflows/build-rust-cross-platform.yml @@ -0,0 +1,48 @@ +name: Build Rust Cross Platform + +on: + workflow_call: + +jobs: + build_rust: + name: Build for ${{ matrix.settings.os }} ${{ matrix.settings.target }} + runs-on: ${{ matrix.settings.os }} + strategy: + fail-fast: false + matrix: + settings: + - os: macos-12 + target: x86_64-apple-darwin + - os: macos-12 + target: aarch64-apple-darwin + - os: windows-2022 + target: x86_64-pc-windows-msvc + - os: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + + steps: + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - name: Install rust + uses: dtolnay/rust-toolchain@f361669954a8ecfc00a3443f35f9ac8e610ffc06 # stable + with: + toolchain: stable + + - name: Cache cargo registry + uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + + - name: Add build architecture + run: rustup target add ${{ matrix.settings.target }} + + - name: Build Rust + env: + RUSTFLAGS: "-D warnings" + run: cargo build --target ${{ matrix.settings.target }} --release + + - name: Upload Artifact + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: libbitwarden_c_files-${{ matrix.settings.target }} + path: | + target/${{ matrix.settings.target }}/release/*bitwarden_c* diff --git a/.github/workflows/generate_schemas.yml b/.github/workflows/generate_schemas.yml index 1f75ee483..ee30a10fe 100644 --- a/.github/workflows/generate_schemas.yml +++ b/.github/workflows/generate_schemas.yml @@ -47,7 +47,7 @@ jobs: uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: schemas.cs - path: ${{ github.workspace }}/languages/csharp/schemas.cs + path: ${{ github.workspace }}/languages/csharp/Bitwarden.Sdk/schemas.cs if-no-files-found: error - name: Upload python schemas artifact diff --git a/.github/workflows/publish-dotnet.yml b/.github/workflows/publish-dotnet.yml new file mode 100644 index 000000000..a37266f69 --- /dev/null +++ b/.github/workflows/publish-dotnet.yml @@ -0,0 +1,69 @@ +name: Deploy NuGet Package + +on: + workflow_dispatch: + version_number: + description: "New Version" + required: true + +jobs: + generate_schemas: + uses: ./.github/workflows/generate_schemas.yml + + build_rust: + uses: ./.github/workflows/build-rust-cross-platform.yml + + deploy: + name: Deploy + runs-on: ubuntu-22.04 + needs: + - generate_schemas + - build_rust + + steps: + - name: Checkout Repository + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - name: Download C# schemas artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.cs + path: languages/csharp/Bitwarden.Sdk + + - name: Set up .NET Core + uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 + with: + global-json-file: languages/csharp/global.json + + - name: Download x86_64-apple-darwin files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-apple-darwin + path: languages/csharp/Bitwarden.Sdk/macos-x64 + + - name: Download aarch64-apple-darwin files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-aarch64-apple-darwin + path: languages/csharp/Bitwarden.Sdk/macos-arm64 + + - name: Download x86_64-unknown-linux-gnu files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-unknown-linux-gnu + path: languages/csharp/Bitwarden.Sdk/ubuntu-x64 + + - name: Download x86_64-pc-windows-msvc files + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: libbitwarden_c_files-x86_64-pc-windows-msvc + path: languages/csharp/Bitwarden.Sdk/windows-x64 + + - name: Pack NuGet Package + env: + VERSION: ${{ github.event.inputs.version_number }} + run: dotnet pack --configuration Release -p:PackageID=Bitwarden.Sdk -p:Version=${VERSION} --output ./nuget-output /nologo /v:n + working-directory: languages/csharp/Bitwarden.Sdk + + - name: Publish NuGet Package + run: dotnet nuget push ./languages/csharp/Bitwarden.Sdk/nuget-output/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/.gitignore b/.gitignore index 9e450f9ab..3f459493b 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,6 @@ languages/kotlin/sdk/src/main/java/com/bitwarden/core/bitwarden.kt # Schemas support/schemas crates/bitwarden-napi/src-ts/bitwarden_client/schemas.ts -languages/csharp/schemas.cs +languages/csharp/Bitwarden.Sdk/schemas.cs languages/js_webassembly/bitwarden_client/schemas.ts languages/python/BitwardenClient/schemas.py diff --git a/.vscode/launch.json b/.vscode/launch.json index cb99bc8e0..7da474a22 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "buildCsharp", - "program": "${workspaceFolder}/languages/csharp/bin/Debug/net6.0/bitwardenSdk.dll", + "program": "${workspaceFolder}/languages/csharp/Bitwarden.Sdk/bin/Debug/net6.0/BitwardenSdk.dll", "args": [], "env": { "RUST_LOG": "debug" diff --git a/.vscode/settings.json b/.vscode/settings.json index fcf022457..e75498e9c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "cSpell.words": [ "bindgen", + "Bitwarden", "Cdecl", "chrono", "cloc", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 491d770c9..55dc10eb2 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -30,7 +30,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/languages/csharp/bitwardenSdk.csproj", + "${workspaceFolder}/languages/csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], diff --git a/languages/csharp/.editorconfig b/languages/csharp/.editorconfig new file mode 100644 index 000000000..21d7ac4a3 --- /dev/null +++ b/languages/csharp/.editorconfig @@ -0,0 +1,125 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Don't use tabs for indentation. +[*] +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +guidelines = 120 +# (Please don't specify an indent_size here; that has too many unintended consequences.) + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +charset = utf-8-bom + +# Xml project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# Xml config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# Dotnet code style settings: +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Suggest more modern language features when available +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion + +# Prefix private members with underscore +dotnet_naming_rule.private_members_with_underscore.symbols = private_fields +dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore +dotnet_naming_rule.private_members_with_underscore.severity = suggestion + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_style.prefix_underscore.capitalization = camel_case +dotnet_naming_style.prefix_underscore.required_prefix = _ + +# Async methods should have "Async" suffix +dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods +dotnet_naming_rule.async_methods_end_in_async.style = end_in_async +dotnet_naming_rule.async_methods_end_in_async.severity = suggestion + +dotnet_naming_symbols.any_async_methods.applicable_kinds = method +dotnet_naming_symbols.any_async_methods.applicable_accessibilities = * +dotnet_naming_symbols.any_async_methods.required_modifiers = async + +dotnet_naming_style.end_in_async.required_prefix = +dotnet_naming_style.end_in_async.required_suffix = Async +dotnet_naming_style.end_in_async.capitalization = pascal_case +dotnet_naming_style.end_in_async.word_separator = + +# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items. +dotnet_diagnostic.CS0618.severity = suggestion + +# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items. +dotnet_diagnostic.CS0612.severity = suggestion + +# Remove unnecessary using directives https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005 +dotnet_diagnostic.IDE0005.severity = warning + +# CSharp code style settings: +[*.cs] +# Prefer "var" everywhere +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion + +# Prefer method-like constructs to have a expression-body +csharp_style_expression_bodied_methods = true:none +csharp_style_expression_bodied_constructors = true:none +csharp_style_expression_bodied_operators = true:none + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:none +csharp_style_expression_bodied_indexers = true:none +csharp_style_expression_bodied_accessors = true:none + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true + +# Namespace settings +csharp_style_namespace_declarations = file_scoped:warning + +# Switch expression +dotnet_diagnostic.CS8509.severity = error # missing switch case for named enum value +dotnet_diagnostic.CS8524.severity = none # missing switch case for unnamed enum value diff --git a/languages/csharp/Bitwarden.Sdk.Samples/Bitwarden.Sdk.Samples.csproj b/languages/csharp/Bitwarden.Sdk.Samples/Bitwarden.Sdk.Samples.csproj new file mode 100644 index 000000000..5b189d8ca --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk.Samples/Bitwarden.Sdk.Samples.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0 + enable + enable + + + + + + + diff --git a/languages/csharp/Bitwarden.Sdk.Samples/Program.cs b/languages/csharp/Bitwarden.Sdk.Samples/Program.cs new file mode 100644 index 000000000..ee6834979 --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk.Samples/Program.cs @@ -0,0 +1,30 @@ +using Bitwarden.Sdk; + +// Configure secrets +var accessToken = Environment.GetEnvironmentVariable("ACCESS_TOKEN")!; +var organizationIdString = Environment.GetEnvironmentVariable("ORGANIZATION_ID")!; +var organizationId = Guid.Parse(organizationIdString); + +// Create SDK Client +using var bitwardenClient = new BitwardenClient(); + +// Authenticate +bitwardenClient.AccessTokenLogin(accessToken); + +// Project operations +var projectResponse = bitwardenClient.Projects.Create(organizationId, "NewTestProject"); +var projectsResponse = bitwardenClient.Projects.List(organizationId); +var projectId = projectResponse.Id; +projectResponse = bitwardenClient.Projects.Get(projectId); +projectResponse = bitwardenClient.Projects.Update(projectId, organizationId, "NewTestProject2"); + +// Secret operations +var secretResponse = + bitwardenClient.Secrets.Create("key", "value", "note", organizationId, new[] { projectId }); +var secretId = secretResponse.Id; +var secretIdentifiersResponse = bitwardenClient.Secrets.List(organizationId); +secretResponse = bitwardenClient.Secrets.Get(secretId); +secretResponse = bitwardenClient.Secrets + .Update(secretId, "key2", "value2", "note2", organizationId, new[] { projectId }); +bitwardenClient.Secrets.Delete(new[] { secretId }); +bitwardenClient.Projects.Delete(new[] { projectId }); diff --git a/languages/csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj b/languages/csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj new file mode 100644 index 000000000..97f850211 --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/Bitwarden.Sdk.csproj @@ -0,0 +1,73 @@ + + + + net6.0 + README.md + enable + enable + Bitwarden.Sdk + Bitwarden Secrets Manager SDK + Bitwarden Inc. + .NET bindings for interacting with the Bitwarden Secrets Manager + Bitwarden Inc. + https://github.com/bitwarden/sdk/tree/master/languages/csharp + Bitwarden;Sdk;.NET + SDK + bitwarden.png + Git + Bitwarden.Sdk + https://bitwarden.com/products/secrets-manager/ + https://github.com/bitwarden/sdk/blob/master/LICENSE + + + + + + + + + + + + + + + 4 + + + + Always + true + + + Always + true + + + Always + true + + + + + Always + true + runtimes/osx-x64/native + + + Always + true + runtimes/osx-arm64/native + + + Always + true + runtimes/linux-x64/native + + + Always + true + runtimes/win-x64/native + + + diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs b/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs new file mode 100644 index 000000000..8a2b480de --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs @@ -0,0 +1,13 @@ +namespace Bitwarden.Sdk; + +public class BitwardenAuthException : Exception +{ + public BitwardenAuthException(string message) : base(message) + { + } + + public BitwardenAuthException(string message, System.Exception innerException) + : base(message, innerException) + { + } +} diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs b/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs new file mode 100644 index 000000000..617a3d00b --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs @@ -0,0 +1,39 @@ +namespace Bitwarden.Sdk; + +public sealed class BitwardenClient : IDisposable +{ + private readonly CommandRunner _commandRunner; + private readonly BitwardenSafeHandle _handle; + + public BitwardenClient(BitwardenSettings? settings = null) + { + var clientSettings = new ClientSettings + { + ApiUrl = settings?.ApiUrl!, IdentityUrl = settings?.IdentityUrl!, UserAgent = "Bitwarden DOTNET-SDK" + }; + + _handle = BitwardenLibrary.Init(clientSettings.ToJson()); + _commandRunner = new CommandRunner(_handle); + Projects = new ProjectsClient(_commandRunner); + Secrets = new SecretsClient(_commandRunner); + } + + public void AccessTokenLogin(string accessToken) + { + var command = new Command() { AccessTokenLogin = new AccessTokenLoginRequest { AccessToken = accessToken } }; + var response = _commandRunner.RunCommand(command); + if (response is not { Success: true }) + { + throw new BitwardenAuthException(response != null ? response.ErrorMessage : "Login failed"); + } + } + + public ProjectsClient Projects { get; } + + public SecretsClient Secrets { get; } + + public void Dispose() + { + _handle.Dispose(); + } +} diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenException.cs b/languages/csharp/Bitwarden.Sdk/BitwardenException.cs new file mode 100644 index 000000000..539656bf4 --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenException.cs @@ -0,0 +1,13 @@ +namespace Bitwarden.Sdk; + +public class BitwardenException : Exception +{ + public BitwardenException(string message) : base(message) + { + } + + public BitwardenException(string message, System.Exception innerException) + : base(message, innerException) + { + } +} diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs b/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs new file mode 100644 index 000000000..76a35ed5b --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs @@ -0,0 +1,31 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Bitwarden.Sdk; + +internal static class BitwardenLibrary +{ + [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] + private static extern BitwardenSafeHandle init(string settings); + + [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] + private static extern void free_mem(IntPtr handle); + + [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] + private static extern string run_command(string json, BitwardenSafeHandle handle); + + internal static BitwardenSafeHandle Init(string settings) + { + return init(settings); + } + + internal static void FreeMemory(IntPtr handle) + { + free_mem(handle); + } + + internal static string RunCommand(string json, BitwardenSafeHandle handle) + { + return run_command(json, handle); + } +} diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenSafeHandle.cs b/languages/csharp/Bitwarden.Sdk/BitwardenSafeHandle.cs new file mode 100644 index 000000000..7939aab67 --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenSafeHandle.cs @@ -0,0 +1,17 @@ +using Microsoft.Win32.SafeHandles; + +namespace Bitwarden.Sdk; + +internal class BitwardenSafeHandle : SafeHandleZeroOrMinusOneIsInvalid +{ + public BitwardenSafeHandle() : base(true) + { + SetHandle(handle); + } + + protected override bool ReleaseHandle() + { + BitwardenLibrary.FreeMemory(handle); + return true; + } +} diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs b/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs new file mode 100644 index 000000000..a96c5932f --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs @@ -0,0 +1,15 @@ +namespace Bitwarden.Sdk; + +public class BitwardenSettings +{ + /// + /// The api url of the targeted Bitwarden instance. Defaults to `https://api.bitwarden.com` + /// + public string? ApiUrl { get; set; } + + /// + /// The identity url of the targeted Bitwarden instance. Defaults to + /// `https://identity.bitwarden.com` + /// + public string? IdentityUrl { get; set; } +} diff --git a/languages/csharp/Bitwarden.Sdk/CommandRunner.cs b/languages/csharp/Bitwarden.Sdk/CommandRunner.cs new file mode 100644 index 000000000..d797e9ece --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/CommandRunner.cs @@ -0,0 +1,20 @@ +namespace Bitwarden.Sdk; +using System.Text.Json; + +internal class CommandRunner +{ + + private readonly BitwardenSafeHandle _handle; + + internal CommandRunner(BitwardenSafeHandle handle) + { + _handle = handle; + } + + internal T? RunCommand(Command command) + { + var req = JsonSerializer.Serialize(command, Converter.Settings); + var result = BitwardenLibrary.RunCommand(req, _handle); + return JsonSerializer.Deserialize(result, Converter.Settings); + } +} diff --git a/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs b/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs new file mode 100644 index 000000000..da22e2d7f --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs @@ -0,0 +1,94 @@ +namespace Bitwarden.Sdk; + +public class ProjectsClient +{ + private readonly CommandRunner _commandRunner; + + internal ProjectsClient(CommandRunner commandRunner) + { + _commandRunner = commandRunner; + } + + public ProjectResponse Get(Guid id) + { + var command = new Command() { Projects = new ProjectsCommand { Get = new ProjectGetRequest { Id = id } } }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Project not found"); + } + + public ProjectResponse Create(Guid organizationId, string name) + { + var command = new Command() + { + Projects = new ProjectsCommand + { + Create = new ProjectCreateRequest { OrganizationId = organizationId, Name = name } + } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Project create failed"); + } + + public ProjectResponse Update(Guid id, Guid organizationId, string name) + { + var command = new Command() + { + Projects = new ProjectsCommand + { + Update = new ProjectPutRequest { Id = id, OrganizationId = organizationId, Name = name } + } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Project update failed"); + } + + public ProjectsDeleteResponse Delete(Guid[] ids) + { + var command = new Command() + { + Projects = new ProjectsCommand { Delete = new ProjectsDeleteRequest { Ids = ids } } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Project delete failed"); + } + + public ProjectsResponse List(Guid organizationId) + { + var command = new Command() + { + Projects = new ProjectsCommand { List = new ProjectsListRequest { OrganizationId = organizationId } } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "No projects for given organization"); + } +} diff --git a/languages/csharp/Bitwarden.Sdk/SecretsClient.cs b/languages/csharp/Bitwarden.Sdk/SecretsClient.cs new file mode 100644 index 000000000..cf6cd36b1 --- /dev/null +++ b/languages/csharp/Bitwarden.Sdk/SecretsClient.cs @@ -0,0 +1,113 @@ +namespace Bitwarden.Sdk; + +public class SecretsClient +{ + private readonly CommandRunner _commandRunner; + + internal SecretsClient(CommandRunner commandRunner) + { + _commandRunner = commandRunner; + } + + public SecretResponse Get(Guid id) + { + var command = new Command() { Secrets = new SecretsCommand { Get = new SecretGetRequest { Id = id } } }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Secret not found"); + } + + public SecretResponse Create(string key, string value, string note, Guid organizationId, + Guid[] projectIds) + { + var command = new Command() + { + Secrets = new SecretsCommand + { + Create = new SecretCreateRequest + { + Key = key, + Value = value, + Note = note, + OrganizationId = organizationId, + ProjectIds = projectIds + } + } + }; + + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Secret create failed"); + } + + public SecretResponse Update(Guid id, string key, string value, string note, Guid organizationId, + Guid[] projectIds) + { + var command = new Command() + { + Secrets = new SecretsCommand + { + Update = new SecretPutRequest + { + Id = id, + Key = key, + Value = value, + Note = note, + OrganizationId = organizationId, + ProjectIds = projectIds + } + } + }; + + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Secret update failed"); + } + + public SecretsDeleteResponse Delete(Guid[] ids) + { + var command = new Command() + { + Secrets = new SecretsCommand { Delete = new SecretsDeleteRequest { Ids = ids } } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "Secrets delete failed"); + } + + public SecretIdentifiersResponse List(Guid organizationId) + { + var command = new Command() + { + Secrets = new SecretsCommand { List = new SecretIdentifiersRequest { OrganizationId = organizationId } } + }; + var result = _commandRunner.RunCommand(command); + + if (result is { Success: true }) + { + return result.Data; + } + + throw new BitwardenException(result != null ? result.ErrorMessage : "No secrets for given organization"); + } +} diff --git a/languages/csharp/Bitwarden.Sdk/bitwarden.png b/languages/csharp/Bitwarden.Sdk/bitwarden.png new file mode 100644 index 0000000000000000000000000000000000000000..5b9d09d51d999275473c8f210437a424ea96d84d GIT binary patch literal 878 zcmV-!1CjiRP)}b0K@`U)%ZbFGQ8}Xs zClM_aEkwJZkYJ%HW0OKGy>=B+i4y$4Dqyxf3qi3+V@gdS9w^rZuQ-W?U@#zl1TSYu zqM*_F-_6Rg?(N;|%zh;E9xMyDEc@PX-q+r~>0&;z_tLw5ezN&7$d40jV@sJIMSeJ+ zA03|eUhMKQ{vJPFVVhGXIfSde0Jz~h`RT)gyB|Z}`|05! z3IPH@00;m9AOHk_01yBIKmZ5;0U!VbfB+Bx0zd!=00A%pKrWk!AHet3->CsGaI{;C zj#2YH zKp8+yC=dmNv60>EfxWM-@ioO~E58e%@z4nYO%7IlY-CqJOWrWPq9FveybS4rfFaE1 zcXENVKRS)q`ZfrK&R$;#l^ESbhat>XF7GBhJfos9`C?f5kIvZbnmb@RmA^%p%rHb8B&`QwQ*xC9q!z zAVyC&vj5bp<=71uQpR7a#Uud0;Dn5BmLjr}!^{=O65B~94KyCRNax+UbdxnU6PhAr zcMEMDfY?SlWC(<^u(eSIyjP9gJnezd&kWf<|5tzk0ALb5Vs4E8{{R3007*qoM6N<$ Eg66e@TL1t6 literal 0 HcmV?d00001 diff --git a/languages/csharp/Bitwarden.sln b/languages/csharp/Bitwarden.sln new file mode 100644 index 000000000..4cf8d147f --- /dev/null +++ b/languages/csharp/Bitwarden.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bitwarden.Sdk", "Bitwarden.Sdk\Bitwarden.Sdk.csproj", "{DADE59E5-E573-430A-8EB2-BC21D8E8C1D3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bitwarden.Sdk.Samples", "Bitwarden.Sdk.Samples\Bitwarden.Sdk.Samples.csproj", "{CA9F8EDC-643F-4624-AC00-F741E1F30CA4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DADE59E5-E573-430A-8EB2-BC21D8E8C1D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DADE59E5-E573-430A-8EB2-BC21D8E8C1D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DADE59E5-E573-430A-8EB2-BC21D8E8C1D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DADE59E5-E573-430A-8EB2-BC21D8E8C1D3}.Release|Any CPU.Build.0 = Release|Any CPU + {CA9F8EDC-643F-4624-AC00-F741E1F30CA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA9F8EDC-643F-4624-AC00-F741E1F30CA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA9F8EDC-643F-4624-AC00-F741E1F30CA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA9F8EDC-643F-4624-AC00-F741E1F30CA4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/languages/csharp/BitwardenSdk.cs b/languages/csharp/BitwardenSdk.cs deleted file mode 100644 index 388b7977f..000000000 --- a/languages/csharp/BitwardenSdk.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Bitwarden.Sdk -{ - internal class BitwardenSdk : IDisposable - { - [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr init(string settings); - [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] - private static extern void free_mem(IntPtr clientPtr); - - [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] - private static extern string run_command(string loginRequest, IntPtr clientPtr); - - private readonly IntPtr _ptr; - private bool disposedValue; - - public BitwardenSdk(ClientSettings? settings = null) - { - _ptr = init(settings?.ToJson()); - } - - public ResponseForPasswordLoginResponse? PasswordLogin(string email, string password) => RunCommand(new Command - { - PasswordLogin = new PasswordLoginRequest { - Email = email, - Password = password - }, - }, ResponseForPasswordLoginResponse.FromJson); - - public ResponseForUserApiKeyResponse? UserApiKey(string password) => RunCommand(new Command - { - GetUserApiKey = new SecretVerificationRequest { - MasterPassword = password - }, - }, ResponseForUserApiKeyResponse.FromJson); - - private TReturn? RunCommand(Command input, Func deserializer) - { - var req = input.ToJson(); - - var json_result = run_command(req, _ptr); - Console.WriteLine(json_result); - return deserializer(json_result); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - // TODO: dispose managed state (managed objects) - } - - free_mem(_ptr); - disposedValue = true; - } - } - - - ~BitwardenSdk() - { - // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method - Dispose(disposing: false); - } - - public void Dispose() - { - // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - } -} diff --git a/languages/csharp/LICENSE.txt b/languages/csharp/LICENSE.txt new file mode 100644 index 000000000..e9d496ff7 --- /dev/null +++ b/languages/csharp/LICENSE.txt @@ -0,0 +1,295 @@ +BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT +Version 1, 17 March 2023 + +1. Introduction + +1.1 The Bitwarden Software Development Kit (referred to in the License Agreement +as the "SDK" and available for download at the following URL +https://github.com/bitwarden/sdk) is licensed to you subject to the terms of +this License Agreement. The License Agreement forms a legally binding contract +between you and the Company in relation to your use of the SDK. + +1.2 "Bitwarden" means the Bitwarden software made available by the Company, +available for download at the following URL, as updated from time to time. + +1.3 A "Compatible Application" means any software program or service that (i) +connects to and interoperates with a current version of the Bitwarden server +products distributed by the Company; and (ii) complies with the Company’s +acceptable use policy available at the following URL: +https://bitwarden.com/terms/#acceptable_use. + +1.4 "Company" means Bitwarden Inc., organized under the laws of the State of +Delaware. + +2. Accepting this License Agreement + +2.1 In order to access or use the SDK, you must first agree to the License +Agreement. You may not access or use the SDK if you do not accept the License +Agreement. + +2.2 By clicking to accept and/or accessing or using the SDK, you hereby agree to +the terms of the License Agreement. + +2.3 You may not access or use the SDK and may not accept the License Agreement +if you are a person barred from receiving the SDK under the laws of the United +States or other countries, including the country in which you are resident or +from which you access or use the SDK. + +2.4 If you are agreeing to be bound by the License Agreement on behalf of your +employer or any other entity, you represent and warrant that you have full legal +authority to bind your employer or such other entity to the License Agreement. +If you do not have the requisite authority, you may not accept the License +Agreement or you may not access or use the SDK on behalf of your employer or +other entity. + +3. SDK License from Bitwarden + +3.1 Subject to the terms of this License Agreement, Bitwarden grants you a +limited, worldwide, royalty-free, non-assignable, non-exclusive, and +non-sublicensable license to use the SDK solely (a) to develop, test, and +demonstrate a Compatible Application; (b) to develop, test, and run a Compatible +Application for personal use by your family; or (c) to to develop, test, and run +a Compatible Application for the internal business operations of your +organization in connection with a paid license for a Bitwarden server product, +provided that in no case above may the Compatible Application be offered, +licensed, or sold to a third party. + +3.2 You agree that Bitwarden or third parties own all legal right, title and +interest in and to the SDK, including any Intellectual Property Rights that +subsist in the SDK. "Intellectual Property Rights" means any and all rights +under patent law, copyright law, trade secret law, trademark law, and any and +all other proprietary rights. Bitwarden reserves all rights not expressly +granted to you. + +3.3 You may not use this SDK to develop applications for use with software other +than Bitwarden (including non-compatible implementations of Bitwarden) or to +develop another SDK. + +3.4 You may not use the SDK for any purpose not expressly permitted by the +License Agreement. Except for contributions to Bitwarden pursuant to the +Contribution License Agreement available at this URL: +https://cla-assistant.io/bitwarden/clients, or to the extent required by +applicable third party licenses, you may not copy modify, adapt, redistribute, +decompile, reverse engineer, disassemble, or create derivative works of the SDK +or any part of the SDK. + +3.5 Use, reproduction, and distribution of a component of the SDK licensed under +an open source software license are governed solely by the terms of that open +source software license and not the License Agreement. + +3.6 You agree that the form and nature of the SDK that the Company provides may +change without prior notice to you and that future versions of the SDK may be +incompatible with applications developed on previous versions of the SDK. You +agree that the Company may stop (permanently or temporarily) providing the SDK +or any features within the SDK to you or to users generally at the Company’s +sole discretion, without prior notice to you. + +3.7 Nothing in the License Agreement gives you a right to use any of the +Company’s trade names, trademarks, service marks, logos, domain names, or other +distinctive brand features. + +3.8 You agree that you will not remove, obscure, or alter any proprietary rights +notices (including copyright and trademark notices) that may be affixed to or +contained within the SDK. + +4. Use of the SDK by You + +4.1 The Company agrees that it obtains no right, title, or interest from you (or +your licensors) under the License Agreement in or to any software applications +that you develop using the SDK, including any Intellectual Property Rights that +subsist in those applications. + +4.2 You agree to use the SDK and write applications only for purposes that are +permitted by (a) the License Agreement and (b) any applicable law, regulation or +generally accepted practices or guidelines in the relevant jurisdictions +(including any laws regarding the export of data or software to and from the +United States or other relevant countries). + +4.3 You agree that if you use the SDK to develop applications for other users, +you will protect the privacy and legal rights of those users. If the users +provide you with user names, passwords, or other login information or personal +information, you must make the users aware that the information will be +available to your application, and you must provide legally adequate privacy +notice and protection for those users. If your application stores personal or +sensitive information provided by users, it must do so securely. If the user +provides your application with Bitwarden Account information, your application +may only use that information to access the user's Bitwarden Account when, and +for the limited purposes for which, the user has given you permission to do so. + +4.4 You agree that you will not engage in any activity with the SDK, including +the development or distribution of an application, that interferes with, +disrupts, damages, or accesses in an unauthorized manner the servers, networks, +or other properties or services of any third party including, but not limited +to, the Company, or any mobile communications carrier or public cloud service. + +4.5 If you use the SDK to retrieve a user's data from Bitwarden, you acknowledge +and agree that you shall retrieve data only with the user's explicit consent and +only when, and for the limited purposes for which, the user has given you +permission to do so. + +4.6 You agree that you are solely responsible for, and that the Company has no +responsibility to you or to any third party for, any data, content, or resources +that you create, transmit or display through Bitwarden and/or applications for +Bitwarden, and for the consequences of your actions (including any loss or +damage which Bitwarden may suffer) by doing so. + +4.7 You agree that you are solely responsible for, and that the Company has no +responsibility to you or to any third party for, any breach of your obligations +under the License Agreement, any applicable third party contract or Terms of +Service, or any applicable law or regulation, and for the consequences +(including any loss or damage which the Company or any third party may suffer) +of any such breach. + +5. Third Party Applications + +5.1 If you use the SDK to integrate or run applications developed by a third +party or that access data, content or resources provided by a third party, you +agree that the Company is not responsible for those applications, data, content, +or resources. You understand that all data, content or resources which you may +access through such third party applications are the sole responsibility of the +person from which they originated and that the Company is not liable for any +loss or damage that you may experience as a result of the use or access of any +of those third party applications, data, content, or resources. + +5.2 You should be aware that the data, content, and resources presented to you +through such a third party application may be protected by intellectual property +rights which are owned by the providers (or by other persons or companies on +their behalf). You acknowledge that your use of such third party applications, +data, content, or resources may be subject to separate terms between you and the +relevant third party. In that case, the License Agreement does not affect your +legal relationship with these third parties. + +6. Use of Bitwarden Server + +You acknowledge and agree that the Bitwarden server products to which any +Compatible Application must connect is protected by intellectual property rights +which are owned by the Company and your use of the Bitwarden server products is +subject to additional terms not set forth in this License Agreement. + +7. Terminating this License Agreement + +7.1 The License Agreement will continue to apply until terminated by either you +or the Company as set out below. + +7.2 If you want to terminate the License Agreement, you may do so by ceasing +your use of the SDK and any relevant developer credentials. + +7.3 The Company may at any time, terminate the License Agreement with you if: + +(a) you have breached any provision of the License Agreement; or + +(b) the Company is required to do so by law; or + +(c) a third party with whom the Company offered certain parts of the SDK to you +has terminated its relationship with the Company or ceased to offer certain +parts of the SDK to either the Company or to you; or + +(d) the Company decides to no longer provide the SDK or certain parts of the SDK +to users in the country in which you are resident or from which you use the +service, or the provision of the SDK or certain SDK services to you by the +Company is, in the Company’'s sole discretion, no longer commercially viable or +technically practicable. + +7.4 When the License Agreement comes to an end, all of the legal rights, +obligations and liabilities that you and the Company have benefited from, been +subject to (or which have accrued over time whilst the License Agreement has +been in force) or which are expressed to continue indefinitely, shall be +unaffected by this cessation, and the provisions of paragraph 12.8 shall +continue to apply to such rights, obligations and liabilities indefinitely. + +8. NO SUPPORT + +The Company is not obligated under this License Agreement to provide you any +support services for the SDK. Any support provided is at the Company’s sole +discretion and provided on an "as is" basis and without warranty of any kind. + +9. DISCLAIMER OF WARRANTIES + +9.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE +RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF +ANY KIND FROM Bitwarden. + +9.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED +THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY +RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF +DATA THAT RESULTS FROM SUCH USE. + +9.3 THE COMPANY FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY +KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED +WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE +AND NON-INFRINGEMENT. + +10. LIMITATION OF LIABILITY + +YOU EXPRESSLY UNDERSTAND AND AGREE THAT THE COMPANY, ITS SUBSIDIARIES AND +AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF +LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, +STATUTORY, OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS +OF DATA, WHETHER OR NOT THE COMPANY OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF +OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. + +11. Indemnification + +To the maximum extent permitted by law, you agree to defend, indemnify and hold +harmless the Company, its affiliates and their respective directors, officers, +employees and agents from and against any and all claims, actions, suits or +proceedings, as well as any and all losses, liabilities, damages, costs and +expenses (including reasonable attorneys fees) arising out of or accruing from +(a) your use of the SDK, (b) any application you develop on the SDK that +infringes any copyright, trademark, trade secret, trade dress, patent or other +intellectual property right of any person or defames any person or violates +their rights of publicity or privacy, and (c) any non-compliance by you with the +License Agreement. + +12. General Legal Terms + +12.1 The Company may make changes to the License Agreement as it distributes new +versions of the SDK. When these changes are made, the Company will make a new +version of the License Agreement available on the website where the SDK is made +available. + +12.2 The License Agreement constitutes the whole legal agreement between you and +the Company and governs your use of the SDK (excluding any services or software +which the Company may provide to you under a separate written agreement), and +completely replaces any prior agreements between you and the Company in relation +to the SDK. + +12.3 You agree that if the Company does not exercise or enforce any legal right +or remedy which is contained in the License Agreement (or which the Company has +the benefit of under any applicable law), this will not be taken to be a formal +waiver of the Company's rights and that those rights or remedies will still be +available to the Company. + +12.4 If any court of law, having the jurisdiction to decide on this matter, +rules that any provision of the License Agreement is invalid, then that +provision will be removed from the License Agreement without affecting the rest +of the License Agreement. The remaining provisions of the License Agreement will +continue to be valid and enforceable. + +12.5 You acknowledge and agree that each member of the group of companies of +which the Company is the parent shall be third party beneficiaries to the +License Agreement and that such other companies shall be entitled to directly +enforce, and rely upon, any provision of the License Agreement that confers a +benefit on them or rights in favor of them. Other than this, no other person or +company shall be third party beneficiaries to the License Agreement. + +12.6 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND +REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND +REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON +DESTINATIONS, END USERS, AND END USE. + +12.7 The rights granted in the License Agreement may not be assigned or +transferred by either you or the Company without the prior written approval of +the other party, provided that the Company may assign this License Agreement +upon notice to you in connection with an acquisition, merger, sale of assets, or +similar corporate change in control for the Company or the Intellectual Property +Rights in the SDK. + +12.8 The License Agreement, and any dispute relating to or arising out of this +License Agreement, shall be governed by the laws of the State of California +without regard to its conflict of laws provisions. You and the Company agree to +submit to the exclusive jurisdiction of the courts located within the county of +Los Angeles, California to resolve any dispute or legal matter arising from the +License Agreement. Notwithstanding this, you agree that the Company shall be +allowed to apply for injunctive remedies, or any equivalent type of urgent legal +relief, in any forum or jurisdiction. diff --git a/languages/csharp/Program.cs b/languages/csharp/Program.cs deleted file mode 100644 index d2e047bfb..000000000 --- a/languages/csharp/Program.cs +++ /dev/null @@ -1,6 +0,0 @@ -using Bitwarden.Sdk; - -var sdk = new BitwardenSdk(); -sdk.PasswordLogin("test@bitwarden.com", "asdfasdf"); -var apiKey = sdk.UserApiKey("asdfasdf"); -Console.WriteLine(apiKey?.Data?.ApiKey ?? "api key was null"); diff --git a/languages/csharp/README.md b/languages/csharp/README.md index e390a1ca1..dea2d1d22 100644 --- a/languages/csharp/README.md +++ b/languages/csharp/README.md @@ -1,17 +1,70 @@ -# Requirements +# Bitwarden Secrets Manager SDK -- Dotnet +.NET bindings for interacting with the [Bitwarden Secrets Manager]. This is a beta release and might be missing some functionality. -# Installation +## Create access token -From the `languages/csharp/` directory, +Review the help documentation on [Access Tokens] -```bash -dotnet restore +## Usage code snippets + +### Create new Bitwarden client + +```csharp +const string accessToken = ""; +using var bitwardenClient = new BitwardenClient(); +bitwardenClient.AccessTokenLogin(accessToken); +``` + +### Create new project + +```csharp +var organizationId = Guid.Parse(""); +var projectResponse = bitwardenClient.Projects().Create(organizationId, "TestProject"); +``` + +### List all projects + +```csharp +var response = bitwardenClient.Projects.List(organizationId); +``` + +### Update project + +```csharp +var projectId = projectResponse.Id; +projectResponse = bitwardenClient.Projects.Get(projectId); +projectResponse = bitwardenClient.Projects.Update(projectId, organizationId, "TestProjectUpdated"); +``` + +### Add new secret + +```csharp +var key = "key"; +var value = "value"; +var note = "note"; +var secretResponse = bitwardenClient.Secrets.Create(key, value, note, organizationId, new[] { projectId }); +var secretId = secretResponse.Id; +``` + +### Update secret +```csharp +secretResponse = bitwardenClient.Secrets + .Update(secretId, "key2", "value2", "note2", organizationId, new[] { projectId }); ``` -# Run +### List secrets -```bash -dotnet run +```csharp +var secretIdentifiersResponse = bitwardenClient.Secrets.List(organizationId); ``` + +# Delete secret or project + +```csharp +bitwardenClient.Secrets.Delete(new [] { secretId }); +bitwardenClient.Projects.Delete(new [] { projectId }); +``` + +[Access Tokens]: https://bitwarden.com/help/access-tokens/ +[Bitwarden Secrets Manager]: https://bitwarden.com/products/secrets-manager/ diff --git a/languages/csharp/bitwardenSdk.csproj b/languages/csharp/bitwardenSdk.csproj deleted file mode 100644 index 315bdca9f..000000000 --- a/languages/csharp/bitwardenSdk.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - Exe - net6.0 - enable - enable - Bitwarden.Sdk - - - - - - - - - - - - - Always - - - Always - - - Always - - - - - - Always - - - Always - - - Always - - - diff --git a/languages/csharp/global.json b/languages/csharp/global.json new file mode 100644 index 000000000..527fd31d3 --- /dev/null +++ b/languages/csharp/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "6.0.413", + "rollForward": "latestFeature" + } +} diff --git a/support/scripts/schemas.ts b/support/scripts/schemas.ts index e08661017..148b089e6 100644 --- a/support/scripts/schemas.ts +++ b/support/scripts/schemas.ts @@ -62,7 +62,7 @@ async function main() { }, }); - writeToFile("./languages/csharp/schemas.cs", csharp.lines); + writeToFile("./languages/csharp/Bitwarden.Sdk/schemas.cs", csharp.lines); } main(); From bbbfdc6ce130275559084aee9345cf8e09bd0004 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 21 Sep 2023 21:01:16 +0200 Subject: [PATCH 09/17] .NET resolve suggested warnings (#247) --- .../Bitwarden.Sdk/BitwardenAuthException.cs | 2 +- .../csharp/Bitwarden.Sdk/BitwardenClient.cs | 11 +++++------ .../Bitwarden.Sdk/BitwardenException.cs | 2 +- .../csharp/Bitwarden.Sdk/BitwardenLibrary.cs | 18 ++++-------------- .../csharp/Bitwarden.Sdk/BitwardenSettings.cs | 3 +-- .../csharp/Bitwarden.Sdk/CommandRunner.cs | 6 +++--- .../csharp/Bitwarden.Sdk/ProjectsClient.cs | 10 +++++----- .../csharp/Bitwarden.Sdk/SecretsClient.cs | 13 +++++-------- languages/csharp/Bitwarden.Sdk/bitwarden.png | Bin 878 -> 790 bytes 9 files changed, 25 insertions(+), 40 deletions(-) diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs b/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs index 8a2b480de..7bb9f873a 100644 --- a/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs +++ b/languages/csharp/Bitwarden.Sdk/BitwardenAuthException.cs @@ -6,7 +6,7 @@ public BitwardenAuthException(string message) : base(message) { } - public BitwardenAuthException(string message, System.Exception innerException) + public BitwardenAuthException(string message, Exception innerException) : base(message, innerException) { } diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs b/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs index 617a3d00b..cb352d84f 100644 --- a/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs +++ b/languages/csharp/Bitwarden.Sdk/BitwardenClient.cs @@ -9,7 +9,9 @@ public BitwardenClient(BitwardenSettings? settings = null) { var clientSettings = new ClientSettings { - ApiUrl = settings?.ApiUrl!, IdentityUrl = settings?.IdentityUrl!, UserAgent = "Bitwarden DOTNET-SDK" + ApiUrl = settings?.ApiUrl!, + IdentityUrl = settings?.IdentityUrl!, + UserAgent = "Bitwarden DOTNET-SDK" }; _handle = BitwardenLibrary.Init(clientSettings.ToJson()); @@ -20,7 +22,7 @@ public BitwardenClient(BitwardenSettings? settings = null) public void AccessTokenLogin(string accessToken) { - var command = new Command() { AccessTokenLogin = new AccessTokenLoginRequest { AccessToken = accessToken } }; + var command = new Command { AccessTokenLogin = new AccessTokenLoginRequest { AccessToken = accessToken } }; var response = _commandRunner.RunCommand(command); if (response is not { Success: true }) { @@ -32,8 +34,5 @@ public void AccessTokenLogin(string accessToken) public SecretsClient Secrets { get; } - public void Dispose() - { - _handle.Dispose(); - } + public void Dispose() => _handle.Dispose(); } diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenException.cs b/languages/csharp/Bitwarden.Sdk/BitwardenException.cs index 539656bf4..1cf6abaa2 100644 --- a/languages/csharp/Bitwarden.Sdk/BitwardenException.cs +++ b/languages/csharp/Bitwarden.Sdk/BitwardenException.cs @@ -6,7 +6,7 @@ public BitwardenException(string message) : base(message) { } - public BitwardenException(string message, System.Exception innerException) + public BitwardenException(string message, Exception innerException) : base(message, innerException) { } diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs b/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs index 76a35ed5b..ada399401 100644 --- a/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs +++ b/languages/csharp/Bitwarden.Sdk/BitwardenLibrary.cs @@ -1,5 +1,4 @@ -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; namespace Bitwarden.Sdk; @@ -14,18 +13,9 @@ internal static class BitwardenLibrary [DllImport("bitwarden_c", CallingConvention = CallingConvention.Cdecl)] private static extern string run_command(string json, BitwardenSafeHandle handle); - internal static BitwardenSafeHandle Init(string settings) - { - return init(settings); - } + internal static BitwardenSafeHandle Init(string settings) => init(settings); - internal static void FreeMemory(IntPtr handle) - { - free_mem(handle); - } + internal static void FreeMemory(IntPtr handle) => free_mem(handle); - internal static string RunCommand(string json, BitwardenSafeHandle handle) - { - return run_command(json, handle); - } + internal static string RunCommand(string json, BitwardenSafeHandle handle) => run_command(json, handle); } diff --git a/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs b/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs index a96c5932f..a7ccdcd22 100644 --- a/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs +++ b/languages/csharp/Bitwarden.Sdk/BitwardenSettings.cs @@ -8,8 +8,7 @@ public class BitwardenSettings public string? ApiUrl { get; set; } /// - /// The identity url of the targeted Bitwarden instance. Defaults to - /// `https://identity.bitwarden.com` + /// The identity url of the targeted Bitwarden instance. Defaults to `https://identity.bitwarden.com` /// public string? IdentityUrl { get; set; } } diff --git a/languages/csharp/Bitwarden.Sdk/CommandRunner.cs b/languages/csharp/Bitwarden.Sdk/CommandRunner.cs index d797e9ece..fbd6b7e31 100644 --- a/languages/csharp/Bitwarden.Sdk/CommandRunner.cs +++ b/languages/csharp/Bitwarden.Sdk/CommandRunner.cs @@ -1,9 +1,9 @@ -namespace Bitwarden.Sdk; -using System.Text.Json; +using System.Text.Json; + +namespace Bitwarden.Sdk; internal class CommandRunner { - private readonly BitwardenSafeHandle _handle; internal CommandRunner(BitwardenSafeHandle handle) diff --git a/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs b/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs index da22e2d7f..54649b989 100644 --- a/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs +++ b/languages/csharp/Bitwarden.Sdk/ProjectsClient.cs @@ -11,7 +11,7 @@ internal ProjectsClient(CommandRunner commandRunner) public ProjectResponse Get(Guid id) { - var command = new Command() { Projects = new ProjectsCommand { Get = new ProjectGetRequest { Id = id } } }; + var command = new Command { Projects = new ProjectsCommand { Get = new ProjectGetRequest { Id = id } } }; var result = _commandRunner.RunCommand(command); if (result is { Success: true }) @@ -24,7 +24,7 @@ public ProjectResponse Get(Guid id) public ProjectResponse Create(Guid organizationId, string name) { - var command = new Command() + var command = new Command { Projects = new ProjectsCommand { @@ -43,7 +43,7 @@ public ProjectResponse Create(Guid organizationId, string name) public ProjectResponse Update(Guid id, Guid organizationId, string name) { - var command = new Command() + var command = new Command { Projects = new ProjectsCommand { @@ -62,7 +62,7 @@ public ProjectResponse Update(Guid id, Guid organizationId, string name) public ProjectsDeleteResponse Delete(Guid[] ids) { - var command = new Command() + var command = new Command { Projects = new ProjectsCommand { Delete = new ProjectsDeleteRequest { Ids = ids } } }; @@ -78,7 +78,7 @@ public ProjectsDeleteResponse Delete(Guid[] ids) public ProjectsResponse List(Guid organizationId) { - var command = new Command() + var command = new Command { Projects = new ProjectsCommand { List = new ProjectsListRequest { OrganizationId = organizationId } } }; diff --git a/languages/csharp/Bitwarden.Sdk/SecretsClient.cs b/languages/csharp/Bitwarden.Sdk/SecretsClient.cs index cf6cd36b1..fafdca2ab 100644 --- a/languages/csharp/Bitwarden.Sdk/SecretsClient.cs +++ b/languages/csharp/Bitwarden.Sdk/SecretsClient.cs @@ -11,7 +11,7 @@ internal SecretsClient(CommandRunner commandRunner) public SecretResponse Get(Guid id) { - var command = new Command() { Secrets = new SecretsCommand { Get = new SecretGetRequest { Id = id } } }; + var command = new Command { Secrets = new SecretsCommand { Get = new SecretGetRequest { Id = id } } }; var result = _commandRunner.RunCommand(command); if (result is { Success: true }) @@ -25,7 +25,7 @@ public SecretResponse Get(Guid id) public SecretResponse Create(string key, string value, string note, Guid organizationId, Guid[] projectIds) { - var command = new Command() + var command = new Command { Secrets = new SecretsCommand { @@ -53,7 +53,7 @@ public SecretResponse Create(string key, string value, string note, Guid organiz public SecretResponse Update(Guid id, string key, string value, string note, Guid organizationId, Guid[] projectIds) { - var command = new Command() + var command = new Command { Secrets = new SecretsCommand { @@ -81,10 +81,7 @@ public SecretResponse Update(Guid id, string key, string value, string note, Gui public SecretsDeleteResponse Delete(Guid[] ids) { - var command = new Command() - { - Secrets = new SecretsCommand { Delete = new SecretsDeleteRequest { Ids = ids } } - }; + var command = new Command { Secrets = new SecretsCommand { Delete = new SecretsDeleteRequest { Ids = ids } } }; var result = _commandRunner.RunCommand(command); if (result is { Success: true }) @@ -97,7 +94,7 @@ public SecretsDeleteResponse Delete(Guid[] ids) public SecretIdentifiersResponse List(Guid organizationId) { - var command = new Command() + var command = new Command { Secrets = new SecretsCommand { List = new SecretIdentifiersRequest { OrganizationId = organizationId } } }; diff --git a/languages/csharp/Bitwarden.Sdk/bitwarden.png b/languages/csharp/Bitwarden.Sdk/bitwarden.png index 5b9d09d51d999275473c8f210437a424ea96d84d..681629a2716a6c9fff49281850bbc4ec34cf43cf 100644 GIT binary patch literal 790 zcmV+x1L^#UP)C00012P)t-s0000W zVBZ*E-y2}x7+~KRVB8m9-56cn7hT*KUECL5-4|Zn|NsB-_5I@O`_$q1#n<+?%=D~f{r0Z^)>0prOQHJG1d*d{5;3j9@7hT-w**Kg4000bhQchC<5Fju>V2_`# zzt8W9O#{6E00Lr3L_t(|+U?uTlBzHehGBFDQA~pJ6M=m9f1PJ>rnIm@D(OI6^t-q6 zOk=F6(#|Fw^P~V74;Dd`3miV7?`Qik<)jAb_m^?Z3~)GO-=71h6A7jXuJUf8{iCi0zLp#TtKT{RqzK`27rvv1^{3}0rUYFga9lHa3=%s z2EZ@?ts(>P2iPzGeW?uu;1&X)=id+t7(xK_bwe-!tv`VN1gXV3fbnUx`qrty0XXdk zpyzAH0$}h3)N0xQ9st%0;NCBe1s8zM127mhtpgu`dJV8_t-$~g!5YBb>G=!*5v&0o znw}pEfNmAw8uea>cmUWHz{9BbEaCv@fGJ?StM~K+aRC_gBB0gu`~k56aMe7(8bzuc z7y!S^a8tAzU;_&9`Wz}A4*t)uA{*c$Nq+@ak^ z>;nLLqe!L)b^`#NR+DrG>R literal 878 zcmV-!1CjiRP)}b0K@`U)%ZbFGQ8}Xs zClM_aEkwJZkYJ%HW0OKGy>=B+i4y$4Dqyxf3qi3+V@gdS9w^rZuQ-W?U@#zl1TSYu zqM*_F-_6Rg?(N;|%zh;E9xMyDEc@PX-q+r~>0&;z_tLw5ezN&7$d40jV@sJIMSeJ+ zA03|eUhMKQ{vJPFVVhGXIfSde0Jz~h`RT)gyB|Z}`|05! z3IPH@00;m9AOHk_01yBIKmZ5;0U!VbfB+Bx0zd!=00A%pKrWk!AHet3->CsGaI{;C zj#2YH zKp8+yC=dmNv60>EfxWM-@ioO~E58e%@z4nYO%7IlY-CqJOWrWPq9FveybS4rfFaE1 zcXENVKRS)q`ZfrK&R$;#l^ESbhat>XF7GBhJfos9`C?f5kIvZbnmb@RmA^%p%rHb8B&`QwQ*xC9q!z zAVyC&vj5bp<=71uQpR7a#Uud0;Dn5BmLjr}!^{=O65B~94KyCRNax+UbdxnU6PhAr zcMEMDfY?SlWC(<^u(eSIyjP9gJnezd&kWf<|5tzk0ALb5Vs4E8{{R3007*qoM6N<$ Eg66e@TL1t6 From d5dd5cd85e6adad41250700e13fda3464248fb53 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:17:11 +0200 Subject: [PATCH 10/17] Lock file maintenance (#254) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Cargo.lock | 72 +++++++++---------- crates/bitwarden-napi/package-lock.json | 6 +- languages/js_webassembly/package-lock.json | 84 +++++++++++----------- package-lock.json | 20 +++--- 4 files changed, 91 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d682a9410..814fe5318 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -652,9 +652,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", @@ -997,9 +997,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" @@ -1422,9 +1422,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hkdf" @@ -2066,9 +2066,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.3+3.1.2" +version = "300.1.5+3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2c101a165fff9935e34def4669595ab1c7847943c42be86e21503e482be107" +checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" dependencies = [ "cc", ] @@ -2577,9 +2577,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -2721,9 +2721,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] @@ -2851,9 +2851,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -2937,9 +2937,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3022,9 +3022,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "supports-color" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4950e7174bffabe99455511c39707310e7e9b440364a2fcb1cc21521be57b354" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" dependencies = [ "is-terminal", "is_ci", @@ -3092,9 +3092,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -3131,9 +3131,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -3144,15 +3144,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3212,9 +3212,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3365,9 +3365,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "uniffi" @@ -3725,9 +3725,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] diff --git a/crates/bitwarden-napi/package-lock.json b/crates/bitwarden-napi/package-lock.json index 4383da1a7..02ea37bec 100644 --- a/crates/bitwarden-napi/package-lock.json +++ b/crates/bitwarden-napi/package-lock.json @@ -95,9 +95,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", + "version": "20.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.5.tgz", + "integrity": "sha512-2qGq5LAOTh9izcc0+F+dToFigBWiK1phKPt7rNhOqJSr35y8rlIBjDwGtFSgAI6MGIhjwOVNSQZVdJsZJ2uR1w==", "dev": true, "peer": true }, diff --git a/languages/js_webassembly/package-lock.json b/languages/js_webassembly/package-lock.json index 962a13941..81c910b90 100644 --- a/languages/js_webassembly/package-lock.json +++ b/languages/js_webassembly/package-lock.json @@ -126,9 +126,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.44.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz", - "integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==", + "version": "8.44.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz", + "integrity": "sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==", "dev": true, "dependencies": { "@types/estree": "*", @@ -136,9 +136,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.5.tgz", + "integrity": "sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -146,15 +146,15 @@ } }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", + "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", "dev": true }, "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "version": "4.17.18", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.18.tgz", + "integrity": "sha512-Sxv8BSLLgsBYmcnGdGjjEjqET2U+AKAdCRODmMiq02FgjwuV75Ut85DRpvFjyw/Mk0vgUOliGRU0UUmuuZHByQ==", "dev": true, "dependencies": { "@types/body-parser": "*", @@ -164,9 +164,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.36", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", - "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", + "version": "4.17.37", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.37.tgz", + "integrity": "sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==", "dev": true, "dependencies": { "@types/node": "*", @@ -209,9 +209,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", + "version": "20.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.5.tgz", + "integrity": "sha512-2qGq5LAOTh9izcc0+F+dToFigBWiK1phKPt7rNhOqJSr35y8rlIBjDwGtFSgAI6MGIhjwOVNSQZVdJsZJ2uR1w==", "dev": true }, "node_modules/@types/qs": { @@ -753,9 +753,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.21.11", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.11.tgz", + "integrity": "sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==", "dev": true, "funding": [ { @@ -772,10 +772,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", + "caniuse-lite": "^1.0.30001538", + "electron-to-chromium": "^1.4.526", "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -823,9 +823,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001535", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001535.tgz", - "integrity": "sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==", + "version": "1.0.30001538", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", + "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==", "dev": true, "funding": [ { @@ -1251,9 +1251,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.523", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz", - "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==", + "version": "1.4.528", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.528.tgz", + "integrity": "sha512-UdREXMXzLkREF4jA8t89FQjA8WHI6ssP38PMY4/4KhXFQbtImnghh4GkCgrtiZwLKUKVD2iTVXvDVQjfomEQuA==", "dev": true }, "node_modules/encodeurl": { @@ -1535,9 +1535,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -3442,9 +3442,9 @@ } }, "node_modules/terser": { - "version": "5.19.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.4.tgz", - "integrity": "sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.20.0.tgz", + "integrity": "sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -3595,9 +3595,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -4069,9 +4069,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", - "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, "engines": { "node": ">=10.0.0" diff --git a/package-lock.json b/package-lock.json index 4e48c7540..38af38025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -363,9 +363,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", + "version": "20.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.5.tgz", + "integrity": "sha512-2qGq5LAOTh9izcc0+F+dToFigBWiK1phKPt7rNhOqJSr35y8rlIBjDwGtFSgAI6MGIhjwOVNSQZVdJsZJ2uR1w==", "dev": true, "peer": true }, @@ -919,9 +919,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -1629,9 +1629,9 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", + "version": "10.3.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.7.tgz", + "integrity": "sha512-wCMbE1m9Nx5yD9LYtgsVWq5VhHlk5WzJirw594qZR6AIvQYuHrdDtIktUVjQItalD53y7dqoedu9xP0u0WaxIQ==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", @@ -1641,7 +1641,7 @@ "path-scurry": "^1.10.1" }, "bin": { - "glob": "dist/cjs/src/bin.js" + "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.17" From 8eef7897ccd1b78d5855703867cdbcce98453f8b Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Mon, 25 Sep 2023 11:35:20 +0200 Subject: [PATCH 11/17] Configure wrapping for markdown (#234) --- .prettierrc.json | 10 +++++++++- README.md | 26 +++++++++++++++---------- crates/bitwarden-api-api/README.md | 10 +++++++--- crates/bitwarden-api-identity/README.md | 10 +++++++--- crates/bitwarden/CHANGELOG.md | 8 ++++---- crates/bitwarden/README.md | 4 ++-- crates/bw/README.md | 4 +++- crates/bws/CHANGELOG.md | 10 ++++++---- crates/bws/README.md | 4 ++-- languages/kotlin/doc.md | 6 +++--- 10 files changed, 59 insertions(+), 33 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index de753c537..af82b68c4 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,3 +1,11 @@ { - "printWidth": 100 + "printWidth": 100, + "overrides": [ + { + "files": "*.md", + "options": { + "proseWrap": "always" + } + } + ] } diff --git a/README.md b/README.md index 9c3d3fe68..18613d4dc 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,13 @@ cargo build The project is structured as a monorepo using cargo workspaces. - [`bitwarden`](./crates/bitwarden/): Rust friendly API for interacting with the secrets manager. -- [`bitwarden-api-api`](./crates/bitwarden-api-api/): Auto-generated API bindings for the API server. -- [`bitwarden-api-identity`](./crates/bitwarden-api-identity/): Auto-generated API bindings for the Identity server. +- [`bitwarden-api-api`](./crates/bitwarden-api-api/): Auto-generated API bindings for the API + server. +- [`bitwarden-api-identity`](./crates/bitwarden-api-identity/): Auto-generated API bindings for the + Identity server. - [`bitwarden-c`](./crates/bitwarden-c/): C bindings for FFI interop. -- [`bitwarden-json`](./crates/bitwarden-json/): JSON wrapper around the `bitwarden` crate. Powers the other language bindings. +- [`bitwarden-json`](./crates/bitwarden-json/): JSON wrapper around the `bitwarden` crate. Powers + the other language bindings. - [`bitwarden-napi`](./crates/bitwarden-napi/): Node-API bindings. - [`bws`](./crates/bws/): CLI for interacting with the secrets manager. - [`sdk-schemas`](./crates/sdk-schemas/): Generator for the _json schemas_. @@ -34,9 +37,9 @@ To minimize the amount of work required to support additional bindings the proje around a `json` based API. With every binding only needing to implement one method, namely `run_command`. -To ensure type safety in the API, _json schemas_ are generated from the rust structs in `bitwarden` using [schemars](https://crates.io/crates/schemars). -The _json schemas_ are later used to generate the API bindings for each language using -[QuickType](https://github.com/quicktype/quicktype). +To ensure type safety in the API, _json schemas_ are generated from the rust structs in `bitwarden` +using [schemars](https://crates.io/crates/schemars). The _json schemas_ are later used to generate +the API bindings for each language using [QuickType](https://github.com/quicktype/quicktype). ```bash npm run schemas @@ -44,8 +47,9 @@ npm run schemas ## API Bindings -We autogenerate the server bindings using [openapi-generator](https://github.com/OpenAPITools/openapi-generator). -To do this we first need to build the internal swagger documentation. +We autogenerate the server bindings using +[openapi-generator](https://github.com/OpenAPITools/openapi-generator). To do this we first need to +build the internal swagger documentation. ### Swagger generation @@ -81,7 +85,8 @@ npx openapi-generator-cli generate ` --additional-properties=packageVersion=1.0.0 ``` -OpenApi Generator works using templates, we have customized our templates to work better with our codebase. +OpenApi Generator works using templates, we have customized our templates to work better with our +codebase. - https://github.com/OpenAPITools/openapi-generator/issues/10977 - https://github.com/OpenAPITools/openapi-generator/issues/12464 @@ -90,4 +95,5 @@ There is also a scenario where we have a negative integer enum which completely generation. In that case we excluded the file from being generated and manually patched it. `crates/bitwarden-api-api/src/models/organization_user_status_type.rs` -The hope going forward is that we can continue to use the generator with minimal manual intervention. +The hope going forward is that we can continue to use the generator with minimal manual +intervention. diff --git a/crates/bitwarden-api-api/README.md b/crates/bitwarden-api-api/README.md index 0754e9680..255041dc5 100644 --- a/crates/bitwarden-api-api/README.md +++ b/crates/bitwarden-api-api/README.md @@ -1,10 +1,13 @@ # Rust API client for bitwarden-api-api -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +No description provided (generated by Openapi Generator +https://github.com/openapitools/openapi-generator) ## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By +using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API +client. - API version: latest - Package version: 1.0.0 @@ -12,7 +15,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder in a directory named `bitwarden-api-api` and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `bitwarden-api-api` and add the +following to `Cargo.toml` under `[dependencies]`: ``` bitwarden-api-api = { path = "./bitwarden-api-api" } diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index ba71ced56..8288a18e5 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -1,10 +1,13 @@ # Rust API client for bitwarden-api-identity -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +No description provided (generated by Openapi Generator +https://github.com/openapitools/openapi-generator) ## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By +using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API +client. - API version: v1 - Package version: 1.0.0 @@ -12,7 +15,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder in a directory named `bitwarden-api-identity` and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `bitwarden-api-identity` and add the +following to `Cargo.toml` under `[dependencies]`: ``` bitwarden-api-identity = { path = "./bitwarden-api-identity" } diff --git a/crates/bitwarden/CHANGELOG.md b/crates/bitwarden/CHANGELOG.md index 4c99ad091..d61af5206 100644 --- a/crates/bitwarden/CHANGELOG.md +++ b/crates/bitwarden/CHANGELOG.md @@ -2,8 +2,8 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] @@ -17,8 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -- The secrets manager SDK is now hidden behind a `secrets` feature flag. Make sure to enable - this flag in your `Cargo.toml` file. At the moment the flag is enabled by default for compatibility +- The secrets manager SDK is now hidden behind a `secrets` feature flag. Make sure to enable this + flag in your `Cargo.toml` file. At the moment the flag is enabled by default for compatibility reasons, but this is considered deprecated and the flag will be made opt-in eventually. ### Added diff --git a/crates/bitwarden/README.md b/crates/bitwarden/README.md index ef024e06b..a0708b7e6 100644 --- a/crates/bitwarden/README.md +++ b/crates/bitwarden/README.md @@ -1,8 +1,8 @@ # Bitwarden Secrets Manager SDK A Rust client SDK to interact with the -[Bitwarden Secrets Manager](https://bitwarden.com/products/secrets-manager/). This is a beta -release and might be missing some functionality. +[Bitwarden Secrets Manager](https://bitwarden.com/products/secrets-manager/). This is a beta release +and might be missing some functionality. ## Usage diff --git a/crates/bw/README.md b/crates/bw/README.md index 2237c0a47..ef3d1fe8b 100644 --- a/crates/bw/README.md +++ b/crates/bw/README.md @@ -1,3 +1,5 @@ # Reserved Bitwarden Crate -Due to the wild-west nature of crates.io, we can't own a "bitwarden" namespace that we fully control. This means that certain crate names that we have a high likelihood of using in the future could be claimed by malicious or uniformed actors. +Due to the wild-west nature of crates.io, we can't own a "bitwarden" namespace that we fully +control. This means that certain crate names that we have a high likelihood of using in the future +could be claimed by malicious or uniformed actors. diff --git a/crates/bws/CHANGELOG.md b/crates/bws/CHANGELOG.md index a0a16f745..15fcfdf3b 100644 --- a/crates/bws/CHANGELOG.md +++ b/crates/bws/CHANGELOG.md @@ -2,21 +2,23 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added - Support for shell autocompletion with the `bws completions` command (#103) -- When running `bws` with no args, the help text is now printed to `stderr` instead of `stdout` to be consistent with `bws subcommand` behavior (#190) +- When running `bws` with no args, the help text is now printed to `stderr` instead of `stdout` to + be consistent with `bws subcommand` behavior (#190) ## [0.3.0] - 2023-07-26 ### Deprecated -- Switched command order from `action type` to `type action`, please re-read the help documentation (#76) +- Switched command order from `action type` to `type action`, please re-read the help documentation + (#76) ### Added diff --git a/crates/bws/README.md b/crates/bws/README.md index 0378e0dcf..11ea23814 100644 --- a/crates/bws/README.md +++ b/crates/bws/README.md @@ -1,8 +1,8 @@ # Bitwarden Secrets Manager CLI A Rust CLI for interacting with the -[Bitwarden Secrets Manager](https://bitwarden.com/products/secrets-manager/). This is a beta -release and might be missing some functionality. +[Bitwarden Secrets Manager](https://bitwarden.com/products/secrets-manager/). This is a beta release +and might be missing some functionality. ## Install diff --git a/languages/kotlin/doc.md b/languages/kotlin/doc.md index 824f0da27..9e8c19929 100644 --- a/languages/kotlin/doc.md +++ b/languages/kotlin/doc.md @@ -1,8 +1,8 @@ # Bitwarden Mobile SDK -Auto generated documentation for the Bitwarden Mobile SDK. For more information please refer to -the rust crates `bitwarden` and `bitwarden-uniffi`. For code samples check the -`languages/kotlin/app` and `languages/swift/app` directories. +Auto generated documentation for the Bitwarden Mobile SDK. For more information please refer to the +rust crates `bitwarden` and `bitwarden-uniffi`. For code samples check the `languages/kotlin/app` +and `languages/swift/app` directories. ## Client From 47f7be2155137c539c10bca532f29243357061ee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:32:08 -0400 Subject: [PATCH 12/17] Update actions/checkout action to v4 (#252) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-dotnet.yml | 2 +- .github/workflows/build-rust-cross-platform.yml | 2 +- .github/workflows/publish-dotnet.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml index 9d0ab1dce..059db6491 100644 --- a/.github/workflows/build-dotnet.yml +++ b/.github/workflows/build-dotnet.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Download C# schemas artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 diff --git a/.github/workflows/build-rust-cross-platform.yml b/.github/workflows/build-rust-cross-platform.yml index d287cf061..e9e7a79f6 100644 --- a/.github/workflows/build-rust-cross-platform.yml +++ b/.github/workflows/build-rust-cross-platform.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@f361669954a8ecfc00a3443f35f9ac8e610ffc06 # stable diff --git a/.github/workflows/publish-dotnet.yml b/.github/workflows/publish-dotnet.yml index a37266f69..7f438b24c 100644 --- a/.github/workflows/publish-dotnet.yml +++ b/.github/workflows/publish-dotnet.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Download C# schemas artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 From e8556aa64a5347237e939e2fcc2af592af49ffee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:37:02 -0400 Subject: [PATCH 13/17] Update bitwarden/gh-actions digest to 62d1bf7 (#248) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/publish-rust-crates.yml | 2 +- .github/workflows/release-cli.yml | 8 ++++---- .github/workflows/release-napi.yml | 12 ++++++------ .github/workflows/version-bump.yml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index 7ba18cc57..95cb54939 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -109,7 +109,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: keyvault: "bitwarden-ci" secrets: "cratesio-api-token" diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index d80fc1f7a..c1e946fb8 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -58,7 +58,7 @@ jobs: - name: Download all Release artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-cli.yml path: packages @@ -67,7 +67,7 @@ jobs: - name: Dry Run - Download all artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-cli.yml path: packages @@ -75,7 +75,7 @@ jobs: branch: master - name: Get checksum files - uses: bitwarden/gh-actions/get-checksum@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/get-checksum@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: packages_dir: "packages" file_path: "packages/bws-sha256-checksums-${{ steps.version.outputs.version }}.txt" @@ -134,7 +134,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: keyvault: "bitwarden-ci" secrets: "cratesio-api-token" diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index 864c3cdba..79e5e0f1d 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -47,7 +47,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/release-version-check@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -101,7 +101,7 @@ jobs: - name: Download schemas if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-napi.yml artifacts: schemas.ts @@ -111,7 +111,7 @@ jobs: - name: Dry Run - Download schemas if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-napi.yml artifacts: schemas.ts @@ -132,14 +132,14 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: keyvault: "bitwarden-ci" secrets: "npm-api-key" - name: Download artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-napi.yml path: ${{ github.workspace }}/crates/bitwarden-napi/artifacts @@ -148,7 +148,7 @@ jobs: - name: Dry Run - Download artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: workflow: build-napi.yml path: ${{ github.workspace }}/crates/bitwarden-napi/artifacts diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 0944f969a..764ba7cde 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -49,7 +49,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@8fccdaea2810d5dfb13753b6dd93bbd3a63ff82e + uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f with: keyvault: "bitwarden-ci" secrets: "github-gpg-private-key, github-gpg-private-key-passphrase" From 28a1e050f6f3ebb7c043959316db887e11263308 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:56:04 -0400 Subject: [PATCH 14/17] Update gh minor (#251) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-android.yml | 10 +++++----- .github/workflows/build-cli.yml | 8 ++++---- .github/workflows/build-dotnet.yml | 2 +- .github/workflows/build-napi.yml | 2 +- .github/workflows/build-rust-crates.yml | 4 ++-- .github/workflows/build-rust-cross-platform.yml | 4 ++-- .github/workflows/cloc.yml | 2 +- .github/workflows/direct-minimal-versions.yml | 2 +- .github/workflows/generate_schemas.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/publish-rust-crates.yml | 4 ++-- .github/workflows/release-cli.yml | 4 ++-- .github/workflows/release-napi.yml | 4 ++-- .github/workflows/rust-test.yml | 4 ++-- .github/workflows/version-bump.yml | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 579392c8e..b67e9ed7b 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -25,7 +25,7 @@ jobs: - target: i686-linux-android steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable @@ -57,14 +57,14 @@ jobs: needs: build steps: - name: Checkout repo (PR) - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 if: github.event_name == 'pull_request' with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref }} - name: Checkout repo (Push) - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 if: github.event_name == 'push' with: fetch-depth: 0 @@ -80,7 +80,7 @@ jobs: key: cargo-combine-cache - name: Setup Java - uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: temurin java-version: 17 @@ -102,7 +102,7 @@ jobs: run: ./build-schemas.sh - name: Publish - uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc # v2.8.0 + uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1 with: arguments: sdk:publish build-root-directory: languages/kotlin diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 3a0ab6213..624a69c4f 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -22,7 +22,7 @@ jobs: package_version: ${{ steps.retrieve-version.outputs.package_version }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Get Package Version id: retrieve-version @@ -60,7 +60,7 @@ jobs: target: aarch64-unknown-linux-gnu steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable @@ -115,7 +115,7 @@ jobs: _PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Download x86_64-apple-darwin artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 @@ -155,7 +155,7 @@ jobs: - setup steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml index 059db6491..608e8c47d 100644 --- a/.github/workflows/build-dotnet.yml +++ b/.github/workflows/build-dotnet.yml @@ -71,7 +71,7 @@ jobs: working-directory: languages/csharp/Bitwarden.Sdk - name: Upload NuGet package - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: Bitwarden.Sdk.0.0.1.nupkg path: | diff --git a/.github/workflows/build-napi.yml b/.github/workflows/build-napi.yml index e9a8f49a5..b55ef939f 100644 --- a/.github/workflows/build-napi.yml +++ b/.github/workflows/build-napi.yml @@ -51,7 +51,7 @@ jobs: strip *.node steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Setup Node uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 diff --git a/.github/workflows/build-rust-crates.yml b/.github/workflows/build-rust-crates.yml index c7d5aaf85..0b868367d 100644 --- a/.github/workflows/build-rust-crates.yml +++ b/.github/workflows/build-rust-crates.yml @@ -34,7 +34,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable @@ -64,7 +64,7 @@ jobs: - build steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/build-rust-cross-platform.yml b/.github/workflows/build-rust-cross-platform.yml index e9e7a79f6..70bee0adf 100644 --- a/.github/workflows/build-rust-cross-platform.yml +++ b/.github/workflows/build-rust-cross-platform.yml @@ -30,7 +30,7 @@ jobs: toolchain: stable - name: Cache cargo registry - uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 - name: Add build architecture run: rustup target add ${{ matrix.settings.target }} @@ -41,7 +41,7 @@ jobs: run: cargo build --target ${{ matrix.settings.target }} --release - name: Upload Artifact - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: libbitwarden_c_files-${{ matrix.settings.target }} path: | diff --git a/.github/workflows/cloc.yml b/.github/workflows/cloc.yml index 58a464d2c..48f72ff65 100644 --- a/.github/workflows/cloc.yml +++ b/.github/workflows/cloc.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Set up cloc run: | diff --git a/.github/workflows/direct-minimal-versions.yml b/.github/workflows/direct-minimal-versions.yml index 41a5e4b68..579817c49 100644 --- a/.github/workflows/direct-minimal-versions.yml +++ b/.github/workflows/direct-minimal-versions.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/generate_schemas.yml b/.github/workflows/generate_schemas.yml index ee30a10fe..9b2ac57c3 100644 --- a/.github/workflows/generate_schemas.yml +++ b/.github/workflows/generate_schemas.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 03f4fb4e0..425f4e83a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index 95cb54939..461bcab02 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -43,7 +43,7 @@ jobs: packages_command: ${{ steps.packages-list.outputs.packages_command }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} @@ -100,7 +100,7 @@ jobs: - setup steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Login to Azure uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index c1e946fb8..8e4cc0fd9 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -27,7 +27,7 @@ jobs: release-version: ${{ steps.version.outputs.version }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} @@ -125,7 +125,7 @@ jobs: - setup steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Login to Azure uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index 79e5e0f1d..35040d19f 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -33,7 +33,7 @@ jobs: release-version: ${{ steps.version.outputs.version }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} @@ -90,7 +90,7 @@ jobs: _PKG_VERSION: ${{ needs.setup.outputs.release-version }} steps: - name: Checkout repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Setup Node uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 877cbbbc0..f77cb29f6 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable @@ -56,7 +56,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 764ba7cde..1cbb87b47 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout Branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable From 32c98bbdad5a024038624352b356ebf363f52c4a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:57:13 -0400 Subject: [PATCH 15/17] Update dtolnay/rust-toolchain digest to 439cf60 (#249) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-rust-cross-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-rust-cross-platform.yml b/.github/workflows/build-rust-cross-platform.yml index 70bee0adf..007cf5d17 100644 --- a/.github/workflows/build-rust-cross-platform.yml +++ b/.github/workflows/build-rust-cross-platform.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - name: Install rust - uses: dtolnay/rust-toolchain@f361669954a8ecfc00a3443f35f9ac8e610ffc06 # stable + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable with: toolchain: stable From 6859c5b731885266a3ce6ac6e1d43f9a5f882242 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 28 Sep 2023 20:58:34 +0200 Subject: [PATCH 16/17] Mock response values for password strength and generators (#257) --- crates/bitwarden/src/auth/password.rs | 4 ++-- crates/bitwarden/src/tool/generators/password.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bitwarden/src/auth/password.rs b/crates/bitwarden/src/auth/password.rs index 7749710d4..a38c75ab6 100644 --- a/crates/bitwarden/src/auth/password.rs +++ b/crates/bitwarden/src/auth/password.rs @@ -5,7 +5,7 @@ pub(super) fn password_strength( _email: String, _additional_inputs: Vec, ) -> u8 { - todo!() + 2 } pub(super) fn satisfies_policy( @@ -13,7 +13,7 @@ pub(super) fn satisfies_policy( _strength: u8, _policy: &MasterPasswordPolicyOptions, ) -> bool { - todo!() + true } #[derive(Debug, JsonSchema)] diff --git a/crates/bitwarden/src/tool/generators/password.rs b/crates/bitwarden/src/tool/generators/password.rs index ea74616b2..0a3874082 100644 --- a/crates/bitwarden/src/tool/generators/password.rs +++ b/crates/bitwarden/src/tool/generators/password.rs @@ -41,9 +41,9 @@ pub struct PassphraseGeneratorRequest { } pub(super) fn password(_input: PasswordGeneratorRequest) -> Result { - todo!() + Ok("pa11w0rd".to_string()) } pub(super) fn passphrase(_input: PassphraseGeneratorRequest) -> Result { - todo!() + Ok("correct-horse-battery-staple".to_string()) } From caf352131f087b6a345b8ae05462ffd2eb5ca9dd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:51:57 +0200 Subject: [PATCH 17/17] Update npm minor (#264) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 34 +++++++++++++++++----------------- package.json | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38af38025..22f0e6282 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@openapitools/openapi-generator-cli": "2.7.0", "handlebars": "^4.7.8", "prettier": "3.0.3", - "quicktype-core": "23.0.75", - "rimraf": "5.0.1", + "quicktype-core": "23.0.76", + "rimraf": "5.0.5", "ts-node": "10.9.1", "typescript": "5.2.2" } @@ -1191,9 +1191,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", - "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -1491,9 +1491,9 @@ } }, "node_modules/quicktype-core": { - "version": "23.0.75", - "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-23.0.75.tgz", - "integrity": "sha512-aVXb5MpCdWCyrWUqw906+dBU7C3wFWwSax1ySu/0wk4QNGnpg1DPJDDUdOXXMNKmLlAeA9+3Cs1kPHWNXxovBQ==", + "version": "23.0.76", + "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-23.0.76.tgz", + "integrity": "sha512-QinZRNovSTQcFuhRKxeHb22eFmyucbG96EPaQDSbz9qvIPxUhs1BZviNc8HAkHWYFqTSET/xZcEoHpm1DeDbRg==", "dev": true, "dependencies": { "@glideapps/ts-necessities": "2.1.3", @@ -1602,15 +1602,15 @@ } }, "node_modules/rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "dependencies": { - "glob": "^10.2.5" + "glob": "^10.3.7" }, "bin": { - "rimraf": "dist/cjs/src/bin.js" + "rimraf": "dist/esm/bin.mjs" }, "engines": { "node": ">=14" @@ -1629,13 +1629,13 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.7.tgz", - "integrity": "sha512-wCMbE1m9Nx5yD9LYtgsVWq5VhHlk5WzJirw594qZR6AIvQYuHrdDtIktUVjQItalD53y7dqoedu9xP0u0WaxIQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "path-scurry": "^1.10.1" diff --git a/package.json b/package.json index 62ca39163..fdeb8fe58 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "@openapitools/openapi-generator-cli": "2.7.0", "handlebars": "^4.7.8", "prettier": "3.0.3", - "quicktype-core": "23.0.75", - "rimraf": "5.0.1", + "quicktype-core": "23.0.76", + "rimraf": "5.0.5", "ts-node": "10.9.1", "typescript": "5.2.2" }