@cloudflare/vite-plugin 1.57.2 → 2.0.0-beta.sha-c82c3efb3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1781 +1 @@
1
- import { Pipeline, PipelineRecord } from "cloudflare:pipelines";
2
-
3
- //#region ../config/dist/public-fVh2BrM5.d.mts
4
-
5
- //#region src/exports.d.ts
6
- /**
7
- * Storage backend for the Durable Object.
8
- *
9
- * Containers are only supported on the SQLite storage engine, so `container` is
10
- * only offered alongside `storage: "sqlite"`.
11
- */
12
- type DurableObjectStorageOptions<TContainer extends ContainerDefinition | undefined = ContainerDefinition | undefined> = {
13
- /**
14
- * Selects the SQLite-backed storage engine (recommended for new
15
- * classes).
16
- */
17
- storage: "sqlite";
18
- /**
19
- * Attach a Container application to this Durable Object by config reference.
20
- */
21
- container?: TContainer;
22
- } | {
23
- /** Selects the legacy key-value storage engine. */
24
- storage: "legacy-kv";
25
- };
26
- /**
27
- * Declares a provisioned Durable Object class exported from this Worker.
28
- *
29
- * For more information about Durable Objects, see the documentation at
30
- * https://developers.cloudflare.com/workers/learning/using-durable-objects
31
- *
32
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
33
- */
34
- type DurableObjectCreatedExportOptions<TContainer extends ContainerDefinition | undefined = ContainerDefinition | undefined> = {
35
- state?: "created";
36
- } & DurableObjectStorageOptions<TContainer>;
37
- /**
38
- * Retire a provisioned Durable Object namespace whose class has
39
- * been removed from code.
40
- *
41
- * During deploy, the class must not be exported in the uploaded code, and no
42
- * other Worker may hold a `durableObject` binding to the namespace.
43
- */
44
- interface DurableObjectDeletedExportOptions {
45
- state: "deleted";
46
- }
47
- /**
48
- * Rename a provisioned Durable Object namespace's class. The
49
- * `renamedTo` value must also appear as a live (`state: "created"`)
50
- * `durableObject` entry in the same `exports` map.
51
- */
52
- interface DurableObjectRenamedExportOptions {
53
- state: "renamed";
54
- /**
55
- * The destination class name. Must be a valid JavaScript identifier and
56
- * must appear as a live (`state: "created"`) `durableObject` entry in the
57
- * same `exports` map.
58
- */
59
- renamedTo: string;
60
- }
61
- /**
62
- * Transfer ownership of a Durable Object namespace to another Worker in the same account.
63
- * The target Worker must first deploy an `expectingTransfer` entry naming this Worker via `transferFrom`.
64
- */
65
- interface DurableObjectTransferredExportOptions {
66
- state: "transferred";
67
- /**
68
- * The destination Worker. Must reference a Worker in the same account.
69
- */
70
- transferredTo: string;
71
- }
72
- /**
73
- * Prepare to receive cross-Worker Durable Object transfer.
74
- * Once the source Worker's `transferred` export is deployed, this entry becomes a normal live `durable-object` export.
75
- */
76
- type DurableObjectExpectingTransferExportOptions<TContainer extends ContainerDefinition | undefined = ContainerDefinition | undefined> = {
77
- state: "expecting-transfer";
78
- /**
79
- * The source Worker for the two-phase cross-Worker transfer.
80
- */
81
- transferFrom: string;
82
- } & DurableObjectStorageOptions<TContainer>;
83
- type DurableObjectCreatedExport<TContainer extends ContainerDefinition | undefined = ContainerDefinition | undefined> = DurableObjectCreatedExportOptions<TContainer> & {
84
- type: "durable-object";
85
- };
86
- interface DurableObjectDeletedExport extends DurableObjectDeletedExportOptions {
87
- type: "durable-object";
88
- }
89
- interface DurableObjectRenamedExport extends DurableObjectRenamedExportOptions {
90
- type: "durable-object";
91
- }
92
- interface DurableObjectTransferredExport extends DurableObjectTransferredExportOptions {
93
- type: "durable-object";
94
- }
95
- type DurableObjectExpectingTransferExport<TContainer extends ContainerDefinition | undefined = ContainerDefinition | undefined> = DurableObjectExpectingTransferExportOptions<TContainer> & {
96
- type: "durable-object";
97
- };
98
- type DurableObjectExportOptions = DurableObjectCreatedExportOptions | DurableObjectDeletedExportOptions | DurableObjectRenamedExportOptions | DurableObjectTransferredExportOptions | DurableObjectExpectingTransferExportOptions;
99
- type DurableObjectExports = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableObjectRenamedExport | DurableObjectTransferredExport | DurableObjectExpectingTransferExport;
100
- interface WorkerEntrypointExportOptions {
101
- cache?: {
102
- /** Whether cache is enabled for this entrypoint. */
103
- enabled: boolean;
104
- };
105
- }
106
- interface WorkerEntrypointExport extends WorkerEntrypointExportOptions {
107
- type: "worker";
108
- }
109
- /**
110
- * Configuration for named exports declared by the Worker. Each entry's
111
- * key is the exported class name; the value configures the export.
112
- */
113
- interface Exports {
114
- /**
115
- * Declares a Durable Object class defined by this Worker.
116
- *
117
- * For more information about Durable Objects, see the documentation at
118
- * https://developers.cloudflare.com/workers/learning/using-durable-objects
119
- *
120
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
121
- */
122
- durableObject<TContainer extends ContainerDefinition | undefined = undefined>(options: DurableObjectCreatedExportOptions<TContainer>): DurableObjectCreatedExport<TContainer>;
123
- /**
124
- * Retire a provisioned Durable Object namespace whose class has been removed from code.
125
- */
126
- durableObject(options: DurableObjectDeletedExportOptions): DurableObjectDeletedExport;
127
- /**
128
- * Rename a provisioned Durable Object namespace's class.
129
- */
130
- durableObject(options: DurableObjectRenamedExportOptions): DurableObjectRenamedExport;
131
- /**
132
- * Transfer ownership of a Durable Object namespace to another Worker in the same account.
133
- */
134
- durableObject(options: DurableObjectTransferredExportOptions): DurableObjectTransferredExport;
135
- /**
136
- * Prepare to receive cross-Worker Durable Object transfer.
137
- * The source Worker must follow up with a deployment containing a `transferred` export to commit the transfer.
138
- */
139
- durableObject<TContainer extends ContainerDefinition | undefined = undefined>(options: DurableObjectExpectingTransferExportOptions<TContainer>): DurableObjectExpectingTransferExport<TContainer>;
140
- durableObject(options: DurableObjectExportOptions): DurableObjectExports;
141
- /** Declares a WorkerEntrypoint export defined by this Worker. */
142
- worker(options?: WorkerEntrypointExportOptions): WorkerEntrypointExport;
143
- }
144
- /**
145
- * Exports builder for configuring Worker exports.
146
- *
147
- * @example
148
- * ```typescript
149
- * import { defineConfig, defineContainer, defineWorker, exports } from "@cloudflare/config";
150
- *
151
- * const myContainer = defineContainer({
152
- * name: "my-container",
153
- * image: { dockerfile: "./Dockerfile" },
154
- * });
155
- *
156
- * const worker = defineWorker({
157
- * exports: {
158
- * MyDurableObject: exports.durableObject({ storage: "sqlite" }),
159
- * MyContainerDO: exports.durableObject({ storage: "sqlite", container: myContainer }),
160
- * OldClass: exports.durableObject({ state: "deleted" }),
161
- * OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
162
- * Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
163
- * Incoming: exports.durableObject({ state: "expecting-transfer", storage: "sqlite", transferFrom: "source-worker" }),
164
- * },
165
- * });
166
- *
167
- * export default defineConfig({ worker, containers: [myContainer] });
168
- * ```
169
- */
170
- declare const exports: Exports;
171
- //#endregion
172
- //#region src/inference.d.ts
173
- /**
174
- * The Worker's entry module, imported with the `{ type: "cf-worker" }` import attribute
175
- * @example
176
- * ```ts
177
- * import * as entrypoint from "./src" with { type: "cf-worker" };
178
- * ```
179
- */
180
- type WorkerModule = Record<string, any>;
181
- /**
182
- * Default module type representing an unknown Worker's exports.
183
- * - default export can be `ExportedHandler` or a `WorkerEntrypoint` class constructor
184
- * - named exports can be `WorkerEntrypoint`, `DurableObject`, or `WorkflowEntrypoint` class constructors
185
- */
186
- interface DefaultModule {
187
- default?: ExportedHandler | Constructor<Rpc.WorkerEntrypointBranded>;
188
- [key: string]: ExportedHandler | Constructor<Rpc.WorkerEntrypointBranded> | Constructor<Rpc.DurableObjectBranded> | Constructor<Rpc.WorkflowEntrypointBranded> | undefined;
189
- }
190
- /**
191
- * Represents a class constructor that creates instances of TInstance.
192
- */
193
- type Constructor<TInstance> = new (...args: any[]) => TInstance;
194
- /**
195
- * Extracts the instance type from a class constructor if it extends `TInstance`.
196
- */
197
- type ExtractInstance<T$1, TInstance> = T$1 extends Constructor<TInstance> ? InstanceType<T$1> : never;
198
- /**
199
- * Mapping from binding type literals to Cloudflare runtime types.
200
- *
201
- * Entries fall into two groups:
202
- * - Parameterized bindings (ai, json, kv, pipeline, queue, text) refine their
203
- * runtime type from the binding instance via nominal matches against the
204
- * `Typed*Binding` / `JsonBinding` / `TextBinding` interfaces from
205
- * `./bindings`. When `TBinding` does not match, the entry falls back to the
206
- * unparameterized runtime type.
207
- * - Non-parameterized bindings map their type literal directly to a runtime
208
- * type and ignore `TBinding`.
209
- *
210
- * IMPORTANT: The right-hand-side identifiers in this map (e.g. `KVNamespace`,
211
- * `ImagesBinding`, `Fetcher`) must resolve to the ambient runtime types from
212
- * `@cloudflare/workers-types`, not to local config interfaces. Several local
213
- * binding interfaces in `./bindings.ts` (`ImagesBinding`, `MediaBinding`,
214
- * `StreamBinding`) share names with ambient globals — importing those local
215
- * types into this file silently shadows the globals and breaks `InferEnv`.
216
- * Only import the `Typed*Binding`, `JsonBinding`, and `TextBinding` interfaces
217
- * from `./bindings` (their names do not collide with ambient globals); never
218
- * widen the import to a wildcard or to the plain `*Binding` interfaces.
219
- */
220
- interface BindingTypeMap<TBinding> {
221
- ai: TBinding extends TypedAiBinding<infer T> ? Ai<T> : Ai;
222
- json: TBinding extends JsonBinding<infer T> ? T : never;
223
- kv: TBinding extends TypedKvBinding<infer T> ? KVNamespace<T> : KVNamespace;
224
- pipeline: TBinding extends TypedPipelineBinding<infer T> ? Pipeline<T> : Pipeline;
225
- queue: TBinding extends TypedQueueBinding<infer T> ? Queue<T> : Queue;
226
- text: TBinding extends TextBinding<infer T> ? T : never;
227
- "agent-memory": AgentMemoryNamespace;
228
- "ai-search": AiSearchInstance;
229
- "ai-search-namespace": AiSearchNamespace;
230
- "analytics-engine-dataset": AnalyticsEngineDataset;
231
- artifacts: Artifacts;
232
- assets: Fetcher;
233
- browser: BrowserRun;
234
- d1: D1Database;
235
- "dispatch-namespace": DispatchNamespace;
236
- "durable-object": DurableObjectNamespace;
237
- flagship: Flagship;
238
- hyperdrive: Hyperdrive;
239
- images: ImagesBinding;
240
- logfwdr: any;
241
- media: MediaBinding;
242
- "mtls-certificate": Fetcher;
243
- "rate-limit": RateLimit;
244
- r2: R2Bucket;
245
- secret: string;
246
- "secrets-store-secret": SecretsStoreSecret;
247
- "send-email": SendEmail;
248
- stream: StreamBinding;
249
- vectorize: VectorizeIndex;
250
- "version-metadata": WorkerVersionMetadata;
251
- "vpc-service": Fetcher;
252
- "vpc-network": Fetcher;
253
- worker: Fetcher;
254
- "worker-loader": WorkerLoader;
255
- workflow: Workflow;
256
- }
257
- type SelectedWorkerExportName<TBinding> = TBinding extends {
258
- exportName?: infer TExportName;
259
- } ? TExportName extends string ? TExportName : "default" : "default";
260
- type InferBindingType<TBinding> = TBinding extends {
261
- type: "worker";
262
- worker: infer TWorker extends WorkerReference;
263
- } ? TWorker extends string ? Fetcher : InferMainModule<UnwrapConfig<TWorker>> extends infer TModule extends WorkerModule ? SelectedWorkerExportName<TBinding> extends infer TExportName ? TExportName extends keyof TModule ? TModule[TExportName] extends Constructor<any> ? Fetcher<ExtractInstance<TModule[TExportName], Rpc.WorkerEntrypointBranded>> : Fetcher : never : never : never : TBinding extends {
264
- type: "durable-object";
265
- worker: infer TWorker extends WorkerReference;
266
- exportName: infer TExportName extends string;
267
- } ? TWorker extends string ? DurableObjectNamespace : InferMainModule<UnwrapConfig<TWorker>> extends infer TModule extends WorkerModule ? TExportName extends keyof TModule ? DurableObjectNamespace<ExtractInstance<TModule[TExportName], Rpc.DurableObjectBranded>> : never : never : TBinding extends {
268
- type: "workflow";
269
- worker: infer TWorker extends WorkerReference;
270
- exportName: infer TExportName extends string;
271
- } ? TWorker extends string ? Workflow : InferMainModule<UnwrapConfig<TWorker>> extends infer TModule extends WorkerModule ? TExportName extends keyof TModule ? ExtractInstance<TModule[TExportName], Rpc.WorkflowEntrypointBranded> extends infer TWorkflow ? TWorkflow extends {
272
- run(event: {
273
- payload: infer P;
274
- }, step: any): any;
275
- } ? Workflow<P> : Workflow : Workflow : never : never : TBinding extends {
276
- type: `unsafe:${string}`;
277
- } ? any : TBinding extends {
278
- type: infer K extends keyof BindingTypeMap<TBinding>;
279
- } ? BindingTypeMap<TBinding>[K] : never;
280
- /**
281
- * Infer export names from a config's exports, optionally filtered by type.
282
- * When TExportType is `string` (default), returns all export names.
283
- * When TExportType is a specific literal like `"durable-object"` or `"workflow"`,
284
- * returns only exports of that type.
285
- */
286
- type InferExportsByType<TUnwrappedConfig, TExportType extends string = string> = TUnwrappedConfig extends {
287
- exports: infer TExports extends Record<string, {
288
- type: string;
289
- }>;
290
- } ? { [K in keyof TExports]: TExports[K] extends {
291
- type: TExportType;
292
- } ? K & string : never }[keyof TExports] : never;
293
- /**
294
- * Infer `WorkerEntrypoint` export names from a config.
295
- * Returns named module exports that are not declared as type `"durable-object"` or `"workflow"` in `exports`.
296
- * Excludes `"default"` since `exportName` should only be provided for named exports.
297
- */
298
- type InferWorkerEntrypointExports<TUnwrappedConfig> = Exclude<keyof InferMainModule<TUnwrappedConfig> & string, "default" | InferExportsByType<TUnwrappedConfig, "durable-object" | "workflow">>;
299
- /**
300
- * Unwrap function and promise types to get the underlying config.
301
- * Use this to normalize a config before passing it to other inference utilities.
302
- */
303
- type UnwrapConfig<TConfig> = TConfig extends ((...args: any[]) => infer TReturn) ? UnwrapConfig<TReturn> : TConfig extends Promise<infer TCompletion> ? UnwrapConfig<TCompletion> : TConfig;
304
- /**
305
- * Infer the `Env` interface type from a Worker config.
306
- *
307
- * Transforms a config object's `env` bindings into their
308
- * corresponding Cloudflare runtime types.
309
- *
310
- * @example
311
- * ```typescript
312
- * import { defineWorker, bindings } from "@cloudflare/config";
313
- * import type { InferEnv, UnwrapConfig } from "@cloudflare/config";
314
- *
315
- * const config = defineWorker({
316
- * env: {
317
- * MY_JSON: bindings.json({ id: string }),
318
- * MY_KV: bindings.kv(),
319
- * },
320
- * });
321
- *
322
- * type WorkerConfig = UnwrapConfig<typeof config>;
323
- * // Inferred as: { MY_JSON: { id: string }; MY_KV: KVNamespace }
324
- * export type Env = InferEnv<WorkerConfig>;
325
- * ```
326
- */
327
- type InferEnv<TUnwrappedConfig> = TUnwrappedConfig extends {
328
- env: infer TEnv extends Record<string, any>;
329
- } ? { [K in keyof TEnv]: InferBindingType<TEnv[K]> } : never;
330
- /**
331
- * Infer the Durable Object namespace names from a Worker config's exports.
332
- * Returns a union of export names that declare a *live* Durable Object —
333
- * `type: "durable-object"` with `state` either omitted, `"created"`, or
334
- * `"expecting-transfer"`. Tombstone entries (`deleted`, `renamed`,
335
- * `transferred`) are excluded because they retire the namespace and a
336
- * binding to a tombstoned class would fail at deploy time.
337
- *
338
- * @example
339
- * ```typescript
340
- * import { defineWorker } from "@cloudflare/config";
341
- * import type { InferDurableNamespaces, UnwrapConfig } from "@cloudflare/config";
342
- *
343
- * const config = defineWorker({
344
- * exports: {
345
- * MyDurableObject: { type: "durable-object", storage: "sqlite" },
346
- * OldGone: { type: "durable-object", state: "deleted" },
347
- * },
348
- * });
349
- *
350
- * type WorkerConfig = UnwrapConfig<typeof config>;
351
- * // Inferred as: "MyDurableObject" (the deleted tombstone is excluded)
352
- * type DurableNamespaces = InferDurableNamespaces<WorkerConfig>;
353
- * ```
354
- */
355
- type InferDurableNamespaces<TUnwrappedConfig> = TUnwrappedConfig extends {
356
- exports: infer TExports extends Record<string, {
357
- type: string;
358
- }>;
359
- } ? { [K in keyof TExports]: TExports[K] extends {
360
- type: "durable-object";
361
- } ? TExports[K] extends {
362
- state: "deleted" | "renamed" | "transferred";
363
- } ? never : K & string : never }[keyof TExports] : never;
364
- /**
365
- * Infer the main module type from a Worker config's entrypoint.
366
- * If entrypoint is a module namespace object, returns that type.
367
- * If entrypoint is a `string` or not present, returns `DefaultModule` as a fallback.
368
- */
369
- type InferMainModule<TUnwrappedConfig> = TUnwrappedConfig extends {
370
- entrypoint: infer TModule extends WorkerModule;
371
- } ? TModule : DefaultModule;
372
- //#endregion
373
- //#region src/triggers.d.ts
374
- interface FetchTriggerOptions {
375
- /**
376
- * A route that your Worker should be published to.
377
- *
378
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
379
- */
380
- pattern: string;
381
- /**
382
- * The DNS zone the pattern is attached to. Required when the
383
- * pattern is ambiguous.
384
- */
385
- zone?: string;
386
- }
387
- /**
388
- * Fetch trigger — a route that your Worker should be published to.
389
- *
390
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
391
- */
392
- interface FetchTrigger extends FetchTriggerOptions {
393
- type: "fetch";
394
- }
395
- interface QueueConsumerTriggerOptions {
396
- /** The name of the queue from which this consumer should consume. */
397
- name: string;
398
- /** The queue to send messages that failed to be consumed. */
399
- deadLetterQueue?: string;
400
- /** The maximum number of messages per batch. */
401
- maxBatchSize?: number;
402
- /** The maximum number of seconds to wait to fill a batch with messages. */
403
- maxBatchTimeout?: number;
404
- /**
405
- * The maximum number of concurrent consumer Worker invocations.
406
- * Leaving this unset will allow your consumer to scale to the
407
- * maximum concurrency needed to keep up with the message backlog.
408
- */
409
- maxConcurrency?: number | null;
410
- /** The maximum number of retries for each message. */
411
- maxRetries?: number;
412
- /** The number of seconds to wait before retrying a message. */
413
- retryDelay?: number;
414
- /** The number of milliseconds to wait for pulled messages to become visible again. */
415
- visibilityTimeoutMs?: number;
416
- }
417
- /**
418
- * Queue consumer trigger — invokes this Worker when messages arrive on the
419
- * named queue.
420
- *
421
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
422
- */
423
- interface QueueConsumerTrigger extends QueueConsumerTriggerOptions {
424
- type: "queue";
425
- }
426
- interface ScheduledTriggerOptions {
427
- /**
428
- * A "cron" definition to trigger a Worker's "scheduled" function.
429
- *
430
- * Lets you call Workers periodically, much like a cron job.
431
- *
432
- * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
433
- */
434
- schedule: string;
435
- }
436
- /**
437
- * Scheduled (cron) trigger — invokes this Worker on the given schedules.
438
- *
439
- * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
440
- */
441
- interface ScheduledTrigger extends ScheduledTriggerOptions {
442
- type: "scheduled";
443
- }
444
- interface EmailTriggerOptions {
445
- /**
446
- * Inbound Email Routing addresses handled by this Worker.
447
- *
448
- * Each entry is a literal recipient address (e.g. `"support@example.com"`)
449
- * or a `*@domain` catch-all (e.g. `"*@example.com"`).
450
- */
451
- addresses: string[];
452
- }
453
- /**
454
- * Email trigger — invokes this Worker for the configured Email Routing
455
- * addresses.
456
- */
457
- interface EmailTrigger extends EmailTriggerOptions {
458
- type: "email";
459
- }
460
- interface ConnectTriggerOptions {
461
- /** The transport protocol to listen for. */
462
- protocol: "tcp";
463
- /** The port to listen on. */
464
- port: number;
465
- /** The address to bind to. Defaults to `127.0.0.1`. */
466
- address?: string;
467
- }
468
- /**
469
- * Connect trigger — invokes this Worker's `connect(socket, env, ctx)`
470
- * handler for raw socket connections received on the configured
471
- * protocol/port.
472
- */
473
- interface ConnectTrigger extends ConnectTriggerOptions {
474
- type: "connect";
475
- }
476
- /**
477
- * Event triggers — fetch routes, queue consumers, cron schedules, Email
478
- * Routing addresses, and raw sockets — that invoke this Worker.
479
- * Construct entries with `triggers.fetch(...)`, `triggers.queue(...)`,
480
- * `triggers.scheduled(...)`, `triggers.email(...)`, or `triggers.connect(...)`.
481
- *
482
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
483
- */
484
- interface Triggers {
485
- /**
486
- * Fetch trigger — a route that your Worker should be published to.
487
- *
488
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
489
- */
490
- fetch(options: FetchTriggerOptions): FetchTrigger;
491
- /**
492
- * Queue consumer trigger — invokes this Worker when messages arrive on the
493
- * named queue.
494
- *
495
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
496
- */
497
- queue(options: QueueConsumerTriggerOptions): QueueConsumerTrigger;
498
- /**
499
- * Scheduled (cron) trigger — invokes this Worker on the given schedules.
500
- *
501
- * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
502
- */
503
- scheduled(options: ScheduledTriggerOptions): ScheduledTrigger;
504
- /**
505
- * Email trigger — invokes this Worker for the configured Email Routing
506
- * addresses.
507
- */
508
- email(options: EmailTriggerOptions): EmailTrigger;
509
- /**
510
- * Connect trigger — invokes this Worker's `connect(socket, env, ctx)`
511
- * handler for raw socket connections received on the configured
512
- * protocol/port.
513
- */
514
- connect(options: ConnectTriggerOptions): ConnectTrigger;
515
- }
516
- /**
517
- * Triggers builder for configuring event triggers.
518
- *
519
- * @example
520
- * ```typescript
521
- * import { defineConfig, triggers } from "@cloudflare/config";
522
- *
523
- * export default defineConfig({
524
- * worker: {
525
- * name: "my-worker",
526
- * compatibilityDate: "2026-09-17",
527
- * triggers: [
528
- * triggers.fetch({ pattern: "example.com/*", zone: "example.com" }),
529
- * triggers.queue({ name: "my-queue" }),
530
- * triggers.scheduled({ schedule: "0 * * * *" }),
531
- * triggers.scheduled({ schedule: "30 0 * * *" }),
532
- * triggers.email({ addresses: ["support@example.com"] }),
533
- * triggers.connect({ protocol: "tcp", port: 5432 }),
534
- * ],
535
- * },
536
- * });
537
- * ```
538
- */
539
- declare const triggers: Triggers;
540
- //#endregion
541
- //#region src/types.d.ts
542
- /** Account-level values shared by the resources in a configuration. */
543
- interface Settings {
544
- /**
545
- * This is the ID of the account associated with your zone. It can also be
546
- * specified through the `CLOUDFLARE_ACCOUNT_ID` environment variable.
547
- */
548
- accountId?: string;
549
- /**
550
- * The compliance boundary in which commands should operate. When omitted,
551
- * this can be supplied through `CLOUDFLARE_COMPLIANCE_REGION`.
552
- */
553
- complianceRegion?: "public" | "fedramp-high";
554
- }
555
- /** The authored shape of `cloudflare.config.ts`'s default export. */
556
- interface CloudflareConfig extends Settings {
557
- /** The Worker defined by this configuration. */
558
- worker?: ConfigInput<WorkerConfig>;
559
- /** Container applications defined by this configuration. */
560
- containers?: ConfigInput<ContainerConfig>[];
561
- }
562
- /**
563
- * Union of all binding definitions accepted in `env`.
564
- */
565
- type Binding = AgentMemoryBinding | AiBinding | AiSearchBinding | AiSearchNamespaceBinding | AnalyticsEngineDatasetBinding | ArtifactsBinding | AssetsBinding | BrowserBinding | D1Binding | DispatchNamespaceBinding | DurableObjectBinding | FlagshipBinding | HyperdriveBinding | ImagesBinding$1 | JsonBinding | KvBinding | LogfwdrBinding | MediaBinding$1 | MtlsCertificateBinding | PipelineBinding | QueueBinding | R2Binding | RateLimitBinding | SecretBinding | SecretsStoreSecretBinding | SendEmailBinding | StreamBinding$1 | TextBinding | UnsafeBinding | VectorizeBinding | VersionMetadataBinding | VpcNetworkBinding | VpcServiceBinding | WorkerBinding | WorkerLoaderBinding;
566
- /**
567
- * Union of all trigger definitions accepted in `triggers`.
568
- */
569
- type Trigger = ConnectTrigger | EmailTrigger | FetchTrigger | QueueConsumerTrigger | ScheduledTrigger;
570
- /**
571
- * Union of all export definitions accepted in `exports`. Worker entries
572
- * configure WorkerEntrypoint exports. Durable Object entries configure live
573
- * classes and tombstone lifecycle operations.
574
- */
575
- type Export = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableObjectRenamedExport | DurableObjectTransferredExport | DurableObjectExpectingTransferExport | WorkerEntrypointExport;
576
- /** An image source accepted in an authored Container configuration. */
577
- type ContainerImage = {
578
- /** The path to a Dockerfile. */
579
- dockerfile: string;
580
- /**
581
- * Build context of the application.
582
- *
583
- * @default The directory containing `dockerfile`.
584
- */
585
- buildContext?: string;
586
- /** Image variables available to the image at build time only. */
587
- buildVars?: Record<string, string>;
588
- } | {
589
- /**
590
- * Reference to an existing image.
591
- *
592
- * For supported registries, refer to
593
- * https://developers.cloudflare.com/containers/guides/image-management/#use-pre-built-container-images
594
- */
595
- reference: string;
596
- };
597
- /** Application-wide observability settings shared by all Containers. */
598
- interface ContainerObservabilityConfig {
599
- /** Whether observability is enabled. */
600
- enabled?: boolean;
601
- logs?: {
602
- /** Whether log collection is enabled. */
603
- enabled?: boolean;
604
- };
605
- }
606
- /** Observability settings for a standard Container application. */
607
- type StandardContainerObservabilityConfig = ContainerObservabilityConfig & ({
608
- /** Percentage of Container instances targeted for observability. */
609
- targetInstancePercentage?: number;
610
- targetInstanceCount?: never;
611
- } | {
612
- targetInstancePercentage?: never;
613
- /** Number of Container instances targeted for observability. */
614
- targetInstanceCount?: number;
615
- });
616
- /** Fields shared by all Container application configurations. */
617
- interface BaseContainerConfig {
618
- /**
619
- * Name of the application.
620
- *
621
- * This is also the identifier used to reference the Container from a Durable
622
- * Object's `exports` entry via its `container` field.
623
- */
624
- name: string;
625
- /**
626
- * Passed through without client-side validation or transformation.
627
- *
628
- * @hidden
629
- */
630
- unsafe?: Record<string, unknown>;
631
- }
632
- /** A Container application managed with a standard scheduling policy. */
633
- interface StandardContainerConfig extends BaseContainerConfig {
634
- /** Configures observability and optional targeting for Container instances. */
635
- observability?: StandardContainerObservabilityConfig;
636
- /** The image to build or deploy. */
637
- image: ContainerImage;
638
- /**
639
- * Maximum number of application instances.
640
- *
641
- * @default 20
642
- */
643
- maxInstances?: number;
644
- /**
645
- * The instance type to be used for the Container.
646
- * Select from one of the following named instance types:
647
- *
648
- * - lite: 1/16 vCPU, 256 MiB memory, and 2 GB disk
649
- * - basic: 1/4 vCPU, 1 GiB memory, and 4 GB disk
650
- * - standard-1: 1/2 vCPU, 4 GiB memory, and 8 GB disk
651
- * - standard-2: 1 vCPU, 6 GiB memory, and 12 GB disk
652
- * - standard-3: 2 vCPU, 8 GiB memory, and 16 GB disk
653
- * - standard-4: 4 vCPU, 12 GiB memory, and 20 GB disk
654
- *
655
- * Customers on an enterprise plan have the additional option to set custom
656
- * limits.
657
- *
658
- * @default "lite"
659
- */
660
- instanceType?: "basic" | "lite" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | {
661
- /** @default 0.0625 (1/16 vCPU) */
662
- vcpu?: number;
663
- /** @default 256 MiB */
664
- memoryMib?: number;
665
- /** @default 2 GB */
666
- diskMb?: number;
667
- };
668
- /**
669
- * The scheduling policy of the application.
670
- *
671
- * @default "default"
672
- */
673
- schedulingPolicy?: "default" | "regional";
674
- ssh?: {
675
- /**
676
- * If enabled, users with write access to the Container application can
677
- * connect to it over SSH.
678
- *
679
- * @default false
680
- */
681
- enabled: boolean;
682
- /**
683
- * Port that the SSH service is running on.
684
- *
685
- * @default 22
686
- */
687
- port?: number;
688
- };
689
- /** SSH public keys to put in the Container's authorized_keys file. */
690
- authorizedKeys?: Array<{
691
- name: string;
692
- publicKey: string;
693
- }>;
694
- /** Scheduling constraints for Container placement. */
695
- constraints?: {
696
- /** Limit Container placement to specific geographic regions. */
697
- regions?: Array<"ENAM" | "WNAM" | "EEUR" | "WEUR" | "APAC" | "SAM" | "ME" | "OC" | "AFR">;
698
- /** Restrict Containers to compliance boundaries. */
699
- jurisdiction?: "eu" | "fedramp";
700
- };
701
- rollout?: {
702
- /**
703
- * How a rollout should be created. It supports the following modes:
704
- *
705
- * - full-auto: The Container application will be rolled out fully
706
- * automatically.
707
- * - none: The Container application will not have a rollout or update.
708
- * - full-manual: The Container application will be rolled out by manually
709
- * progressing through the rollout steps.
710
- *
711
- * @default "full-auto"
712
- * @hidden
713
- */
714
- kind?: "full-auto" | "none" | "full-manual";
715
- /**
716
- * Configures what percentage of instances should be updated at each step of
717
- * a rollout. You can specify this as a single number or an array of numbers.
718
- *
719
- * If this is a single number, each step will progress by that percentage.
720
- * The options are 5, 10, 20, 25, 50, or 100.
721
- *
722
- * If this is an array, each step specifies the cumulative rollout progress.
723
- * The final step must be 100.
724
- *
725
- * @default [10, 100]
726
- */
727
- stepPercentage?: number | number[];
728
- /**
729
- * Configures the grace period, in seconds, for active instances before they
730
- * are shut down during a rollout.
731
- *
732
- * @default 0
733
- */
734
- activeGracePeriod?: number;
735
- };
736
- }
737
- /** A Container application managed by a Durable Object. */
738
- interface DurableObjectContainerConfig extends BaseContainerConfig {
739
- schedulingPolicy: "durable-object";
740
- /**
741
- * Configures application-wide observability. Instance targeting is not
742
- * supported for Durable Object-managed Containers.
743
- */
744
- observability?: ContainerObservabilityConfig;
745
- /** Named images that the Durable Object can start. */
746
- images?: Record<string, ContainerImage>;
747
- }
748
- /**
749
- * Container application configuration. This is the input shape passed to
750
- * `defineContainer` and parsed at runtime by `InputContainerSchema`.
751
- */
752
- type ContainerConfig = DurableObjectContainerConfig | StandardContainerConfig;
753
- /**
754
- * Worker configuration. This is the input shape passed to
755
- * [`defineWorker`](https://developers.cloudflare.com/workers/wrangler/configuration/).
756
- *
757
- * Fields are parsed and normalised at runtime by `InputWorkerSchema` before
758
- * being passed to downstream tooling.
759
- */
760
- interface WorkerConfig {
761
- /**
762
- * The name of your Worker.
763
- */
764
- name: string;
765
- /**
766
- * A date in the form yyyy-mm-dd, which will be used to determine
767
- * which version of the Workers runtime is used.
768
- *
769
- * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
770
- */
771
- compatibilityDate: string;
772
- /**
773
- * A list of flags that enable features from upcoming features of
774
- * the Workers runtime, usually used together with `compatibilityDate`.
775
- *
776
- * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
777
- *
778
- * @default []
779
- */
780
- compatibilityFlags?: string[];
781
- /**
782
- * The entrypoint module that will be executed.
783
- *
784
- * May be either a path string (e.g. `"./src/index.ts"`) or a module
785
- * namespace imported with the `cf-worker` import attribute.
786
- *
787
- * @example
788
- * ```ts
789
- * import { defineConfig, defineWorker } from "@cloudflare/config";
790
- * import * as entrypoint from "./src" with { type: "cf-worker" };
791
- * const worker = defineWorker({ entrypoint });
792
- * export default defineConfig({ worker });
793
- * ```
794
- */
795
- entrypoint?: string | WorkerModule;
796
- /**
797
- * Specify the directory of static assets to deploy/serve.
798
- *
799
- * More details at https://developers.cloudflare.com/workers/frameworks/
800
- *
801
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
802
- */
803
- assets?: {
804
- /** How to handle HTML requests. */
805
- htmlHandling?: "auto-trailing-slash" | "drop-trailing-slash" | "force-trailing-slash" | "none";
806
- /** How to handle requests that do not match an asset. */
807
- notFoundHandling?: "single-page-application" | "404-page" | "none";
808
- /**
809
- * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
810
- *
811
- * Can also be `true`, indicating that every request should be routed to the User Worker.
812
- */
813
- runWorkerFirst?: string[] | boolean;
814
- };
815
- /**
816
- * Custom domains that your Worker should be published to.
817
- *
818
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
819
- */
820
- domains?: string[];
821
- /**
822
- * Event triggers — fetch routes, queue consumers, cron schedules, Email
823
- * Routing addresses, and raw sockets — that invoke this Worker.
824
- * Construct entries with `triggers.fetch(...)`, `triggers.queue(...)`,
825
- * `triggers.scheduled(...)`, `triggers.email(...)`, or
826
- * `triggers.connect(...)`.
827
- *
828
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
829
- */
830
- triggers?: Trigger[];
831
- /**
832
- * A list of Tail Workers that are bound to this Worker.
833
- *
834
- * `@cloudflare/config` unifies regular and streaming tail consumers under
835
- * a single field; pass `streaming: true` to forward streaming tail events.
836
- *
837
- * @default []
838
- */
839
- tailConsumers?: Array<{
840
- /** The name of the service tail events will be forwarded to. */
841
- worker: string;
842
- /** Whether to stream tail events in real time. */
843
- streaming?: boolean;
844
- }>;
845
- /**
846
- * Specify the cache behavior of the Worker.
847
- */
848
- cache?: {
849
- /** If cache is enabled for this Worker. */
850
- enabled: boolean;
851
- /** Whether cached assets may be reused across Worker versions. */
852
- crossVersionCache?: boolean;
853
- };
854
- /**
855
- * Specify how the Worker should be located to minimize round-trip time.
856
- *
857
- * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
858
- */
859
- placement?: {
860
- mode: "off" | "smart";
861
- hint?: string;
862
- } | {
863
- mode?: "targeted";
864
- region: string;
865
- } | {
866
- mode?: "targeted";
867
- host: string;
868
- } | {
869
- mode?: "targeted";
870
- hostname: string;
871
- };
872
- /**
873
- * Specify limits for runtime behavior.
874
- * Only supported for the "standard" Usage Model.
875
- *
876
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
877
- */
878
- limits?: {
879
- /** Maximum allowed CPU time for a Worker's invocation in milliseconds. */
880
- cpuMs?: number;
881
- /** Maximum allowed number of fetch requests that a Worker's invocation can execute. */
882
- subrequests?: number;
883
- };
884
- /**
885
- * Send Trace Events from this Worker to Workers Logpush.
886
- *
887
- * This will not configure a corresponding Logpush job automatically.
888
- *
889
- * For more information about Workers Logpush, see:
890
- * https://blog.cloudflare.com/logpush-for-workers/
891
- */
892
- logpush?: boolean;
893
- /**
894
- * Specify the observability behavior of the Worker.
895
- *
896
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
897
- */
898
- observability?: {
899
- /** If observability is enabled for this Worker. */
900
- enabled?: boolean;
901
- /** The sampling rate. */
902
- headSamplingRate?: number;
903
- /**
904
- * Whether query strings are removed from request URLs in logs and traces.
905
- *
906
- * @default false
907
- */
908
- redactQueryString?: boolean;
909
- /** Real-time Issues settings for this Worker. */
910
- issues?: {
911
- /** Whether real-time Issues are enabled. */
912
- enabled?: boolean;
913
- };
914
- logs?: {
915
- enabled?: boolean;
916
- /** The sampling rate. */
917
- headSamplingRate?: number;
918
- /** Set to false to disable invocation logs. */
919
- invocationLogs?: boolean;
920
- /**
921
- * If logs should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.
922
- *
923
- * @default true
924
- */
925
- persist?: boolean;
926
- /**
927
- * What destinations logs emitted from the Worker should be sent to.
928
- *
929
- * @default []
930
- */
931
- destinations?: string[];
932
- };
933
- traces?: {
934
- enabled?: boolean;
935
- /** The sampling rate. */
936
- headSamplingRate?: number;
937
- /**
938
- * If traces should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.
939
- *
940
- * @default true
941
- */
942
- persist?: boolean;
943
- /**
944
- * What destinations traces emitted from the Worker should be sent to.
945
- *
946
- * @default []
947
- */
948
- destinations?: string[];
949
- };
950
- };
951
- /**
952
- * Whether we use `<name>.<subdomain>.workers.dev` to
953
- * test and deploy your Worker.
954
- *
955
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
956
- *
957
- * @default true
958
- */
959
- workersDev?: boolean;
960
- /**
961
- * Whether we use `<version>-<name>.<subdomain>.workers.dev` to
962
- * serve Preview URLs for your Worker.
963
- *
964
- * @default false
965
- */
966
- previewUrls?: boolean;
967
- /**
968
- * Designates this Worker as an internal-only "first-party" Worker.
969
- *
970
- * @internal
971
- */
972
- firstPartyWorker?: boolean;
973
- /**
974
- * "Unsafe" tables for runtime features that aren't directly supported by
975
- * this configuration. Values are forwarded verbatim in the Worker's
976
- * upload metadata.
977
- *
978
- * @default {}
979
- */
980
- unsafe?: {
981
- /**
982
- * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
983
- * here will always be applied to metadata last, so can add new or override existing fields.
984
- */
985
- metadata?: Record<string, unknown>;
986
- /**
987
- * Used for internal capnp uploads for the Workers runtime.
988
- */
989
- capnp?: {
990
- basePath: string;
991
- sourceSchemas: string[];
992
- compiledSchema?: never;
993
- } | {
994
- basePath?: never;
995
- sourceSchemas?: never;
996
- compiledSchema: string;
997
- };
998
- };
999
- /**
1000
- * Bindings exposed on the Worker's `env` object. Construct entries with
1001
- * `bindings.kv(...)`, `bindings.r2(...)`, etc.
1002
- */
1003
- env?: Record<string, Binding>;
1004
- /**
1005
- * Configuration for named exports declared by the Worker. Each entry's
1006
- * key is the exported class name; the value configures the export.
1007
- *
1008
- * Only one export kind is currently supported:
1009
- *
1010
- * - Construct entries with `exports.durableObject(...)`.
1011
- * - Declares Durable Object classes exported from this Worker.
1012
- * For more information about Durable Objects, see the documentation at
1013
- * https://developers.cloudflare.com/workers/learning/using-durable-objects.
1014
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects.
1015
- */
1016
- exports?: Record<string, Export>;
1017
- }
1018
- //#endregion
1019
- //#region src/definition.d.ts
1020
- interface ConfigContext {
1021
- /** Whether the config is being evaluated for a Preview build. */
1022
- isPreview: boolean;
1023
- /**
1024
- * The mode the config is being evaluated in.
1025
- * Set via the `--mode` CLI flag.
1026
- * In Vite the mode defaults to `development` in `vite dev` and `production` in `vite build` ([more info](https://vite.dev/guide/env-and-mode.html#modes)).
1027
- * In Wrangler the mode defaults to `undefined`.
1028
- */
1029
- mode: string | undefined;
1030
- }
1031
- /**
1032
- * A configuration value, promise, or factory. Factories can be passed directly
1033
- * for automatic resolution with the current context or called explicitly with
1034
- * another context before they are used.
1035
- */
1036
- type ConfigInput<T$1> = T$1 | Promise<T$1> | ((ctx: ConfigContext) => T$1 | Promise<T$1>);
1037
- type ContainerDefinition<T$1 extends ContainerConfig = ContainerConfig> = ConfigInput<T$1>;
1038
- type WorkerDefinition<T$1 extends WorkerConfig = WorkerConfig> = ConfigInput<T$1>;
1039
- /** A Worker name, value, promise, or context-aware factory. */
1040
- type WorkerReference = string | WorkerDefinition;
1041
- /**
1042
- * Used to define the default export in `cloudflare.config.ts`.
1043
- *
1044
- * @example
1045
- * ```typescript
1046
- * import { defineConfig } from "@cloudflare/config";
1047
- *
1048
- * export default defineConfig({
1049
- * worker: {
1050
- * name: "my-worker",
1051
- * compatibilityDate: "2026-09-17",
1052
- * },
1053
- * });
1054
- * ```
1055
- */
1056
- declare const defineConfig: <const TInput extends ConfigInput<CloudflareConfig>>(config: TInput) => TInput;
1057
- /**
1058
- * Define a Container.
1059
- *
1060
- * @example
1061
- * ```typescript
1062
- * import { defineContainer } from "@cloudflare/config";
1063
- *
1064
- * const container = defineContainer({
1065
- * name: "my-container",
1066
- * image: { dockerfile: "./Dockerfile" },
1067
- * });
1068
- * ```
1069
- */
1070
- declare const defineContainer: <const TInput extends ConfigInput<ContainerConfig>>(config: TInput) => TInput;
1071
- /**
1072
- * Define a Worker.
1073
- *
1074
- * @example
1075
- * ```typescript
1076
- * import { defineWorker } from "@cloudflare/config";
1077
- *
1078
- * const worker = defineWorker({
1079
- * name: "my-worker",
1080
- * compatibilityDate: "2026-09-17",
1081
- * });
1082
- * ```
1083
- */
1084
- declare const defineWorker: <const TInput extends ConfigInput<WorkerConfig>>(config: TInput) => TInput;
1085
- //#endregion
1086
- //#region src/utils.d.ts
1087
- /**
1088
- * Represents any valid JSON value.
1089
- */
1090
- type Json = string | number | boolean | null | Json[] | {
1091
- [key: string]: Json;
1092
- };
1093
- //#endregion
1094
- //#region src/bindings.d.ts
1095
- /** Options that control a binding during local development. */
1096
- interface BindingDevOptions {
1097
- /** Whether the binding should connect to the remote resource. */
1098
- remote?: boolean;
1099
- }
1100
- interface AgentMemoryBindingOptions {
1101
- /** The user-chosen namespace name. Must exist in Cloudflare at deploy time. */
1102
- namespace: string;
1103
- /** Options that only apply during local development. */
1104
- dev?: BindingDevOptions;
1105
- }
1106
- /**
1107
- * Agent Memory namespace binding. Each binding is scoped to a namespace and
1108
- * allows agents to persist and recall memory.
1109
- */
1110
- interface AgentMemoryBinding extends AgentMemoryBindingOptions {
1111
- type: "agent-memory";
1112
- }
1113
- interface AiBindingOptions {
1114
- /** Options that only apply during local development. */
1115
- dev?: BindingDevOptions;
1116
- }
1117
- /**
1118
- * Binding to the Workers AI project.
1119
- *
1120
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1121
- */
1122
- interface AiBinding extends AiBindingOptions {
1123
- type: "ai";
1124
- }
1125
- /**
1126
- * Binding to the Workers AI project.
1127
- *
1128
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1129
- */
1130
- interface TypedAiBinding<TAiModelList extends AiModelListType = AiModels> extends AiBinding {
1131
- /** @internal Carries type parameters for inference */
1132
- __typeParams: [TAiModelList];
1133
- }
1134
- interface AiSearchBindingOptions {
1135
- /** The user-chosen instance name. Must exist in Cloudflare at deploy time. */
1136
- name: string;
1137
- /** Options that only apply during local development. */
1138
- dev?: BindingDevOptions;
1139
- }
1140
- /**
1141
- * AI Search instance binding. Each binding is bound directly to a single
1142
- * pre-existing instance within the "default" namespace.
1143
- */
1144
- interface AiSearchBinding extends AiSearchBindingOptions {
1145
- type: "ai-search";
1146
- }
1147
- interface AiSearchNamespaceBindingOptions {
1148
- /** The user-chosen namespace name. Must exist in Cloudflare at deploy time. */
1149
- namespace: string;
1150
- /** Options that only apply during local development. */
1151
- dev?: BindingDevOptions;
1152
- }
1153
- /**
1154
- * AI Search namespace binding. Each binding is scoped to a namespace and
1155
- * allows dynamic instance CRUD within it.
1156
- */
1157
- interface AiSearchNamespaceBinding extends AiSearchNamespaceBindingOptions {
1158
- type: "ai-search-namespace";
1159
- }
1160
- interface AnalyticsEngineDatasetBindingOptions {
1161
- /** The name of this dataset to write to. */
1162
- name?: string;
1163
- }
1164
- /**
1165
- * Binding to an Analytics Engine dataset.
1166
- *
1167
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
1168
- */
1169
- interface AnalyticsEngineDatasetBinding extends AnalyticsEngineDatasetBindingOptions {
1170
- type: "analytics-engine-dataset";
1171
- }
1172
- interface ArtifactsBindingOptions {
1173
- /** The namespace to use. */
1174
- namespace: string;
1175
- /** Options that only apply during local development. */
1176
- dev?: BindingDevOptions;
1177
- }
1178
- /**
1179
- * Binding to an Artifacts instance. Artifacts provides git-compatible file
1180
- * storage on Cloudflare Workers.
1181
- */
1182
- interface ArtifactsBinding extends ArtifactsBindingOptions {
1183
- type: "artifacts";
1184
- }
1185
- /**
1186
- * Binding to the Worker's static assets.
1187
- *
1188
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
1189
- */
1190
- interface AssetsBinding {
1191
- type: "assets";
1192
- }
1193
- interface BrowserBindingOptions {
1194
- /** Options that only apply during local development. */
1195
- dev?: BindingDevOptions;
1196
- }
1197
- /**
1198
- * Binding to a headless browser usable from the Worker.
1199
- *
1200
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
1201
- */
1202
- interface BrowserBinding extends BrowserBindingOptions {
1203
- type: "browser";
1204
- }
1205
- interface D1BindingOptions {
1206
- /** The UUID of this D1 database (not required). */
1207
- id?: string;
1208
- /** The name of this D1 database. */
1209
- name?: string;
1210
- /** Options that only apply during local development. */
1211
- dev?: BindingDevOptions;
1212
- }
1213
- /**
1214
- * Binding to a D1 database.
1215
- *
1216
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
1217
- */
1218
- interface D1Binding extends D1BindingOptions {
1219
- type: "d1";
1220
- }
1221
- interface DispatchNamespaceBindingOptions {
1222
- /** The namespace to bind to. */
1223
- namespace?: string;
1224
- /** Details about the outbound Worker which will handle outbound requests from your namespace. */
1225
- outbound?: {
1226
- /** Name of the Worker handling the outbound requests. */
1227
- worker: string;
1228
- /** (Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler. */
1229
- parameters?: string[];
1230
- };
1231
- /** Options that only apply during local development. */
1232
- dev?: BindingDevOptions;
1233
- }
1234
- /**
1235
- * Binding to a Workers for Platforms dispatch namespace.
1236
- *
1237
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1238
- */
1239
- interface DispatchNamespaceBinding extends DispatchNamespaceBindingOptions {
1240
- type: "dispatch-namespace";
1241
- }
1242
- type ReferencedWorkerConfig<TWorker$1 extends WorkerReference> = TWorker$1 extends string ? never : UnwrapConfig<TWorker$1>;
1243
- type DurableObjectExportName<TWorker$1 extends WorkerReference> = TWorker$1 extends string ? string : InferDurableNamespaces<ReferencedWorkerConfig<TWorker$1>>;
1244
- type WorkerEntrypointExportName<TWorker$1 extends WorkerReference> = TWorker$1 extends string ? string : InferWorkerEntrypointExports<ReferencedWorkerConfig<TWorker$1>>;
1245
- type WorkflowExportName<TWorker$1 extends WorkerReference> = TWorker$1 extends string ? string : InferExportsByType<ReferencedWorkerConfig<TWorker$1>, "workflow">;
1246
- interface DurableObjectBindingOptions<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends DurableObjectExportName<TWorker$1> = DurableObjectExportName<TWorker$1>> {
1247
- /** The name or config of the Worker that defines the Durable Object class. */
1248
- worker: TWorker$1;
1249
- /** The exported class name of the Durable Object. */
1250
- exportName: TExportName$1;
1251
- }
1252
- /**
1253
- * Binding to a Durable Object class. `worker` is the name or config of the
1254
- * Worker that defines the class; `exportName` is the exported class name.
1255
- *
1256
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
1257
- */
1258
- interface DurableObjectBinding<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends DurableObjectExportName<TWorker$1> = DurableObjectExportName<TWorker$1>> extends DurableObjectBindingOptions<TWorker$1, TExportName$1> {
1259
- type: "durable-object";
1260
- }
1261
- interface FlagshipBindingOptions {
1262
- /** The Flagship app ID to bind to. */
1263
- id?: string;
1264
- /** Options that only apply during local development. */
1265
- dev?: BindingDevOptions;
1266
- }
1267
- /** Binding to a Flagship feature-flag service. */
1268
- interface FlagshipBinding extends FlagshipBindingOptions {
1269
- type: "flagship";
1270
- }
1271
- interface HyperdriveBindingOptions {
1272
- /** The ID of the Hyperdrive configuration. */
1273
- id: string;
1274
- /** Options that only apply during local development. */
1275
- dev?: {
1276
- /** The database connection string used during local development. */
1277
- connectionString?: string;
1278
- };
1279
- }
1280
- /**
1281
- * Binding to a Hyperdrive configuration.
1282
- *
1283
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
1284
- */
1285
- interface HyperdriveBinding extends HyperdriveBindingOptions {
1286
- type: "hyperdrive";
1287
- }
1288
- interface ImagesBindingOptions {
1289
- /** Options that only apply during local development. */
1290
- dev?: BindingDevOptions;
1291
- }
1292
- /**
1293
- * Binding to Cloudflare Images.
1294
- *
1295
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
1296
- */
1297
- interface ImagesBinding$1 extends ImagesBindingOptions {
1298
- type: "images";
1299
- }
1300
- /**
1301
- * Inline JSON value made available to the Worker on `env` under the
1302
- * binding name.
1303
- */
1304
- interface JsonBinding<T$1 extends Json = Json> {
1305
- type: "json";
1306
- /** The JSON value made available to the Worker. */
1307
- value: T$1;
1308
- }
1309
- interface KvBindingOptions {
1310
- /** The ID of the KV namespace. */
1311
- id?: string;
1312
- /** Options that only apply during local development. */
1313
- dev?: BindingDevOptions;
1314
- }
1315
- /**
1316
- * Binding to a Workers KV namespace.
1317
- *
1318
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
1319
- */
1320
- interface KvBinding extends KvBindingOptions {
1321
- type: "kv";
1322
- }
1323
- /**
1324
- * Binding to a Workers KV namespace.
1325
- *
1326
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
1327
- */
1328
- interface TypedKvBinding<TKey extends string = string> extends KvBinding {
1329
- /** @internal Carries type parameters for inference */
1330
- __typeParams: [TKey];
1331
- }
1332
- interface LogfwdrBindingOptions {
1333
- /** The destination for this logged message. */
1334
- destination: string;
1335
- }
1336
- /** Binding for forwarding logs to logfwdr. */
1337
- interface LogfwdrBinding extends LogfwdrBindingOptions {
1338
- type: "logfwdr";
1339
- }
1340
- interface MediaBindingOptions {
1341
- /** Options that only apply during local development. */
1342
- dev?: BindingDevOptions;
1343
- }
1344
- /** Binding to Cloudflare Media Transformations. */
1345
- interface MediaBinding$1 extends MediaBindingOptions {
1346
- type: "media";
1347
- }
1348
- interface MtlsCertificateBindingOptions {
1349
- /** The UUID of the uploaded mTLS certificate. */
1350
- id: string;
1351
- /** Options that only apply during local development. */
1352
- dev?: BindingDevOptions;
1353
- }
1354
- /**
1355
- * Binding to an uploaded mTLS certificate.
1356
- *
1357
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1358
- */
1359
- interface MtlsCertificateBinding extends MtlsCertificateBindingOptions {
1360
- type: "mtls-certificate";
1361
- }
1362
- interface PipelineBindingOptions {
1363
- /** Name of the Pipeline to bind. */
1364
- name: string;
1365
- /** Options that only apply during local development. */
1366
- dev?: BindingDevOptions;
1367
- }
1368
- /** Binding to a Cloudflare Pipeline. */
1369
- interface PipelineBinding extends PipelineBindingOptions {
1370
- type: "pipeline";
1371
- }
1372
- /** Binding to a Cloudflare Pipeline. */
1373
- interface TypedPipelineBinding<TRecord extends PipelineRecord = PipelineRecord> extends PipelineBinding {
1374
- /** @internal Carries type parameters for inference */
1375
- __typeParams: [TRecord];
1376
- }
1377
- interface QueueBindingOptions {
1378
- /** The name of this Queue. */
1379
- name?: string;
1380
- /** The number of seconds to wait before delivering a message. */
1381
- deliveryDelay?: number;
1382
- /** Options that only apply during local development. */
1383
- dev?: BindingDevOptions;
1384
- }
1385
- /**
1386
- * Producer binding to a Cloudflare Queue.
1387
- *
1388
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
1389
- */
1390
- interface QueueBinding extends QueueBindingOptions {
1391
- type: "queue";
1392
- }
1393
- /**
1394
- * Producer binding to a Cloudflare Queue.
1395
- *
1396
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
1397
- */
1398
- interface TypedQueueBinding<TBody = unknown> extends QueueBinding {
1399
- /** @internal Carries type parameters for inference */
1400
- __typeParams: [TBody];
1401
- }
1402
- interface R2BindingOptions {
1403
- /** The name of this R2 bucket at the edge. */
1404
- name?: string;
1405
- /** The jurisdiction that the bucket exists in. Default if not present. */
1406
- jurisdiction?: string;
1407
- /** Settings that only apply to local development. */
1408
- dev?: BindingDevOptions & {
1409
- /** EXPERIMENTAL: credentials for the local S3-compatible endpoint. */
1410
- experimentalS3Credentials?: {
1411
- accessKeyId: string;
1412
- secretAccessKey: string;
1413
- };
1414
- };
1415
- }
1416
- /**
1417
- * Binding to an R2 bucket.
1418
- *
1419
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
1420
- */
1421
- interface R2Binding extends R2BindingOptions {
1422
- type: "r2";
1423
- }
1424
- interface RateLimitBindingOptions {
1425
- /** The namespace ID for this rate limiter. */
1426
- namespace: string;
1427
- /** Simple rate limiting configuration. */
1428
- simple: {
1429
- /** The maximum number of requests allowed in the time period. */
1430
- limit: number;
1431
- /** The time period in seconds (10 for ten seconds, 60 for one minute). */
1432
- period: 10 | 60;
1433
- };
1434
- }
1435
- /** Binding to a rate limiter. */
1436
- interface RateLimitBinding extends RateLimitBindingOptions {
1437
- type: "rate-limit";
1438
- }
1439
- /**
1440
- * Declares a secret that is required by your Worker, exposed on `env` under
1441
- * the binding name.
1442
- *
1443
- * When defined, this binding:
1444
- * - Replaces .dev.vars/.env/process.env inference for type generation
1445
- * - Enables local dev validation with warnings for missing secrets
1446
- *
1447
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property
1448
- */
1449
- interface SecretBinding {
1450
- type: "secret";
1451
- }
1452
- interface SecretsStoreSecretBindingOptions {
1453
- /** ID of the secret store. */
1454
- storeId: string;
1455
- /** Name of the secret. */
1456
- secretName: string;
1457
- }
1458
- /** Binding to a Secrets Store secret. */
1459
- interface SecretsStoreSecretBinding extends SecretsStoreSecretBindingOptions {
1460
- type: "secrets-store-secret";
1461
- }
1462
- type SendEmailDestinationOptions = {
1463
- /** If this binding should be restricted to a specific verified address. */
1464
- destinationAddress: string;
1465
- allowedDestinationAddresses?: never;
1466
- } | {
1467
- destinationAddress?: never;
1468
- /** If this binding should be restricted to a set of verified addresses. */
1469
- allowedDestinationAddresses: string[];
1470
- } | {
1471
- destinationAddress?: never;
1472
- allowedDestinationAddresses?: never;
1473
- };
1474
- type SendEmailBindingOptions = SendEmailDestinationOptions & {
1475
- /** If this binding should be restricted to a set of sender addresses. */
1476
- allowedSenderAddresses?: string[];
1477
- /** Options that only apply during local development. */
1478
- dev?: BindingDevOptions;
1479
- };
1480
- /**
1481
- * Binding for sending email from inside the Worker.
1482
- *
1483
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
1484
- */
1485
- type SendEmailBinding = SendEmailBindingOptions & {
1486
- type: "send-email";
1487
- };
1488
- interface StreamBindingOptions {
1489
- /** Options that only apply during local development. */
1490
- dev?: BindingDevOptions;
1491
- }
1492
- /** Binding to Cloudflare Stream. */
1493
- interface StreamBinding$1 extends StreamBindingOptions {
1494
- type: "stream";
1495
- }
1496
- /**
1497
- * Inline string value made available to the Worker on `env` under the
1498
- * binding name.
1499
- *
1500
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
1501
- */
1502
- interface TextBinding<T$1 extends string = string> {
1503
- type: "text";
1504
- /** The string value made available to the Worker. */
1505
- value: T$1;
1506
- }
1507
- interface UnsafeBindingOptions {
1508
- /** Local-dev plugin configuration for this unsafe binding. */
1509
- dev?: {
1510
- /** The plugin package that provides the binding's local-dev implementation. */
1511
- plugin: {
1512
- package: string;
1513
- name: string;
1514
- };
1515
- /** Plugin-specific options. */
1516
- options?: Record<string, unknown>;
1517
- };
1518
- [key: string]: unknown;
1519
- }
1520
- /**
1521
- * Escape-hatch binding for runtime features that aren't directly supported
1522
- * by this configuration. Included in the Worker's upload metadata without
1523
- * changes.
1524
- */
1525
- interface UnsafeBinding extends UnsafeBindingOptions {
1526
- type: `unsafe:${string}`;
1527
- }
1528
- interface VectorizeBindingOptions {
1529
- /** The name of the Vectorize index. */
1530
- name: string;
1531
- /** Options that only apply during local development. */
1532
- dev?: BindingDevOptions;
1533
- }
1534
- /**
1535
- * Binding to a Vectorize index.
1536
- *
1537
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
1538
- */
1539
- interface VectorizeBinding extends VectorizeBindingOptions {
1540
- type: "vectorize";
1541
- }
1542
- /** Binding to the Worker version's metadata. */
1543
- interface VersionMetadataBinding {
1544
- type: "version-metadata";
1545
- }
1546
- type VpcNetworkBindingOptions = {
1547
- /** The tunnel ID of the Cloudflare Tunnel to route traffic through. Mutually exclusive with `networkId`. */
1548
- tunnelId: string;
1549
- networkId?: never;
1550
- /** Options that only apply during local development. */
1551
- dev?: BindingDevOptions;
1552
- } | {
1553
- tunnelId?: never;
1554
- /** The network ID to route traffic through. Mutually exclusive with `tunnelId`. */
1555
- networkId: string;
1556
- /** Options that only apply during local development. */
1557
- dev?: BindingDevOptions;
1558
- };
1559
- /** Binding to a VPC network. */
1560
- type VpcNetworkBinding = VpcNetworkBindingOptions & {
1561
- type: "vpc-network";
1562
- };
1563
- interface VpcServiceBindingOptions {
1564
- /** The service ID of the VPC connectivity service. */
1565
- id: string;
1566
- /** Options that only apply during local development. */
1567
- dev?: BindingDevOptions;
1568
- }
1569
- /** Binding to a VPC service. */
1570
- interface VpcServiceBinding extends VpcServiceBindingOptions {
1571
- type: "vpc-service";
1572
- }
1573
- interface WorkerBindingOptions<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends WorkerEntrypointExportName<TWorker$1> | undefined = WorkerEntrypointExportName<TWorker$1> | undefined> {
1574
- /** The name or config of the bound Worker. */
1575
- worker: TWorker$1;
1576
- /** The named export to bind to (defaults to the default export). */
1577
- exportName?: TExportName$1;
1578
- /** Optional properties that will be made available to the service via `ctx.props`. */
1579
- props?: Record<string, unknown>;
1580
- /** Options that only apply during local development. */
1581
- dev?: BindingDevOptions;
1582
- }
1583
- /**
1584
- * Service binding (Worker-to-Worker). `worker` is the name or config of the
1585
- * bound Worker; `exportName` selects a named `WorkerEntrypoint` export
1586
- * (defaults to the default export).
1587
- *
1588
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
1589
- */
1590
- interface WorkerBinding<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends WorkerEntrypointExportName<TWorker$1> | undefined = WorkerEntrypointExportName<TWorker$1> | undefined> extends WorkerBindingOptions<TWorker$1, TExportName$1> {
1591
- type: "worker";
1592
- }
1593
- /** Binding to a Worker Loader. */
1594
- interface WorkerLoaderBinding {
1595
- type: "worker-loader";
1596
- }
1597
- interface WorkflowBindingOptions<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends WorkflowExportName<TWorker$1> = WorkflowExportName<TWorker$1>> {
1598
- /** The name or config of the Worker that defines the Workflow. */
1599
- worker: TWorker$1;
1600
- /** The exported class name of the Workflow. */
1601
- exportName: TExportName$1;
1602
- }
1603
- /**
1604
- * Binding to a Workflow. `worker` is the name or config of the Worker that
1605
- * defines the Workflow; `exportName` is the exported `WorkflowEntrypoint`
1606
- * class name.
1607
- */
1608
- interface WorkflowBinding<TWorker$1 extends WorkerReference = WorkerReference, TExportName$1 extends WorkflowExportName<TWorker$1> = WorkflowExportName<TWorker$1>> extends WorkflowBindingOptions<TWorker$1, TExportName$1> {
1609
- type: "workflow";
1610
- }
1611
- interface Bindings {
1612
- /**
1613
- * Agent Memory namespace binding. Each binding is scoped to a namespace and
1614
- * allows agents to persist and recall memory.
1615
- */
1616
- agentMemory(options: AgentMemoryBindingOptions): AgentMemoryBinding;
1617
- /**
1618
- * Binding to the Workers AI project.
1619
- *
1620
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1621
- */
1622
- ai<TAiModelList extends AiModelListType = AiModels>(options?: AiBindingOptions): TypedAiBinding<TAiModelList>;
1623
- /**
1624
- * AI Search instance binding. Each binding is bound directly to a single
1625
- * pre-existing instance within the "default" namespace.
1626
- */
1627
- aiSearch(options: AiSearchBindingOptions): AiSearchBinding;
1628
- /**
1629
- * AI Search namespace binding. Each binding is scoped to a namespace and
1630
- * allows dynamic instance CRUD within it.
1631
- */
1632
- aiSearchNamespace(options: AiSearchNamespaceBindingOptions): AiSearchNamespaceBinding;
1633
- /**
1634
- * Binding to an Analytics Engine dataset.
1635
- *
1636
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
1637
- */
1638
- analyticsEngineDataset(options?: AnalyticsEngineDatasetBindingOptions): AnalyticsEngineDatasetBinding;
1639
- /**
1640
- * Binding to an Artifacts instance. Artifacts provides git-compatible file
1641
- * storage on Cloudflare Workers.
1642
- */
1643
- artifacts(options: ArtifactsBindingOptions): ArtifactsBinding;
1644
- /**
1645
- * Binding to the Worker's static assets.
1646
- *
1647
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
1648
- */
1649
- assets(): AssetsBinding;
1650
- /**
1651
- * Binding to a headless browser usable from the Worker.
1652
- *
1653
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
1654
- */
1655
- browser(options?: BrowserBindingOptions): BrowserBinding;
1656
- /**
1657
- * Binding to a D1 database.
1658
- *
1659
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
1660
- */
1661
- d1(options?: D1BindingOptions): D1Binding;
1662
- /**
1663
- * Binding to a Workers for Platforms dispatch namespace.
1664
- *
1665
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1666
- */
1667
- dispatchNamespace(options?: DispatchNamespaceBindingOptions): DispatchNamespaceBinding;
1668
- /**
1669
- * Binding to a Durable Object class. `worker` is the name or config of the
1670
- * Worker that defines the class; `exportName` is the exported class name.
1671
- *
1672
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
1673
- */
1674
- durableObject<TWorker$1 extends WorkerReference, TExportName$1 extends DurableObjectExportName<TWorker$1>>(options: DurableObjectBindingOptions<TWorker$1, TExportName$1>): DurableObjectBinding<TWorker$1, TExportName$1>;
1675
- /** Binding to a Flagship feature-flag service. */
1676
- flagship(options?: FlagshipBindingOptions): FlagshipBinding;
1677
- /**
1678
- * Binding to a Hyperdrive configuration.
1679
- *
1680
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
1681
- */
1682
- hyperdrive(options: HyperdriveBindingOptions): HyperdriveBinding;
1683
- /**
1684
- * Binding to Cloudflare Images.
1685
- *
1686
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
1687
- */
1688
- images(options?: ImagesBindingOptions): ImagesBinding$1;
1689
- /**
1690
- * Inline JSON value made available to the Worker on `env` under the
1691
- * binding name.
1692
- */
1693
- json<T$1 extends Json>(value: T$1): JsonBinding<T$1>;
1694
- /**
1695
- * Binding to a Workers KV namespace.
1696
- *
1697
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
1698
- */
1699
- kv<TKey extends string = string>(options?: KvBindingOptions): TypedKvBinding<TKey>;
1700
- /** Binding for forwarding logs to logfwdr. */
1701
- logfwdr(options: LogfwdrBindingOptions): LogfwdrBinding;
1702
- /** Binding to Cloudflare Media Transformations. */
1703
- media(options?: MediaBindingOptions): MediaBinding$1;
1704
- /**
1705
- * Binding to an uploaded mTLS certificate.
1706
- *
1707
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1708
- */
1709
- mtlsCertificate(options: MtlsCertificateBindingOptions): MtlsCertificateBinding;
1710
- /** Binding to a Cloudflare Pipeline. */
1711
- pipeline<TRecord extends PipelineRecord = PipelineRecord>(options: PipelineBindingOptions): TypedPipelineBinding<TRecord>;
1712
- /**
1713
- * Producer binding to a Cloudflare Queue.
1714
- *
1715
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
1716
- */
1717
- queue<TBody = unknown>(options?: QueueBindingOptions): TypedQueueBinding<TBody>;
1718
- /**
1719
- * Binding to an R2 bucket.
1720
- *
1721
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
1722
- */
1723
- r2(options?: R2BindingOptions): R2Binding;
1724
- /** Binding to a rate limiter. */
1725
- rateLimit(options: RateLimitBindingOptions): RateLimitBinding;
1726
- /**
1727
- * Declares a secret that is required by your Worker, exposed on `env` under
1728
- * the binding name.
1729
- *
1730
- * When defined, this binding:
1731
- * - Replaces .dev.vars/.env/process.env inference for type generation
1732
- * - Enables local dev validation with warnings for missing secrets
1733
- *
1734
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property
1735
- */
1736
- secret(): SecretBinding;
1737
- /** Binding to a Secrets Store secret. */
1738
- secretsStoreSecret(options: SecretsStoreSecretBindingOptions): SecretsStoreSecretBinding;
1739
- /**
1740
- * Binding for sending email from inside the Worker.
1741
- *
1742
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
1743
- */
1744
- sendEmail(options?: SendEmailBindingOptions): SendEmailBinding;
1745
- /** Binding to Cloudflare Stream. */
1746
- stream(options?: StreamBindingOptions): StreamBinding$1;
1747
- /**
1748
- * Inline string value made available to the Worker on `env` under the
1749
- * binding name.
1750
- *
1751
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
1752
- */
1753
- text<T$1 extends string>(value: T$1): TextBinding<T$1>;
1754
- /**
1755
- * Binding to a Vectorize index.
1756
- *
1757
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
1758
- */
1759
- vectorize(options: VectorizeBindingOptions): VectorizeBinding;
1760
- /** Binding to the Worker version's metadata. */
1761
- versionMetadata(): VersionMetadataBinding;
1762
- /** Binding to a VPC network. */
1763
- vpcNetwork(options: VpcNetworkBindingOptions): VpcNetworkBinding;
1764
- /** Binding to a VPC service. */
1765
- vpcService(options: VpcServiceBindingOptions): VpcServiceBinding;
1766
- /**
1767
- * Service binding (Worker-to-Worker). `worker` is the name or config of the
1768
- * bound Worker; `exportName` selects a named `WorkerEntrypoint` export
1769
- * (defaults to the default export).
1770
- *
1771
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
1772
- */
1773
- worker<TWorker$1 extends WorkerReference, TExportName$1 extends WorkerEntrypointExportName<TWorker$1> | undefined = undefined>(options: WorkerBindingOptions<TWorker$1, TExportName$1>): WorkerBinding<TWorker$1, NoInfer<TExportName$1>>;
1774
- /** Binding to a Worker Loader. */
1775
- workerLoader(): WorkerLoaderBinding;
1776
- }
1777
- declare const bindings: Bindings;
1778
- //#endregion
1779
- //#endregion
1780
- export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, BindingDevOptions, Bindings, BrowserBinding, CloudflareConfig, ConfigContext, ConnectTrigger, ContainerConfig, ContainerDefinition, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding$1 as ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding$1 as MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, Settings, StreamBinding$1 as StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WorkerBinding, WorkerConfig, WorkerDefinition, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkerReference, WorkflowBinding, bindings, defineConfig, defineContainer, defineWorker, exports, triggers };
1781
- //# sourceMappingURL=experimental-config.d.mts.map
1
+ export * from "@cloudflare/config/public";