import { db } from './db'; export interface DebugAsset { type: string; url: string; file: Blob; title: string; fakeid: string; } /** * 更新 html 缓存 * @param html 缓存 */ export async function updateDebugCache(html: DebugAsset): Promise { return db.transaction('rw', 'debug', async () => { await db.debug.put(html); return true; }); } /** * 获取 asset 缓存 * @param url */ export async function getDebugCache(url: string): Promise { return db.debug.get(url); } export async function getDebugInfo(): Promise { return db.debug.toArray(); }