UNPKG

epps

Version:

Enhances Pinia stores with advanced features such as persistence, encryption, and store extension. Simplifies state management and ensures data security for Vue.js and Nuxt applications.

24 lines (23 loc) 793 B
import Crypt from "../services/Crypt"; import Persister from "../services/Persister"; import type { PiniaPluginContext, StateTree } from "pinia"; import type { AllowedKeyPath } from "../types/storage"; export interface EppsConstructorProps { dbName?: string; dbKeyPath?: AllowedKeyPath; cryptKey?: string; debug?: boolean; } export declare class EppsPlugin { private _db?; private _debug; private _crypt?; private _watchedStore; get db(): Persister | undefined; get crypt(): Crypt | undefined; constructor(db?: Persister, crypt?: Crypt, debug?: boolean); private getEppsOptions; private getStoreDb; plugin({ store, options }: PiniaPluginContext): void; rewriteResetStore({ store }: PiniaPluginContext, initState: StateTree): void; }