import type {Upload} from '../models' import type {KvStore} from './Types' /** * Memory based configstore. * Used mostly for unit tests. */ export class MemoryKvStore implements KvStore { data: Map = new Map() async get(key: string): Promise { return this.data.get(key) } async set(key: string, value: T): Promise { this.data.set(key, value) } async delete(key: string): Promise { this.data.delete(key) } async list(): Promise> { return [...this.data.keys()] } }