Skip to content

Commit 4cccada

Browse files
committed
Move org id to core
1 parent ba210e7 commit 4cccada

File tree

8 files changed

+15
-10
lines changed

8 files changed

+15
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/bitwarden-core/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ keywords.workspace = true
1717
[features]
1818
internal = ["dep:zxcvbn"]
1919
no-memory-hardening = [
20-
"bitwarden-crypto/no-memory-hardening"
20+
"bitwarden-crypto/no-memory-hardening",
2121
] # Disable memory hardening features
2222
secrets = [] # Secrets manager API
2323
uniffi = ["bitwarden-crypto/uniffi", "dep:uniffi"] # Uniffi bindings
2424
wasm = [
2525
"bitwarden-error/wasm",
2626
"dep:wasm-bindgen",
27-
"dep:tsify-next"
27+
"dep:tsify-next",
2828
] # WASM support
2929

3030
[dependencies]
@@ -33,6 +33,7 @@ bitwarden-api-api = { workspace = true }
3333
bitwarden-api-identity = { workspace = true }
3434
bitwarden-crypto = { workspace = true }
3535
bitwarden-error = { workspace = true }
36+
bitwarden-uuid = { workspace = true }
3637
chrono = { workspace = true, features = ["std"] }
3738
# We don't use this directly (it's used by rand), but we need it here to enable WASM support
3839
getrandom = { version = ">=0.2.9, <0.3", features = ["js"] }

crates/bitwarden-core/src/ids.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use bitwarden_uuid::uuid;
2+
3+
uuid!(pub OrganizationId);

crates/bitwarden-core/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ mod util;
2525

2626
pub use bitwarden_crypto::ZeroizingAllocator;
2727
pub use client::{Client, ClientSettings, DeviceType};
28+
29+
mod ids;
30+
pub use ids::*;

crates/bitwarden-uniffi/src/vault/ciphers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use bitwarden_vault::{Cipher, CipherListView, CipherView, Fido2CredentialView, OrganizationId};
1+
use bitwarden_core::OrganizationId;
2+
use bitwarden_vault::{Cipher, CipherListView, CipherView, Fido2CredentialView};
23
use uuid::Uuid;
34

45
use crate::{error::Error, Result};

crates/bitwarden-vault/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ bitwarden-api-api = { workspace = true }
2828
bitwarden-core = { workspace = true, features = ["internal"] }
2929
bitwarden-crypto = { workspace = true }
3030
bitwarden-error = { workspace = true }
31-
bitwarden-uuid = { workspace = true }
3231
chrono = { workspace = true }
3332
data-encoding = ">=2.0, <3"
3433
hmac = ">=0.12.1, <0.13"

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
use bitwarden_core::Client;
1+
use bitwarden_core::{Client, OrganizationId};
22
use bitwarden_crypto::IdentifyKey;
3-
use bitwarden_uuid::uuid;
3+
44
#[cfg(feature = "wasm")]
55
use wasm_bindgen::prelude::*;
66

77
use crate::{
88
Cipher, CipherError, CipherListView, CipherView, DecryptError, EncryptError, VaultClient,
99
};
1010

11-
uuid!(pub OrganizationId);
12-
1311
#[cfg_attr(feature = "wasm", wasm_bindgen)]
1412
pub struct CiphersClient {
1513
pub(crate) client: Client,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub use cipher::{
2222
Cipher, CipherError, CipherListView, CipherListViewType, CipherRepromptType, CipherType,
2323
CipherView,
2424
};
25-
pub use cipher_client::{CiphersClient, OrganizationId};
25+
pub use cipher_client::CiphersClient;
2626
pub use field::FieldView;
2727
pub use identity::IdentityView;
2828
pub use login::{

0 commit comments

Comments
 (0)