@cloudflare/config 0.2.1 → 0.4.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.
@@ -206,12 +206,43 @@ const exports = {
206
206
  worker
207
207
  };
208
208
 
209
+ //#endregion
210
+ //#region src/definition.ts
211
+ const DEFINITION = Symbol.for("@cloudflare/config:definition");
212
+ /**
213
+ * Unwrap an authored config from its value / promise / function shape, awaiting
214
+ * the result. A function config is invoked with {@link ConfigContext}.
215
+ */
216
+ async function unwrap(config, ctx) {
217
+ return typeof config === "function" ? await config(ctx) : await config;
218
+ }
219
+ /**
220
+ * Resolve any `cloudflare.config.ts` export to its plain config value.
221
+ *
222
+ * A `define*` helper stores its authored config plus `type` under the
223
+ * {@link DEFINITION} symbol; here we unwrap the config and stamp `type` back on.
224
+ * Every other export — a raw object/promise/function — is unwrapped as-is and
225
+ * already carries its own `type`. Discrimination happens afterwards via `type`.
226
+ */
227
+ async function resolveExportDefinition(def, ctx) {
228
+ if (typeof def === "object" && def !== null && DEFINITION in def) {
229
+ const { config, type } = def[DEFINITION];
230
+ return {
231
+ ...await unwrap(config, ctx),
232
+ type
233
+ };
234
+ }
235
+ return await unwrap(def, ctx);
236
+ }
237
+
209
238
  //#endregion
210
239
  //#region src/worker-definition.ts
211
- const CONFIG = Symbol.for("@cloudflare/config:worker-config");
212
240
  function defineWorker(config) {
213
241
  return {
214
- [CONFIG]: config,
242
+ [DEFINITION]: {
243
+ config,
244
+ type: "worker"
245
+ },
215
246
  durableObject(options) {
216
247
  return {
217
248
  type: "durable-object",
@@ -226,10 +257,19 @@ function defineWorker(config) {
226
257
  }
227
258
  };
228
259
  }
229
- async function resolveWorkerDefinition(def, ctx) {
230
- const raw = typeof def === "object" && def !== null && CONFIG in def ? def[CONFIG] : def;
231
- return await (typeof raw === "function" ? raw(ctx) : raw);
260
+
261
+ //#endregion
262
+ //#region src/settings-definition.ts
263
+ /**
264
+ * Declare shared settings.
265
+ * Authored as a named `settings` export.
266
+ */
267
+ function defineSettings(config) {
268
+ return { [DEFINITION]: {
269
+ config,
270
+ type: "settings"
271
+ } };
232
272
  }
233
273
 
234
274
  //#endregion
235
- export { bindings as a, triggers as i, resolveWorkerDefinition as n, exports as r, defineWorker as t };
275
+ export { triggers as a, exports as i, defineWorker as n, bindings as o, resolveExportDefinition as r, defineSettings as t };
@@ -132,7 +132,7 @@ interface D1Binding extends D1BindingOptions {
132
132
  }
133
133
  interface DispatchNamespaceBindingOptions {
134
134
  /** The namespace to bind to. */
135
- namespace: string;
135
+ namespace?: string;
136
136
  /** Details about the outbound Worker which will handle outbound requests from your namespace. */
137
137
  outbound?: {
138
138
  /** Name of the Worker handling the outbound requests. */
@@ -180,7 +180,7 @@ interface TypedDurableObjectBinding<TConfig$1, TExportName$1 extends string> ext
180
180
  }
181
181
  interface FlagshipBindingOptions {
182
182
  /** The Flagship app ID to bind to. */
183
- id: string;
183
+ id?: string;
184
184
  /** Set to `true` to suppress the remote binding warning in local dev. Flagship bindings are always remote. */
185
185
  remote?: boolean;
186
186
  }
@@ -293,7 +293,7 @@ interface TypedPipelineBinding<TRecord extends PipelineRecord = PipelineRecord>
293
293
  }
294
294
  interface QueueBindingOptions {
295
295
  /** The name of this Queue. */
296
- name: string;
296
+ name?: string;
297
297
  /** The number of seconds to wait before delivering a message. */
298
298
  deliveryDelay?: number;
299
299
  /** Whether the Queue producer should be remote or not in local development. */
@@ -600,7 +600,7 @@ interface Bindings {
600
600
  *
601
601
  * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
602
602
  */
603
- dispatchNamespace(options: DispatchNamespaceBindingOptions): DispatchNamespaceBinding;
603
+ dispatchNamespace(options?: DispatchNamespaceBindingOptions): DispatchNamespaceBinding;
604
604
  /**
605
605
  * Binding to a Durable Object class. `workerName` is the name of the Worker
606
606
  * that defines the class; `exportName` is the exported class name.
@@ -609,7 +609,7 @@ interface Bindings {
609
609
  */
610
610
  durableObject(options: DurableObjectBindingOptions): DurableObjectBinding;
611
611
  /** Binding to a Flagship feature-flag service. */
612
- flagship(options: FlagshipBindingOptions): FlagshipBinding;
612
+ flagship(options?: FlagshipBindingOptions): FlagshipBinding;
613
613
  /**
614
614
  * Binding to a Hyperdrive configuration.
615
615
  *
@@ -650,7 +650,7 @@ interface Bindings {
650
650
  *
651
651
  * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
652
652
  */
653
- queue<TBody = unknown>(options: QueueBindingOptions): TypedQueueBinding<TBody>;
653
+ queue<TBody = unknown>(options?: QueueBindingOptions): TypedQueueBinding<TBody>;
654
654
  /**
655
655
  * Binding to an R2 bucket.
656
656
  *
@@ -1006,6 +1006,32 @@ interface Exports {
1006
1006
  */
1007
1007
  declare const exports: Exports;
1008
1008
  //#endregion
1009
+ //#region src/definition.d.ts
1010
+ interface ConfigContext {
1011
+ /**
1012
+ * The mode the config is being evaluated in.
1013
+ * Set via the `--mode` CLI flag.
1014
+ * In Vite the mode defaults to `development` in `vite dev` and `production` in `vite build` ([more info](https://vite.dev/guide/env-and-mode.html#modes)).
1015
+ * In Wrangler the mode defaults to `undefined`.
1016
+ */
1017
+ mode: string | undefined;
1018
+ }
1019
+ declare const DEFINITION: unique symbol;
1020
+ /**
1021
+ * The authored config in any of its supported shapes: a plain value, a promise,
1022
+ * or a function of {@link ConfigContext}.
1023
+ */
1024
+ type ConfigInput<T$1> = T$1 | Promise<T$1> | ((ctx: ConfigContext) => T$1 | Promise<T$1>);
1025
+ /**
1026
+ * Resolve any `cloudflare.config.ts` export to its plain config value.
1027
+ *
1028
+ * A `define*` helper stores its authored config plus `type` under the
1029
+ * {@link DEFINITION} symbol; here we unwrap the config and stamp `type` back on.
1030
+ * Every other export — a raw object/promise/function — is unwrapped as-is and
1031
+ * already carries its own `type`. Discrimination happens afterwards via `type`.
1032
+ */
1033
+ declare function resolveExportDefinition(def: unknown, ctx: ConfigContext): Promise<unknown>;
1034
+ //#endregion
1009
1035
  //#region src/types.d.ts
1010
1036
  /**
1011
1037
  * Union of all binding definitions accepted in `env`.
@@ -1028,19 +1054,18 @@ type Export = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableO
1028
1054
  * Fields are validated at runtime by `InputWorkerSchema` and normalised before
1029
1055
  * being passed to downstream tooling.
1030
1056
  */
1031
- interface UserConfig {
1057
+ interface WorkerConfig {
1032
1058
  /**
1033
- * The name of your Worker.
1059
+ * Discriminates this config as a Worker config.
1060
+ *
1061
+ * Injected automatically by `defineWorker`; only needs to be written by
1062
+ * hand when authoring a raw config object without the helper.
1034
1063
  */
1035
- name: string;
1064
+ type: "worker";
1036
1065
  /**
1037
- * This is the ID of the account associated with your zone.
1038
- * You might have more than one account, so make sure to use
1039
- * the ID of the account associated with the zone/route you
1040
- * provide, if you provide one. It can also be specified through
1041
- * the CLOUDFLARE_ACCOUNT_ID environment variable.
1066
+ * The name of your Worker.
1042
1067
  */
1043
- accountId?: string;
1068
+ name: string;
1044
1069
  /**
1045
1070
  * A date in the form yyyy-mm-dd, which will be used to determine
1046
1071
  * which version of the Workers runtime is used.
@@ -1229,13 +1254,6 @@ interface UserConfig {
1229
1254
  * @default false
1230
1255
  */
1231
1256
  previewUrls?: boolean;
1232
- /**
1233
- * Specify the compliance region mode of the Worker.
1234
- *
1235
- * Although if the user does not specify a compliance region, the default is `public`,
1236
- * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
1237
- */
1238
- complianceRegion?: "public" | "fedramp-high";
1239
1257
  /**
1240
1258
  * Designates this Worker as an internal-only "first-party" Worker.
1241
1259
  *
@@ -1287,29 +1305,51 @@ interface UserConfig {
1287
1305
  */
1288
1306
  exports?: Record<string, Export>;
1289
1307
  }
1290
- //#endregion
1291
- //#region src/worker-definition.d.ts
1292
- interface ConfigContext {
1308
+ /**
1309
+ * Settings shared by the other exports.
1310
+ * Authored as a named `settings` export via
1311
+ * `defineSettings`.
1312
+ */
1313
+ interface SettingsConfig {
1293
1314
  /**
1294
- * The mode the config is being evaluated in.
1295
- * Set via the `--mode` CLI flag.
1296
- * In Vite the mode defaults to `development` in `vite dev` and `production` in `vite build` ([more info](https://vite.dev/guide/env-and-mode.html#modes)).
1297
- * In Wrangler the mode defaults to `undefined`.
1315
+ * Discriminates this config as a settings config.
1316
+ *
1317
+ * Injected automatically by `defineSettings`; only needs to be written by
1318
+ * hand when authoring a raw config object without the helper.
1298
1319
  */
1299
- mode: string | undefined;
1320
+ type: "settings";
1321
+ /**
1322
+ * This is the ID of the account associated with your zone.
1323
+ * You might have more than one account, so make sure to use
1324
+ * the ID of the account associated with the zone/route you
1325
+ * provide, if you provide one. It can also be specified through
1326
+ * the CLOUDFLARE_ACCOUNT_ID environment variable.
1327
+ */
1328
+ accountId?: string;
1329
+ /**
1330
+ * Specify the compliance region mode of the Worker.
1331
+ *
1332
+ * Although if the user does not specify a compliance region, the default is `public`,
1333
+ * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
1334
+ */
1335
+ complianceRegion?: "public" | "fedramp-high";
1300
1336
  }
1301
- declare const CONFIG: unique symbol;
1337
+ //#endregion
1338
+ //#region src/worker-definition.d.ts
1302
1339
  /**
1303
- * Base shape of a Worker definition. Carries the resolved config and the
1304
- * untyped cross-worker binding helpers.
1340
+ * Base shape of a Worker definition. Carries the authored config (under
1341
+ * {@link DEFINITION}) and the untyped cross-worker binding helpers.
1305
1342
  */
1306
- interface WorkerDefinition<TConfig$1 extends UserConfig = UserConfig> extends Pick<Bindings, "durableObject" | "worker"> {
1307
- [CONFIG]: TConfig$1 | Promise<TConfig$1> | ((ctx: ConfigContext) => TConfig$1 | Promise<TConfig$1>);
1343
+ interface WorkerDefinition<TConfig$1 extends WorkerConfig = WorkerConfig> extends Pick<Bindings, "durableObject" | "worker"> {
1344
+ [DEFINITION]: {
1345
+ config: ConfigInput<Omit<TConfig$1, "type">>;
1346
+ type: "worker";
1347
+ };
1308
1348
  }
1309
1349
  /**
1310
1350
  * Worker definition with typed cross-worker binding helpers.
1311
1351
  */
1312
- interface TypedWorkerDefinition<TConfig$1 extends UserConfig, TWorkerName extends string = InferWorkerName<TConfig$1>> extends WorkerDefinition<TConfig$1> {
1352
+ interface TypedWorkerDefinition<TConfig$1 extends WorkerConfig, TWorkerName extends string = InferWorkerName<TConfig$1>> extends WorkerDefinition<TConfig$1> {
1313
1353
  /**
1314
1354
  * Binding to a Durable Object class. `workerName` is the name of the Worker
1315
1355
  * that defines the class; `exportName` is the exported class name.
@@ -1334,10 +1374,18 @@ interface TypedWorkerDefinition<TConfig$1 extends UserConfig, TWorkerName extend
1334
1374
  remote?: boolean;
1335
1375
  }): TypedWorkerBinding<TConfig$1, TExportName$1 extends string ? TExportName$1 : "default">;
1336
1376
  }
1337
- type UserConfigExport<T$1 extends UserConfig = UserConfig> = T$1 | Promise<T$1> | ((ctx: ConfigContext) => T$1 | Promise<T$1>);
1338
- declare function defineWorker<const T$1 extends UserConfig>(config: (ctx: ConfigContext) => (UserConfig & T$1) | Promise<UserConfig & T$1>): TypedWorkerDefinition<T$1>;
1339
- declare function defineWorker<const T$1 extends UserConfig>(config: (UserConfig & T$1) | Promise<UserConfig & T$1>): TypedWorkerDefinition<T$1>;
1340
- declare function resolveWorkerDefinition(def: unknown, ctx: ConfigContext): Promise<unknown>;
1377
+ type WorkerConfigExport<T$1 extends WorkerConfig = WorkerConfig> = ConfigInput<T$1>;
1378
+ /**
1379
+ * Authored Worker config shape — {@link WorkerConfig} without the `type`
1380
+ * discriminant, which `defineWorker` injects.
1381
+ */
1382
+ type WorkerConfigInput = Omit<WorkerConfig, "type">;
1383
+ declare function defineWorker<const T$1 extends WorkerConfigInput>(config: (ctx: ConfigContext) => (WorkerConfigInput & T$1) | Promise<WorkerConfigInput & T$1>): TypedWorkerDefinition<T$1 & {
1384
+ type: "worker";
1385
+ }>;
1386
+ declare function defineWorker<const T$1 extends WorkerConfigInput>(config: (WorkerConfigInput & T$1) | Promise<WorkerConfigInput & T$1>): TypedWorkerDefinition<T$1 & {
1387
+ type: "worker";
1388
+ }>;
1341
1389
  //#endregion
1342
1390
  //#region src/inference.d.ts
1343
1391
  /**
@@ -1475,7 +1523,7 @@ type InferWorkerEntrypointExports<TUnwrappedConfig$1> = Exclude<keyof InferMainM
1475
1523
  * Unwrap function and promise types to get the underlying config.
1476
1524
  * Use this to normalize a config before passing it to other inference utilities.
1477
1525
  */
1478
- type UnwrapConfig<TConfig$1> = TConfig$1 extends WorkerDefinition<infer TUnwrappedConfig> ? TUnwrappedConfig : TConfig$1 extends UserConfigExport<infer TUnwrappedConfig> ? TUnwrappedConfig : never;
1526
+ type UnwrapConfig<TConfig$1> = TConfig$1 extends WorkerDefinition<infer TUnwrappedConfig> ? TUnwrappedConfig : TConfig$1 extends WorkerConfigExport<infer TUnwrappedConfig> ? TUnwrappedConfig : never;
1479
1527
  /**
1480
1528
  * Infer the `Env` interface type from a Worker config.
1481
1529
  *
@@ -1545,4 +1593,21 @@ type InferMainModule<TUnwrappedConfig$1> = TUnwrappedConfig$1 extends {
1545
1593
  entrypoint: infer TModule extends WorkerModule;
1546
1594
  } ? TModule : DefaultModule;
1547
1595
  //#endregion
1548
- export { StreamBinding$1 as $, AnalyticsEngineDatasetBinding as A, ImagesBinding$1 as B, ScheduledTrigger as C, AiBinding as D, AgentMemoryBinding as E, D1Binding as F, MtlsCertificateBinding as G, KvBinding as H, DispatchNamespaceBinding as I, R2Binding as J, PipelineBinding as K, DurableObjectBinding as L, AssetsBinding as M, Bindings as N, AiSearchBinding as O, BrowserBinding as P, SendEmailBinding as Q, FlagshipBinding as R, QueueConsumerTrigger as S, triggers as T, LogfwdrBinding as U, JsonBinding as V, MediaBinding$1 as W, SecretBinding as X, RateLimitBinding as Y, SecretsStoreSecretBinding as Z, WorkerEntrypointExport as _, bindings as _t, ConfigContext as a, TypedQueueBinding as at, EmailTrigger as b, defineWorker as c, UnsafeBinding as ct, DurableObjectCreatedExport as d, VpcNetworkBinding as dt, TextBinding as et, DurableObjectDeletedExport as f, VpcServiceBinding as ft, Exports as g, WorkflowBinding as gt, DurableObjectTransferredExport as h, WorkerLoaderBinding as ht, UnwrapConfig as i, TypedPipelineBinding as it, ArtifactsBinding as j, AiSearchNamespaceBinding as k, resolveWorkerDefinition as l, VectorizeBinding as lt, DurableObjectRenamedExport as m, WorkerBinding as mt, InferEnv as n, TypedDurableObjectBinding as nt, TypedWorkerDefinition as o, TypedWorkerBinding as ot, DurableObjectExpectingTransferExport as p, WebSearchBinding as pt, QueueBinding as q, InferMainModule as r, TypedKvBinding as rt, UserConfigExport as s, TypedWorkflowBinding as st, InferDurableNamespaces as t, TypedAiBinding as tt, UserConfig as u, VersionMetadataBinding as ut, WorkerEntrypointExportOptions as v, Triggers as w, FetchTrigger as x, exports as y, HyperdriveBinding as z };
1596
+ //#region src/settings-definition.d.ts
1597
+ /**
1598
+ * Authored settings config shape — {@link SettingsConfig} without the `type`
1599
+ * discriminant, which `defineSettings` injects.
1600
+ */
1601
+ type SettingsConfigInput = Omit<SettingsConfig, "type">;
1602
+ /**
1603
+ * Declare shared settings.
1604
+ * Authored as a named `settings` export.
1605
+ */
1606
+ declare function defineSettings(config: ConfigInput<SettingsConfigInput>): {
1607
+ [DEFINITION]: {
1608
+ config: ConfigInput<SettingsConfigInput>;
1609
+ type: string;
1610
+ };
1611
+ };
1612
+ //#endregion
1613
+ export { RateLimitBinding as $, AgentMemoryBinding as A, DispatchNamespaceBinding as B, exports as C, ScheduledTrigger as D, QueueConsumerTrigger as E, ArtifactsBinding as F, JsonBinding as G, FlagshipBinding as H, AssetsBinding as I, MediaBinding$1 as J, KvBinding as K, Bindings as L, AiSearchBinding as M, AiSearchNamespaceBinding as N, Triggers as O, AnalyticsEngineDatasetBinding as P, R2Binding as Q, BrowserBinding as R, WorkerEntrypointExportOptions as S, FetchTrigger as T, HyperdriveBinding as U, DurableObjectBinding as V, ImagesBinding$1 as W, PipelineBinding as X, MtlsCertificateBinding as Y, QueueBinding as Z, DurableObjectExpectingTransferExport as _, WebSearchBinding as _t, InferMainModule as a, TypedAiBinding as at, Exports as b, WorkflowBinding as bt, WorkerConfigExport as c, TypedPipelineBinding as ct, SettingsConfig as d, TypedWorkflowBinding as dt, SecretBinding as et, WorkerConfig as f, UnsafeBinding as ft, DurableObjectDeletedExport as g, VpcServiceBinding as gt, DurableObjectCreatedExport as h, VpcNetworkBinding as ht, InferEnv as i, TextBinding as it, AiBinding as j, triggers as k, WorkerConfigInput as l, TypedQueueBinding as lt, resolveExportDefinition as m, VersionMetadataBinding as mt, defineSettings as n, SendEmailBinding as nt, UnwrapConfig as o, TypedDurableObjectBinding as ot, ConfigContext as p, VectorizeBinding as pt, LogfwdrBinding as q, InferDurableNamespaces as r, StreamBinding$1 as rt, TypedWorkerDefinition as s, TypedKvBinding as st, SettingsConfigInput as t, SecretsStoreSecretBinding as tt, defineWorker as u, TypedWorkerBinding as ut, DurableObjectRenamedExport as v, WorkerBinding as vt, EmailTrigger as w, WorkerEntrypointExport as x, bindings as xt, DurableObjectTransferredExport as y, WorkerLoaderBinding as yt, D1Binding as z };
package/dist/public.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as StreamBinding, A as AnalyticsEngineDatasetBinding, B as ImagesBinding, C as ScheduledTrigger, D as AiBinding, E as AgentMemoryBinding, F as D1Binding, G as MtlsCertificateBinding, H as KvBinding, I as DispatchNamespaceBinding, J as R2Binding, K as PipelineBinding, L as DurableObjectBinding, M as AssetsBinding, N as Bindings, O as AiSearchBinding, P as BrowserBinding, Q as SendEmailBinding, R as FlagshipBinding, S as QueueConsumerTrigger, T as triggers, U as LogfwdrBinding, V as JsonBinding, W as MediaBinding, X as SecretBinding, Y as RateLimitBinding, Z as SecretsStoreSecretBinding, _ as WorkerEntrypointExport, _t as bindings, a as ConfigContext, at as TypedQueueBinding, b as EmailTrigger, c as defineWorker, ct as UnsafeBinding, d as DurableObjectCreatedExport, dt as VpcNetworkBinding, et as TextBinding, f as DurableObjectDeletedExport, ft as VpcServiceBinding, g as Exports, gt as WorkflowBinding, h as DurableObjectTransferredExport, ht as WorkerLoaderBinding, i as UnwrapConfig, it as TypedPipelineBinding, j as ArtifactsBinding, k as AiSearchNamespaceBinding, lt as VectorizeBinding, m as DurableObjectRenamedExport, mt as WorkerBinding, n as InferEnv, nt as TypedDurableObjectBinding, o as TypedWorkerDefinition, ot as TypedWorkerBinding, p as DurableObjectExpectingTransferExport, pt as WebSearchBinding, q as QueueBinding, r as InferMainModule, rt as TypedKvBinding, s as UserConfigExport, st as TypedWorkflowBinding, t as InferDurableNamespaces, tt as TypedAiBinding, u as UserConfig, ut as VersionMetadataBinding, v as WorkerEntrypointExportOptions, w as Triggers, x as FetchTrigger, y as exports, z as HyperdriveBinding } from "./public-m7PNfSwY.mjs";
2
- export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, Bindings, BrowserBinding, ConfigContext, 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, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedDurableObjectBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, TypedWorkerBinding, TypedWorkerDefinition, TypedWorkflowBinding, UnsafeBinding, UnwrapConfig, UserConfig, UserConfigExport, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WebSearchBinding, WorkerBinding, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkflowBinding, bindings, defineWorker, exports, triggers };
1
+ import { $ as RateLimitBinding, A as AgentMemoryBinding, B as DispatchNamespaceBinding, C as exports, D as ScheduledTrigger, E as QueueConsumerTrigger, F as ArtifactsBinding, G as JsonBinding, H as FlagshipBinding, I as AssetsBinding, J as MediaBinding, K as KvBinding, L as Bindings, M as AiSearchBinding, N as AiSearchNamespaceBinding, O as Triggers, P as AnalyticsEngineDatasetBinding, Q as R2Binding, R as BrowserBinding, S as WorkerEntrypointExportOptions, T as FetchTrigger, U as HyperdriveBinding, V as DurableObjectBinding, W as ImagesBinding, X as PipelineBinding, Y as MtlsCertificateBinding, Z as QueueBinding, _ as DurableObjectExpectingTransferExport, _t as WebSearchBinding, a as InferMainModule, at as TypedAiBinding, b as Exports, bt as WorkflowBinding, c as WorkerConfigExport, ct as TypedPipelineBinding, d as SettingsConfig, dt as TypedWorkflowBinding, et as SecretBinding, f as WorkerConfig, ft as UnsafeBinding, g as DurableObjectDeletedExport, gt as VpcServiceBinding, h as DurableObjectCreatedExport, ht as VpcNetworkBinding, i as InferEnv, it as TextBinding, j as AiBinding, k as triggers, l as WorkerConfigInput, lt as TypedQueueBinding, mt as VersionMetadataBinding, n as defineSettings, nt as SendEmailBinding, o as UnwrapConfig, ot as TypedDurableObjectBinding, p as ConfigContext, pt as VectorizeBinding, q as LogfwdrBinding, r as InferDurableNamespaces, rt as StreamBinding, s as TypedWorkerDefinition, st as TypedKvBinding, t as SettingsConfigInput, tt as SecretsStoreSecretBinding, u as defineWorker, ut as TypedWorkerBinding, v as DurableObjectRenamedExport, vt as WorkerBinding, w as EmailTrigger, x as WorkerEntrypointExport, xt as bindings, y as DurableObjectTransferredExport, yt as WorkerLoaderBinding, z as D1Binding } from "./public-myuV_kLK.mjs";
2
+ export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, Bindings, BrowserBinding, ConfigContext, 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 };
package/dist/public.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { a as bindings, i as triggers, r as exports, t as defineWorker } from "./public-mmLmXmLK.mjs";
1
+ import { a as triggers, i as exports, n as defineWorker, o as bindings, t as defineSettings } from "./public-D2QZv1n6.mjs";
2
2
 
3
- export { bindings, defineWorker, exports, triggers };
3
+ export { bindings, defineSettings, defineWorker, exports, triggers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/config",
3
- "version": "0.2.1",
3
+ "version": "0.4.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.20260714.1",
34
+ "@cloudflare/workers-types": "^5.20260730.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
- "@cloudflare/workers-utils": "0.27.0",
40
- "@cloudflare/workers-tsconfig": "0.0.0"
39
+ "@cloudflare/workers-tsconfig": "0.0.0",
40
+ "@cloudflare/workers-utils": "0.30.0"
41
41
  },
42
42
  "workers-sdk": {
43
43
  "prerelease": true