@cloudflare/workers-utils 0.37.0 → 0.38.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.
@@ -1,4 +1,4 @@
1
- import { bf as TailConsumer, bj as WorkerMetadata, R as RawConfig } from './compliance-b1X-Ss7e.mjs';
1
+ import { bg as TailConsumer, bk as WorkerMetadata, R as RawConfig } from './compliance-Dta138UP.mjs';
2
2
  import { AssetConfig } from '@cloudflare/workers-shared';
3
3
  import { Cloudflare } from 'cloudflare';
4
4
  import 'node:url';
package/dist/browser.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export { constructWranglerConfig } from './chunk-CDB2RWUW.mjs';
1
+ export { constructWranglerConfig } from './chunk-S3ANQ67D.mjs';
2
2
  import './chunk-Q72B4Q5Z.mjs';
@@ -39,6 +39,15 @@ function hasDurableObjectExports(exports$1) {
39
39
  __name(hasDurableObjectExports, "hasDurableObjectExports");
40
40
 
41
41
  // src/config/containers.ts
42
+ var CONTAINER_IMAGES_BINDING = "EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES";
43
+ function isDurableObjectContainerApp(container) {
44
+ return container.scheduling_policy === "durable_object";
45
+ }
46
+ __name(isDurableObjectContainerApp, "isDurableObjectContainerApp");
47
+ function getDurableObjectContainerApps(containers) {
48
+ return Array.isArray(containers) ? containers.filter(isDurableObjectContainerApp) : [];
49
+ }
50
+ __name(getDurableObjectContainerApps, "getDurableObjectContainerApps");
42
51
  function getContainerNameToClassNameMap(exports$1) {
43
52
  const containerNameToClassName = /* @__PURE__ */ new Map();
44
53
  for (const [className, entry] of Object.entries(
@@ -3155,4 +3164,4 @@ smol-toml/dist/index.js:
3155
3164
  *)
3156
3165
  */
3157
3166
 
3158
- export { APIError, ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, applyEdits, configFileName, configFormat, dir, dist_default, experimental_readRawConfig, findWranglerConfig, format2 as format, formatConfigSnippet, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectExports, hasDurableObjectExports, indexLocation, isRedirectedConfig, isRedirectedRawConfig, modify, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation };
3167
+ export { APIError, CONTAINER_IMAGES_BINDING, ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, applyEdits, configFileName, configFormat, dir, dist_default, experimental_readRawConfig, findWranglerConfig, format2 as format, formatConfigSnippet, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectContainerApps, getDurableObjectExports, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, isRedirectedRawConfig, modify, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation };
@@ -74,6 +74,15 @@ function getComplianceRegionSubdomain(complianceConfig) {
74
74
  return getCloudflareComplianceRegion(complianceConfig) === "fedramp_high" ? ".fed" : "";
75
75
  }
76
76
  __name(getComplianceRegionSubdomain, "getComplianceRegionSubdomain");
77
+ function getCloudflareContainerRegistry(complianceConfig = COMPLIANCE_REGION_CONFIG_UNKNOWN) {
78
+ if (process.env.CLOUDFLARE_CONTAINER_REGISTRY) {
79
+ return process.env.CLOUDFLARE_CONTAINER_REGISTRY;
80
+ }
81
+ const environmentPrefix = process.env.WRANGLER_API_ENVIRONMENT === "staging" ? "staging." : "";
82
+ const complianceRegionSubdomain = getComplianceRegionSubdomain(complianceConfig);
83
+ return `${environmentPrefix}registry${complianceRegionSubdomain}.cloudflare.com`;
84
+ }
85
+ __name(getCloudflareContainerRegistry, "getCloudflareContainerRegistry");
77
86
  function getStagingSubdomain() {
78
87
  return getCloudflareApiEnvironmentFromEnv() === "staging" ? ".staging" : "";
79
88
  }
@@ -175,4 +184,4 @@ var getCloudflaredPathFromEnv = getEnvironmentVariableFactory({
175
184
  variableName: "CLOUDFLARED_PATH"
176
185
  });
177
186
 
178
- export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getNoSkillsUpdatePromptsFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, isDoNotTrackEnabled };
187
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareContainerRegistry, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getNoSkillsUpdatePromptsFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, isDoNotTrackEnabled };
@@ -1,7 +1,7 @@
1
1
  import { __name } from './chunk-Q72B4Q5Z.mjs';
2
2
 
3
3
  // src/default-compat-date.ts
4
- var DEFAULT_COMPAT_DATE = "2026-09-08";
4
+ var DEFAULT_COMPAT_DATE = "2026-09-10";
5
5
 
6
6
  // src/assert-never.ts
7
7
  function assertNever(_value) {
@@ -100,6 +100,13 @@ declare const getCloudflareApiBaseUrl: (complianceConfig: ComplianceConfig) => s
100
100
  * Compute the subdomain for the compliance region.
101
101
  */
102
102
  declare function getComplianceRegionSubdomain(complianceConfig: ComplianceConfig): string;
103
+ /**
104
+ * Returns the managed container registry for the configured API environment and compliance region.
105
+ *
106
+ * @param complianceConfig - Compliance configuration used to select the public or FedRAMP registry.
107
+ * @returns The managed registry hostname, respecting `CLOUDFLARE_CONTAINER_REGISTRY` and `WRANGLER_API_ENVIRONMENT`.
108
+ */
109
+ declare function getCloudflareContainerRegistry(complianceConfig?: ComplianceConfig): string;
103
110
  /**
104
111
  * `WRANGLER_LOG_SANITIZE` specifies whether we sanitize debug logs.
105
112
  *
@@ -758,6 +765,11 @@ interface CfDurableObjectMigrations {
758
765
  from: string;
759
766
  to: string;
760
767
  }[];
768
+ transferred_classes?: {
769
+ from: string;
770
+ from_script: string;
771
+ to: string;
772
+ }[];
761
773
  deleted_classes?: string[];
762
774
  }[];
763
775
  }
@@ -815,6 +827,7 @@ interface CfWorkerInit {
815
827
  containers: {
816
828
  name?: string;
817
829
  class_name?: string;
830
+ images?: Record<string, string>;
818
831
  }[] | undefined;
819
832
  migrations: CfDurableObjectMigrations | undefined;
820
833
  /**
@@ -1160,6 +1173,7 @@ type WorkerMetadataPut = {
1160
1173
  containers?: {
1161
1174
  name?: string;
1162
1175
  class_name?: string;
1176
+ images?: Record<string, string>;
1163
1177
  }[];
1164
1178
  package_dependencies?: Array<{
1165
1179
  name: string;
@@ -1681,7 +1695,23 @@ type UnsafeBinding = {
1681
1695
  [key: string]: unknown;
1682
1696
  };
1683
1697
  /**
1684
- * Configuration for a container application
1698
+ * An image Wrangler prepares for a Durable Object-managed container.
1699
+ */
1700
+ type DurableObjectContainerImage = {
1701
+ /**
1702
+ * Path to the Dockerfile Wrangler builds and pushes.
1703
+ */
1704
+ dockerfile: string;
1705
+ image?: never;
1706
+ } | {
1707
+ /**
1708
+ * Digest-pinned image in the account's managed registry.
1709
+ */
1710
+ image: string;
1711
+ dockerfile?: never;
1712
+ };
1713
+ /**
1714
+ * Configuration for a container application.
1685
1715
  */
1686
1716
  type ContainerObservability = {
1687
1717
  /** If observability is enabled for this container application */
@@ -1726,7 +1756,15 @@ type ContainerApp = {
1726
1756
  /**
1727
1757
  * The path to a Dockerfile, or an image URI for the Cloudflare registry.
1728
1758
  */
1729
- image: string;
1759
+ image?: string;
1760
+ /**
1761
+ * Named images available to a Durable Object-managed container through
1762
+ * `ctx.container.images` and
1763
+ * `env.EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES[className]`.
1764
+ *
1765
+ * Only supported when `scheduling_policy` is `"durable_object"`.
1766
+ */
1767
+ images?: Record<string, DurableObjectContainerImage>;
1730
1768
  /**
1731
1769
  * Build context of the application.
1732
1770
  * @optional - defaults to the directory of `image`.
@@ -1755,9 +1793,13 @@ type ContainerApp = {
1755
1793
  /**
1756
1794
  * The scheduling policy of the application
1757
1795
  * @optional
1796
+ * `"durable_object"` makes each Durable Object instance own its Container.
1797
+ * In that mode, only `name`, `class_name`, `scheduling_policy`, and `images` are
1798
+ * supported on this entry.
1799
+ *
1758
1800
  * @default "default"
1759
1801
  */
1760
- scheduling_policy?: "default" | "moon" | "regional";
1802
+ scheduling_policy?: "default" | "durable_object" | "moon" | "regional";
1761
1803
  /**
1762
1804
  * The instance type to be used for the container.
1763
1805
  * Select from one of the following named instance types:
@@ -1935,6 +1977,12 @@ type DurableObjectMigration = {
1935
1977
  from: string;
1936
1978
  to: string;
1937
1979
  }[];
1980
+ /** The Durable Objects being transferred from another Worker. */
1981
+ transferred_classes?: {
1982
+ from: string;
1983
+ from_script: string;
1984
+ to: string;
1985
+ }[];
1938
1986
  /** The Durable Objects being removed. */
1939
1987
  deleted_classes?: string[];
1940
1988
  };
@@ -3636,4 +3684,4 @@ interface EnvironmentMap {
3636
3684
  }
3637
3685
  declare const defaultWranglerConfig: Config;
3638
3686
 
3639
- export { type CfModule as $, type ApiCredentials as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfAssetsBinding as F, type CfBrowserBinding as G, type CfCapnp as H, type CfD1Database as I, type CfDataBlobBindings as J, type CfDevPluginCfg as K, type Logger as L, type CfDispatchNamespace as M, type CfDurableObject as N, type CfDurableObjectMigrations as O, type CfExports as P, type CfFlagship as Q, type RawConfig as R, type CfHelloWorld as S, type CfHyperdrive as T, type CfImagesBinding as U, type CfKvNamespace as V, type WorkerEntrypointExport as W, type CfLogfwdr as X, type CfLogfwdrBinding as Y, type CfMTlsCertificate as Z, type CfMediaBinding as _, type RedirectedRawConfig as a, type LegacyAssetPaths as a$, type CfModuleType as a0, type CfPipeline as a1, type CfPlacement as a2, type CfQueue as a3, type CfR2Bucket as a4, type CfRateLimit as a5, type CfScriptFormat as a6, type CfSecretsStoreSecrets as a7, type CfSendEmailBindings as a8, type CfService as a9, type DurableObjectBindings as aA, type DurableObjectExportStorage as aB, type DurableObjectMigration as aC, ENVIRONMENT_TAG_PREFIX as aD, type Entry as aE, type Environment as aF, type EnvironmentNonInheritable as aG, type ExportsReconciliationEntryBase as aH, type ExportsReconciliationErrorDetail as aI, type ExportsReconciliationInfo as aJ, type ExportsReconciliationRename as aK, type ExportsReconciliationResult as aL, type ExportsReconciliationTransfer as aM, type ExportsReconciliationTransferPending as aN, type ExportsReconciliationWarning as aO, type FetchKVGetValueFetcher as aP, type FetchListResultFetcher as aQ, type FetchPagedListResultFetcher as aR, type FetchResult as aS, type FetchResultFetcher as aT, type File as aU, type Hook as aV, type HookValues as aW, INHERIT_SYMBOL as aX, JSON_CONFIG_FORMATS as aY, type Json as aZ, LOGGER_LEVELS as a_, type CfStreamBinding as aa, type CfTextBlobBindings as ab, type CfUnsafe as ac, type CfUnsafeBinding as ad, type CfUserLimits as ae, type CfVars as af, type CfVectorize as ag, type CfVersionMetadataBinding as ah, type CfVpcNetwork as ai, type CfVpcService as aj, type CfWasmModuleBindings as ak, type CfWebSearch as al, type CfWorkerContext as am, type CfWorkerInit as an, type CfWorkerLoader as ao, type CfWorkerSourceMap as ap, type CfWorkflow as aq, type CloudchamberConfig as ar, type ConfigFields as as, type ConfigModuleRuleType as at, type ConfiguredExport as au, type ContainerEngine as av, type ContainerObservability as aw, type CustomDomainRoute as ax, type DispatchNamespaceOutbound as ay, type DockerConfiguration as az, type Config as b, getWranglerHideBanner as b$, type LocalS3Credentials as b0, type LogLevel as b1, type LoggerLevel as b2, type NodeJSCompatMode as b3, type Observability as b4, PATH_TO_DEPLOY_CONFIG as b5, type PreviewsConfig as b6, type RawDevConfig as b7, type RawEnvironment as b8, type Rule as b9, getCIMatchTag as bA, getCIOverrideName as bB, getCIOverrideNetworkModeHost as bC, getCfFetchEnabledFromEnv as bD, getCfFetchPathFromEnv as bE, getCloudflareApiBaseUrl as bF, getCloudflareApiEnvironmentFromEnv as bG, getCloudflareComplianceRegion as bH, getCloudflareEnv as bI, getCloudflareIncludeProcessEnvFromEnv as bJ, getCloudflareLoadDevVarsFromDotEnv as bK, getCloudflaredPathFromEnv as bL, getComplianceRegionSubdomain as bM, getD1ExtraLocationChoices as bN, getDisableConfigWatching as bO, getLocalExplorerEnabledFromEnv as bP, getLocalObservabilityEnabledFromEnv as bQ, getNoSkillsUpdatePromptsFromEnv as bR, getOpenNextDeployFromEnv as bS, getOutputFileDirectoryFromEnv as bT, getOutputFilePathFromEnv as bU, getRegistryPath as bV, getSanitizeLogs as bW, getSubdomainMixedStateCheckDisabled as bX, getTraceHeader as bY, getWorkersCIBranchName as bZ, getWranglerCacheDirFromEnv as b_, SERVICE_TAG_PREFIX as ba, type ServiceFetch as bb, type ServiceMetadataRes as bc, type StartDevWorkerInput as bd, type StreamingTailConsumer as be, type TailConsumer as bf, type Trigger as bg, type UserLimits as bh, type ValidatedAssetsOptions as bi, type WorkerMetadata as bj, type WorkflowBinding as bk, type ZoneIdRoute as bl, type ZoneNameRoute as bm, addAuthorizationHeader as bn, defaultWranglerConfig as bo, extractAccountTag as bp, extractWAFBlockRayId as bq, fetchInternalBase as br, fetchKVGetValueBase as bs, fetchListResultBase as bt, fetchResultBase as bu, getBrowserRenderingHeadfulFromEnv as bv, getBuildConditionsFromEnv as bw, getBuildPlatformFromEnv as bx, getC3CommandFromEnv as by, getCIGeneratePreviewAlias as bz, type ContainerApp as c, getWranglerSendErrorReportsFromEnv as c0, getWranglerSendMetricsFromEnv as c1, hasCursor as c2, hasMorePages as c3, isDoNotTrackEnabled as c4, isWAFBlockResponse as c5, maybeAddTraceHeader as c6, parseRetryAfterMs as c7, parseRetryAfterValue as c8, performApiFetchBase as c9, renderError as ca, throwFetchError as cb, truncate as cc, type WorkerMetadataBinding as d, type CfTailConsumer as e, type ComplianceConfig as f, type Route as g, ARTIFACTS_EVENT_TYPES as h, type Access as i, type ArtifactsEventTrigger as j, type ArtifactsEventType as k, type AssetConfigMetadata as l, type Assets as m, type AssetsOptions as n, type AsyncHook as o, type BinaryFile as p, COMPLIANCE_REGION_CONFIG_PUBLIC as q, COMPLIANCE_REGION_CONFIG_UNKNOWN as r, type CacheOptions as s, type CfAIBinding as t, type CfAISearch as u, type CfAISearchNamespace as v, type CfAccount as w, type CfAgentMemory as x, type CfAnalyticsEngineDataset as y, type CfArtifacts as z };
3687
+ export { type CfModule as $, type ApiCredentials as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfAssetsBinding as F, type CfBrowserBinding as G, type CfCapnp as H, type CfD1Database as I, type CfDataBlobBindings as J, type CfDevPluginCfg as K, type Logger as L, type CfDispatchNamespace as M, type CfDurableObject as N, type CfDurableObjectMigrations as O, type CfExports as P, type CfFlagship as Q, type RawConfig as R, type CfHelloWorld as S, type CfHyperdrive as T, type CfImagesBinding as U, type CfKvNamespace as V, type WorkerEntrypointExport as W, type CfLogfwdr as X, type CfLogfwdrBinding as Y, type CfMTlsCertificate as Z, type CfMediaBinding as _, type RedirectedRawConfig as a, LOGGER_LEVELS as a$, type CfModuleType as a0, type CfPipeline as a1, type CfPlacement as a2, type CfQueue as a3, type CfR2Bucket as a4, type CfRateLimit as a5, type CfScriptFormat as a6, type CfSecretsStoreSecrets as a7, type CfSendEmailBindings as a8, type CfService as a9, type DurableObjectBindings as aA, type DurableObjectContainerImage as aB, type DurableObjectExportStorage as aC, type DurableObjectMigration as aD, ENVIRONMENT_TAG_PREFIX as aE, type Entry as aF, type Environment as aG, type EnvironmentNonInheritable as aH, type ExportsReconciliationEntryBase as aI, type ExportsReconciliationErrorDetail as aJ, type ExportsReconciliationInfo as aK, type ExportsReconciliationRename as aL, type ExportsReconciliationResult as aM, type ExportsReconciliationTransfer as aN, type ExportsReconciliationTransferPending as aO, type ExportsReconciliationWarning as aP, type FetchKVGetValueFetcher as aQ, type FetchListResultFetcher as aR, type FetchPagedListResultFetcher as aS, type FetchResult as aT, type FetchResultFetcher as aU, type File as aV, type Hook as aW, type HookValues as aX, INHERIT_SYMBOL as aY, JSON_CONFIG_FORMATS as aZ, type Json as a_, type CfStreamBinding as aa, type CfTextBlobBindings as ab, type CfUnsafe as ac, type CfUnsafeBinding as ad, type CfUserLimits as ae, type CfVars as af, type CfVectorize as ag, type CfVersionMetadataBinding as ah, type CfVpcNetwork as ai, type CfVpcService as aj, type CfWasmModuleBindings as ak, type CfWebSearch as al, type CfWorkerContext as am, type CfWorkerInit as an, type CfWorkerLoader as ao, type CfWorkerSourceMap as ap, type CfWorkflow as aq, type CloudchamberConfig as ar, type ConfigFields as as, type ConfigModuleRuleType as at, type ConfiguredExport as au, type ContainerEngine as av, type ContainerObservability as aw, type CustomDomainRoute as ax, type DispatchNamespaceOutbound as ay, type DockerConfiguration as az, type Config as b, getWorkersCIBranchName as b$, type LegacyAssetPaths as b0, type LocalS3Credentials as b1, type LogLevel as b2, type LoggerLevel as b3, type NodeJSCompatMode as b4, type Observability as b5, PATH_TO_DEPLOY_CONFIG as b6, type PreviewsConfig as b7, type RawDevConfig as b8, type RawEnvironment as b9, getCIGeneratePreviewAlias as bA, getCIMatchTag as bB, getCIOverrideName as bC, getCIOverrideNetworkModeHost as bD, getCfFetchEnabledFromEnv as bE, getCfFetchPathFromEnv as bF, getCloudflareApiBaseUrl as bG, getCloudflareApiEnvironmentFromEnv as bH, getCloudflareComplianceRegion as bI, getCloudflareContainerRegistry as bJ, getCloudflareEnv as bK, getCloudflareIncludeProcessEnvFromEnv as bL, getCloudflareLoadDevVarsFromDotEnv as bM, getCloudflaredPathFromEnv as bN, getComplianceRegionSubdomain as bO, getD1ExtraLocationChoices as bP, getDisableConfigWatching as bQ, getLocalExplorerEnabledFromEnv as bR, getLocalObservabilityEnabledFromEnv as bS, getNoSkillsUpdatePromptsFromEnv as bT, getOpenNextDeployFromEnv as bU, getOutputFileDirectoryFromEnv as bV, getOutputFilePathFromEnv as bW, getRegistryPath as bX, getSanitizeLogs as bY, getSubdomainMixedStateCheckDisabled as bZ, getTraceHeader as b_, type Rule as ba, SERVICE_TAG_PREFIX as bb, type ServiceFetch as bc, type ServiceMetadataRes as bd, type StartDevWorkerInput as be, type StreamingTailConsumer as bf, type TailConsumer as bg, type Trigger as bh, type UserLimits as bi, type ValidatedAssetsOptions as bj, type WorkerMetadata as bk, type WorkflowBinding as bl, type ZoneIdRoute as bm, type ZoneNameRoute as bn, addAuthorizationHeader as bo, defaultWranglerConfig as bp, extractAccountTag as bq, extractWAFBlockRayId as br, fetchInternalBase as bs, fetchKVGetValueBase as bt, fetchListResultBase as bu, fetchResultBase as bv, getBrowserRenderingHeadfulFromEnv as bw, getBuildConditionsFromEnv as bx, getBuildPlatformFromEnv as by, getC3CommandFromEnv as bz, type ContainerApp as c, getWranglerCacheDirFromEnv as c0, getWranglerHideBanner as c1, getWranglerSendErrorReportsFromEnv as c2, getWranglerSendMetricsFromEnv as c3, hasCursor as c4, hasMorePages as c5, isDoNotTrackEnabled as c6, isWAFBlockResponse as c7, maybeAddTraceHeader as c8, parseRetryAfterMs as c9, parseRetryAfterValue as ca, performApiFetchBase as cb, renderError as cc, throwFetchError as cd, truncate as ce, type WorkerMetadataBinding as d, type CfTailConsumer as e, type ComplianceConfig as f, type Route as g, ARTIFACTS_EVENT_TYPES as h, type Access as i, type ArtifactsEventTrigger as j, type ArtifactsEventType as k, type AssetConfigMetadata as l, type Assets as m, type AssetsOptions as n, type AsyncHook as o, type BinaryFile as p, COMPLIANCE_REGION_CONFIG_PUBLIC as q, COMPLIANCE_REGION_CONFIG_UNKNOWN as r, type CacheOptions as s, type CfAIBinding as t, type CfAISearch as u, type CfAISearchNamespace as v, type CfAccount as w, type CfAgentMemory as x, type CfAnalyticsEngineDataset as y, type CfArtifacts as z };
@@ -1,4 +1,4 @@
1
- export { q as COMPLIANCE_REGION_CONFIG_PUBLIC, r as COMPLIANCE_REGION_CONFIG_UNKNOWN, f as ComplianceConfig, bF as getCloudflareApiBaseUrl, bH as getCloudflareComplianceRegion, bM as getComplianceRegionSubdomain } from './compliance-b1X-Ss7e.mjs';
1
+ export { q as COMPLIANCE_REGION_CONFIG_PUBLIC, r as COMPLIANCE_REGION_CONFIG_UNKNOWN, f as ComplianceConfig, bG as getCloudflareApiBaseUrl, bI as getCloudflareComplianceRegion, bJ as getCloudflareContainerRegistry, bO as getComplianceRegionSubdomain } from './compliance-Dta138UP.mjs';
2
2
  import 'node:url';
3
3
  import 'undici';
4
4
  import '@cloudflare/workers-shared';
@@ -1,4 +1,4 @@
1
- export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareApiBaseUrl, getCloudflareComplianceRegion, getComplianceRegionSubdomain } from './chunk-XUGGRRBO.mjs';
1
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareApiBaseUrl, getCloudflareComplianceRegion, getCloudflareContainerRegistry, getComplianceRegionSubdomain } from './chunk-IYSONYTF.mjs';
2
2
  import './chunk-MCNIGVAF.mjs';
3
3
  import './chunk-3IYLA2JH.mjs';
4
4
  import './chunk-WO2IAW6M.mjs';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as ContainerApp, d as WorkerMetadataBinding, e as CfTailConsumer, L as Logger, A as ApiCredentials, f as ComplianceConfig, g as Route } from './compliance-b1X-Ss7e.mjs';
2
- export { h as ARTIFACTS_EVENT_TYPES, i as Access, j as ArtifactsEventTrigger, k as ArtifactsEventType, l as AssetConfigMetadata, m as Assets, n as AssetsOptions, o as AsyncHook, p as BinaryFile, q as COMPLIANCE_REGION_CONFIG_PUBLIC, r as COMPLIANCE_REGION_CONFIG_UNKNOWN, s as CacheOptions, t as CfAIBinding, u as CfAISearch, v as CfAISearchNamespace, w as CfAccount, x as CfAgentMemory, y as CfAnalyticsEngineDataset, z as CfArtifacts, F as CfAssetsBinding, G as CfBrowserBinding, H as CfCapnp, I as CfD1Database, J as CfDataBlobBindings, K as CfDevPluginCfg, M as CfDispatchNamespace, N as CfDurableObject, O as CfDurableObjectMigrations, P as CfExports, Q as CfFlagship, S as CfHelloWorld, T as CfHyperdrive, U as CfImagesBinding, V as CfKvNamespace, X as CfLogfwdr, Y as CfLogfwdrBinding, Z as CfMTlsCertificate, _ as CfMediaBinding, $ as CfModule, a0 as CfModuleType, a1 as CfPipeline, a2 as CfPlacement, a3 as CfQueue, a4 as CfR2Bucket, a5 as CfRateLimit, a6 as CfScriptFormat, a7 as CfSecretsStoreSecrets, a8 as CfSendEmailBindings, a9 as CfService, aa as CfStreamBinding, ab as CfTextBlobBindings, ac as CfUnsafe, ad as CfUnsafeBinding, ae as CfUserLimits, af as CfVars, ag as CfVectorize, ah as CfVersionMetadataBinding, ai as CfVpcNetwork, aj as CfVpcService, ak as CfWasmModuleBindings, al as CfWebSearch, am as CfWorkerContext, an as CfWorkerInit, ao as CfWorkerLoader, ap as CfWorkerSourceMap, aq as CfWorkflow, ar as CloudchamberConfig, as as ConfigFields, at as ConfigModuleRuleType, au as ConfiguredExport, av as ContainerEngine, aw as ContainerObservability, ax as CustomDomainRoute, ay as DispatchNamespaceOutbound, az as DockerConfiguration, aA as DurableObjectBindings, aB as DurableObjectExportStorage, aC as DurableObjectMigration, aD as ENVIRONMENT_TAG_PREFIX, aE as Entry, aF as Environment, aG as EnvironmentNonInheritable, aH as ExportsReconciliationEntryBase, aI as ExportsReconciliationErrorDetail, aJ as ExportsReconciliationInfo, aK as ExportsReconciliationRename, aL as ExportsReconciliationResult, aM as ExportsReconciliationTransfer, aN as ExportsReconciliationTransferPending, aO as ExportsReconciliationWarning, aP as FetchKVGetValueFetcher, aQ as FetchListResultFetcher, aR as FetchPagedListResultFetcher, aS as FetchResult, aT as FetchResultFetcher, aU as File, aV as Hook, aW as HookValues, aX as INHERIT_SYMBOL, aY as JSON_CONFIG_FORMATS, aZ as Json, a_ as LOGGER_LEVELS, a$ as LegacyAssetPaths, b0 as LocalS3Credentials, b1 as LogLevel, b2 as LoggerLevel, b3 as NodeJSCompatMode, b4 as Observability, b5 as PATH_TO_DEPLOY_CONFIG, b6 as PreviewsConfig, b7 as RawDevConfig, b8 as RawEnvironment, a as RedirectedRawConfig, b9 as Rule, ba as SERVICE_TAG_PREFIX, bb as ServiceFetch, bc as ServiceMetadataRes, bd as StartDevWorkerInput, be as StreamingTailConsumer, bf as TailConsumer, bg as Trigger, bh as UserLimits, bi as ValidatedAssetsOptions, bj as WorkerMetadata, bk as WorkflowBinding, bl as ZoneIdRoute, bm as ZoneNameRoute, bn as addAuthorizationHeader, bo as defaultWranglerConfig, bp as extractAccountTag, bq as extractWAFBlockRayId, br as fetchInternalBase, bs as fetchKVGetValueBase, bt as fetchListResultBase, bu as fetchResultBase, bv as getBrowserRenderingHeadfulFromEnv, bw as getBuildConditionsFromEnv, bx as getBuildPlatformFromEnv, by as getC3CommandFromEnv, bz as getCIGeneratePreviewAlias, bA as getCIMatchTag, bB as getCIOverrideName, bC as getCIOverrideNetworkModeHost, bD as getCfFetchEnabledFromEnv, bE as getCfFetchPathFromEnv, bF as getCloudflareApiBaseUrl, bG as getCloudflareApiEnvironmentFromEnv, bH as getCloudflareComplianceRegion, bI as getCloudflareEnv, bJ as getCloudflareIncludeProcessEnvFromEnv, bK as getCloudflareLoadDevVarsFromDotEnv, bL as getCloudflaredPathFromEnv, bM as getComplianceRegionSubdomain, bN as getD1ExtraLocationChoices, bO as getDisableConfigWatching, bP as getLocalExplorerEnabledFromEnv, bQ as getLocalObservabilityEnabledFromEnv, bR as getNoSkillsUpdatePromptsFromEnv, bS as getOpenNextDeployFromEnv, bT as getOutputFileDirectoryFromEnv, bU as getOutputFilePathFromEnv, bV as getRegistryPath, bW as getSanitizeLogs, bX as getSubdomainMixedStateCheckDisabled, bY as getTraceHeader, bZ as getWorkersCIBranchName, b_ as getWranglerCacheDirFromEnv, b$ as getWranglerHideBanner, c0 as getWranglerSendErrorReportsFromEnv, c1 as getWranglerSendMetricsFromEnv, c2 as hasCursor, c3 as hasMorePages, c4 as isDoNotTrackEnabled, c5 as isWAFBlockResponse, c6 as maybeAddTraceHeader, c7 as parseRetryAfterMs, c8 as parseRetryAfterValue, c9 as performApiFetchBase, ca as renderError, cb as throwFetchError, cc as truncate } from './compliance-b1X-Ss7e.mjs';
1
+ import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as ContainerApp, d as WorkerMetadataBinding, e as CfTailConsumer, L as Logger, A as ApiCredentials, f as ComplianceConfig, g as Route } from './compliance-Dta138UP.mjs';
2
+ export { h as ARTIFACTS_EVENT_TYPES, i as Access, j as ArtifactsEventTrigger, k as ArtifactsEventType, l as AssetConfigMetadata, m as Assets, n as AssetsOptions, o as AsyncHook, p as BinaryFile, q as COMPLIANCE_REGION_CONFIG_PUBLIC, r as COMPLIANCE_REGION_CONFIG_UNKNOWN, s as CacheOptions, t as CfAIBinding, u as CfAISearch, v as CfAISearchNamespace, w as CfAccount, x as CfAgentMemory, y as CfAnalyticsEngineDataset, z as CfArtifacts, F as CfAssetsBinding, G as CfBrowserBinding, H as CfCapnp, I as CfD1Database, J as CfDataBlobBindings, K as CfDevPluginCfg, M as CfDispatchNamespace, N as CfDurableObject, O as CfDurableObjectMigrations, P as CfExports, Q as CfFlagship, S as CfHelloWorld, T as CfHyperdrive, U as CfImagesBinding, V as CfKvNamespace, X as CfLogfwdr, Y as CfLogfwdrBinding, Z as CfMTlsCertificate, _ as CfMediaBinding, $ as CfModule, a0 as CfModuleType, a1 as CfPipeline, a2 as CfPlacement, a3 as CfQueue, a4 as CfR2Bucket, a5 as CfRateLimit, a6 as CfScriptFormat, a7 as CfSecretsStoreSecrets, a8 as CfSendEmailBindings, a9 as CfService, aa as CfStreamBinding, ab as CfTextBlobBindings, ac as CfUnsafe, ad as CfUnsafeBinding, ae as CfUserLimits, af as CfVars, ag as CfVectorize, ah as CfVersionMetadataBinding, ai as CfVpcNetwork, aj as CfVpcService, ak as CfWasmModuleBindings, al as CfWebSearch, am as CfWorkerContext, an as CfWorkerInit, ao as CfWorkerLoader, ap as CfWorkerSourceMap, aq as CfWorkflow, ar as CloudchamberConfig, as as ConfigFields, at as ConfigModuleRuleType, au as ConfiguredExport, av as ContainerEngine, aw as ContainerObservability, ax as CustomDomainRoute, ay as DispatchNamespaceOutbound, az as DockerConfiguration, aA as DurableObjectBindings, aB as DurableObjectContainerImage, aC as DurableObjectExportStorage, aD as DurableObjectMigration, aE as ENVIRONMENT_TAG_PREFIX, aF as Entry, aG as Environment, aH as EnvironmentNonInheritable, aI as ExportsReconciliationEntryBase, aJ as ExportsReconciliationErrorDetail, aK as ExportsReconciliationInfo, aL as ExportsReconciliationRename, aM as ExportsReconciliationResult, aN as ExportsReconciliationTransfer, aO as ExportsReconciliationTransferPending, aP as ExportsReconciliationWarning, aQ as FetchKVGetValueFetcher, aR as FetchListResultFetcher, aS as FetchPagedListResultFetcher, aT as FetchResult, aU as FetchResultFetcher, aV as File, aW as Hook, aX as HookValues, aY as INHERIT_SYMBOL, aZ as JSON_CONFIG_FORMATS, a_ as Json, a$ as LOGGER_LEVELS, b0 as LegacyAssetPaths, b1 as LocalS3Credentials, b2 as LogLevel, b3 as LoggerLevel, b4 as NodeJSCompatMode, b5 as Observability, b6 as PATH_TO_DEPLOY_CONFIG, b7 as PreviewsConfig, b8 as RawDevConfig, b9 as RawEnvironment, a as RedirectedRawConfig, ba as Rule, bb as SERVICE_TAG_PREFIX, bc as ServiceFetch, bd as ServiceMetadataRes, be as StartDevWorkerInput, bf as StreamingTailConsumer, bg as TailConsumer, bh as Trigger, bi as UserLimits, bj as ValidatedAssetsOptions, bk as WorkerMetadata, bl as WorkflowBinding, bm as ZoneIdRoute, bn as ZoneNameRoute, bo as addAuthorizationHeader, bp as defaultWranglerConfig, bq as extractAccountTag, br as extractWAFBlockRayId, bs as fetchInternalBase, bt as fetchKVGetValueBase, bu as fetchListResultBase, bv as fetchResultBase, bw as getBrowserRenderingHeadfulFromEnv, bx as getBuildConditionsFromEnv, by as getBuildPlatformFromEnv, bz as getC3CommandFromEnv, bA as getCIGeneratePreviewAlias, bB as getCIMatchTag, bC as getCIOverrideName, bD as getCIOverrideNetworkModeHost, bE as getCfFetchEnabledFromEnv, bF as getCfFetchPathFromEnv, bG as getCloudflareApiBaseUrl, bH as getCloudflareApiEnvironmentFromEnv, bI as getCloudflareComplianceRegion, bJ as getCloudflareContainerRegistry, bK as getCloudflareEnv, bL as getCloudflareIncludeProcessEnvFromEnv, bM as getCloudflareLoadDevVarsFromDotEnv, bN as getCloudflaredPathFromEnv, bO as getComplianceRegionSubdomain, bP as getD1ExtraLocationChoices, bQ as getDisableConfigWatching, bR as getLocalExplorerEnabledFromEnv, bS as getLocalObservabilityEnabledFromEnv, bT as getNoSkillsUpdatePromptsFromEnv, bU as getOpenNextDeployFromEnv, bV as getOutputFileDirectoryFromEnv, bW as getOutputFilePathFromEnv, bX as getRegistryPath, bY as getSanitizeLogs, bZ as getSubdomainMixedStateCheckDisabled, b_ as getTraceHeader, b$ as getWorkersCIBranchName, c0 as getWranglerCacheDirFromEnv, c1 as getWranglerHideBanner, c2 as getWranglerSendErrorReportsFromEnv, c3 as getWranglerSendMetricsFromEnv, c4 as hasCursor, c5 as hasMorePages, c6 as isDoNotTrackEnabled, c7 as isWAFBlockResponse, c8 as maybeAddTraceHeader, c9 as parseRetryAfterMs, ca as parseRetryAfterValue, cb as performApiFetchBase, cc as renderError, cd as throwFetchError, ce as truncate } from './compliance-Dta138UP.mjs';
3
3
  import * as jsoncParser from 'jsonc-parser';
4
4
  import { UserError, TelemetryMessage } from './errors.mjs';
5
5
  export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, createFatalError } from './errors.mjs';
@@ -153,6 +153,15 @@ interface PartitionedExports {
153
153
  }
154
154
  declare function partitionExports(exports: Exports | undefined): PartitionedExports;
155
155
 
156
+ /** Temporary Wrangler-owned image map until native Container image metadata is available. */
157
+ declare const CONTAINER_IMAGES_BINDING = "EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES";
158
+ type DurableObjectContainerApp = ContainerApp & {
159
+ class_name: string;
160
+ name: string;
161
+ scheduling_policy: "durable_object";
162
+ };
163
+ declare function isDurableObjectContainerApp(container: ContainerApp): container is DurableObjectContainerApp;
164
+ declare function getDurableObjectContainerApps(containers: ContainerApp[] | undefined): DurableObjectContainerApp[];
156
165
  /**
157
166
  * A container can be linked to a Durable Object from either direction:
158
167
  *
@@ -1275,4 +1284,4 @@ declare function toUrlPath(filePath: string): UrlPath;
1275
1284
  */
1276
1285
  declare const friendlyBindingNames: Record<ConfigBindingFieldName, string>;
1277
1286
 
1278
- export { APIError, ApiCredentials, Binding, type BindingLocalSupport, BunPackageManager, CfTailConsumer, CompatDate, ComplianceConfig, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, type ConvertBindingsOptions, DEFAULT_COMPAT_DATE, Diagnostics, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, type Location, Logger, type Message, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type OutputEntry, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, type PrintBindingsOptions, RawConfig, type ResolveConfigPathOptions, Route, TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, configFileName, configFormat, convertConfigToBindings, createConfigCache, experimental_patchConfig, experimental_readRawConfig, extractBindingsOfType, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isDockerfile, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, printBindings, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNamedTunnel, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validateBindingRemoteSetting, validatePagesConfig, writeOutput };
1287
+ export { APIError, ApiCredentials, Binding, type BindingLocalSupport, BunPackageManager, CONTAINER_IMAGES_BINDING, CfTailConsumer, CompatDate, ComplianceConfig, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, type ConvertBindingsOptions, DEFAULT_COMPAT_DATE, Diagnostics, type DurableObjectContainerApp, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, type Location, Logger, type Message, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type OutputEntry, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, type PrintBindingsOptions, RawConfig, type ResolveConfigPathOptions, Route, TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, configFileName, configFormat, convertConfigToBindings, createConfigCache, experimental_patchConfig, experimental_readRawConfig, extractBindingsOfType, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectContainerApps, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isDockerfile, isDurableObjectContainerApp, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, printBindings, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNamedTunnel, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validateBindingRemoteSetting, validatePagesConfig, writeOutput };
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  export { MetricsRegistry } from './chunk-Z62CVNHJ.mjs';
2
2
  export { _forceColour, formatZodError } from './chunk-7AX24RFK.mjs';
3
- import { isRedirectedRawConfig, configFileName, formatConfigSnippet, getDurableObjectExports, getContainerNameToClassNameMap, parsePackageJSON, readFileSync, ParseError, parseJSON, APIError, dir, parseTOML, modify, applyEdits, format, dist_default, parseJSONC } from './chunk-V6JSHOVJ.mjs';
4
- export { APIError, ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, configFileName, configFormat, experimental_readRawConfig, findWranglerConfig, formatConfigSnippet, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectExports, hasDurableObjectExports, indexLocation, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation } from './chunk-V6JSHOVJ.mjs';
5
- import { assertNever } from './chunk-CDB2RWUW.mjs';
6
- export { DEFAULT_COMPAT_DATE, assertNever, constructWranglerConfig, mapWorkerMetadataBindings } from './chunk-CDB2RWUW.mjs';
3
+ import { isRedirectedRawConfig, configFileName, formatConfigSnippet, getDurableObjectExports, getContainerNameToClassNameMap, parsePackageJSON, readFileSync, ParseError, parseJSON, APIError, CONTAINER_IMAGES_BINDING, dir, parseTOML, modify, applyEdits, format, dist_default, parseJSONC } from './chunk-IQDQ5WRD.mjs';
4
+ export { APIError, CONTAINER_IMAGES_BINDING, ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, configFileName, configFormat, experimental_readRawConfig, findWranglerConfig, formatConfigSnippet, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectContainerApps, getDurableObjectExports, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation } from './chunk-IQDQ5WRD.mjs';
5
+ import { assertNever } from './chunk-S3ANQ67D.mjs';
6
+ export { DEFAULT_COMPAT_DATE, assertNever, constructWranglerConfig, mapWorkerMetadataBindings } from './chunk-S3ANQ67D.mjs';
7
7
  export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './chunk-C6O4ION7.mjs';
8
- import { getCloudflareEnv, getCloudflareApiBaseUrl, getTraceHeader, getCloudflaredPathFromEnv, getOutputFilePathFromEnv, getOutputFileDirectoryFromEnv, getCIOverrideName, getWranglerCacheDirFromEnv } from './chunk-XUGGRRBO.mjs';
9
- export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getNoSkillsUpdatePromptsFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, isDoNotTrackEnabled } from './chunk-XUGGRRBO.mjs';
8
+ import { getCloudflareEnv, getCloudflareContainerRegistry, getCloudflareApiBaseUrl, getTraceHeader, getCloudflaredPathFromEnv, getOutputFilePathFromEnv, getOutputFileDirectoryFromEnv, getCIOverrideName, getWranglerCacheDirFromEnv } from './chunk-IYSONYTF.mjs';
9
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareContainerRegistry, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getNoSkillsUpdatePromptsFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, isDoNotTrackEnabled } from './chunk-IYSONYTF.mjs';
10
10
  import { dedent } from './chunk-MCNIGVAF.mjs';
11
11
  export { getBooleanEnvironmentVariableFactory, getDockerPath, getEnvironmentVariableFactory } from './chunk-3IYLA2JH.mjs';
12
12
  import { UserError, FatalError } from './chunk-WO2IAW6M.mjs';
@@ -18451,7 +18451,16 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
18451
18451
  // `name` is inheritable, so a named environment that doesn't redeclare it
18452
18452
  // still runs under the top level Worker name — fall back to it so the
18453
18453
  // generated container name isn't built from `undefined`.
18454
- validateContainerApp(envName, rawEnv.name ?? rawConfig?.name, configPath),
18454
+ validateContainerApp(
18455
+ envName,
18456
+ rawEnv.name ?? rawConfig?.name,
18457
+ configPath,
18458
+ {
18459
+ complianceConfig: {
18460
+ compliance_region: rawEnv.compliance_region ?? topLevelEnv?.compliance_region
18461
+ }
18462
+ }
18463
+ ),
18455
18464
  void 0
18456
18465
  ),
18457
18466
  send_email: notInheritable(
@@ -19903,6 +19912,15 @@ function validatePreviewsContainers(envName, configPath) {
19903
19912
  });
19904
19913
  return (diagnostics, field, value, config2) => {
19905
19914
  if (Array.isArray(value)) {
19915
+ const durableObjectPolicyFields = [...value.entries()].filter(
19916
+ ([, entry]) => entry && typeof entry === "object" && entry.scheduling_policy === "durable_object"
19917
+ ).map(([index]) => `"${field}[${index}].scheduling_policy"`);
19918
+ if (durableObjectPolicyFields.length > 0) {
19919
+ diagnostics.errors.push(
19920
+ `${durableObjectPolicyFields.join(", ")} cannot be "durable_object". Durable Object-managed Containers are configured only in the top-level "containers" array.`
19921
+ );
19922
+ return false;
19923
+ }
19906
19924
  const nameFields = [...value.entries()].filter(
19907
19925
  ([, entry]) => entry && typeof entry === "object" && "name" in entry
19908
19926
  ).map(([index]) => `"${field}[${index}].name"`);
@@ -19937,6 +19955,85 @@ function validatePreviewsContainers(envName, configPath) {
19937
19955
  };
19938
19956
  }
19939
19957
  __name(validatePreviewsContainers, "validatePreviewsContainers");
19958
+ function validateDurableObjectContainerImages(diagnostics, field, images, complianceConfig) {
19959
+ if (images === void 0) {
19960
+ return true;
19961
+ }
19962
+ if (typeof images !== "object" || images === null || Array.isArray(images) || Object.keys(images).length === 0) {
19963
+ diagnostics.errors.push(
19964
+ `"${field}" must be a non-empty object when present.`
19965
+ );
19966
+ return false;
19967
+ }
19968
+ let valid = true;
19969
+ const entries = Object.entries(images);
19970
+ if (entries.length > 100) {
19971
+ diagnostics.errors.push(`"${field}" must contain at most 100 images.`);
19972
+ valid = false;
19973
+ }
19974
+ for (const [imageName, imageValue] of entries) {
19975
+ const imageField = `${field}.${imageName}`;
19976
+ if (imageName.length === 0 || imageName.length > 128) {
19977
+ diagnostics.errors.push(
19978
+ `"${field}" image names must be between 1 and 128 characters.`
19979
+ );
19980
+ valid = false;
19981
+ }
19982
+ if (typeof imageValue !== "object" || imageValue === null || Array.isArray(imageValue)) {
19983
+ diagnostics.errors.push(
19984
+ `"${imageField}" must be an object with either a "dockerfile" or "image" field.`
19985
+ );
19986
+ valid = false;
19987
+ continue;
19988
+ }
19989
+ const image = imageValue;
19990
+ const hasDockerfile = image.dockerfile !== void 0;
19991
+ const hasImage = image.image !== void 0;
19992
+ if (hasDockerfile === hasImage) {
19993
+ diagnostics.errors.push(
19994
+ `"${imageField}" must specify exactly one of "dockerfile" or "image".`
19995
+ );
19996
+ valid = false;
19997
+ }
19998
+ if (hasDockerfile && (typeof image.dockerfile !== "string" || image.dockerfile.length === 0)) {
19999
+ diagnostics.errors.push(
20000
+ `"${imageField}.dockerfile" must be a non-empty string.`
20001
+ );
20002
+ valid = false;
20003
+ }
20004
+ if (hasImage && (typeof image.image !== "string" || image.image.length === 0)) {
20005
+ diagnostics.errors.push(
20006
+ `"${imageField}.image" must be a non-empty string.`
20007
+ );
20008
+ valid = false;
20009
+ }
20010
+ if (typeof image.image === "string" && image.image.length > 0) {
20011
+ const registry2 = getCloudflareContainerRegistry(complianceConfig);
20012
+ const prefix = `${registry2}/`;
20013
+ const reference = image.image.slice(prefix.length);
20014
+ const digestReference = reference.match(
20015
+ /^[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*)+@sha256:[a-f0-9]{64}$/
20016
+ );
20017
+ if (!image.image.startsWith(prefix) || digestReference?.[0] !== reference) {
20018
+ diagnostics.errors.push(
20019
+ `"${imageField}.image" must be a digest-pinned image in the managed registry, in the form "${registry2}/<account-id>/<repository>@sha256:<64 lowercase hex characters>".`
20020
+ );
20021
+ valid = false;
20022
+ }
20023
+ }
20024
+ const unsupportedFields = Object.keys(image).filter(
20025
+ (property) => property !== "dockerfile" && property !== "image"
20026
+ );
20027
+ if (unsupportedFields.length > 0) {
20028
+ diagnostics.errors.push(
20029
+ `Unexpected fields found in ${imageField} field: ${unsupportedFields.map((property) => `"${property}"`).join(", ")}`
20030
+ );
20031
+ valid = false;
20032
+ }
20033
+ }
20034
+ return valid;
20035
+ }
20036
+ __name(validateDurableObjectContainerImages, "validateDurableObjectContainerImages");
19940
20037
  function validateContainerApp(envName, topLevelName, configPath, options = {}) {
19941
20038
  const { generateDefaultName = true } = options;
19942
20039
  return (diagnostics, field, value, config2) => {
@@ -19950,13 +20047,23 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
19950
20047
  return false;
19951
20048
  }
19952
20049
  for (const containerAppOptional of value) {
19953
- validateOptionalProperty(
19954
- diagnostics,
19955
- field,
19956
- "class_name",
19957
- containerAppOptional.class_name,
19958
- "string"
19959
- );
20050
+ const isDurableObjectManaged = containerAppOptional.scheduling_policy === "durable_object";
20051
+ const hasValidDurableObjectClassName = typeof containerAppOptional.class_name === "string" && containerAppOptional.class_name.length > 0;
20052
+ if (isDurableObjectManaged) {
20053
+ if (!hasValidDurableObjectClassName) {
20054
+ diagnostics.errors.push(
20055
+ `"containers.class_name" must be a non-empty string when "containers.scheduling_policy" is "durable_object".`
20056
+ );
20057
+ }
20058
+ } else {
20059
+ validateOptionalProperty(
20060
+ diagnostics,
20061
+ field,
20062
+ "class_name",
20063
+ containerAppOptional.class_name,
20064
+ "string"
20065
+ );
20066
+ }
19960
20067
  validateOptionalProperty(
19961
20068
  diagnostics,
19962
20069
  field,
@@ -19964,7 +20071,7 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
19964
20071
  containerAppOptional.name,
19965
20072
  "string"
19966
20073
  );
19967
- if (generateDefaultName && !containerAppOptional.name) {
20074
+ if (generateDefaultName && !containerAppOptional.name && (!isDurableObjectManaged || hasValidDurableObjectClassName)) {
19968
20075
  if (containerAppOptional.class_name === void 0) {
19969
20076
  diagnostics.errors.push(
19970
20077
  `"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`
@@ -19979,6 +20086,23 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
19979
20086
  containerAppOptional.name = name.toLowerCase().replace(/ /g, "-");
19980
20087
  }
19981
20088
  }
20089
+ if (isDurableObjectManaged) {
20090
+ validateDurableObjectContainerImages(
20091
+ diagnostics,
20092
+ `${field}.images`,
20093
+ containerAppOptional.images,
20094
+ options.complianceConfig
20095
+ );
20096
+ const unsupportedFields = Object.keys(containerAppOptional).filter(
20097
+ (key) => !["name", "class_name", "scheduling_policy", "images"].includes(key)
20098
+ );
20099
+ if (unsupportedFields.length > 0) {
20100
+ diagnostics.errors.push(
20101
+ `Unsupported fields for Durable Object-managed Containers in ${field}: ${unsupportedFields.map((key) => `"${key}"`).join(",")}. Only "name", "class_name", "scheduling_policy", and "images" are supported.`
20102
+ );
20103
+ }
20104
+ continue;
20105
+ }
19982
20106
  if (!containerAppOptional.configuration?.image && !containerAppOptional.image) {
19983
20107
  diagnostics.errors.push(
19984
20108
  `"containers.image" field must be defined for each container app. This should be the path to your Dockerfile or an image URI pointing to the Cloudflare registry.`
@@ -20992,6 +21116,7 @@ var validateBindingsHaveUniqueNames = /* @__PURE__ */ __name((diagnostics, confi
20992
21116
  ])
20993
21117
  );
20994
21118
  bindingsGroupedByType["Secret"] = config2.secrets?.required ?? [];
21119
+ bindingsGroupedByType["Container images"] = [CONTAINER_IMAGES_BINDING];
20995
21120
  const bindingsGroupedByName = {};
20996
21121
  for (const bindingType in bindingsGroupedByType) {
20997
21122
  const bindingNames = bindingsGroupedByType[bindingType];
@@ -24439,7 +24564,9 @@ ${allTailConsumers.map(({ service, streaming }) => {
24439
24564
  }
24440
24565
  log(
24441
24566
  `${containersTitle}
24442
- ${containers.map((c) => `- ${c.name} (${c.image})`).join("\n")}`
24567
+ ${containers.map(
24568
+ (container) => container.scheduling_policy === "durable_object" ? `- ${container.class_name} (durable_object)` : `- ${container.name} (${container.image})`
24569
+ ).join("\n")}`
24443
24570
  );
24444
24571
  log("");
24445
24572
  }