import type { Context } from "../context.js"; import { Resource } from "../resource.js"; import type { Worker } from "./worker.js"; /** * Properties for wrangler.json configuration file */ export interface WranglerJsonProps { name?: string; /** * The worker to generate the wrangler.json file for */ worker: Worker; /** * Path to write the wrangler.json file to * * @default cwd/wrangler.json */ path?: string; /** * The main entry point for the worker * * @default worker.entrypoint */ main?: string; } /** * Output returned after WranglerJson creation/update */ export interface WranglerJson extends Resource<"cloudflare::WranglerJson">, WranglerJsonProps { /** * Time at which the file was created */ createdAt: number; /** * Time at which the file was last updated */ updatedAt: number; /** * Path to the wrangler.json file */ path: string; /** * `wrangler.json` spec */ spec: WranglerJsonSpec; } /** * Resource for managing wrangler.json configuration files */ export declare const WranglerJson: (((this: any, id: string, props?: {}) => never) & (new (_: never) => never)) | ((this: Context, id: string, props: WranglerJsonProps) => Promise); /** * Wrangler.json configuration specification based on Cloudflare's schema */ export interface WranglerJsonSpec { /** * The name of the worker */ name: string; /** * Main entry point for the worker */ main?: string; /** * A date in the form yyyy-mm-dd used to determine Workers runtime version */ compatibility_date?: string; /** * A list of flags that enable features from upcoming Workers runtime */ compatibility_flags?: string[]; /** * Whether to enable a workers.dev URL for this worker */ workers_dev?: boolean; /** * Routes to attach to the worker */ routes?: string[]; /** * Browser bindings */ browser?: { binding: string; }; /** * KV Namespace bindings */ kv_namespaces?: { binding: string; id: string; }[]; /** * Durable Object bindings */ durable_objects?: { bindings: { name: string; class_name: string; script_name?: string; environment?: string; }[]; }; /** * R2 bucket bindings */ r2_buckets?: { binding: string; bucket_name: string; }[]; /** * Queue bindings */ queues?: { producers: { queue: string; binding: string; }[]; consumers: { queue: string; max_batch_size?: number; max_concurrency?: number; max_retries?: number; max_wait_time_ms?: number; retry_delay?: number; }[]; }; /** * Service bindings */ services?: { binding: string; service: string; environment?: string; }[]; /** * Workflow bindings */ workflows?: { name: string; binding: string; class_name: string; }[]; /** * Vectorize index bindings */ vectorize_indexes?: { binding: string; index_name: string; }[]; /** * Plain text bindings (vars) */ vars?: Record; /** * D1 database bindings */ d1_databases?: { binding: string; database_id: string; database_name: string; migrations_dir?: string; }[]; /** * Assets bindings */ assets?: { directory: string; binding: string; }; /** * Workflow bindings */ wasm_modules?: Record; /** * Safe mode configuration */ node_compat?: boolean; /** * Whether to minify the worker script */ minify?: boolean; } //# sourceMappingURL=wrangler.json.d.ts.map