export type TemplateManifest = { templateVersion: string; minCliVersion: string; requiredSecrets: string[]; requiredVars: string[]; kvBindings: string[]; migrations: { version: string; notes: string; }[]; }; export declare function templateRoot(): string; export declare function loadManifest(): TemplateManifest; /** A Cloudflare native rate-limit binding, as declared in the template's wrangler config. */ export type RateLimitBinding = { name: string; namespace_id: string; simple: { limit: number; period: number; }; }; /** * The template's Cloudflare rate-limit bindings, read from the build output of * the single place they are declared — `wrangler.jsonc`. `ownmail deploy` * carries them through by patching that same emitted config, so anything that * writes a wrangler config for a user must read them from here rather than * restate them: a second copy is a second thing to forget. * * These bindings are the only atomic brute-force control in front of sign-in, * and a project without them silently degrades to per-instance counting, so a * missing declaration is a hard error rather than a warning. */ export declare function templateRateLimits(): RateLimitBinding[]; export type MaterializeInput = { slug: string; workerName: string; kvNamespaceId: string; vars: Record; /** Optional custom domain for the app itself (Cloudflare custom_domain route). */ appDomain?: string; /** All custom domains attached to the app. */ appDomains?: string[]; }; export type Materialized = { /** Directory containing the copied dist. */ dir: string; /** Path to the patched wrangler config — pass to `wrangler deploy -c`. */ configPath: string; }; export type ManualExportInput = { slug: string; siteName: string; region: 'us' | 'eu'; apiBaseUrl?: string; applicationId: string; inboxEmail: string; templateVersion: string; targetDir: string; apiKey?: string; sessionSecret: string; }; export type NodeMaterialized = { dir: string; }; /** Copies the prebuilt Vercel Build Output API directory into an isolated deployment directory. */ export declare function materializeVercel(slug: string): NodeMaterialized; /** * Builds a Netlify deployment from the same Node SSR bundle used by Vercel. * The fetch-style function handles dynamic routes while `preferStatic` keeps * immutable client assets on Netlify's CDN. */ export declare function materializeNetlify(slug: string): NodeMaterialized; /** Copies the Node SSR bundle and loopback-only server into durable local runtime storage. */ export declare function materializeLocal(targetDir: string): NodeMaterialized; /** * Copies the template's prebuilt dist (vite + @cloudflare/vite-plugin output: * dist/server + dist/client + dist/server/wrangler.json) into a scratch dir * and patches the emitted wrangler config with this user's worker name, KV * namespace id, and runtime vars. */ export declare function materialize(input: MaterializeInput): Materialized; export declare function exportManualBundle(input: ManualExportInput): string; //# sourceMappingURL=materialize.d.ts.map