feat(core-storage): add PouchEnvelope tests and LocalStorageService implementation

- Introduced tests for PouchEnvelope to validate envelope-aware CRUD operations using an in-memory PouchDB.
- Implemented LocalStorageService with encryption support for sensitive keys, including tests for setItem, getItem, removeItem, and clear methods.
- Defined a generic storage interface (IStorageService) to enforce type-safe serialization/deserialization across storage implementations.
This commit is contained in:
Firman Ramdhani
2026-07-06 11:38:37 +07:00
parent 7130eb3fe3
commit d1ce292e3c
17 changed files with 1568 additions and 215 deletions
+7 -7
View File
@@ -1,10 +1,10 @@
// ─── Interfaces ─────────────────────────────────────────────────
export type { IStorageService } from './storage.interface';
export type { StorageOptions } from './local-storage.service';
export type { IndexedDBConfig } from './indexed-db.service';
export type { PouchConfig } from './pouch';
export type { IStorageService } from './types/storage.interface';
export type { StorageOptions } from './local-storage/local-storage.service';
export type { IndexedDBConfig } from './indexed-db/indexed-db.service';
export type { PouchConfig, CouchEnvelope, FlatDoc, SyncStatus } from './pouch-db';
// ─── Service Classes ────────────────────────────────────────────
export { LocalStorageService, createLocalStorage } from './local-storage.service';
export { IndexedDBService, createIndexedDB } from './indexed-db.service';
export { PouchDatabaseManager, PouchDatabaseWrapper } from './pouch';
export { LocalStorageService, createLocalStorage } from './local-storage/local-storage.service';
export { IndexedDBService, createIndexedDB } from './indexed-db/indexed-db.service';
export { PouchDBManager, PouchEnvelopeDBManager, PouchService, PouchEnvelopeService } from './pouch-db';