/** @file the tests' main module: a DO that hosts stores on its own storage. */ import { DurableObject } from "cloudflare:workers"; import { M } from "../src/patterns.js"; import { makeMapStore, type MapStore } from "../src/store.js"; /** hosts the store from the credential-rotation sketch: one key, `cookie` */ export class StoreHost extends DurableObject { cookies(): MapStore { return makeMapStore("cookie", { keyShape: "cookie", valueShape: M.string() }, this.ctx.storage.kv); } } export default { fetch: () => new Response("store tests", { status: 404 }), };