Skip to content

Commit 2028495

Browse files
authored
Migrate vault client implementations from mobile directory (#217)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective Reorganize client implementations to be colocated with their respective domain models. <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent 8f0ea14 commit 2028495

File tree

8 files changed

+11
-13
lines changed

8 files changed

+11
-13
lines changed

crates/bitwarden-vault/src/mobile/cipher_client.rs renamed to crates/bitwarden-vault/src/cipher/cipher_client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ impl ClientCiphers {
6262
Ok(cipher_view)
6363
}
6464

65+
#[cfg(feature = "wasm")]
6566
pub fn decrypt_fido2_private_key(
6667
&self,
6768
cipher_view: CipherView,

crates/bitwarden-vault/src/cipher/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
pub(crate) mod attachment;
2+
pub(crate) mod attachment_client;
23
pub(crate) mod card;
34
#[allow(clippy::module_inception)]
45
pub(crate) mod cipher;
6+
pub(crate) mod cipher_client;
57
pub(crate) mod cipher_permissions;
68
pub(crate) mod field;
79
pub(crate) mod identity;
@@ -14,11 +16,13 @@ pub(crate) mod ssh_key;
1416
pub use attachment::{
1517
Attachment, AttachmentEncryptResult, AttachmentFile, AttachmentFileView, AttachmentView,
1618
};
19+
pub use attachment_client::{ClientAttachments, DecryptFileError, EncryptFileError};
1720
pub use card::{CardBrand, CardView};
1821
pub use cipher::{
1922
Cipher, CipherError, CipherListView, CipherListViewType, CipherRepromptType, CipherType,
2023
CipherView,
2124
};
25+
pub use cipher_client::ClientCiphers;
2226
pub use field::FieldView;
2327
pub use identity::IdentityView;
2428
pub use login::{

crates/bitwarden-vault/src/lib.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ mod cipher;
99
pub use cipher::*;
1010
mod collection;
1111
pub use collection::{Collection, CollectionView};
12+
mod collection_client;
13+
pub use collection_client::ClientCollections;
1214
mod folder;
1315
pub use folder::{Folder, FolderView};
16+
mod folder_client;
17+
pub use folder_client::ClientFolders;
1418
mod password_history;
1519
pub use password_history::{PasswordHistory, PasswordHistoryView};
20+
mod password_history_client;
21+
pub use password_history_client::ClientPasswordHistory;
1622
mod domain;
1723
pub use domain::GlobalDomains;
1824
mod totp;
@@ -23,14 +29,6 @@ mod error;
2329
pub use error::{DecryptError, EncryptError, VaultParseError};
2430
mod vault_client;
2531
pub use vault_client::{VaultClient, VaultClientExt};
26-
mod mobile;
27-
pub use mobile::{
28-
attachment_client::{ClientAttachments, DecryptFileError, EncryptFileError},
29-
cipher_client::ClientCiphers,
30-
collection_client::ClientCollections,
31-
folder_client::ClientFolders,
32-
password_history_client::ClientPasswordHistory,
33-
};
3432

3533
mod sync;
3634
mod totp_client;

crates/bitwarden-vault/src/mobile/mod.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)