@cloudflare/workers-utils 0.11.2 → 0.18.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/README.md +3 -1
- package/dist/browser.d.mts +1 -1
- package/dist/browser.mjs +3 -2
- package/dist/{chunk-NNMRVG4F.mjs → chunk-A4F3D336.mjs} +5 -1
- package/dist/{chunk-4233U5MA.mjs → chunk-BLWXWFJK.mjs} +72 -36
- package/dist/{chunk-LDFBMPMW.mjs → chunk-DCOBXSFB.mjs} +1 -8
- package/dist/chunk-O4YGOZSW.mjs +52 -0
- package/dist/chunk-OZQVB3L3.mjs +8 -0
- package/dist/{config-DAxLpjUL.d.mts → config-_M2XwEUI.d.mts} +276 -9
- package/dist/index.d.mts +44 -28
- package/dist/index.mjs +4903 -300
- package/dist/metafile-esm.json +1 -1
- package/dist/prometheus-metrics.d.mts +50 -0
- package/dist/prometheus-metrics.mjs +2 -0
- package/dist/test-helpers/index.d.mts +1 -1
- package/dist/test-helpers/index.mjs +3 -2
- package/package.json +19 -17
|
@@ -136,6 +136,13 @@ interface CfMediaBinding {
|
|
|
136
136
|
binding: string;
|
|
137
137
|
remote?: boolean;
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* A binding to Cloudflare Stream
|
|
141
|
+
*/
|
|
142
|
+
interface CfStreamBinding {
|
|
143
|
+
binding: string;
|
|
144
|
+
remote?: boolean;
|
|
145
|
+
}
|
|
139
146
|
/**
|
|
140
147
|
* A binding to the Worker Version's metadata
|
|
141
148
|
*/
|
|
@@ -164,6 +171,9 @@ interface CfWorkflow {
|
|
|
164
171
|
script_name?: string;
|
|
165
172
|
remote?: boolean;
|
|
166
173
|
raw?: boolean;
|
|
174
|
+
limits?: {
|
|
175
|
+
steps?: number;
|
|
176
|
+
};
|
|
167
177
|
}
|
|
168
178
|
interface CfQueue {
|
|
169
179
|
binding: string;
|
|
@@ -196,15 +206,35 @@ interface CfVectorize {
|
|
|
196
206
|
raw?: boolean;
|
|
197
207
|
remote?: boolean;
|
|
198
208
|
}
|
|
209
|
+
interface CfAISearchNamespace {
|
|
210
|
+
binding: string;
|
|
211
|
+
namespace: string | typeof INHERIT_SYMBOL;
|
|
212
|
+
remote?: boolean;
|
|
213
|
+
}
|
|
214
|
+
interface CfAISearch {
|
|
215
|
+
binding: string;
|
|
216
|
+
instance_name: string;
|
|
217
|
+
remote?: boolean;
|
|
218
|
+
}
|
|
199
219
|
interface CfSecretsStoreSecrets {
|
|
200
220
|
binding: string;
|
|
201
221
|
store_id: string;
|
|
202
222
|
secret_name: string;
|
|
203
223
|
}
|
|
224
|
+
interface CfArtifacts {
|
|
225
|
+
binding: string;
|
|
226
|
+
namespace: string;
|
|
227
|
+
remote?: boolean;
|
|
228
|
+
}
|
|
204
229
|
interface CfHelloWorld {
|
|
205
230
|
binding: string;
|
|
206
231
|
enable_timer?: boolean;
|
|
207
232
|
}
|
|
233
|
+
interface CfFlagship {
|
|
234
|
+
binding: string;
|
|
235
|
+
app_id: string;
|
|
236
|
+
remote?: boolean;
|
|
237
|
+
}
|
|
208
238
|
interface CfWorkerLoader {
|
|
209
239
|
binding: string;
|
|
210
240
|
}
|
|
@@ -235,6 +265,12 @@ interface CfVpcService {
|
|
|
235
265
|
service_id: string;
|
|
236
266
|
remote?: boolean;
|
|
237
267
|
}
|
|
268
|
+
interface CfVpcNetwork {
|
|
269
|
+
binding: string;
|
|
270
|
+
tunnel_id?: string;
|
|
271
|
+
network_id?: string;
|
|
272
|
+
remote?: boolean;
|
|
273
|
+
}
|
|
238
274
|
interface CfAnalyticsEngineDataset {
|
|
239
275
|
binding: string;
|
|
240
276
|
dataset?: string;
|
|
@@ -385,6 +421,7 @@ interface CfWorkerInit {
|
|
|
385
421
|
_headers?: string;
|
|
386
422
|
} | undefined;
|
|
387
423
|
observability: Observability | undefined;
|
|
424
|
+
cache: CacheOptions | undefined;
|
|
388
425
|
}
|
|
389
426
|
interface CfWorkerContext {
|
|
390
427
|
env: string | undefined;
|
|
@@ -459,6 +496,9 @@ type WorkerMetadataBinding = {
|
|
|
459
496
|
type: "images";
|
|
460
497
|
name: string;
|
|
461
498
|
raw?: boolean;
|
|
499
|
+
} | {
|
|
500
|
+
type: "stream";
|
|
501
|
+
name: string;
|
|
462
502
|
} | {
|
|
463
503
|
type: "version_metadata";
|
|
464
504
|
name: string;
|
|
@@ -466,6 +506,14 @@ type WorkerMetadataBinding = {
|
|
|
466
506
|
type: "data_blob";
|
|
467
507
|
name: string;
|
|
468
508
|
part: string;
|
|
509
|
+
} | {
|
|
510
|
+
type: "ai_search_namespace";
|
|
511
|
+
name: string;
|
|
512
|
+
namespace: string;
|
|
513
|
+
} | {
|
|
514
|
+
type: "ai_search";
|
|
515
|
+
name: string;
|
|
516
|
+
instance_name: string;
|
|
469
517
|
} | {
|
|
470
518
|
type: "kv_namespace";
|
|
471
519
|
name: string;
|
|
@@ -559,10 +607,18 @@ type WorkerMetadataBinding = {
|
|
|
559
607
|
name: string;
|
|
560
608
|
store_id: string;
|
|
561
609
|
secret_name: string;
|
|
610
|
+
} | {
|
|
611
|
+
type: "artifacts";
|
|
612
|
+
name: string;
|
|
613
|
+
namespace: string;
|
|
562
614
|
} | {
|
|
563
615
|
type: "unsafe_hello_world";
|
|
564
616
|
name: string;
|
|
565
617
|
enable_timer?: boolean;
|
|
618
|
+
} | {
|
|
619
|
+
type: "flagship";
|
|
620
|
+
name: string;
|
|
621
|
+
app_id: string;
|
|
566
622
|
} | {
|
|
567
623
|
type: "ratelimit";
|
|
568
624
|
name: string;
|
|
@@ -575,6 +631,11 @@ type WorkerMetadataBinding = {
|
|
|
575
631
|
type: "vpc_service";
|
|
576
632
|
name: string;
|
|
577
633
|
service_id: string;
|
|
634
|
+
} | {
|
|
635
|
+
type: "vpc_network";
|
|
636
|
+
name: string;
|
|
637
|
+
tunnel_id?: string;
|
|
638
|
+
network_id?: string;
|
|
578
639
|
} | {
|
|
579
640
|
type: "worker_loader";
|
|
580
641
|
name: string;
|
|
@@ -688,7 +749,7 @@ type Trigger = {
|
|
|
688
749
|
cron: string;
|
|
689
750
|
} | ({
|
|
690
751
|
type: "queue-consumer";
|
|
691
|
-
} & QueueConsumer);
|
|
752
|
+
} & Omit<QueueConsumer, "type">);
|
|
692
753
|
type BindingOmit<T> = Omit<T, "binding">;
|
|
693
754
|
type NameOmit<T> = Omit<T, "name">;
|
|
694
755
|
type Binding = {
|
|
@@ -722,7 +783,9 @@ type Binding = {
|
|
|
722
783
|
type: "ai";
|
|
723
784
|
} & BindingOmit<CfAIBinding>) | ({
|
|
724
785
|
type: "images";
|
|
725
|
-
} & BindingOmit<CfImagesBinding>) | {
|
|
786
|
+
} & BindingOmit<CfImagesBinding>) | ({
|
|
787
|
+
type: "stream";
|
|
788
|
+
} & BindingOmit<CfStreamBinding>) | {
|
|
726
789
|
type: "version_metadata";
|
|
727
790
|
} | {
|
|
728
791
|
type: "data_blob";
|
|
@@ -740,6 +803,10 @@ type Binding = {
|
|
|
740
803
|
} & BindingOmit<CfD1Database>) | ({
|
|
741
804
|
type: "vectorize";
|
|
742
805
|
} & BindingOmit<CfVectorize>) | ({
|
|
806
|
+
type: "ai_search_namespace";
|
|
807
|
+
} & BindingOmit<CfAISearchNamespace>) | ({
|
|
808
|
+
type: "ai_search";
|
|
809
|
+
} & BindingOmit<CfAISearch>) | ({
|
|
743
810
|
type: "hyperdrive";
|
|
744
811
|
} & BindingOmit<CfHyperdrive>) | ({
|
|
745
812
|
type: "service";
|
|
@@ -757,16 +824,22 @@ type Binding = {
|
|
|
757
824
|
} & BindingOmit<CfPipeline>) | ({
|
|
758
825
|
type: "secrets_store_secret";
|
|
759
826
|
} & BindingOmit<CfSecretsStoreSecrets>) | ({
|
|
827
|
+
type: "artifacts";
|
|
828
|
+
} & BindingOmit<CfArtifacts>) | ({
|
|
760
829
|
type: "logfwdr";
|
|
761
830
|
} & NameOmit<CfLogfwdrBinding>) | ({
|
|
762
831
|
type: "unsafe_hello_world";
|
|
763
832
|
} & BindingOmit<CfHelloWorld>) | ({
|
|
833
|
+
type: "flagship";
|
|
834
|
+
} & BindingOmit<CfFlagship>) | ({
|
|
764
835
|
type: "ratelimit";
|
|
765
836
|
} & NameOmit<CfRateLimit>) | ({
|
|
766
837
|
type: "worker_loader";
|
|
767
838
|
} & BindingOmit<CfWorkerLoader>) | ({
|
|
768
839
|
type: "vpc_service";
|
|
769
840
|
} & BindingOmit<CfVpcService>) | ({
|
|
841
|
+
type: "vpc_network";
|
|
842
|
+
} & BindingOmit<CfVpcNetwork>) | ({
|
|
770
843
|
type: "media";
|
|
771
844
|
} & BindingOmit<CfMediaBinding>) | ({
|
|
772
845
|
type: `unsafe_${string}`;
|
|
@@ -798,6 +871,8 @@ type ZoneNameRoute = {
|
|
|
798
871
|
type CustomDomainRoute = {
|
|
799
872
|
pattern: string;
|
|
800
873
|
custom_domain: boolean;
|
|
874
|
+
enabled?: boolean;
|
|
875
|
+
previews_enabled?: boolean;
|
|
801
876
|
};
|
|
802
877
|
type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
|
|
803
878
|
/**
|
|
@@ -910,7 +985,7 @@ type ContainerApp = {
|
|
|
910
985
|
/** @defaults to 2 GB */
|
|
911
986
|
disk_mb?: number;
|
|
912
987
|
};
|
|
913
|
-
|
|
988
|
+
ssh?: {
|
|
914
989
|
/**
|
|
915
990
|
* If enabled, those with write access to a container will be able to SSH into it through Wrangler.
|
|
916
991
|
* @default false
|
|
@@ -922,6 +997,14 @@ type ContainerApp = {
|
|
|
922
997
|
*/
|
|
923
998
|
port?: number;
|
|
924
999
|
};
|
|
1000
|
+
/**
|
|
1001
|
+
* @deprecated Use `ssh` instead.
|
|
1002
|
+
* @hidden
|
|
1003
|
+
*/
|
|
1004
|
+
wrangler_ssh?: {
|
|
1005
|
+
enabled: boolean;
|
|
1006
|
+
port?: number;
|
|
1007
|
+
};
|
|
925
1008
|
/**
|
|
926
1009
|
* SSH public keys to put in the container's authorized_keys file.
|
|
927
1010
|
*/
|
|
@@ -960,16 +1043,29 @@ type ContainerApp = {
|
|
|
960
1043
|
memory_mib?: number;
|
|
961
1044
|
};
|
|
962
1045
|
/**
|
|
963
|
-
* Scheduling constraints
|
|
964
|
-
* @hidden
|
|
1046
|
+
* Scheduling constraints for container placement.
|
|
965
1047
|
*/
|
|
966
1048
|
constraints?: {
|
|
967
|
-
|
|
1049
|
+
/**
|
|
1050
|
+
* Limit container placement to specific geographic regions.
|
|
1051
|
+
*/
|
|
1052
|
+
regions?: ("ENAM" | "WNAM" | "EEUR" | "WEUR" | "APAC" | "SAM" | "ME" | "OC" | "AFR")[];
|
|
1053
|
+
/**
|
|
1054
|
+
* Restrict containers to compliance boundaries.
|
|
1055
|
+
*/
|
|
1056
|
+
jurisdiction?: "eu" | "fedramp";
|
|
1057
|
+
/**
|
|
1058
|
+
* @hidden
|
|
1059
|
+
*/
|
|
968
1060
|
cities?: string[];
|
|
969
1061
|
/**
|
|
970
1062
|
* @deprecated Use `tiers` instead
|
|
1063
|
+
* @hidden
|
|
971
1064
|
*/
|
|
972
1065
|
tier?: number;
|
|
1066
|
+
/**
|
|
1067
|
+
* @hidden
|
|
1068
|
+
*/
|
|
973
1069
|
tiers?: number[];
|
|
974
1070
|
};
|
|
975
1071
|
/**
|
|
@@ -1334,6 +1430,13 @@ interface EnvironmentInheritable {
|
|
|
1334
1430
|
* @inheritable
|
|
1335
1431
|
*/
|
|
1336
1432
|
observability: Observability | undefined;
|
|
1433
|
+
/**
|
|
1434
|
+
* Specify the cache behavior of the Worker.
|
|
1435
|
+
*
|
|
1436
|
+
* @inheritable
|
|
1437
|
+
* @hidden
|
|
1438
|
+
*/
|
|
1439
|
+
cache: CacheOptions | undefined;
|
|
1337
1440
|
/**
|
|
1338
1441
|
* Specify the compliance region mode of the Worker.
|
|
1339
1442
|
*
|
|
@@ -1356,6 +1459,18 @@ interface EnvironmentInheritable {
|
|
|
1356
1459
|
*/
|
|
1357
1460
|
exclude: string[];
|
|
1358
1461
|
};
|
|
1462
|
+
/**
|
|
1463
|
+
* Configuration for Worker Previews.
|
|
1464
|
+
*
|
|
1465
|
+
* Previews are branches of your Worker's main instance used to test features
|
|
1466
|
+
* in development outside of production. This block defines the settings
|
|
1467
|
+
* used when creating Preview deployments via `wrangler preview`.
|
|
1468
|
+
*
|
|
1469
|
+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#previews
|
|
1470
|
+
*
|
|
1471
|
+
* @inheritable
|
|
1472
|
+
*/
|
|
1473
|
+
previews: PreviewsConfig | undefined;
|
|
1359
1474
|
}
|
|
1360
1475
|
type DurableObjectBindings = {
|
|
1361
1476
|
/** The name of the binding used to refer to the Durable Object */
|
|
@@ -1378,6 +1493,11 @@ type WorkflowBinding = {
|
|
|
1378
1493
|
script_name?: string;
|
|
1379
1494
|
/** Whether the Workflow should be remote or not in local development */
|
|
1380
1495
|
remote?: boolean;
|
|
1496
|
+
/** Optional limits for the Workflow */
|
|
1497
|
+
limits?: {
|
|
1498
|
+
/** Maximum number of steps a Workflow instance can execute */
|
|
1499
|
+
steps?: number;
|
|
1500
|
+
};
|
|
1381
1501
|
};
|
|
1382
1502
|
/**
|
|
1383
1503
|
* The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
|
|
@@ -1409,6 +1529,23 @@ interface EnvironmentNonInheritable {
|
|
|
1409
1529
|
* @nonInheritable
|
|
1410
1530
|
*/
|
|
1411
1531
|
vars: Record<string, string | Json>;
|
|
1532
|
+
/**
|
|
1533
|
+
* Secrets configuration (experimental).
|
|
1534
|
+
*
|
|
1535
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1536
|
+
* and so must be specified in every named environment.
|
|
1537
|
+
*
|
|
1538
|
+
* @nonInheritable
|
|
1539
|
+
*/
|
|
1540
|
+
secrets?: {
|
|
1541
|
+
/**
|
|
1542
|
+
* List of secret names that are required by your Worker.
|
|
1543
|
+
* When defined, this property:
|
|
1544
|
+
* - Replaces .dev.vars/.env/process.env inference for type generation
|
|
1545
|
+
* - Enables local dev validation with warnings for missing secrets
|
|
1546
|
+
*/
|
|
1547
|
+
required?: string[];
|
|
1548
|
+
};
|
|
1412
1549
|
/**
|
|
1413
1550
|
* A list of durable objects that your Worker should be bound to.
|
|
1414
1551
|
*
|
|
@@ -1531,8 +1668,8 @@ interface EnvironmentNonInheritable {
|
|
|
1531
1668
|
consumers?: {
|
|
1532
1669
|
/** The name of the queue from which this consumer should consume. */
|
|
1533
1670
|
queue: string;
|
|
1534
|
-
/** The consumer type
|
|
1535
|
-
type?:
|
|
1671
|
+
/** The consumer type. Only "worker" is supported in wrangler config. Default is "worker". */
|
|
1672
|
+
type?: "worker";
|
|
1536
1673
|
/** The maximum number of messages per batch */
|
|
1537
1674
|
max_batch_size?: number;
|
|
1538
1675
|
/** The maximum number of seconds to wait to fill a batch with messages. */
|
|
@@ -1620,6 +1757,42 @@ interface EnvironmentNonInheritable {
|
|
|
1620
1757
|
/** Whether the Vectorize index should be remote or not in local development */
|
|
1621
1758
|
remote?: boolean;
|
|
1622
1759
|
}[];
|
|
1760
|
+
/**
|
|
1761
|
+
* Specifies AI Search namespace bindings that are bound to this Worker environment.
|
|
1762
|
+
* Each binding is scoped to a namespace and allows dynamic instance CRUD within it.
|
|
1763
|
+
*
|
|
1764
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1765
|
+
* and so must be specified in every named environment.
|
|
1766
|
+
*
|
|
1767
|
+
* @default []
|
|
1768
|
+
* @nonInheritable
|
|
1769
|
+
*/
|
|
1770
|
+
ai_search_namespaces: {
|
|
1771
|
+
/** The binding name used to refer to the AI Search namespace in the Worker. */
|
|
1772
|
+
binding: string;
|
|
1773
|
+
/** The user-chosen namespace name. Must exist in Cloudflare at deploy time. */
|
|
1774
|
+
namespace: string;
|
|
1775
|
+
/** Whether the AI Search namespace binding should be remote in local development */
|
|
1776
|
+
remote?: boolean;
|
|
1777
|
+
}[];
|
|
1778
|
+
/**
|
|
1779
|
+
* Specifies AI Search instance bindings that are bound to this Worker environment.
|
|
1780
|
+
* Each binding is bound directly to a single pre-existing instance within the "default" namespace.
|
|
1781
|
+
*
|
|
1782
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1783
|
+
* and so must be specified in every named environment.
|
|
1784
|
+
*
|
|
1785
|
+
* @default []
|
|
1786
|
+
* @nonInheritable
|
|
1787
|
+
*/
|
|
1788
|
+
ai_search: {
|
|
1789
|
+
/** The binding name used to refer to the AI Search instance in the Worker. */
|
|
1790
|
+
binding: string;
|
|
1791
|
+
/** The user-chosen instance name. Must exist in Cloudflare at deploy time. */
|
|
1792
|
+
instance_name: string;
|
|
1793
|
+
/** Whether the AI Search instance binding should be remote in local development */
|
|
1794
|
+
remote?: boolean;
|
|
1795
|
+
}[];
|
|
1623
1796
|
/**
|
|
1624
1797
|
* Specifies Hyperdrive configs that are bound to this Worker environment.
|
|
1625
1798
|
*
|
|
@@ -1753,6 +1926,20 @@ interface EnvironmentNonInheritable {
|
|
|
1753
1926
|
/** Whether the Media binding should be remote or not */
|
|
1754
1927
|
remote?: boolean;
|
|
1755
1928
|
} | undefined;
|
|
1929
|
+
/**
|
|
1930
|
+
* Binding to Cloudflare Stream
|
|
1931
|
+
*
|
|
1932
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1933
|
+
* and so must be specified in every named environment.
|
|
1934
|
+
*
|
|
1935
|
+
* @default {}
|
|
1936
|
+
* @nonInheritable
|
|
1937
|
+
*/
|
|
1938
|
+
stream: {
|
|
1939
|
+
binding: string;
|
|
1940
|
+
/** Whether the Stream binding should be remote or not in local development */
|
|
1941
|
+
remote?: boolean;
|
|
1942
|
+
} | undefined;
|
|
1756
1943
|
/**
|
|
1757
1944
|
* Binding to the Worker Version's metadata
|
|
1758
1945
|
*/
|
|
@@ -1889,6 +2076,24 @@ interface EnvironmentNonInheritable {
|
|
|
1889
2076
|
/** Name of the secret */
|
|
1890
2077
|
secret_name: string;
|
|
1891
2078
|
}[];
|
|
2079
|
+
/**
|
|
2080
|
+
* Specifies Artifacts bindings that are bound to this Worker environment.
|
|
2081
|
+
* Artifacts provides git-compatible file storage on Cloudflare Workers.
|
|
2082
|
+
*
|
|
2083
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
2084
|
+
* and so must be specified in every named environment.
|
|
2085
|
+
*
|
|
2086
|
+
* @default []
|
|
2087
|
+
* @nonInheritable
|
|
2088
|
+
*/
|
|
2089
|
+
artifacts: {
|
|
2090
|
+
/** The binding name used to refer to the Artifacts instance. */
|
|
2091
|
+
binding: string;
|
|
2092
|
+
/** The namespace to use. */
|
|
2093
|
+
namespace: string;
|
|
2094
|
+
/** Whether to use the remote Artifacts service in local dev. */
|
|
2095
|
+
remote?: boolean;
|
|
2096
|
+
}[];
|
|
1892
2097
|
/**
|
|
1893
2098
|
* **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
|
|
1894
2099
|
*
|
|
@@ -1904,6 +2109,23 @@ interface EnvironmentNonInheritable {
|
|
|
1904
2109
|
/** Whether the timer is enabled */
|
|
1905
2110
|
enable_timer?: boolean;
|
|
1906
2111
|
}[];
|
|
2112
|
+
/**
|
|
2113
|
+
* Specifies Flagship feature flag bindings that are bound to this Worker environment.
|
|
2114
|
+
*
|
|
2115
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
2116
|
+
* and so must be specified in every named environment.
|
|
2117
|
+
*
|
|
2118
|
+
* @default []
|
|
2119
|
+
* @nonInheritable
|
|
2120
|
+
*/
|
|
2121
|
+
flagship: {
|
|
2122
|
+
/** The binding name used to refer to the bound Flagship service. */
|
|
2123
|
+
binding: string;
|
|
2124
|
+
/** The Flagship app ID to bind to. */
|
|
2125
|
+
app_id: string;
|
|
2126
|
+
/** Whether to use the remote Flagship service for flag evaluation in local dev. */
|
|
2127
|
+
remote?: boolean;
|
|
2128
|
+
}[];
|
|
1907
2129
|
/**
|
|
1908
2130
|
* Specifies rate limit bindings that are bound to this Worker environment.
|
|
1909
2131
|
*
|
|
@@ -1956,6 +2178,30 @@ interface EnvironmentNonInheritable {
|
|
|
1956
2178
|
/** Whether the VPC service is remote or not */
|
|
1957
2179
|
remote?: boolean;
|
|
1958
2180
|
}[];
|
|
2181
|
+
/**
|
|
2182
|
+
* Specifies VPC networks that are bound to this Worker environment.
|
|
2183
|
+
*
|
|
2184
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
2185
|
+
* and so must be specified in every named environment.
|
|
2186
|
+
*
|
|
2187
|
+
* @default []
|
|
2188
|
+
* @nonInheritable
|
|
2189
|
+
*/
|
|
2190
|
+
vpc_networks: ({
|
|
2191
|
+
/** The binding name used to refer to the VPC network in the Worker. */
|
|
2192
|
+
binding: string;
|
|
2193
|
+
/** The tunnel ID of the Cloudflare Tunnel to route traffic through. Mutually exclusive with network_id. */
|
|
2194
|
+
tunnel_id: string;
|
|
2195
|
+
/** Whether the VPC network is remote or not */
|
|
2196
|
+
remote?: boolean;
|
|
2197
|
+
} | {
|
|
2198
|
+
/** The binding name used to refer to the VPC network in the Worker. */
|
|
2199
|
+
binding: string;
|
|
2200
|
+
/** The network ID to route traffic through. Mutually exclusive with tunnel_id. */
|
|
2201
|
+
network_id: string;
|
|
2202
|
+
/** Whether the VPC network is remote or not */
|
|
2203
|
+
remote?: boolean;
|
|
2204
|
+
})[];
|
|
1959
2205
|
}
|
|
1960
2206
|
/**
|
|
1961
2207
|
* The raw environment configuration that we read from the config file.
|
|
@@ -2058,13 +2304,34 @@ interface Observability {
|
|
|
2058
2304
|
destinations?: string[];
|
|
2059
2305
|
};
|
|
2060
2306
|
}
|
|
2307
|
+
interface CacheOptions {
|
|
2308
|
+
/** If cache is enabled for this Worker */
|
|
2309
|
+
enabled: boolean;
|
|
2310
|
+
}
|
|
2061
2311
|
type DockerConfiguration = {
|
|
2062
2312
|
/** Socket used by miniflare to communicate with Docker */
|
|
2063
2313
|
socketPath: string;
|
|
2314
|
+
/** Docker image name for the container egress interceptor sidecar */
|
|
2315
|
+
containerEgressInterceptorImage?: string;
|
|
2064
2316
|
};
|
|
2065
2317
|
type ContainerEngine = {
|
|
2066
2318
|
localDocker: DockerConfiguration;
|
|
2067
2319
|
} | string;
|
|
2320
|
+
/**
|
|
2321
|
+
* Configuration for Worker Previews.
|
|
2322
|
+
*
|
|
2323
|
+
* This defines the settings used when creating Preview deployments.
|
|
2324
|
+
* Previews are branches of your Worker's main instance used to test features
|
|
2325
|
+
* during feature development outside of production.
|
|
2326
|
+
*
|
|
2327
|
+
* The `previews` block contains any intentionally divergent configuration intended solely for Previews, including:
|
|
2328
|
+
* - All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)
|
|
2329
|
+
* - Select inheritable properties: `logpush`, `observability`, `limits`
|
|
2330
|
+
*
|
|
2331
|
+
* @inheritable
|
|
2332
|
+
*/
|
|
2333
|
+
interface PreviewsConfig extends Partial<EnvironmentNonInheritable>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits">> {
|
|
2334
|
+
}
|
|
2068
2335
|
|
|
2069
2336
|
/**
|
|
2070
2337
|
* This is the static type definition for the configuration object.
|
|
@@ -2312,4 +2579,4 @@ interface EnvironmentMap {
|
|
|
2312
2579
|
}
|
|
2313
2580
|
declare const defaultWranglerConfig: Config;
|
|
2314
2581
|
|
|
2315
|
-
export { type
|
|
2582
|
+
export { type CfAISearchNamespace as $, type Assets as A, type Binding as B, type Config as C, type DurableObjectMigration as D, type Environment as E, type CfTextBlobBindings as F, type CfBrowserBinding as G, type CfAIBinding as H, type CfImagesBinding as I, type CfMediaBinding as J, type CfStreamBinding as K, type CfVersionMetadataBinding as L, type CfDataBlobBindings as M, type CfDurableObject as N, type Observability as O, type PreviewsConfig as P, type CfWorkflow as Q, type RawConfig as R, type StreamingTailConsumer as S, type TailConsumer as T, type UserLimits as U, type CfQueue as V, type WorkerMetadataBinding as W, type CfR2Bucket as X, type CfD1Database as Y, type ZoneIdRoute as Z, type CfVectorize as _, type RedirectedRawConfig as a, type CfAISearch as a0, type CfSecretsStoreSecrets as a1, type CfArtifacts as a2, type CfHelloWorld as a3, type CfFlagship as a4, type CfWorkerLoader as a5, type CfRateLimit as a6, type CfHyperdrive as a7, type CfService as a8, type CfVpcService as a9, INHERIT_SYMBOL as aA, SERVICE_TAG_PREFIX as aB, ENVIRONMENT_TAG_PREFIX as aC, PATH_TO_DEPLOY_CONFIG as aD, JSON_CONFIG_FORMATS as aE, type CfVpcNetwork as aa, type CfAnalyticsEngineDataset as ab, type CfDispatchNamespace as ac, type CfMTlsCertificate as ad, type CfLogfwdr as ae, type CfLogfwdrBinding as af, type CfAssetsBinding as ag, type CfPipeline as ah, type CfUnsafeBinding as ai, type CfCapnp as aj, type CfUnsafe as ak, type CfDurableObjectMigrations as al, type CfPlacement as am, type CfTailConsumer as an, type CfUserLimits as ao, type CfWorkerInit as ap, type CfWorkerContext as aq, type CfWorkerSourceMap as ar, type Json as as, type AssetConfigMetadata as at, type WorkerMetadata as au, type ServiceMetadataRes as av, type ServiceFetch as aw, type File as ax, type BinaryFile as ay, type Trigger as az, type RawDevConfig as b, type ConfigFields as c, type RawEnvironment as d, defaultWranglerConfig as e, type ZoneNameRoute as f, type CustomDomainRoute as g, type Route as h, type CloudchamberConfig as i, type ContainerApp as j, type DurableObjectBindings as k, type WorkflowBinding as l, type EnvironmentNonInheritable as m, type Rule as n, type ConfigModuleRuleType as o, type DispatchNamespaceOutbound as p, type CacheOptions as q, type DockerConfiguration as r, type ContainerEngine as s, type CfScriptFormat as t, type CfModuleType as u, type CfModule as v, type CfVars as w, type CfKvNamespace as x, type CfSendEmailBindings as y, type CfWasmModuleBindings as z };
|