@vobase/core 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ import type { Database } from 'bun:sqlite';
2
+ import type { VobaseDb } from './db/client';
3
+ /** Encrypt a plaintext string using AES-256-GCM. Returns base64-encoded ciphertext. */
4
+ export declare function encrypt(plaintext: string): string;
5
+ /** Decrypt a base64-encoded ciphertext using AES-256-GCM. */
6
+ export declare function decrypt(encoded: string): string;
7
+ /** Get a single credential value (decrypted). Returns null if not found or decryption fails. */
8
+ export declare function getCredential(db: VobaseDb, key: string): Promise<string | null>;
9
+ /** Set a single credential value (encrypted). Upserts on conflict. */
10
+ export declare function setCredential(db: VobaseDb, key: string, value: string): Promise<void>;
11
+ /** Delete a single credential. */
12
+ export declare function deleteCredential(db: VobaseDb, key: string): Promise<void>;
13
+ /**
14
+ * Create the _credentials table if it doesn't exist.
15
+ * This is opt-in — call during app startup if your project uses credential encryption.
16
+ */
17
+ export declare function ensureCredentialTable(db: Database): void;
18
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAkB5C,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED,6DAA6D;AAC7D,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAe/C;AAED,gGAAgG;AAChG,wBAAsB,aAAa,CACjC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAYxB;AAED,sEAAsE;AACtE,wBAAsB,aAAa,CACjC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CASf;AAED,kCAAkC;AAClC,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAIf;AAUD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAExD"}