@cloudflare/config 0.5.0 → 0.6.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 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, m as resolveExportDefinition, 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";
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, m as resolveExportDefinition, 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-CwG0JcrK.mjs";
2
2
  import * as z from "zod";
3
3
  import { RawConfig } from "@cloudflare/workers-utils";
4
4
 
@@ -222,6 +222,7 @@ declare const DurableObjectCreatedExportSchema: z.ZodObject<{
222
222
  sqlite: "sqlite";
223
223
  "legacy-kv": "legacy-kv";
224
224
  }>;
225
+ container: z.ZodOptional<z.ZodString>;
225
226
  }, z.core.$strict>;
226
227
  declare const DurableObjectDeletedExportSchema: z.ZodObject<{
227
228
  type: z.ZodLiteral<"durable-object">;
@@ -245,6 +246,7 @@ declare const DurableObjectExpectingTransferExportSchema: z.ZodObject<{
245
246
  "legacy-kv": "legacy-kv";
246
247
  }>;
247
248
  transferFrom: z.ZodString;
249
+ container: z.ZodOptional<z.ZodString>;
248
250
  }, z.core.$strict>;
249
251
  declare const WorkerEntrypointExportSchema: z.ZodObject<{
250
252
  type: z.ZodLiteral<"worker">;
@@ -255,10 +257,12 @@ declare const WorkerEntrypointExportSchema: z.ZodObject<{
255
257
  declare const ExportSchema: z.ZodUnion<readonly [z.ZodObject<{
256
258
  type: z.ZodLiteral<"durable-object">;
257
259
  state: z.ZodOptional<z.ZodLiteral<"created">>;
258
- storage: z.ZodEnum<{
259
- sqlite: "sqlite";
260
- "legacy-kv": "legacy-kv";
261
- }>;
260
+ container: z.ZodOptional<z.ZodString>;
261
+ storage: z.ZodLiteral<"sqlite">;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ type: z.ZodLiteral<"durable-object">;
264
+ state: z.ZodOptional<z.ZodLiteral<"created">>;
265
+ storage: z.ZodLiteral<"legacy-kv">;
262
266
  }, z.core.$strict>, z.ZodObject<{
263
267
  type: z.ZodLiteral<"durable-object">;
264
268
  state: z.ZodLiteral<"deleted">;
@@ -273,11 +277,14 @@ declare const ExportSchema: z.ZodUnion<readonly [z.ZodObject<{
273
277
  }, z.core.$strict>, z.ZodObject<{
274
278
  type: z.ZodLiteral<"durable-object">;
275
279
  state: z.ZodLiteral<"expecting-transfer">;
276
- storage: z.ZodEnum<{
277
- sqlite: "sqlite";
278
- "legacy-kv": "legacy-kv";
279
- }>;
280
280
  transferFrom: z.ZodString;
281
+ container: z.ZodOptional<z.ZodString>;
282
+ storage: z.ZodLiteral<"sqlite">;
283
+ }, z.core.$strict>, z.ZodObject<{
284
+ type: z.ZodLiteral<"durable-object">;
285
+ state: z.ZodLiteral<"expecting-transfer">;
286
+ transferFrom: z.ZodString;
287
+ storage: z.ZodLiteral<"legacy-kv">;
281
288
  }, z.core.$strict>, z.ZodObject<{
282
289
  type: z.ZodLiteral<"worker">;
283
290
  cache: z.ZodOptional<z.ZodObject<{
@@ -399,10 +406,12 @@ declare const InputWorkerSchema: z.ZodObject<{
399
406
  exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
400
407
  type: z.ZodLiteral<"durable-object">;
401
408
  state: z.ZodOptional<z.ZodLiteral<"created">>;
402
- storage: z.ZodEnum<{
403
- sqlite: "sqlite";
404
- "legacy-kv": "legacy-kv";
405
- }>;
409
+ container: z.ZodOptional<z.ZodString>;
410
+ storage: z.ZodLiteral<"sqlite">;
411
+ }, z.core.$strict>, z.ZodObject<{
412
+ type: z.ZodLiteral<"durable-object">;
413
+ state: z.ZodOptional<z.ZodLiteral<"created">>;
414
+ storage: z.ZodLiteral<"legacy-kv">;
406
415
  }, z.core.$strict>, z.ZodObject<{
407
416
  type: z.ZodLiteral<"durable-object">;
408
417
  state: z.ZodLiteral<"deleted">;
@@ -417,11 +426,14 @@ declare const InputWorkerSchema: z.ZodObject<{
417
426
  }, z.core.$strict>, z.ZodObject<{
418
427
  type: z.ZodLiteral<"durable-object">;
419
428
  state: z.ZodLiteral<"expecting-transfer">;
420
- storage: z.ZodEnum<{
421
- sqlite: "sqlite";
422
- "legacy-kv": "legacy-kv";
423
- }>;
424
429
  transferFrom: z.ZodString;
430
+ container: z.ZodOptional<z.ZodString>;
431
+ storage: z.ZodLiteral<"sqlite">;
432
+ }, z.core.$strict>, z.ZodObject<{
433
+ type: z.ZodLiteral<"durable-object">;
434
+ state: z.ZodLiteral<"expecting-transfer">;
435
+ transferFrom: z.ZodString;
436
+ storage: z.ZodLiteral<"legacy-kv">;
425
437
  }, z.core.$strict>, z.ZodObject<{
426
438
  type: z.ZodLiteral<"worker">;
427
439
  cache: z.ZodOptional<z.ZodObject<{
@@ -561,10 +573,12 @@ declare const ConfigExportsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
561
573
  exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
562
574
  type: z.ZodLiteral<"durable-object">;
563
575
  state: z.ZodOptional<z.ZodLiteral<"created">>;
564
- storage: z.ZodEnum<{
565
- sqlite: "sqlite";
566
- "legacy-kv": "legacy-kv";
567
- }>;
576
+ container: z.ZodOptional<z.ZodString>;
577
+ storage: z.ZodLiteral<"sqlite">;
578
+ }, z.core.$strict>, z.ZodObject<{
579
+ type: z.ZodLiteral<"durable-object">;
580
+ state: z.ZodOptional<z.ZodLiteral<"created">>;
581
+ storage: z.ZodLiteral<"legacy-kv">;
568
582
  }, z.core.$strict>, z.ZodObject<{
569
583
  type: z.ZodLiteral<"durable-object">;
570
584
  state: z.ZodLiteral<"deleted">;
@@ -579,11 +593,14 @@ declare const ConfigExportsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
579
593
  }, z.core.$strict>, z.ZodObject<{
580
594
  type: z.ZodLiteral<"durable-object">;
581
595
  state: z.ZodLiteral<"expecting-transfer">;
582
- storage: z.ZodEnum<{
583
- sqlite: "sqlite";
584
- "legacy-kv": "legacy-kv";
585
- }>;
586
596
  transferFrom: z.ZodString;
597
+ container: z.ZodOptional<z.ZodString>;
598
+ storage: z.ZodLiteral<"sqlite">;
599
+ }, z.core.$strict>, z.ZodObject<{
600
+ type: z.ZodLiteral<"durable-object">;
601
+ state: z.ZodLiteral<"expecting-transfer">;
602
+ transferFrom: z.ZodString;
603
+ storage: z.ZodLiteral<"legacy-kv">;
587
604
  }, z.core.$strict>, z.ZodObject<{
588
605
  type: z.ZodLiteral<"worker">;
589
606
  cache: z.ZodOptional<z.ZodObject<{
@@ -727,10 +744,12 @@ declare const OutputWorkerSchema: z.ZodObject<{
727
744
  exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
728
745
  type: z.ZodLiteral<"durable-object">;
729
746
  state: z.ZodOptional<z.ZodLiteral<"created">>;
730
- storage: z.ZodEnum<{
731
- sqlite: "sqlite";
732
- "legacy-kv": "legacy-kv";
733
- }>;
747
+ container: z.ZodOptional<z.ZodString>;
748
+ storage: z.ZodLiteral<"sqlite">;
749
+ }, z.core.$strict>, z.ZodObject<{
750
+ type: z.ZodLiteral<"durable-object">;
751
+ state: z.ZodOptional<z.ZodLiteral<"created">>;
752
+ storage: z.ZodLiteral<"legacy-kv">;
734
753
  }, z.core.$strict>, z.ZodObject<{
735
754
  type: z.ZodLiteral<"durable-object">;
736
755
  state: z.ZodLiteral<"deleted">;
@@ -745,11 +764,14 @@ declare const OutputWorkerSchema: z.ZodObject<{
745
764
  }, z.core.$strict>, z.ZodObject<{
746
765
  type: z.ZodLiteral<"durable-object">;
747
766
  state: z.ZodLiteral<"expecting-transfer">;
748
- storage: z.ZodEnum<{
749
- sqlite: "sqlite";
750
- "legacy-kv": "legacy-kv";
751
- }>;
752
767
  transferFrom: z.ZodString;
768
+ container: z.ZodOptional<z.ZodString>;
769
+ storage: z.ZodLiteral<"sqlite">;
770
+ }, z.core.$strict>, z.ZodObject<{
771
+ type: z.ZodLiteral<"durable-object">;
772
+ state: z.ZodLiteral<"expecting-transfer">;
773
+ transferFrom: z.ZodString;
774
+ storage: z.ZodLiteral<"legacy-kv">;
753
775
  }, z.core.$strict>, z.ZodObject<{
754
776
  type: z.ZodLiteral<"worker">;
755
777
  cache: z.ZodOptional<z.ZodObject<{
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as triggers, i as exports$1, n as defineWorker, o as bindings, r as resolveExportDefinition, t as defineSettings } from "./public-D2QZv1n6.mjs";
1
+ import { a as triggers, i as exports$1, n as defineWorker, o as bindings, r as resolveExportDefinition, t as defineSettings } from "./public-CgtRnd2s.mjs";
2
2
  import * as nodeModule from "node:module";
3
3
  import * as z from "zod";
4
4
  import { existsSync, readFileSync, statSync } from "node:fs";
@@ -266,7 +266,8 @@ const EnvSchema = z.record(z.string(), BindingSchema).superRefine(validateSingle
266
266
  const DurableObjectCreatedExportSchema = z.strictObject({
267
267
  type: z.literal("durable-object"),
268
268
  state: z.literal("created").optional(),
269
- storage: z.enum(["sqlite", "legacy-kv"])
269
+ storage: z.enum(["sqlite", "legacy-kv"]),
270
+ container: z.string().optional()
270
271
  });
271
272
  const DurableObjectDeletedExportSchema = z.strictObject({
272
273
  type: z.literal("durable-object"),
@@ -286,18 +287,25 @@ const DurableObjectExpectingTransferExportSchema = z.strictObject({
286
287
  type: z.literal("durable-object"),
287
288
  state: z.literal("expecting-transfer"),
288
289
  storage: z.enum(["sqlite", "legacy-kv"]),
289
- transferFrom: z.string()
290
+ transferFrom: z.string(),
291
+ container: z.string().optional()
290
292
  });
291
293
  const WorkerEntrypointExportSchema = z.strictObject({
292
294
  type: z.literal("worker"),
293
295
  cache: z.strictObject({ enabled: z.boolean() }).optional()
294
296
  });
297
+ const DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: z.literal("sqlite") });
298
+ const DurableObjectCreatedLegacyKvExportSchema = DurableObjectCreatedExportSchema.omit({ container: true }).extend({ storage: z.literal("legacy-kv") });
299
+ const DurableObjectExpectingTransferSqliteExportSchema = DurableObjectExpectingTransferExportSchema.extend({ storage: z.literal("sqlite") });
300
+ const DurableObjectExpectingTransferLegacyKvExportSchema = DurableObjectExpectingTransferExportSchema.omit({ container: true }).extend({ storage: z.literal("legacy-kv") });
295
301
  const ExportSchema = z.union([
296
- DurableObjectCreatedExportSchema,
302
+ DurableObjectCreatedSqliteExportSchema,
303
+ DurableObjectCreatedLegacyKvExportSchema,
297
304
  DurableObjectDeletedExportSchema,
298
305
  DurableObjectRenamedExportSchema,
299
306
  DurableObjectTransferredExportSchema,
300
- DurableObjectExpectingTransferExportSchema,
307
+ DurableObjectExpectingTransferSqliteExportSchema,
308
+ DurableObjectExpectingTransferLegacyKvExportSchema,
301
309
  WorkerEntrypointExportSchema
302
310
  ]);
303
311
  const LimitsSchema = z.strictObject({
@@ -559,17 +567,54 @@ var __name = (target, value) => __defProp(target, "name", {
559
567
  });
560
568
 
561
569
  //#endregion
562
- //#region ../workers-utils/dist/chunk-3K53PSCY.mjs
570
+ //#region ../workers-utils/dist/chunk-QFKPUV4H.mjs
571
+ function hasKnownExportType(entry) {
572
+ const type = entry?.type;
573
+ return type === "durable-object" || type === "worker";
574
+ }
575
+ __name(hasKnownExportType, "hasKnownExportType");
563
576
  function partitionExports(exports$2) {
564
577
  const partitioned = {
565
578
  "durable-object": {},
566
579
  worker: {}
567
580
  };
568
581
  if (exports$2 === void 0) return partitioned;
569
- for (const [name, entry] of Object.entries(exports$2)) partitioned[entry.type][name] = entry;
582
+ for (const [name, entry] of Object.entries(exports$2)) {
583
+ if (!hasKnownExportType(entry)) continue;
584
+ partitioned[entry.type][name] = entry;
585
+ }
570
586
  return partitioned;
571
587
  }
572
588
  __name(partitionExports, "partitionExports");
589
+ function getDurableObjectExports(exports$2) {
590
+ return partitionExports(exports$2)["durable-object"];
591
+ }
592
+ __name(getDurableObjectExports, "getDurableObjectExports");
593
+ function hasDurableObjectExports(exports$2) {
594
+ return Object.keys(getDurableObjectExports(exports$2)).length > 0;
595
+ }
596
+ __name(hasDurableObjectExports, "hasDurableObjectExports");
597
+ function getContainerNameToClassNameMap(exports$2) {
598
+ const containerNameToClassName = /* @__PURE__ */ new Map();
599
+ for (const [className, entry] of Object.entries(getDurableObjectExports(exports$2))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
600
+ return containerNameToClassName;
601
+ }
602
+ __name(getContainerNameToClassNameMap, "getContainerNameToClassNameMap");
603
+ function resolveContainerClassName(container, exports$2) {
604
+ if (container.class_name !== void 0) return container.class_name;
605
+ if (container.name === void 0) return;
606
+ return getContainerNameToClassNameMap(exports$2).get(container.name);
607
+ }
608
+ __name(resolveContainerClassName, "resolveContainerClassName");
609
+ function getContainerDurableObjectClassNames(containers, exports$2) {
610
+ const classNames = /* @__PURE__ */ new Set();
611
+ for (const container of containers ?? []) {
612
+ const className = resolveContainerClassName(container, exports$2);
613
+ if (className !== void 0) classNames.add(className);
614
+ }
615
+ return classNames;
616
+ }
617
+ __name(getContainerDurableObjectClassNames, "getContainerDurableObjectClassNames");
573
618
  var UserError = class extends Error {
574
619
  static {
575
620
  __name(this, "UserError");
@@ -3450,7 +3495,8 @@ function convertExports(config, result) {
3450
3495
  case "created":
3451
3496
  converted[exportName] = {
3452
3497
  type: "durable-object",
3453
- storage: value.storage
3498
+ storage: value.storage,
3499
+ ...value.storage === "sqlite" && value.container !== void 0 && { container: value.container }
3454
3500
  };
3455
3501
  break;
3456
3502
  case "deleted":
@@ -3478,7 +3524,8 @@ function convertExports(config, result) {
3478
3524
  type: "durable-object",
3479
3525
  state: "expecting-transfer",
3480
3526
  storage: value.storage,
3481
- transfer_from: value.transferFrom
3527
+ transfer_from: value.transferFrom,
3528
+ ...value.storage === "sqlite" && value.container !== void 0 && { container: value.container }
3482
3529
  };
3483
3530
  break;
3484
3531
  }
@@ -193,6 +193,7 @@ function worker(options = {}) {
193
193
  * export default defineWorker({
194
194
  * exports: {
195
195
  * MyDurableObject: exports.durableObject({ storage: "sqlite" }),
196
+ * MyContainerDO: exports.durableObject({ storage: "sqlite", container: "my-container" }),
196
197
  * OldClass: exports.durableObject({ state: "deleted" }),
197
198
  * OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
198
199
  * Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
@@ -859,6 +859,27 @@ interface Triggers {
859
859
  declare const triggers: Triggers;
860
860
  //#endregion
861
861
  //#region src/exports.d.ts
862
+ /**
863
+ * Storage backend for the Durable Object.
864
+ *
865
+ * Containers are only supported on the SQLite storage engine, so `container` is
866
+ * only offered alongside `storage: "sqlite"`.
867
+ */
868
+ type DurableObjectStorageOptions = {
869
+ /**
870
+ * Selects the SQLite-backed storage engine (recommended for new
871
+ * classes).
872
+ */
873
+ storage: "sqlite";
874
+ /**
875
+ * Attach a container to this Durable Object, by container name. The
876
+ * name must match an entry in the top level `containers` array.
877
+ */
878
+ container?: string;
879
+ } | {
880
+ /** Selects the legacy key-value storage engine. */
881
+ storage: "legacy-kv";
882
+ };
862
883
  /**
863
884
  * Declares a provisioned Durable Object class exported from this Worker.
864
885
  *
@@ -867,17 +888,9 @@ declare const triggers: Triggers;
867
888
  *
868
889
  * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
869
890
  */
870
- interface DurableObjectCreatedExportOptions {
891
+ type DurableObjectCreatedExportOptions = {
871
892
  state?: "created";
872
- /**
873
- * Storage backend for the Durable Object.
874
- *
875
- * - `"sqlite"`: selects the SQLite-backed storage engine
876
- * (recommended for new classes).
877
- * - `"legacy-kv"`: selects the legacy key-value storage engine.
878
- */
879
- storage: "sqlite" | "legacy-kv";
880
- }
893
+ } & DurableObjectStorageOptions;
881
894
  /**
882
895
  * Retire a provisioned Durable Object namespace whose class has
883
896
  * been removed from code.
@@ -917,17 +930,16 @@ interface DurableObjectTransferredExportOptions {
917
930
  * Prepare to receive cross-Worker Durable Object transfer.
918
931
  * Once the source Worker's `transferred` export is deployed, this entry becomes a normal live `durable-object` export.
919
932
  */
920
- interface DurableObjectExpectingTransferExportOptions {
933
+ type DurableObjectExpectingTransferExportOptions = {
921
934
  state: "expecting-transfer";
922
- storage: "sqlite" | "legacy-kv";
923
935
  /**
924
936
  * The source Worker for the two-phase cross-Worker transfer.
925
937
  */
926
938
  transferFrom: string;
927
- }
928
- interface DurableObjectCreatedExport extends DurableObjectCreatedExportOptions {
939
+ } & DurableObjectStorageOptions;
940
+ type DurableObjectCreatedExport = DurableObjectCreatedExportOptions & {
929
941
  type: "durable-object";
930
- }
942
+ };
931
943
  interface DurableObjectDeletedExport extends DurableObjectDeletedExportOptions {
932
944
  type: "durable-object";
933
945
  }
@@ -937,9 +949,9 @@ interface DurableObjectRenamedExport extends DurableObjectRenamedExportOptions {
937
949
  interface DurableObjectTransferredExport extends DurableObjectTransferredExportOptions {
938
950
  type: "durable-object";
939
951
  }
940
- interface DurableObjectExpectingTransferExport extends DurableObjectExpectingTransferExportOptions {
952
+ type DurableObjectExpectingTransferExport = DurableObjectExpectingTransferExportOptions & {
941
953
  type: "durable-object";
942
- }
954
+ };
943
955
  type DurableObjectExportOptions = DurableObjectCreatedExportOptions | DurableObjectDeletedExportOptions | DurableObjectRenamedExportOptions | DurableObjectTransferredExportOptions | DurableObjectExpectingTransferExportOptions;
944
956
  type DurableObjectExports = DurableObjectCreatedExport | DurableObjectDeletedExport | DurableObjectRenamedExport | DurableObjectTransferredExport | DurableObjectExpectingTransferExport;
945
957
  interface WorkerEntrypointExportOptions {
@@ -996,6 +1008,7 @@ interface Exports {
996
1008
  * export default defineWorker({
997
1009
  * exports: {
998
1010
  * MyDurableObject: exports.durableObject({ storage: "sqlite" }),
1011
+ * MyContainerDO: exports.durableObject({ storage: "sqlite", container: "my-container" }),
999
1012
  * OldClass: exports.durableObject({ state: "deleted" }),
1000
1013
  * OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
1001
1014
  * Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
package/dist/public.d.mts CHANGED
@@ -1,2 +1,2 @@
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";
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-CwG0JcrK.mjs";
2
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 triggers, i as exports, n as defineWorker, o as bindings, t as defineSettings } from "./public-D2QZv1n6.mjs";
1
+ import { a as triggers, i as exports, n as defineWorker, o as bindings, t as defineSettings } from "./public-CgtRnd2s.mjs";
2
2
 
3
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.5.0",
3
+ "version": "0.6.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.20260804.1",
34
+ "@cloudflare/workers-types": "^5.20260815.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-tsconfig": "0.0.0",
40
- "@cloudflare/workers-utils": "0.31.2"
39
+ "@cloudflare/workers-utils": "0.33.1",
40
+ "@cloudflare/workers-tsconfig": "0.0.0"
41
41
  },
42
42
  "workers-sdk": {
43
43
  "prerelease": true