@cloudflare/config 0.16.0 → 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/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Settings, A as TextBinding, B as WorkerBinding, C as QueueBinding, D as SecretsStoreSecretBinding, E as SecretBinding, F as UnsafeBinding, G as ContainerDefinition, H as WorkflowBinding, I as VectorizeBinding, J as defineConfig, K as WorkerDefinition, L as VersionMetadataBinding, M as TypedKvBinding, N as TypedPipelineBinding, O as SendEmailBinding, P as TypedQueueBinding, Q as ContainerConfig, R as VpcNetworkBinding, S as PipelineBinding, T as RateLimitBinding, U as bindings, V as WorkerLoaderBinding, W as ConfigContext, X as defineWorker, Y as defineContainer, Z as CloudflareConfig, _ as JsonBinding, _t as Exports, a as AnalyticsEngineDatasetBinding, at as ScheduledTrigger, b as MediaBinding, bt as
|
|
1
|
+
import { $ as Settings, A as TextBinding, B as WorkerBinding, C as QueueBinding, D as SecretsStoreSecretBinding, E as SecretBinding, F as UnsafeBinding, G as ContainerDefinition, H as WorkflowBinding, I as VectorizeBinding, J as defineConfig, K as WorkerDefinition, L as VersionMetadataBinding, M as TypedKvBinding, N as TypedPipelineBinding, O as SendEmailBinding, P as TypedQueueBinding, Q as ContainerConfig, R as VpcNetworkBinding, S as PipelineBinding, St as exports, T as RateLimitBinding, U as bindings, V as WorkerLoaderBinding, W as ConfigContext, X as defineWorker, Y as defineContainer, Z as CloudflareConfig, _ as JsonBinding, _t as Exports, a as AnalyticsEngineDatasetBinding, at as ScheduledTrigger, b as MediaBinding, bt as WorkflowExport, c as BindingDevOptions, ct as InferDurableNamespaces, d as D1Binding, dt as UnwrapConfig, et as WorkerConfig, f as DispatchNamespaceBinding, ft as DurableObjectCreatedExport, g as ImagesBinding, gt as DurableObjectTransferredExport, h as HyperdriveBinding, ht as DurableObjectRenamedExport, i as AiSearchNamespaceBinding, it as QueueConsumerTrigger, j as TypedAiBinding, k as StreamBinding, l as Bindings, lt as InferEnv, m as FlagshipBinding, mt as DurableObjectExpectingTransferExport, n as AiBinding, nt as EmailTrigger, o as ArtifactsBinding, ot as Triggers, p as DurableObjectBinding, pt as DurableObjectDeletedExport, q as WorkerReference, r as AiSearchBinding, rt as FetchTrigger, s as AssetsBinding, st as triggers, t as AgentMemoryBinding, tt as ConnectTrigger, u as BrowserBinding, ut as InferMainModule, v as KvBinding, vt as WorkerEntrypointExport, w as R2Binding, x as MtlsCertificateBinding, xt as WorkflowExportOptions, y as LogfwdrBinding, yt as WorkerEntrypointExportOptions, z as VpcServiceBinding } from "./public-DpGZXvA6.mjs";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { RawConfig } from "@cloudflare/workers-utils";
|
|
4
4
|
|
|
@@ -545,6 +545,21 @@ declare const WorkerEntrypointExportSchema: z.ZodObject<{
|
|
|
545
545
|
enabled: z.ZodBoolean;
|
|
546
546
|
}, z.core.$strict>>;
|
|
547
547
|
}, z.core.$strict>;
|
|
548
|
+
declare const WorkflowExportSchema: z.ZodObject<{
|
|
549
|
+
type: z.ZodLiteral<"workflow">;
|
|
550
|
+
name: z.ZodString;
|
|
551
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
552
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
553
|
+
}, z.core.$strict>>;
|
|
554
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
555
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
}, z.core.$strict>>;
|
|
557
|
+
schedules: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
558
|
+
default_retention: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
success_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
560
|
+
error_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
561
|
+
}, z.core.$strict>>;
|
|
562
|
+
}, z.core.$strict>;
|
|
548
563
|
declare const ExportSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
549
564
|
type: z.ZodLiteral<"durable-object">;
|
|
550
565
|
state: z.ZodOptional<z.ZodLiteral<"created">>;
|
|
@@ -581,6 +596,20 @@ declare const ExportSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
581
596
|
cache: z.ZodOptional<z.ZodObject<{
|
|
582
597
|
enabled: z.ZodBoolean;
|
|
583
598
|
}, z.core.$strict>>;
|
|
599
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
600
|
+
type: z.ZodLiteral<"workflow">;
|
|
601
|
+
name: z.ZodString;
|
|
602
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
603
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
}, z.core.$strict>>;
|
|
605
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
606
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
607
|
+
}, z.core.$strict>>;
|
|
608
|
+
schedules: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
609
|
+
default_retention: z.ZodOptional<z.ZodObject<{
|
|
610
|
+
success_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
611
|
+
error_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
612
|
+
}, z.core.$strict>>;
|
|
584
613
|
}, z.core.$strict>]>;
|
|
585
614
|
declare const TailConsumerSchema: z.ZodObject<{
|
|
586
615
|
worker: z.ZodString;
|
|
@@ -588,8 +617,8 @@ declare const TailConsumerSchema: z.ZodObject<{
|
|
|
588
617
|
}, z.core.$strict>;
|
|
589
618
|
/**
|
|
590
619
|
* Input Worker schema — parses Worker definitions from user-authored
|
|
591
|
-
* `cloudflare.config.ts` files. Adds an optional `entrypoint` field to
|
|
592
|
-
* schema.
|
|
620
|
+
* `cloudflare.config.ts` files. Adds an optional string `entrypoint` field to
|
|
621
|
+
* the base schema.
|
|
593
622
|
*/
|
|
594
623
|
declare const InputWorkerSchema: z.ZodObject<{
|
|
595
624
|
name: z.ZodString;
|
|
@@ -630,14 +659,19 @@ declare const InputWorkerSchema: z.ZodObject<{
|
|
|
630
659
|
}, z.core.$strict>, z.ZodObject<{
|
|
631
660
|
type: z.ZodLiteral<"scheduled">;
|
|
632
661
|
schedule: z.ZodString;
|
|
662
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
663
|
+
type: z.ZodLiteral<"connect">;
|
|
664
|
+
protocol: z.ZodLiteral<"tcp">;
|
|
665
|
+
port: z.ZodNumber;
|
|
666
|
+
address: z.ZodOptional<z.ZodString>;
|
|
633
667
|
}, z.core.$strict>, z.ZodObject<{
|
|
634
668
|
type: z.ZodLiteral<"connect">;
|
|
635
|
-
protocol: z.
|
|
636
|
-
tcp: "tcp";
|
|
637
|
-
}>;
|
|
669
|
+
protocol: z.ZodLiteral<"udp">;
|
|
638
670
|
port: z.ZodNumber;
|
|
639
671
|
address: z.ZodOptional<z.ZodString>;
|
|
640
|
-
|
|
672
|
+
idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
maxPendingBytes: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
}, z.core.$strict>], "protocol">], "type">>>;
|
|
641
675
|
tailConsumers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
642
676
|
worker: z.ZodString;
|
|
643
677
|
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -740,13 +774,24 @@ declare const InputWorkerSchema: z.ZodObject<{
|
|
|
740
774
|
cache: z.ZodOptional<z.ZodObject<{
|
|
741
775
|
enabled: z.ZodBoolean;
|
|
742
776
|
}, z.core.$strict>>;
|
|
777
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
778
|
+
type: z.ZodLiteral<"workflow">;
|
|
779
|
+
name: z.ZodString;
|
|
780
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
781
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
782
|
+
}, z.core.$strict>>;
|
|
783
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
784
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
}, z.core.$strict>>;
|
|
786
|
+
schedules: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
787
|
+
default_retention: z.ZodOptional<z.ZodObject<{
|
|
788
|
+
success_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
789
|
+
error_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
790
|
+
}, z.core.$strict>>;
|
|
743
791
|
}, z.core.$strict>]>>>;
|
|
744
|
-
entrypoint: z.ZodOptional<z.
|
|
745
|
-
default: z.ZodString;
|
|
746
|
-
}, z.core.$strict>]>, z.ZodTransform<string, string | {
|
|
747
|
-
default: string;
|
|
748
|
-
}>>>;
|
|
792
|
+
entrypoint: z.ZodOptional<z.ZodString>;
|
|
749
793
|
}, z.core.$strict>;
|
|
794
|
+
type InputWorkerConfig = z.input<typeof InputWorkerSchema>;
|
|
750
795
|
type ParsedInputWorkerConfig = z.output<typeof InputWorkerSchema>;
|
|
751
796
|
/**
|
|
752
797
|
* Input settings schema — parses the account settings at the top level of
|
|
@@ -801,14 +846,19 @@ declare const InputConfigSchema: z.ZodObject<{
|
|
|
801
846
|
}, z.core.$strict>, z.ZodObject<{
|
|
802
847
|
type: z.ZodLiteral<"scheduled">;
|
|
803
848
|
schedule: z.ZodString;
|
|
849
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
850
|
+
type: z.ZodLiteral<"connect">;
|
|
851
|
+
protocol: z.ZodLiteral<"tcp">;
|
|
852
|
+
port: z.ZodNumber;
|
|
853
|
+
address: z.ZodOptional<z.ZodString>;
|
|
804
854
|
}, z.core.$strict>, z.ZodObject<{
|
|
805
855
|
type: z.ZodLiteral<"connect">;
|
|
806
|
-
protocol: z.
|
|
807
|
-
tcp: "tcp";
|
|
808
|
-
}>;
|
|
856
|
+
protocol: z.ZodLiteral<"udp">;
|
|
809
857
|
port: z.ZodNumber;
|
|
810
858
|
address: z.ZodOptional<z.ZodString>;
|
|
811
|
-
|
|
859
|
+
idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
860
|
+
maxPendingBytes: z.ZodOptional<z.ZodNumber>;
|
|
861
|
+
}, z.core.$strict>], "protocol">], "type">>>;
|
|
812
862
|
tailConsumers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
813
863
|
worker: z.ZodString;
|
|
814
864
|
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -911,12 +961,22 @@ declare const InputConfigSchema: z.ZodObject<{
|
|
|
911
961
|
cache: z.ZodOptional<z.ZodObject<{
|
|
912
962
|
enabled: z.ZodBoolean;
|
|
913
963
|
}, z.core.$strict>>;
|
|
964
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
965
|
+
type: z.ZodLiteral<"workflow">;
|
|
966
|
+
name: z.ZodString;
|
|
967
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
968
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
969
|
+
}, z.core.$strict>>;
|
|
970
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
971
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
972
|
+
}, z.core.$strict>>;
|
|
973
|
+
schedules: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
974
|
+
default_retention: z.ZodOptional<z.ZodObject<{
|
|
975
|
+
success_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
976
|
+
error_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
977
|
+
}, z.core.$strict>>;
|
|
914
978
|
}, z.core.$strict>]>>>;
|
|
915
|
-
entrypoint: z.ZodOptional<z.
|
|
916
|
-
default: z.ZodString;
|
|
917
|
-
}, z.core.$strict>]>, z.ZodTransform<string, string | {
|
|
918
|
-
default: string;
|
|
919
|
-
}>>>;
|
|
979
|
+
entrypoint: z.ZodOptional<z.ZodString>;
|
|
920
980
|
}, z.core.$strict>>;
|
|
921
981
|
containers: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
922
982
|
name: z.ZodString;
|
|
@@ -1090,14 +1150,19 @@ declare const OutputWorkerSchema: z.ZodObject<{
|
|
|
1090
1150
|
}, z.core.$strict>, z.ZodObject<{
|
|
1091
1151
|
type: z.ZodLiteral<"scheduled">;
|
|
1092
1152
|
schedule: z.ZodString;
|
|
1153
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1154
|
+
type: z.ZodLiteral<"connect">;
|
|
1155
|
+
protocol: z.ZodLiteral<"tcp">;
|
|
1156
|
+
port: z.ZodNumber;
|
|
1157
|
+
address: z.ZodOptional<z.ZodString>;
|
|
1093
1158
|
}, z.core.$strict>, z.ZodObject<{
|
|
1094
1159
|
type: z.ZodLiteral<"connect">;
|
|
1095
|
-
protocol: z.
|
|
1096
|
-
tcp: "tcp";
|
|
1097
|
-
}>;
|
|
1160
|
+
protocol: z.ZodLiteral<"udp">;
|
|
1098
1161
|
port: z.ZodNumber;
|
|
1099
1162
|
address: z.ZodOptional<z.ZodString>;
|
|
1100
|
-
|
|
1163
|
+
idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1164
|
+
maxPendingBytes: z.ZodOptional<z.ZodNumber>;
|
|
1165
|
+
}, z.core.$strict>], "protocol">], "type">>>;
|
|
1101
1166
|
tailConsumers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1102
1167
|
worker: z.ZodString;
|
|
1103
1168
|
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1200,6 +1265,20 @@ declare const OutputWorkerSchema: z.ZodObject<{
|
|
|
1200
1265
|
cache: z.ZodOptional<z.ZodObject<{
|
|
1201
1266
|
enabled: z.ZodBoolean;
|
|
1202
1267
|
}, z.core.$strict>>;
|
|
1268
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1269
|
+
type: z.ZodLiteral<"workflow">;
|
|
1270
|
+
name: z.ZodString;
|
|
1271
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
1272
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
1273
|
+
}, z.core.$strict>>;
|
|
1274
|
+
concurrency: z.ZodOptional<z.ZodObject<{
|
|
1275
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1276
|
+
}, z.core.$strict>>;
|
|
1277
|
+
schedules: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1278
|
+
default_retention: z.ZodOptional<z.ZodObject<{
|
|
1279
|
+
success_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1280
|
+
error_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1281
|
+
}, z.core.$strict>>;
|
|
1203
1282
|
}, z.core.$strict>]>>>;
|
|
1204
1283
|
manifest: z.ZodOptional<z.ZodObject<{
|
|
1205
1284
|
type: z.ZodEnum<{
|
|
@@ -1240,7 +1319,7 @@ interface GenerateTypesOptions {
|
|
|
1240
1319
|
packageName?: string;
|
|
1241
1320
|
}
|
|
1242
1321
|
/**
|
|
1243
|
-
* Generate the content for
|
|
1322
|
+
* Generate the content for a Worker types declaration file.
|
|
1244
1323
|
*
|
|
1245
1324
|
* @example
|
|
1246
1325
|
* ```typescript
|
|
@@ -1248,10 +1327,10 @@ interface GenerateTypesOptions {
|
|
|
1248
1327
|
* import { writeFileSync } from "node:fs";
|
|
1249
1328
|
*
|
|
1250
1329
|
* const content = generateTypes({
|
|
1251
|
-
* configPath: "
|
|
1330
|
+
* configPath: "../../cloudflare.config.ts",
|
|
1252
1331
|
* });
|
|
1253
1332
|
*
|
|
1254
|
-
* writeFileSync("
|
|
1333
|
+
* writeFileSync(".cloudflare/types/index.d.ts", content);
|
|
1255
1334
|
* ```
|
|
1256
1335
|
*/
|
|
1257
1336
|
declare function generateTypes({
|
|
@@ -1346,4 +1425,4 @@ declare function loadAndParseConfig(configPath: string, ctx: ConfigContext): Pro
|
|
|
1346
1425
|
/** Load and parse only account settings from the default export. */
|
|
1347
1426
|
declare function loadAndParseConfigSettings(configPath: string, ctx: ConfigContext): Promise<LoadAndParseConfigSettingsResult>;
|
|
1348
1427
|
//#endregion
|
|
1349
|
-
export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, AnalyticsEngineDatasetBindingSchema, ArtifactsBinding, AssetsBinding, AssetsSchema, BindingDevOptions, BindingSchema, Bindings, BrowserBinding, BrowserBindingSchema, CloudflareConfig, ConfigContext, type ConfigParseResult, type ConfigSettingsParseResult, ConnectTrigger, ContainerConfig, ContainerDefinition, D1Binding, D1BindingSchema, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectCreatedExportSchema, DurableObjectDeletedExport, DurableObjectDeletedExportSchema, DurableObjectExpectingTransferExport, DurableObjectExpectingTransferExportSchema, DurableObjectRenamedExport, DurableObjectRenamedExportSchema, DurableObjectTransferredExport, DurableObjectTransferredExportSchema, EmailTrigger, ExportSchema, Exports, FetchTrigger, FlagshipBinding, FlagshipBindingSchema, HyperdriveBinding, HyperdriveBindingSchema, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, InputConfigSchema, InputContainerSchema, InputSettingsSchema, InputWorkerSchema, JsonBinding, KVBindingSchema, KnownBindingSchema, KvBinding, type LoadAndParseConfigResult, type LoadAndParseConfigSettingsResult, type LoadConfigResult, LogfwdrBinding, MediaBinding, type ModuleType, ModuleTypeSchema, MtlsCertificateBinding, OutputContainerSchema, OutputRootConfigSchema, OutputWorkerSchema, type ParsedInputConfig, type ParsedInputContainerConfig, type ParsedInputSettingsConfig, type ParsedInputWorkerConfig, type ParsedOutputContainerConfig, type ParsedOutputRootConfig, type ParsedOutputWorkerConfig, PipelineBinding, QueueBinding, QueueBindingSchema, QueueConsumerTrigger, R2Binding, R2BindingSchema, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, Settings, StreamBinding, TailConsumerSchema, TextBinding, Triggers, TypedAiBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, UnsafeBinding, UnsafeBindingSchema, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WorkerBinding, WorkerBindingSchema, WorkerConfig, WorkerDefinition, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerEntrypointExportSchema, WorkerLoaderBinding, WorkerReference, WorkflowBinding, bindings, convertToWranglerConfig, defineConfig, defineContainer, defineWorker, exports, generateTypes, loadAndParseConfig, loadAndParseConfigSettings, loadConfig, registerConfigHooks, resolveAndParseConfig, resolveAndParseConfigSettings, triggers, validateSingletonBindings };
|
|
1428
|
+
export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, AnalyticsEngineDatasetBindingSchema, ArtifactsBinding, AssetsBinding, AssetsSchema, BindingDevOptions, BindingSchema, Bindings, BrowserBinding, BrowserBindingSchema, CloudflareConfig, ConfigContext, type ConfigParseResult, type ConfigSettingsParseResult, ConnectTrigger, ContainerConfig, ContainerDefinition, D1Binding, D1BindingSchema, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectCreatedExportSchema, DurableObjectDeletedExport, DurableObjectDeletedExportSchema, DurableObjectExpectingTransferExport, DurableObjectExpectingTransferExportSchema, DurableObjectRenamedExport, DurableObjectRenamedExportSchema, DurableObjectTransferredExport, DurableObjectTransferredExportSchema, EmailTrigger, ExportSchema, Exports, FetchTrigger, FlagshipBinding, FlagshipBindingSchema, HyperdriveBinding, HyperdriveBindingSchema, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, InputConfigSchema, InputContainerSchema, InputSettingsSchema, type InputWorkerConfig, InputWorkerSchema, JsonBinding, KVBindingSchema, KnownBindingSchema, KvBinding, type LoadAndParseConfigResult, type LoadAndParseConfigSettingsResult, type LoadConfigResult, LogfwdrBinding, MediaBinding, type ModuleType, ModuleTypeSchema, MtlsCertificateBinding, OutputContainerSchema, OutputRootConfigSchema, OutputWorkerSchema, type ParsedInputConfig, type ParsedInputContainerConfig, type ParsedInputSettingsConfig, type ParsedInputWorkerConfig, type ParsedOutputContainerConfig, type ParsedOutputRootConfig, type ParsedOutputWorkerConfig, PipelineBinding, QueueBinding, QueueBindingSchema, QueueConsumerTrigger, R2Binding, R2BindingSchema, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, Settings, StreamBinding, TailConsumerSchema, TextBinding, Triggers, TypedAiBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, UnsafeBinding, UnsafeBindingSchema, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WorkerBinding, WorkerBindingSchema, WorkerConfig, WorkerDefinition, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerEntrypointExportSchema, WorkerLoaderBinding, WorkerReference, WorkflowBinding, WorkflowExport, WorkflowExportOptions, WorkflowExportSchema, bindings, convertToWranglerConfig, defineConfig, defineContainer, defineWorker, exports, generateTypes, loadAndParseConfig, loadAndParseConfigSettings, loadConfig, registerConfigHooks, resolveAndParseConfig, resolveAndParseConfigSettings, triggers, validateSingletonBindings };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as triggers, i as exports$1, n as defineContainer, o as bindings, r as defineWorker, t as defineConfig } from "./public-
|
|
1
|
+
import { a as triggers, i as exports$1, n as defineContainer, o as bindings, r as defineWorker, t as defineConfig } from "./public-CvUXcSEm.mjs";
|
|
2
2
|
import * as nodeModule from "node:module";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -420,6 +420,18 @@ const WorkerEntrypointExportSchema = z.strictObject({
|
|
|
420
420
|
type: z.literal("worker"),
|
|
421
421
|
cache: z.strictObject({ enabled: z.boolean() }).optional()
|
|
422
422
|
});
|
|
423
|
+
const WorkflowRetentionSchema = z.union([z.number().int().min(1), z.string().min(1)]);
|
|
424
|
+
const WorkflowExportSchema = z.strictObject({
|
|
425
|
+
type: z.literal("workflow"),
|
|
426
|
+
name: z.string(),
|
|
427
|
+
limits: z.strictObject({ steps: z.number().int().min(1).optional() }).optional(),
|
|
428
|
+
concurrency: z.strictObject({ limit: z.number().int().min(1).optional() }).optional(),
|
|
429
|
+
schedules: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]).optional(),
|
|
430
|
+
default_retention: z.strictObject({
|
|
431
|
+
success_retention: WorkflowRetentionSchema.optional(),
|
|
432
|
+
error_retention: WorkflowRetentionSchema.optional()
|
|
433
|
+
}).optional()
|
|
434
|
+
});
|
|
423
435
|
const DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: z.literal("sqlite") });
|
|
424
436
|
const DurableObjectCreatedLegacyKvExportSchema = DurableObjectCreatedExportSchema.omit({ container: true }).extend({ storage: z.literal("legacy-kv") });
|
|
425
437
|
const DurableObjectExpectingTransferSqliteExportSchema = DurableObjectExpectingTransferExportSchema.extend({ storage: z.literal("sqlite") });
|
|
@@ -432,7 +444,8 @@ const ExportSchema = z.union([
|
|
|
432
444
|
DurableObjectTransferredExportSchema,
|
|
433
445
|
DurableObjectExpectingTransferSqliteExportSchema,
|
|
434
446
|
DurableObjectExpectingTransferLegacyKvExportSchema,
|
|
435
|
-
WorkerEntrypointExportSchema
|
|
447
|
+
WorkerEntrypointExportSchema,
|
|
448
|
+
WorkflowExportSchema
|
|
436
449
|
]);
|
|
437
450
|
const LimitsSchema = z.strictObject({
|
|
438
451
|
cpuMs: z.number().optional(),
|
|
@@ -504,12 +517,19 @@ const TriggerSchema = z.discriminatedUnion("type", [
|
|
|
504
517
|
type: z.literal("scheduled"),
|
|
505
518
|
schedule: z.string()
|
|
506
519
|
}),
|
|
507
|
-
z.strictObject({
|
|
520
|
+
z.discriminatedUnion("protocol", [z.strictObject({
|
|
508
521
|
type: z.literal("connect"),
|
|
509
|
-
protocol: z.
|
|
522
|
+
protocol: z.literal("tcp"),
|
|
510
523
|
port: z.number(),
|
|
511
524
|
address: z.string().optional()
|
|
512
|
-
})
|
|
525
|
+
}), z.strictObject({
|
|
526
|
+
type: z.literal("connect"),
|
|
527
|
+
protocol: z.literal("udp"),
|
|
528
|
+
port: z.number(),
|
|
529
|
+
address: z.string().optional(),
|
|
530
|
+
idleTimeoutMs: z.number().int().min(0).max(4294967295).optional(),
|
|
531
|
+
maxPendingBytes: z.number().int().min(0).max(4294967295).optional()
|
|
532
|
+
})])
|
|
513
533
|
]);
|
|
514
534
|
const UnsafeSchema = z.strictObject({
|
|
515
535
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
@@ -549,10 +569,10 @@ const BaseWorkerSchema = z.strictObject({
|
|
|
549
569
|
});
|
|
550
570
|
/**
|
|
551
571
|
* Input Worker schema — parses Worker definitions from user-authored
|
|
552
|
-
* `cloudflare.config.ts` files. Adds an optional `entrypoint` field to
|
|
553
|
-
* schema.
|
|
572
|
+
* `cloudflare.config.ts` files. Adds an optional string `entrypoint` field to
|
|
573
|
+
* the base schema.
|
|
554
574
|
*/
|
|
555
|
-
const InputWorkerSchema = BaseWorkerSchema.extend({ entrypoint: z.
|
|
575
|
+
const InputWorkerSchema = BaseWorkerSchema.extend({ entrypoint: z.string().optional() });
|
|
556
576
|
/**
|
|
557
577
|
* Input settings schema — parses the account settings at the top level of
|
|
558
578
|
* `cloudflare.config.ts`.
|
|
@@ -660,7 +680,7 @@ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ts-ded
|
|
|
660
680
|
//#region src/generate.ts
|
|
661
681
|
var import_dist = require_dist();
|
|
662
682
|
/**
|
|
663
|
-
* Generate the content for
|
|
683
|
+
* Generate the content for a Worker types declaration file.
|
|
664
684
|
*
|
|
665
685
|
* @example
|
|
666
686
|
* ```typescript
|
|
@@ -668,10 +688,10 @@ var import_dist = require_dist();
|
|
|
668
688
|
* import { writeFileSync } from "node:fs";
|
|
669
689
|
*
|
|
670
690
|
* const content = generateTypes({
|
|
671
|
-
* configPath: "
|
|
691
|
+
* configPath: "../../cloudflare.config.ts",
|
|
672
692
|
* });
|
|
673
693
|
*
|
|
674
|
-
* writeFileSync("
|
|
694
|
+
* writeFileSync(".cloudflare/types/index.d.ts", content);
|
|
675
695
|
* ```
|
|
676
696
|
*/
|
|
677
697
|
function generateTypes({ configPath, packageName = "@cloudflare/config" }) {
|
|
@@ -1234,7 +1254,7 @@ function convertExports(config, result) {
|
|
|
1234
1254
|
const converted = {};
|
|
1235
1255
|
const unknownExports = {};
|
|
1236
1256
|
for (const [exportName, value] of Object.entries(exports$2)) {
|
|
1237
|
-
if (value.type === "worker") {
|
|
1257
|
+
if (value.type === "worker" || value.type === "workflow") {
|
|
1238
1258
|
converted[exportName] = value;
|
|
1239
1259
|
continue;
|
|
1240
1260
|
}
|
|
@@ -1328,7 +1348,11 @@ function convertTriggers(config, result) {
|
|
|
1328
1348
|
connectHandlers.push(omitUndefined({
|
|
1329
1349
|
protocol: trigger.protocol,
|
|
1330
1350
|
port: trigger.port,
|
|
1331
|
-
address: trigger.address
|
|
1351
|
+
address: trigger.address,
|
|
1352
|
+
...trigger.protocol === "udp" ? {
|
|
1353
|
+
idle_timeout_ms: trigger.idleTimeoutMs,
|
|
1354
|
+
max_pending_bytes: trigger.maxPendingBytes
|
|
1355
|
+
} : {}
|
|
1332
1356
|
}));
|
|
1333
1357
|
break;
|
|
1334
1358
|
}
|
|
@@ -1530,6 +1554,13 @@ async function normalizeWorkerReferences(resolved, resolveDefinition) {
|
|
|
1530
1554
|
env
|
|
1531
1555
|
};
|
|
1532
1556
|
}
|
|
1557
|
+
function normalizeWorkerEntrypoint(resolved) {
|
|
1558
|
+
if (!isRecord(resolved) || !isRecord(resolved.entrypoint) || !("default" in resolved.entrypoint)) return resolved;
|
|
1559
|
+
return {
|
|
1560
|
+
...resolved,
|
|
1561
|
+
entrypoint: resolved.entrypoint.default
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1533
1564
|
async function normalizeContainerReferences(resolved, resolveDefinition, containers) {
|
|
1534
1565
|
const issues = [];
|
|
1535
1566
|
if (!isRecord(resolved) || !isRecord(resolved.exports)) return {
|
|
@@ -1589,7 +1620,7 @@ async function normalizeContainerReferences(resolved, resolveDefinition, contain
|
|
|
1589
1620
|
};
|
|
1590
1621
|
}
|
|
1591
1622
|
async function normalizeWorkerConfig(resolved, resolveDefinition, containers) {
|
|
1592
|
-
return normalizeContainerReferences(await normalizeWorkerReferences(resolved, resolveDefinition), resolveDefinition, containers);
|
|
1623
|
+
return normalizeContainerReferences(await normalizeWorkerReferences(normalizeWorkerEntrypoint(resolved), resolveDefinition), resolveDefinition, containers);
|
|
1593
1624
|
}
|
|
1594
1625
|
function prefixIssues(issues, prefix) {
|
|
1595
1626
|
return issues.map((issue) => ({
|
|
@@ -1692,4 +1723,4 @@ async function loadAndParseConfigSettings(configPath, ctx) {
|
|
|
1692
1723
|
}
|
|
1693
1724
|
|
|
1694
1725
|
//#endregion
|
|
1695
|
-
export { AnalyticsEngineDatasetBindingSchema, AssetsSchema, BindingSchema, BrowserBindingSchema, D1BindingSchema, DurableObjectCreatedExportSchema, DurableObjectDeletedExportSchema, DurableObjectExpectingTransferExportSchema, DurableObjectRenamedExportSchema, DurableObjectTransferredExportSchema, ExportSchema, FlagshipBindingSchema, HyperdriveBindingSchema, InputConfigSchema, InputContainerSchema, InputSettingsSchema, InputWorkerSchema, KVBindingSchema, KnownBindingSchema, ModuleTypeSchema, OutputContainerSchema, OutputRootConfigSchema, OutputWorkerSchema, QueueBindingSchema, R2BindingSchema, TailConsumerSchema, UnsafeBindingSchema, WorkerBindingSchema, WorkerEntrypointExportSchema, bindings, convertToWranglerConfig, defineConfig, defineContainer, defineWorker, exports$1 as exports, generateTypes, loadAndParseConfig, loadAndParseConfigSettings, loadConfig, registerConfigHooks, resolveAndParseConfig, resolveAndParseConfigSettings, triggers, validateSingletonBindings };
|
|
1726
|
+
export { AnalyticsEngineDatasetBindingSchema, AssetsSchema, BindingSchema, BrowserBindingSchema, D1BindingSchema, DurableObjectCreatedExportSchema, DurableObjectDeletedExportSchema, DurableObjectExpectingTransferExportSchema, DurableObjectRenamedExportSchema, DurableObjectTransferredExportSchema, ExportSchema, FlagshipBindingSchema, HyperdriveBindingSchema, InputConfigSchema, InputContainerSchema, InputSettingsSchema, InputWorkerSchema, KVBindingSchema, KnownBindingSchema, ModuleTypeSchema, OutputContainerSchema, OutputRootConfigSchema, OutputWorkerSchema, QueueBindingSchema, R2BindingSchema, TailConsumerSchema, UnsafeBindingSchema, WorkerBindingSchema, WorkerEntrypointExportSchema, WorkflowExportSchema, bindings, convertToWranglerConfig, defineConfig, defineContainer, defineWorker, exports$1 as exports, generateTypes, loadAndParseConfig, loadAndParseConfigSettings, loadConfig, registerConfigHooks, resolveAndParseConfig, resolveAndParseConfigSettings, triggers, validateSingletonBindings };
|
|
@@ -188,6 +188,12 @@ function worker(options = {}) {
|
|
|
188
188
|
...options
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
+
function workflow(options) {
|
|
192
|
+
return {
|
|
193
|
+
type: "workflow",
|
|
194
|
+
...options
|
|
195
|
+
};
|
|
196
|
+
}
|
|
191
197
|
/**
|
|
192
198
|
* Exports builder for configuring Worker exports.
|
|
193
199
|
*
|
|
@@ -208,6 +214,7 @@ function worker(options = {}) {
|
|
|
208
214
|
* OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
|
|
209
215
|
* Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
|
|
210
216
|
* Incoming: exports.durableObject({ state: "expecting-transfer", storage: "sqlite", transferFrom: "source-worker" }),
|
|
217
|
+
* MyWorkflow: exports.workflow({ name: "my-workflow", limits: { steps: 100 }, schedules: "0 * * * *" }),
|
|
211
218
|
* },
|
|
212
219
|
* });
|
|
213
220
|
*
|
|
@@ -216,7 +223,8 @@ function worker(options = {}) {
|
|
|
216
223
|
*/
|
|
217
224
|
const exports = {
|
|
218
225
|
durableObject,
|
|
219
|
-
worker
|
|
226
|
+
worker,
|
|
227
|
+
workflow
|
|
220
228
|
};
|
|
221
229
|
|
|
222
230
|
//#endregion
|
|
@@ -105,6 +105,37 @@ interface WorkerEntrypointExportOptions {
|
|
|
105
105
|
interface WorkerEntrypointExport extends WorkerEntrypointExportOptions {
|
|
106
106
|
type: "worker";
|
|
107
107
|
}
|
|
108
|
+
interface WorkflowExportOptions {
|
|
109
|
+
/**
|
|
110
|
+
* The name of the Workflow. It identifies the Workflow's instances and must
|
|
111
|
+
* be unique within the account.
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
limits?: {
|
|
115
|
+
/** Maximum number of steps a single Workflow instance may run. */
|
|
116
|
+
steps?: number;
|
|
117
|
+
};
|
|
118
|
+
concurrency?: {
|
|
119
|
+
/** Maximum number of Workflow instances that can run concurrently. */
|
|
120
|
+
limit?: number;
|
|
121
|
+
};
|
|
122
|
+
/** Cron schedule(s) that automatically trigger Workflow instances. */
|
|
123
|
+
schedules?: string | string[];
|
|
124
|
+
/**
|
|
125
|
+
* Default retention for instances of this Workflow, applied when an instance
|
|
126
|
+
* does not set its own retention. Accepts milliseconds or a duration string
|
|
127
|
+
* such as `"3 days"`.
|
|
128
|
+
*/
|
|
129
|
+
default_retention?: {
|
|
130
|
+
/** How long to retain instances that completed successfully or were terminated. */
|
|
131
|
+
success_retention?: number | string;
|
|
132
|
+
/** How long to retain errored instances. */
|
|
133
|
+
error_retention?: number | string;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
interface WorkflowExport extends WorkflowExportOptions {
|
|
137
|
+
type: "workflow";
|
|
138
|
+
}
|
|
108
139
|
/**
|
|
109
140
|
* Configuration for named exports declared by the Worker. Each entry's
|
|
110
141
|
* key is the exported class name; the value configures the export.
|
|
@@ -139,6 +170,14 @@ interface Exports {
|
|
|
139
170
|
durableObject(options: DurableObjectExportOptions): DurableObjectExports;
|
|
140
171
|
/** Declares a WorkerEntrypoint export defined by this Worker. */
|
|
141
172
|
worker(options?: WorkerEntrypointExportOptions): WorkerEntrypointExport;
|
|
173
|
+
/**
|
|
174
|
+
* Declares a Workflow defined by this Worker. The export's key must name a
|
|
175
|
+
* class that extends `WorkflowEntrypoint`.
|
|
176
|
+
*
|
|
177
|
+
* For more information about Workflows, see the documentation at
|
|
178
|
+
* https://developers.cloudflare.com/workflows/
|
|
179
|
+
*/
|
|
180
|
+
workflow(options: WorkflowExportOptions): WorkflowExport;
|
|
142
181
|
}
|
|
143
182
|
/**
|
|
144
183
|
* Exports builder for configuring Worker exports.
|
|
@@ -160,6 +199,7 @@ interface Exports {
|
|
|
160
199
|
* OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
|
|
161
200
|
* Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
|
|
162
201
|
* Incoming: exports.durableObject({ state: "expecting-transfer", storage: "sqlite", transferFrom: "source-worker" }),
|
|
202
|
+
* MyWorkflow: exports.workflow({ name: "my-workflow", limits: { steps: 100 }, schedules: "0 * * * *" }),
|
|
163
203
|
* },
|
|
164
204
|
* });
|
|
165
205
|
*
|
|
@@ -456,22 +496,31 @@ interface EmailTriggerOptions {
|
|
|
456
496
|
interface EmailTrigger extends EmailTriggerOptions {
|
|
457
497
|
type: "email";
|
|
458
498
|
}
|
|
459
|
-
interface
|
|
460
|
-
/** The transport protocol to listen for. */
|
|
461
|
-
protocol: "tcp";
|
|
499
|
+
interface ConnectTriggerOptionsBase {
|
|
462
500
|
/** The port to listen on. */
|
|
463
501
|
port: number;
|
|
464
502
|
/** The address to bind to. Defaults to `127.0.0.1`. */
|
|
465
503
|
address?: string;
|
|
466
504
|
}
|
|
505
|
+
type TcpConnectTriggerOptions = ConnectTriggerOptionsBase & {
|
|
506
|
+
protocol: "tcp";
|
|
507
|
+
};
|
|
508
|
+
type UdpConnectTriggerOptions = ConnectTriggerOptionsBase & {
|
|
509
|
+
protocol: "udp";
|
|
510
|
+
/** The idle timeout in milliseconds after which a peer flow is closed. */
|
|
511
|
+
idleTimeoutMs?: number;
|
|
512
|
+
/** The maximum number of pending datagram bytes per peer flow. */
|
|
513
|
+
maxPendingBytes?: number;
|
|
514
|
+
};
|
|
515
|
+
type ConnectTriggerOptions = TcpConnectTriggerOptions | UdpConnectTriggerOptions;
|
|
467
516
|
/**
|
|
468
517
|
* Connect trigger — invokes this Worker's `connect(socket, env, ctx)`
|
|
469
518
|
* handler for raw socket connections received on the configured
|
|
470
519
|
* protocol/port.
|
|
471
520
|
*/
|
|
472
|
-
|
|
521
|
+
type ConnectTrigger = ConnectTriggerOptions & {
|
|
473
522
|
type: "connect";
|
|
474
|
-
}
|
|
523
|
+
};
|
|
475
524
|
/**
|
|
476
525
|
* Event triggers — fetch routes, queue consumers, cron schedules, Email
|
|
477
526
|
* Routing addresses, and raw sockets — that invoke this Worker.
|
|
@@ -569,9 +618,10 @@ type Trigger = ConnectTrigger | EmailTrigger | FetchTrigger | QueueConsumerTrigg
|
|
|
569
618
|
/**
|
|
570
619
|
* Union of all export definitions accepted in `exports`. Worker entries
|
|
571
620
|
* configure WorkerEntrypoint exports. Durable Object entries configure live
|
|
572
|
-
* classes and tombstone lifecycle operations.
|
|
621
|
+
* classes and tombstone lifecycle operations. Workflow entries declare the
|
|
622
|
+
* Workflows defined by the Worker.
|
|
573
623
|
*/
|
|
574
|
-
type Export = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableObjectRenamedExport | DurableObjectTransferredExport | DurableObjectExpectingTransferExport | WorkerEntrypointExport;
|
|
624
|
+
type Export = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableObjectRenamedExport | DurableObjectTransferredExport | DurableObjectExpectingTransferExport | WorkerEntrypointExport | WorkflowExport;
|
|
575
625
|
/** An image source accepted in an authored Container configuration. */
|
|
576
626
|
type ContainerImage = {
|
|
577
627
|
/** The path to a Dockerfile. */
|
|
@@ -1004,13 +1054,16 @@ interface WorkerConfig {
|
|
|
1004
1054
|
* Configuration for named exports declared by the Worker. Each entry's
|
|
1005
1055
|
* key is the exported class name; the value configures the export.
|
|
1006
1056
|
*
|
|
1007
|
-
* Only one export kind is currently supported:
|
|
1008
|
-
*
|
|
1009
1057
|
* - Construct entries with `exports.durableObject(...)`.
|
|
1010
1058
|
* - Declares Durable Object classes exported from this Worker.
|
|
1011
1059
|
* For more information about Durable Objects, see the documentation at
|
|
1012
1060
|
* https://developers.cloudflare.com/workers/learning/using-durable-objects.
|
|
1013
1061
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects.
|
|
1062
|
+
*
|
|
1063
|
+
* - Construct entries with `exports.workflow(...)`.
|
|
1064
|
+
* - Declares Workflows defined by this Worker.
|
|
1065
|
+
* For more information about Workflows, see the documentation at
|
|
1066
|
+
* https://developers.cloudflare.com/workflows/.
|
|
1014
1067
|
*/
|
|
1015
1068
|
exports?: Record<string, Export>;
|
|
1016
1069
|
}
|
|
@@ -1775,4 +1828,4 @@ interface Bindings {
|
|
|
1775
1828
|
}
|
|
1776
1829
|
declare const bindings: Bindings;
|
|
1777
1830
|
//#endregion
|
|
1778
|
-
export { Settings as $, TextBinding as A, WorkerBinding as B, QueueBinding as C, SecretsStoreSecretBinding as D, SecretBinding as E, UnsafeBinding as F, ContainerDefinition as G, WorkflowBinding as H, VectorizeBinding as I, defineConfig as J, WorkerDefinition as K, VersionMetadataBinding as L, TypedKvBinding as M, TypedPipelineBinding as N, SendEmailBinding as O, TypedQueueBinding as P, ContainerConfig as Q, VpcNetworkBinding as R, PipelineBinding as S, RateLimitBinding as T, bindings as U, WorkerLoaderBinding as V, ConfigContext as W, defineWorker as X, defineContainer as Y, CloudflareConfig as Z, JsonBinding as _, Exports as _t, AnalyticsEngineDatasetBinding as a, ScheduledTrigger as at, MediaBinding$1 as b,
|
|
1831
|
+
export { Settings as $, TextBinding as A, WorkerBinding as B, QueueBinding as C, SecretsStoreSecretBinding as D, SecretBinding as E, UnsafeBinding as F, ContainerDefinition as G, WorkflowBinding as H, VectorizeBinding as I, defineConfig as J, WorkerDefinition as K, VersionMetadataBinding as L, TypedKvBinding as M, TypedPipelineBinding as N, SendEmailBinding as O, TypedQueueBinding as P, ContainerConfig as Q, VpcNetworkBinding as R, PipelineBinding as S, exports as St, RateLimitBinding as T, bindings as U, WorkerLoaderBinding as V, ConfigContext as W, defineWorker as X, defineContainer as Y, CloudflareConfig as Z, JsonBinding as _, Exports as _t, AnalyticsEngineDatasetBinding as a, ScheduledTrigger as at, MediaBinding$1 as b, WorkflowExport as bt, BindingDevOptions as c, InferDurableNamespaces as ct, D1Binding as d, UnwrapConfig as dt, WorkerConfig as et, DispatchNamespaceBinding as f, DurableObjectCreatedExport as ft, ImagesBinding$1 as g, DurableObjectTransferredExport as gt, HyperdriveBinding as h, DurableObjectRenamedExport as ht, AiSearchNamespaceBinding as i, QueueConsumerTrigger as it, TypedAiBinding as j, StreamBinding$1 as k, Bindings as l, InferEnv as lt, FlagshipBinding as m, DurableObjectExpectingTransferExport as mt, AiBinding as n, EmailTrigger as nt, ArtifactsBinding as o, Triggers as ot, DurableObjectBinding as p, DurableObjectDeletedExport as pt, WorkerReference as q, AiSearchBinding as r, FetchTrigger as rt, AssetsBinding as s, triggers as st, AgentMemoryBinding as t, ConnectTrigger as tt, BrowserBinding as u, InferMainModule as ut, KvBinding as v, WorkerEntrypointExport as vt, R2Binding as w, MtlsCertificateBinding as x, WorkflowExportOptions as xt, LogfwdrBinding as y, WorkerEntrypointExportOptions as yt, VpcServiceBinding as z };
|
package/dist/public.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as Settings, A as TextBinding, B as WorkerBinding, C as QueueBinding, D as SecretsStoreSecretBinding, E as SecretBinding, F as UnsafeBinding, G as ContainerDefinition, H as WorkflowBinding, I as VectorizeBinding, J as defineConfig, K as WorkerDefinition, L as VersionMetadataBinding, M as TypedKvBinding, N as TypedPipelineBinding, O as SendEmailBinding, P as TypedQueueBinding, Q as ContainerConfig, R as VpcNetworkBinding, S as PipelineBinding, T as RateLimitBinding, U as bindings, V as WorkerLoaderBinding, W as ConfigContext, X as defineWorker, Y as defineContainer, Z as CloudflareConfig, _ as JsonBinding, _t as Exports, a as AnalyticsEngineDatasetBinding, at as ScheduledTrigger, b as MediaBinding, bt as
|
|
2
|
-
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, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, Settings, 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 };
|
|
1
|
+
import { $ as Settings, A as TextBinding, B as WorkerBinding, C as QueueBinding, D as SecretsStoreSecretBinding, E as SecretBinding, F as UnsafeBinding, G as ContainerDefinition, H as WorkflowBinding, I as VectorizeBinding, J as defineConfig, K as WorkerDefinition, L as VersionMetadataBinding, M as TypedKvBinding, N as TypedPipelineBinding, O as SendEmailBinding, P as TypedQueueBinding, Q as ContainerConfig, R as VpcNetworkBinding, S as PipelineBinding, St as exports, T as RateLimitBinding, U as bindings, V as WorkerLoaderBinding, W as ConfigContext, X as defineWorker, Y as defineContainer, Z as CloudflareConfig, _ as JsonBinding, _t as Exports, a as AnalyticsEngineDatasetBinding, at as ScheduledTrigger, b as MediaBinding, bt as WorkflowExport, c as BindingDevOptions, ct as InferDurableNamespaces, d as D1Binding, dt as UnwrapConfig, et as WorkerConfig, f as DispatchNamespaceBinding, ft as DurableObjectCreatedExport, g as ImagesBinding, gt as DurableObjectTransferredExport, h as HyperdriveBinding, ht as DurableObjectRenamedExport, i as AiSearchNamespaceBinding, it as QueueConsumerTrigger, j as TypedAiBinding, k as StreamBinding, l as Bindings, lt as InferEnv, m as FlagshipBinding, mt as DurableObjectExpectingTransferExport, n as AiBinding, nt as EmailTrigger, o as ArtifactsBinding, ot as Triggers, p as DurableObjectBinding, pt as DurableObjectDeletedExport, q as WorkerReference, r as AiSearchBinding, rt as FetchTrigger, s as AssetsBinding, st as triggers, t as AgentMemoryBinding, tt as ConnectTrigger, u as BrowserBinding, ut as InferMainModule, v as KvBinding, vt as WorkerEntrypointExport, w as R2Binding, x as MtlsCertificateBinding, xt as WorkflowExportOptions, y as LogfwdrBinding, yt as WorkerEntrypointExportOptions, z as VpcServiceBinding } from "./public-DpGZXvA6.mjs";
|
|
2
|
+
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, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, Settings, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WorkerBinding, WorkerConfig, WorkerDefinition, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkerReference, WorkflowBinding, WorkflowExport, WorkflowExportOptions, bindings, defineConfig, defineContainer, defineWorker, exports, triggers };
|
package/dist/public.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as triggers, i as exports, n as defineContainer, o as bindings, r as defineWorker, t as defineConfig } from "./public-
|
|
1
|
+
import { a as triggers, i as exports, n as defineContainer, o as bindings, r as defineWorker, t as defineConfig } from "./public-CvUXcSEm.mjs";
|
|
2
2
|
|
|
3
3
|
export { bindings, defineConfig, defineContainer, defineWorker, exports, triggers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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,13 +31,13 @@
|
|
|
31
31
|
"zod": "4.4.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@cloudflare/workers-types": "^5.
|
|
34
|
+
"@cloudflare/workers-types": "^5.20260923.1",
|
|
35
35
|
"ts-dedent": "^2.2.0",
|
|
36
36
|
"tsdown": "0.16.3",
|
|
37
37
|
"typescript": "5.8.3",
|
|
38
38
|
"vitest": "4.1.0",
|
|
39
39
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
40
|
-
"@cloudflare/workers-utils": "0.
|
|
40
|
+
"@cloudflare/workers-utils": "0.42.0"
|
|
41
41
|
},
|
|
42
42
|
"workers-sdk": {
|
|
43
43
|
"prerelease": true
|