@cloudflare/config 0.7.0 → 0.9.0
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.
- package/dist/index.d.mts +165 -59
- package/dist/index.mjs +98 -83
- package/dist/{public-CCrtkZee.d.mts → public-CN_InYwn.d.mts} +104 -84
- package/dist/public.d.mts +2 -2
- package/package.json +2 -2
|
@@ -9,11 +9,16 @@ type Json = string | number | boolean | null | Json[] | {
|
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/bindings.d.ts
|
|
12
|
+
/** Options that control a binding during local development. */
|
|
13
|
+
interface BindingDevOptions {
|
|
14
|
+
/** Whether the binding should connect to the remote resource. */
|
|
15
|
+
remote?: boolean;
|
|
16
|
+
}
|
|
12
17
|
interface AgentMemoryBindingOptions {
|
|
13
18
|
/** The user-chosen namespace name. Must exist in Cloudflare at deploy time. */
|
|
14
19
|
namespace: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
20
|
+
/** Options that only apply during local development. */
|
|
21
|
+
dev?: BindingDevOptions;
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* Agent Memory namespace binding. Each binding is scoped to a namespace and
|
|
@@ -23,8 +28,8 @@ interface AgentMemoryBinding extends AgentMemoryBindingOptions {
|
|
|
23
28
|
type: "agent-memory";
|
|
24
29
|
}
|
|
25
30
|
interface AiBindingOptions {
|
|
26
|
-
/**
|
|
27
|
-
|
|
31
|
+
/** Options that only apply during local development. */
|
|
32
|
+
dev?: BindingDevOptions;
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
35
|
* Binding to the Workers AI project.
|
|
@@ -46,8 +51,8 @@ interface TypedAiBinding<TAiModelList extends AiModelListType = AiModels> extend
|
|
|
46
51
|
interface AiSearchBindingOptions {
|
|
47
52
|
/** The user-chosen instance name. Must exist in Cloudflare at deploy time. */
|
|
48
53
|
name: string;
|
|
49
|
-
/**
|
|
50
|
-
|
|
54
|
+
/** Options that only apply during local development. */
|
|
55
|
+
dev?: BindingDevOptions;
|
|
51
56
|
}
|
|
52
57
|
/**
|
|
53
58
|
* AI Search instance binding. Each binding is bound directly to a single
|
|
@@ -59,8 +64,8 @@ interface AiSearchBinding extends AiSearchBindingOptions {
|
|
|
59
64
|
interface AiSearchNamespaceBindingOptions {
|
|
60
65
|
/** The user-chosen namespace name. Must exist in Cloudflare at deploy time. */
|
|
61
66
|
namespace: string;
|
|
62
|
-
/**
|
|
63
|
-
|
|
67
|
+
/** Options that only apply during local development. */
|
|
68
|
+
dev?: BindingDevOptions;
|
|
64
69
|
}
|
|
65
70
|
/**
|
|
66
71
|
* AI Search namespace binding. Each binding is scoped to a namespace and
|
|
@@ -84,8 +89,8 @@ interface AnalyticsEngineDatasetBinding extends AnalyticsEngineDatasetBindingOpt
|
|
|
84
89
|
interface ArtifactsBindingOptions {
|
|
85
90
|
/** The namespace to use. */
|
|
86
91
|
namespace: string;
|
|
87
|
-
/**
|
|
88
|
-
|
|
92
|
+
/** Options that only apply during local development. */
|
|
93
|
+
dev?: BindingDevOptions;
|
|
89
94
|
}
|
|
90
95
|
/**
|
|
91
96
|
* Binding to an Artifacts instance. Artifacts provides git-compatible file
|
|
@@ -103,8 +108,8 @@ interface AssetsBinding {
|
|
|
103
108
|
type: "assets";
|
|
104
109
|
}
|
|
105
110
|
interface BrowserBindingOptions {
|
|
106
|
-
/**
|
|
107
|
-
|
|
111
|
+
/** Options that only apply during local development. */
|
|
112
|
+
dev?: BindingDevOptions;
|
|
108
113
|
}
|
|
109
114
|
/**
|
|
110
115
|
* Binding to a headless browser usable from the Worker.
|
|
@@ -119,8 +124,8 @@ interface D1BindingOptions {
|
|
|
119
124
|
id?: string;
|
|
120
125
|
/** The name of this D1 database. */
|
|
121
126
|
name?: string;
|
|
122
|
-
/**
|
|
123
|
-
|
|
127
|
+
/** Options that only apply during local development. */
|
|
128
|
+
dev?: BindingDevOptions;
|
|
124
129
|
}
|
|
125
130
|
/**
|
|
126
131
|
* Binding to a D1 database.
|
|
@@ -136,12 +141,12 @@ interface DispatchNamespaceBindingOptions {
|
|
|
136
141
|
/** Details about the outbound Worker which will handle outbound requests from your namespace. */
|
|
137
142
|
outbound?: {
|
|
138
143
|
/** Name of the Worker handling the outbound requests. */
|
|
139
|
-
|
|
144
|
+
worker: string;
|
|
140
145
|
/** (Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler. */
|
|
141
146
|
parameters?: string[];
|
|
142
147
|
};
|
|
143
|
-
/**
|
|
144
|
-
|
|
148
|
+
/** Options that only apply during local development. */
|
|
149
|
+
dev?: BindingDevOptions;
|
|
145
150
|
}
|
|
146
151
|
/**
|
|
147
152
|
* Binding to a Workers for Platforms dispatch namespace.
|
|
@@ -153,12 +158,12 @@ interface DispatchNamespaceBinding extends DispatchNamespaceBindingOptions {
|
|
|
153
158
|
}
|
|
154
159
|
interface DurableObjectBindingOptions {
|
|
155
160
|
/** The name of the Worker that defines the Durable Object class. */
|
|
156
|
-
|
|
161
|
+
worker: string;
|
|
157
162
|
/** The exported class name of the Durable Object. */
|
|
158
163
|
exportName: string;
|
|
159
164
|
}
|
|
160
165
|
/**
|
|
161
|
-
* Binding to a Durable Object class. `
|
|
166
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
162
167
|
* that defines the class; `exportName` is the exported class name.
|
|
163
168
|
*
|
|
164
169
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
@@ -167,13 +172,13 @@ interface DurableObjectBinding extends DurableObjectBindingOptions {
|
|
|
167
172
|
type: "durable-object";
|
|
168
173
|
}
|
|
169
174
|
/**
|
|
170
|
-
* Binding to a Durable Object class. `
|
|
175
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
171
176
|
* that defines the class; `exportName` is the exported class name.
|
|
172
177
|
*
|
|
173
178
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
174
179
|
*/
|
|
175
180
|
interface TypedDurableObjectBinding<TConfig$1, TExportName$1 extends string> extends DurableObjectBinding {
|
|
176
|
-
|
|
181
|
+
worker: string;
|
|
177
182
|
exportName: TExportName$1;
|
|
178
183
|
/** @internal Carries the config type for inference */
|
|
179
184
|
__config: TConfig$1;
|
|
@@ -181,8 +186,8 @@ interface TypedDurableObjectBinding<TConfig$1, TExportName$1 extends string> ext
|
|
|
181
186
|
interface FlagshipBindingOptions {
|
|
182
187
|
/** The Flagship app ID to bind to. */
|
|
183
188
|
id?: string;
|
|
184
|
-
/**
|
|
185
|
-
|
|
189
|
+
/** Options that only apply during local development. */
|
|
190
|
+
dev?: BindingDevOptions;
|
|
186
191
|
}
|
|
187
192
|
/** Binding to a Flagship feature-flag service. */
|
|
188
193
|
interface FlagshipBinding extends FlagshipBindingOptions {
|
|
@@ -191,8 +196,11 @@ interface FlagshipBinding extends FlagshipBindingOptions {
|
|
|
191
196
|
interface HyperdriveBindingOptions {
|
|
192
197
|
/** The ID of the Hyperdrive configuration. */
|
|
193
198
|
id: string;
|
|
194
|
-
/**
|
|
195
|
-
|
|
199
|
+
/** Options that only apply during local development. */
|
|
200
|
+
dev?: {
|
|
201
|
+
/** The database connection string used during local development. */
|
|
202
|
+
connectionString?: string;
|
|
203
|
+
};
|
|
196
204
|
}
|
|
197
205
|
/**
|
|
198
206
|
* Binding to a Hyperdrive configuration.
|
|
@@ -203,8 +211,8 @@ interface HyperdriveBinding extends HyperdriveBindingOptions {
|
|
|
203
211
|
type: "hyperdrive";
|
|
204
212
|
}
|
|
205
213
|
interface ImagesBindingOptions {
|
|
206
|
-
/**
|
|
207
|
-
|
|
214
|
+
/** Options that only apply during local development. */
|
|
215
|
+
dev?: BindingDevOptions;
|
|
208
216
|
}
|
|
209
217
|
/**
|
|
210
218
|
* Binding to Cloudflare Images.
|
|
@@ -226,8 +234,8 @@ interface JsonBinding<T$1 extends Json = Json> {
|
|
|
226
234
|
interface KvBindingOptions {
|
|
227
235
|
/** The ID of the KV namespace. */
|
|
228
236
|
id?: string;
|
|
229
|
-
/**
|
|
230
|
-
|
|
237
|
+
/** Options that only apply during local development. */
|
|
238
|
+
dev?: BindingDevOptions;
|
|
231
239
|
}
|
|
232
240
|
/**
|
|
233
241
|
* Binding to a Workers KV namespace.
|
|
@@ -255,8 +263,8 @@ interface LogfwdrBinding extends LogfwdrBindingOptions {
|
|
|
255
263
|
type: "logfwdr";
|
|
256
264
|
}
|
|
257
265
|
interface MediaBindingOptions {
|
|
258
|
-
/**
|
|
259
|
-
|
|
266
|
+
/** Options that only apply during local development. */
|
|
267
|
+
dev?: BindingDevOptions;
|
|
260
268
|
}
|
|
261
269
|
/** Binding to Cloudflare Media Transformations. */
|
|
262
270
|
interface MediaBinding$1 extends MediaBindingOptions {
|
|
@@ -265,8 +273,8 @@ interface MediaBinding$1 extends MediaBindingOptions {
|
|
|
265
273
|
interface MtlsCertificateBindingOptions {
|
|
266
274
|
/** The UUID of the uploaded mTLS certificate. */
|
|
267
275
|
id: string;
|
|
268
|
-
/**
|
|
269
|
-
|
|
276
|
+
/** Options that only apply during local development. */
|
|
277
|
+
dev?: BindingDevOptions;
|
|
270
278
|
}
|
|
271
279
|
/**
|
|
272
280
|
* Binding to an uploaded mTLS certificate.
|
|
@@ -279,8 +287,8 @@ interface MtlsCertificateBinding extends MtlsCertificateBindingOptions {
|
|
|
279
287
|
interface PipelineBindingOptions {
|
|
280
288
|
/** Name of the Pipeline to bind. */
|
|
281
289
|
name: string;
|
|
282
|
-
/**
|
|
283
|
-
|
|
290
|
+
/** Options that only apply during local development. */
|
|
291
|
+
dev?: BindingDevOptions;
|
|
284
292
|
}
|
|
285
293
|
/** Binding to a Cloudflare Pipeline. */
|
|
286
294
|
interface PipelineBinding extends PipelineBindingOptions {
|
|
@@ -296,8 +304,8 @@ interface QueueBindingOptions {
|
|
|
296
304
|
name?: string;
|
|
297
305
|
/** The number of seconds to wait before delivering a message. */
|
|
298
306
|
deliveryDelay?: number;
|
|
299
|
-
/**
|
|
300
|
-
|
|
307
|
+
/** Options that only apply during local development. */
|
|
308
|
+
dev?: BindingDevOptions;
|
|
301
309
|
}
|
|
302
310
|
/**
|
|
303
311
|
* Producer binding to a Cloudflare Queue.
|
|
@@ -321,10 +329,8 @@ interface R2BindingOptions {
|
|
|
321
329
|
name?: string;
|
|
322
330
|
/** The jurisdiction that the bucket exists in. Default if not present. */
|
|
323
331
|
jurisdiction?: string;
|
|
324
|
-
/** Whether the R2 bucket should be remote or not in local development. */
|
|
325
|
-
remote?: boolean;
|
|
326
332
|
/** Settings that only apply to local development. */
|
|
327
|
-
|
|
333
|
+
dev?: BindingDevOptions & {
|
|
328
334
|
/** EXPERIMENTAL: credentials for the local S3-compatible endpoint. */
|
|
329
335
|
experimentalS3Credentials?: {
|
|
330
336
|
accessKeyId: string;
|
|
@@ -378,27 +384,35 @@ interface SecretsStoreSecretBindingOptions {
|
|
|
378
384
|
interface SecretsStoreSecretBinding extends SecretsStoreSecretBindingOptions {
|
|
379
385
|
type: "secrets-store-secret";
|
|
380
386
|
}
|
|
381
|
-
|
|
387
|
+
type SendEmailDestinationOptions = {
|
|
382
388
|
/** If this binding should be restricted to a specific verified address. */
|
|
383
|
-
destinationAddress
|
|
389
|
+
destinationAddress: string;
|
|
390
|
+
allowedDestinationAddresses?: never;
|
|
391
|
+
} | {
|
|
392
|
+
destinationAddress?: never;
|
|
384
393
|
/** If this binding should be restricted to a set of verified addresses. */
|
|
385
|
-
allowedDestinationAddresses
|
|
394
|
+
allowedDestinationAddresses: string[];
|
|
395
|
+
} | {
|
|
396
|
+
destinationAddress?: never;
|
|
397
|
+
allowedDestinationAddresses?: never;
|
|
398
|
+
};
|
|
399
|
+
type SendEmailBindingOptions = SendEmailDestinationOptions & {
|
|
386
400
|
/** If this binding should be restricted to a set of sender addresses. */
|
|
387
401
|
allowedSenderAddresses?: string[];
|
|
388
|
-
/**
|
|
389
|
-
|
|
390
|
-
}
|
|
402
|
+
/** Options that only apply during local development. */
|
|
403
|
+
dev?: BindingDevOptions;
|
|
404
|
+
};
|
|
391
405
|
/**
|
|
392
406
|
* Binding for sending email from inside the Worker.
|
|
393
407
|
*
|
|
394
408
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
|
|
395
409
|
*/
|
|
396
|
-
|
|
410
|
+
type SendEmailBinding = SendEmailBindingOptions & {
|
|
397
411
|
type: "send-email";
|
|
398
|
-
}
|
|
412
|
+
};
|
|
399
413
|
interface StreamBindingOptions {
|
|
400
|
-
/**
|
|
401
|
-
|
|
414
|
+
/** Options that only apply during local development. */
|
|
415
|
+
dev?: BindingDevOptions;
|
|
402
416
|
}
|
|
403
417
|
/** Binding to Cloudflare Stream. */
|
|
404
418
|
interface StreamBinding$1 extends StreamBindingOptions {
|
|
@@ -439,8 +453,8 @@ interface UnsafeBinding extends UnsafeBindingOptions {
|
|
|
439
453
|
interface VectorizeBindingOptions {
|
|
440
454
|
/** The name of the Vectorize index. */
|
|
441
455
|
name: string;
|
|
442
|
-
/**
|
|
443
|
-
|
|
456
|
+
/** Options that only apply during local development. */
|
|
457
|
+
dev?: BindingDevOptions;
|
|
444
458
|
}
|
|
445
459
|
/**
|
|
446
460
|
* Binding to a Vectorize index.
|
|
@@ -457,13 +471,15 @@ interface VersionMetadataBinding {
|
|
|
457
471
|
type VpcNetworkBindingOptions = {
|
|
458
472
|
/** The tunnel ID of the Cloudflare Tunnel to route traffic through. Mutually exclusive with `networkId`. */
|
|
459
473
|
tunnelId: string;
|
|
460
|
-
|
|
461
|
-
|
|
474
|
+
networkId?: never;
|
|
475
|
+
/** Options that only apply during local development. */
|
|
476
|
+
dev?: BindingDevOptions;
|
|
462
477
|
} | {
|
|
478
|
+
tunnelId?: never;
|
|
463
479
|
/** The network ID to route traffic through. Mutually exclusive with `tunnelId`. */
|
|
464
480
|
networkId: string;
|
|
465
|
-
/**
|
|
466
|
-
|
|
481
|
+
/** Options that only apply during local development. */
|
|
482
|
+
dev?: BindingDevOptions;
|
|
467
483
|
};
|
|
468
484
|
/** Binding to a VPC network. */
|
|
469
485
|
type VpcNetworkBinding = VpcNetworkBindingOptions & {
|
|
@@ -472,16 +488,16 @@ type VpcNetworkBinding = VpcNetworkBindingOptions & {
|
|
|
472
488
|
interface VpcServiceBindingOptions {
|
|
473
489
|
/** The service ID of the VPC connectivity service. */
|
|
474
490
|
id: string;
|
|
475
|
-
/**
|
|
476
|
-
|
|
491
|
+
/** Options that only apply during local development. */
|
|
492
|
+
dev?: BindingDevOptions;
|
|
477
493
|
}
|
|
478
494
|
/** Binding to a VPC service. */
|
|
479
495
|
interface VpcServiceBinding extends VpcServiceBindingOptions {
|
|
480
496
|
type: "vpc-service";
|
|
481
497
|
}
|
|
482
498
|
interface WebSearchBindingOptions {
|
|
483
|
-
/**
|
|
484
|
-
|
|
499
|
+
/** Options that only apply during local development. */
|
|
500
|
+
dev?: BindingDevOptions;
|
|
485
501
|
}
|
|
486
502
|
/**
|
|
487
503
|
* Cloudflare Web Search binding. There is exactly one shared web corpus, so
|
|
@@ -492,16 +508,16 @@ interface WebSearchBinding extends WebSearchBindingOptions {
|
|
|
492
508
|
}
|
|
493
509
|
interface WorkerBindingOptions {
|
|
494
510
|
/** The name of the bound Worker. */
|
|
495
|
-
|
|
511
|
+
worker: string;
|
|
496
512
|
/** The named export to bind to (defaults to the default export). */
|
|
497
513
|
exportName?: string;
|
|
498
514
|
/** Optional properties that will be made available to the service via `ctx.props`. */
|
|
499
515
|
props?: Record<string, unknown>;
|
|
500
|
-
/**
|
|
501
|
-
|
|
516
|
+
/** Options that only apply during local development. */
|
|
517
|
+
dev?: BindingDevOptions;
|
|
502
518
|
}
|
|
503
519
|
/**
|
|
504
|
-
* Service binding (Worker-to-Worker). `
|
|
520
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
505
521
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
506
522
|
* the default export).
|
|
507
523
|
*
|
|
@@ -511,14 +527,14 @@ interface WorkerBinding extends WorkerBindingOptions {
|
|
|
511
527
|
type: "worker";
|
|
512
528
|
}
|
|
513
529
|
/**
|
|
514
|
-
* Service binding (Worker-to-Worker). `
|
|
530
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
515
531
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
516
532
|
* the default export).
|
|
517
533
|
*
|
|
518
534
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
519
535
|
*/
|
|
520
536
|
interface TypedWorkerBinding<TConfig$1, TExportName$1 extends string> extends WorkerBinding {
|
|
521
|
-
|
|
537
|
+
worker: string;
|
|
522
538
|
exportName: TExportName$1;
|
|
523
539
|
/** @internal Carries the config type for inference */
|
|
524
540
|
__config: TConfig$1;
|
|
@@ -529,23 +545,23 @@ interface WorkerLoaderBinding {
|
|
|
529
545
|
}
|
|
530
546
|
interface WorkflowBindingOptions {
|
|
531
547
|
/** The name of the Worker that defines the Workflow. */
|
|
532
|
-
|
|
548
|
+
worker: string;
|
|
533
549
|
/** The exported class name of the Workflow. */
|
|
534
550
|
exportName: string;
|
|
535
551
|
}
|
|
536
552
|
/**
|
|
537
|
-
* Binding to a Workflow. `
|
|
553
|
+
* Binding to a Workflow. `worker` is the name of the Worker that defines
|
|
538
554
|
* the Workflow; `exportName` is the exported `WorkflowEntrypoint` class name.
|
|
539
555
|
*/
|
|
540
556
|
interface WorkflowBinding extends WorkflowBindingOptions {
|
|
541
557
|
type: "workflow";
|
|
542
558
|
}
|
|
543
559
|
/**
|
|
544
|
-
* Binding to a Workflow. `
|
|
560
|
+
* Binding to a Workflow. `worker` is the name of the Worker that defines
|
|
545
561
|
* the Workflow; `exportName` is the exported `WorkflowEntrypoint` class name.
|
|
546
562
|
*/
|
|
547
563
|
interface TypedWorkflowBinding<TConfig$1, TExportName$1 extends string> extends WorkflowBinding {
|
|
548
|
-
|
|
564
|
+
worker: string;
|
|
549
565
|
exportName: TExportName$1;
|
|
550
566
|
/** @internal Carries the config type for inference */
|
|
551
567
|
__config: TConfig$1;
|
|
@@ -608,7 +624,7 @@ interface Bindings {
|
|
|
608
624
|
*/
|
|
609
625
|
dispatchNamespace(options?: DispatchNamespaceBindingOptions): DispatchNamespaceBinding;
|
|
610
626
|
/**
|
|
611
|
-
* Binding to a Durable Object class. `
|
|
627
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
612
628
|
* that defines the class; `exportName` is the exported class name.
|
|
613
629
|
*
|
|
614
630
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
@@ -711,7 +727,7 @@ interface Bindings {
|
|
|
711
727
|
*/
|
|
712
728
|
webSearch(options?: WebSearchBindingOptions): WebSearchBinding;
|
|
713
729
|
/**
|
|
714
|
-
* Service binding (Worker-to-Worker). `
|
|
730
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
715
731
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
716
732
|
* the default export).
|
|
717
733
|
*
|
|
@@ -1182,7 +1198,7 @@ interface WorkerConfig {
|
|
|
1182
1198
|
*/
|
|
1183
1199
|
tailConsumers?: Array<{
|
|
1184
1200
|
/** The name of the service tail events will be forwarded to. */
|
|
1185
|
-
|
|
1201
|
+
worker: string;
|
|
1186
1202
|
/** Whether to stream tail events in real time. */
|
|
1187
1203
|
streaming?: boolean;
|
|
1188
1204
|
}>;
|
|
@@ -1394,27 +1410,27 @@ interface WorkerDefinition<TConfig$1 extends WorkerConfig = WorkerConfig> extend
|
|
|
1394
1410
|
*/
|
|
1395
1411
|
interface TypedWorkerDefinition<TConfig$1 extends WorkerConfig, TWorkerName extends string = InferWorkerName<TConfig$1>> extends WorkerDefinition<TConfig$1> {
|
|
1396
1412
|
/**
|
|
1397
|
-
* Binding to a Durable Object class. `
|
|
1413
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
1398
1414
|
* that defines the class; `exportName` is the exported class name.
|
|
1399
1415
|
*
|
|
1400
1416
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
1401
1417
|
*/
|
|
1402
1418
|
durableObject<TExportName$1 extends InferDurableNamespaces<TConfig$1>>(options: {
|
|
1403
|
-
|
|
1419
|
+
worker: TWorkerName;
|
|
1404
1420
|
exportName: TExportName$1;
|
|
1405
1421
|
}): TypedDurableObjectBinding<TConfig$1, TExportName$1>;
|
|
1406
1422
|
/**
|
|
1407
|
-
* Service binding (Worker-to-Worker). `
|
|
1423
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
1408
1424
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
1409
1425
|
* the default export).
|
|
1410
1426
|
*
|
|
1411
1427
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
1412
1428
|
*/
|
|
1413
1429
|
worker<TExportName$1 extends InferWorkerEntrypointExports<TConfig$1> | undefined = undefined>(options: {
|
|
1414
|
-
|
|
1430
|
+
worker: TWorkerName;
|
|
1415
1431
|
exportName?: TExportName$1;
|
|
1416
1432
|
props?: Record<string, unknown>;
|
|
1417
|
-
|
|
1433
|
+
dev?: BindingDevOptions;
|
|
1418
1434
|
}): TypedWorkerBinding<TConfig$1, TExportName$1 extends string ? TExportName$1 : "default">;
|
|
1419
1435
|
}
|
|
1420
1436
|
type WorkerConfigExport<T$1 extends WorkerConfig = WorkerConfig> = ConfigInput<T$1>;
|
|
@@ -1643,14 +1659,18 @@ type InferMainModule<TUnwrappedConfig$1> = TUnwrappedConfig$1 extends {
|
|
|
1643
1659
|
*/
|
|
1644
1660
|
type SettingsConfigInput = Omit<SettingsConfig, "type">;
|
|
1645
1661
|
/**
|
|
1646
|
-
*
|
|
1647
|
-
* Authored as a named `settings` export.
|
|
1662
|
+
* A settings definition created by {@link defineSettings}.
|
|
1648
1663
|
*/
|
|
1649
|
-
|
|
1664
|
+
interface SettingsDefinition {
|
|
1650
1665
|
[DEFINITION]: {
|
|
1651
1666
|
config: ConfigInput<SettingsConfigInput>;
|
|
1652
|
-
type:
|
|
1667
|
+
type: "settings";
|
|
1653
1668
|
};
|
|
1654
|
-
}
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* Declare shared settings.
|
|
1672
|
+
* Authored as a named `settings` export.
|
|
1673
|
+
*/
|
|
1674
|
+
declare function defineSettings(config: ConfigInput<SettingsConfigInput>): SettingsDefinition;
|
|
1655
1675
|
//#endregion
|
|
1656
|
-
export {
|
|
1676
|
+
export { PipelineBinding as $, Triggers as A, Bindings as B, WorkerEntrypointExportOptions as C, WorkflowBinding as Ct, FetchTrigger as D, EmailTrigger as E, AiSearchNamespaceBinding as F, FlagshipBinding as G, D1Binding as H, AnalyticsEngineDatasetBinding as I, JsonBinding as J, HyperdriveBinding as K, ArtifactsBinding as L, AgentMemoryBinding as M, AiBinding as N, QueueConsumerTrigger as O, AiSearchBinding as P, MtlsCertificateBinding as Q, AssetsBinding as R, WorkerEntrypointExport as S, WorkerLoaderBinding as St, ConnectTrigger as T, DispatchNamespaceBinding as U, BrowserBinding as V, DurableObjectBinding as W, LogfwdrBinding as X, KvBinding as Y, MediaBinding$1 as Z, DurableObjectDeletedExport as _, VersionMetadataBinding as _t, InferEnv as a, SendEmailBinding as at, DurableObjectTransferredExport as b, WebSearchBinding as bt, TypedWorkerDefinition as c, TypedAiBinding as ct, defineWorker as d, TypedPipelineBinding as dt, QueueBinding as et, SettingsConfig as f, TypedQueueBinding as ft, DurableObjectCreatedExport as g, VectorizeBinding as gt, resolveExportDefinition as h, UnsafeBinding as ht, InferDurableNamespaces as i, SecretsStoreSecretBinding as it, triggers as j, ScheduledTrigger as k, WorkerConfigExport as l, TypedDurableObjectBinding as lt, ConfigContext as m, TypedWorkflowBinding as mt, SettingsDefinition as n, RateLimitBinding as nt, InferMainModule as o, StreamBinding$1 as ot, WorkerConfig as p, TypedWorkerBinding as pt, ImagesBinding$1 as q, defineSettings as r, SecretBinding as rt, UnwrapConfig as s, TextBinding as st, SettingsConfigInput as t, R2Binding as tt, WorkerConfigInput as u, TypedKvBinding as ut, DurableObjectExpectingTransferExport as v, VpcNetworkBinding as vt, exports as w, bindings as wt, Exports as x, WorkerBinding as xt, DurableObjectRenamedExport as y, VpcServiceBinding as yt, BindingDevOptions as z };
|
package/dist/public.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, Bindings, BrowserBinding, ConfigContext, ConnectTrigger, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, SettingsConfig, SettingsConfigInput, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedDurableObjectBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, TypedWorkerBinding, TypedWorkerDefinition, TypedWorkflowBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WebSearchBinding, WorkerBinding, WorkerConfig, WorkerConfigExport, WorkerConfigInput, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkflowBinding, bindings, defineSettings, defineWorker, exports, triggers };
|
|
1
|
+
import { $ as PipelineBinding, A as Triggers, B as Bindings, C as WorkerEntrypointExportOptions, Ct as WorkflowBinding, D as FetchTrigger, E as EmailTrigger, F as AiSearchNamespaceBinding, G as FlagshipBinding, H as D1Binding, I as AnalyticsEngineDatasetBinding, J as JsonBinding, K as HyperdriveBinding, L as ArtifactsBinding, M as AgentMemoryBinding, N as AiBinding, O as QueueConsumerTrigger, P as AiSearchBinding, Q as MtlsCertificateBinding, R as AssetsBinding, S as WorkerEntrypointExport, St as WorkerLoaderBinding, T as ConnectTrigger, U as DispatchNamespaceBinding, V as BrowserBinding, W as DurableObjectBinding, X as LogfwdrBinding, Y as KvBinding, Z as MediaBinding, _ as DurableObjectDeletedExport, _t as VersionMetadataBinding, a as InferEnv, at as SendEmailBinding, b as DurableObjectTransferredExport, bt as WebSearchBinding, c as TypedWorkerDefinition, ct as TypedAiBinding, d as defineWorker, dt as TypedPipelineBinding, et as QueueBinding, f as SettingsConfig, ft as TypedQueueBinding, g as DurableObjectCreatedExport, gt as VectorizeBinding, ht as UnsafeBinding, i as InferDurableNamespaces, it as SecretsStoreSecretBinding, j as triggers, k as ScheduledTrigger, l as WorkerConfigExport, lt as TypedDurableObjectBinding, m as ConfigContext, mt as TypedWorkflowBinding, n as SettingsDefinition, nt as RateLimitBinding, o as InferMainModule, ot as StreamBinding, p as WorkerConfig, pt as TypedWorkerBinding, q as ImagesBinding, r as defineSettings, rt as SecretBinding, s as UnwrapConfig, st as TextBinding, t as SettingsConfigInput, tt as R2Binding, u as WorkerConfigInput, ut as TypedKvBinding, v as DurableObjectExpectingTransferExport, vt as VpcNetworkBinding, w as exports, wt as bindings, x as Exports, xt as WorkerBinding, y as DurableObjectRenamedExport, yt as VpcServiceBinding, z as BindingDevOptions } from "./public-CN_InYwn.mjs";
|
|
2
|
+
export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, BindingDevOptions, Bindings, BrowserBinding, ConfigContext, ConnectTrigger, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, SettingsConfig, SettingsConfigInput, SettingsDefinition, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedDurableObjectBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, TypedWorkerBinding, TypedWorkerDefinition, TypedWorkflowBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WebSearchBinding, WorkerBinding, WorkerConfig, WorkerConfigExport, WorkerConfigInput, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkflowBinding, bindings, defineSettings, defineWorker, exports, triggers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Definitions and utilities for configuring Cloudflare Workers and related products. This is not yet stable enough for external use — APIs may change without notice.",
|
|
5
5
|
"homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/config#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"zod": "4.4.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@cloudflare/workers-types": "^5.
|
|
34
|
+
"@cloudflare/workers-types": "^5.20260828.1",
|
|
35
35
|
"ts-dedent": "^2.2.0",
|
|
36
36
|
"tsdown": "0.16.3",
|
|
37
37
|
"typescript": "5.8.3",
|