feat(wasm): default_vault_settings_json() for wizard parity with CLI init
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,16 @@ pub fn settings_encrypt(handle: &SessionHandle, settings_json: &str) -> Result<V
|
||||
.map_err(|e| JsError::new(&e.to_string()))
|
||||
}
|
||||
|
||||
/// Returns the JSON for `VaultSettings::default()`. Used by the setup
|
||||
/// wizard to encrypt and write a default settings.enc on new-vault setup.
|
||||
/// Keeping this in WASM (instead of hand-encoding in TS) prevents drift
|
||||
/// when the default VaultSettings shape changes in Rust.
|
||||
#[wasm_bindgen]
|
||||
pub fn default_vault_settings_json() -> Result<String, JsError> {
|
||||
let s = VaultSettings::default();
|
||||
serde_json::to_string(&s).map_err(|e| JsError::new(&e.to_string()))
|
||||
}
|
||||
|
||||
// ── Task 20: attachment / generator / imgsecret / ID / TOTP bridges ─────────
|
||||
|
||||
use relicario_core::{decrypt_attachment, encrypt_attachment, FieldId, ItemId};
|
||||
|
||||
Reference in New Issue
Block a user