Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const provideTemporaryAndNonPersistentEngine = async (storeName: string): Promise => {
await Dexie.delete('/sqleet');
const encryptionKey = await saveRandomEncryptionKey();
const engine = new SQLeetEngine('/worker/sqleet-worker.js', SQLeetSchemata.getLatest(), encryptionKey);
await engine.init(storeName);
return engine;
};
static async getUnitializedEngine(): Promise {
const encryptionKey = await getEphemeralValue();
return new SQLeetEngine('/worker/sqleet-worker.js', SQLeetSchemata.getLatest(), encryptionKey);
}