Plaintext values on encryption

This commit is contained in:
2026-02-25 15:35:04 +11:00
parent f80aa2dcfc
commit 77593fe3b4
8 changed files with 407 additions and 143 deletions

View File

@@ -1,4 +1,4 @@
import { BaseStorage, FindOptions } from './base-storage.js';
import { BaseStorage, FindOptions, type Filter } from './base-storage.js';
import { StorageMemory } from './storage-memory.js';
/**
@@ -65,19 +65,19 @@ export class StorageMemorySynced<T extends Record<string, any> = Record<string,
await this.store.insertMany(documents);
}
async find(filter?: Partial<T>, options?: FindOptions): Promise<T[]> {
async find(filter?: Filter<T>, options?: FindOptions): Promise<T[]> {
return await this.inMemoryCache.find(filter, options);
}
async updateMany(
filter: Partial<T>,
filter: Filter<T>,
update: Partial<T>,
options: FindOptions = {} as FindOptions
): Promise<number> {
return await this.store.updateMany(filter, update, options);
}
async deleteMany(filter: Partial<T>, options: FindOptions = {} as FindOptions): Promise<number> {
async deleteMany(filter: Filter<T>, options: FindOptions = {} as FindOptions): Promise<number> {
return await this.store.deleteMany(filter, options);
}