import type { EdictHostAdapter } from "./host-adapter.js"; /** Options for CloudflareHostAdapter construction. */ export interface CloudflareHostAdapterOptions { /** Workers environment bindings. Lookups return "" for missing keys. */ envBindings?: Record; } /** * Cloudflare Workers runtime adapter. * * - Crypto: pure-JS SHA-256, MD5, HMAC (synchronous, no Web Crypto API) * - HTTP: returns structured error (Workers fetch is async, incompatible with sync host imports) * - File IO: returns structured error (Workers KV is async) * - env: configurable via constructor envBindings * * This adapter is designed for use in generated Worker scripts where WASM * host imports must be synchronous. All async-only operations return * structured errors naming the constraint. */ export declare class CloudflareHostAdapter implements EdictHostAdapter { private readonly envBindings; constructor(options?: CloudflareHostAdapterOptions); sha256(data: string): string; md5(data: string): string; hmac(algo: string, key: string, data: string): string; fetch(_url: string, _method: string, _body?: string): { ok: boolean; data: string; }; readFile(_path: string): { ok: false; error: string; }; writeFile(_path: string, _content: string): { ok: false; error: string; }; env(name: string): string; args(): string[]; exit(code: number): never; } //# sourceMappingURL=cloudflare-host-adapter.d.ts.map