@cloudflare/workers-utils 0.38.1 → 0.39.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 { bg as TailConsumer, bk as WorkerMetadata, R as RawConfig } from './compliance-Dta138UP.mjs';
1
+ import { bf as TailConsumer, bj as WorkerMetadata, R as RawConfig } from './compliance-yQnxg2l5.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-KBTXSRPS.mjs';
1
+ export { constructWranglerConfig } from './chunk-5H6GBNUC.mjs';
2
2
  import './chunk-Q72B4Q5Z.mjs';
@@ -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-11";
4
+ var DEFAULT_COMPAT_DATE = "2026-09-15";
5
5
 
6
6
  // src/assert-never.ts
7
7
  function assertNever(_value) {
@@ -285,13 +285,6 @@ function mapWorkerMetadataBindings(bindings) {
285
285
  }
286
286
  ];
287
287
  break;
288
- case "websearch":
289
- {
290
- configObj.websearch = {
291
- binding: binding.name
292
- };
293
- }
294
- break;
295
288
  case "agent_memory": {
296
289
  configObj.agent_memory = [
297
290
  ...configObj.agent_memory ?? [],
@@ -48,6 +48,19 @@ function getDurableObjectContainerApps(containers) {
48
48
  return Array.isArray(containers) ? containers.filter(isDurableObjectContainerApp) : [];
49
49
  }
50
50
  __name(getDurableObjectContainerApps, "getDurableObjectContainerApps");
51
+ function getResolvedDurableObjectContainerApps(containers, exports$1) {
52
+ return getDurableObjectContainerApps(containers).map((container) => {
53
+ const className = resolveContainerClassName(container, exports$1);
54
+ if (typeof className !== "string" || className.length === 0) {
55
+ throw new UserError(
56
+ `The container "${container.name}" is not linked to a Durable Object. Either set "containers.class_name", or reference this container from a Durable Object's \`exports\` entry via its "container" field.`,
57
+ { telemetryMessage: "durable object container class unresolved" }
58
+ );
59
+ }
60
+ return { ...container, class_name: className };
61
+ });
62
+ }
63
+ __name(getResolvedDurableObjectContainerApps, "getResolvedDurableObjectContainerApps");
51
64
  function getContainerNameToClassNameMap(exports$1) {
52
65
  const containerNameToClassName = /* @__PURE__ */ new Map();
53
66
  for (const [className, entry] of Object.entries(
@@ -155,7 +168,10 @@ function validateDurableObjectContainerApplications(config, containers = getDura
155
168
  config.migrations,
156
169
  config.exports
157
170
  );
158
- for (const container of containers) {
171
+ for (const container of getResolvedDurableObjectContainerApps(
172
+ containers,
173
+ config.exports
174
+ )) {
159
175
  const maybeBoundDO = config.durable_objects.bindings.find(
160
176
  (durableObject) => durableObject.class_name === container.class_name
161
177
  );
@@ -2511,7 +2527,7 @@ var APIError = class extends ParseError {
2511
2527
  }
2512
2528
  isGatewayError() {
2513
2529
  if (this.#status !== void 0) {
2514
- return [524].includes(this.#status);
2530
+ return [502, 503, 504, 524].includes(this.#status);
2515
2531
  }
2516
2532
  return false;
2517
2533
  }
@@ -3268,4 +3284,4 @@ smol-toml/dist/index.js:
3268
3284
  *)
3269
3285
  */
3270
3286
 
3271
- 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, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, isRedirectedRawConfig, modify, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation, validateDurableObjectContainerApplications };
3287
+ 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, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getResolvedDurableObjectContainerApps, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, isRedirectedRawConfig, modify, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation, validateDurableObjectContainerApplications };
@@ -617,10 +617,6 @@ interface CfAISearch {
617
617
  instance_name: string;
618
618
  remote?: boolean;
619
619
  }
620
- interface CfWebSearch {
621
- binding: string;
622
- remote?: boolean;
623
- }
624
620
  interface CfAgentMemory {
625
621
  binding: string;
626
622
  namespace: string | typeof INHERIT_SYMBOL;
@@ -957,9 +953,6 @@ type WorkerMetadataBinding = {
957
953
  type: "ai_search";
958
954
  name: string;
959
955
  instance_name: string;
960
- } | {
961
- type: "websearch";
962
- name: string;
963
956
  } | {
964
957
  type: "agent_memory";
965
958
  name: string;
@@ -1370,8 +1363,6 @@ type Binding = {
1370
1363
  } & BindingOmit<CfAISearchNamespace>) | ({
1371
1364
  type: "ai_search";
1372
1365
  } & BindingOmit<CfAISearch>) | ({
1373
- type: "websearch";
1374
- } & BindingOmit<CfWebSearch>) | ({
1375
1366
  type: "agent_memory";
1376
1367
  } & BindingOmit<CfAgentMemory>) | ({
1377
1368
  type: "hyperdrive";
@@ -1702,6 +1693,13 @@ type DurableObjectContainerImage = {
1702
1693
  * Path to the Dockerfile Wrangler builds and pushes.
1703
1694
  */
1704
1695
  dockerfile: string;
1696
+ /**
1697
+ * Build context, relative to the Wrangler configuration file.
1698
+ * Defaults to the Dockerfile's directory.
1699
+ */
1700
+ build_context?: string;
1701
+ /** Variables available to the image only while it is being built. */
1702
+ build_vars?: Record<string, string>;
1705
1703
  image?: never;
1706
1704
  } | {
1707
1705
  /**
@@ -1709,6 +1707,8 @@ type DurableObjectContainerImage = {
1709
1707
  */
1710
1708
  image: string;
1711
1709
  dockerfile?: never;
1710
+ build_context?: never;
1711
+ build_vars?: never;
1712
1712
  };
1713
1713
  /**
1714
1714
  * Configuration for a container application.
@@ -1788,14 +1788,17 @@ type ContainerApp = {
1788
1788
  * Specify the observability behavior of this container application.
1789
1789
  *
1790
1790
  * When set, this overrides the root `observability` config for this container.
1791
+ * Durable Object-managed Containers only support enabling or disabling logs.
1792
+ * Their settings are application-wide, and omitted settings preserve the
1793
+ * existing application rather than inheriting root Worker observability.
1791
1794
  */
1792
1795
  observability?: ContainerObservability;
1793
1796
  /**
1794
1797
  * The scheduling policy of the application
1795
1798
  * @optional
1796
1799
  * `"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.
1800
+ * In that mode, `name`, `class_name`, `scheduling_policy`, `images`, and
1801
+ * application-wide log `observability` are supported on this entry.
1799
1802
  *
1800
1803
  * @default "default"
1801
1804
  */
@@ -2826,23 +2829,6 @@ interface EnvironmentNonInheritable {
2826
2829
  /** Whether the Agent Memory binding should be remote in local development */
2827
2830
  remote?: boolean;
2828
2831
  }[];
2829
- /**
2830
- * Cloudflare Web Search binding. There is exactly one shared web corpus, so the
2831
- * binding is zero-config -- only the variable name is required, declared as a
2832
- * single object (not an array).
2833
- *
2834
- * NOTE: This field is not automatically inherited from the top level environment,
2835
- * and so must be specified in every named environment.
2836
- *
2837
- * @default {}
2838
- * @nonInheritable
2839
- */
2840
- websearch: {
2841
- /** The binding name used to refer to Web Search in the Worker. */
2842
- binding: string;
2843
- /** Whether the Web Search binding should be remote or not in local development */
2844
- remote?: boolean;
2845
- } | undefined;
2846
2832
  /**
2847
2833
  * Specifies Hyperdrive configs that are bound to this Worker environment.
2848
2834
  *
@@ -3684,4 +3670,4 @@ interface EnvironmentMap {
3684
3670
  }
3685
3671
  declare const defaultWranglerConfig: Config;
3686
3672
 
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 };
3673
+ 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 DurableObjectContainerImage 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 CfWorkerContext as al, type CfWorkerInit as am, type CfWorkerLoader as an, type CfWorkerSourceMap as ao, type CfWorkflow as ap, type CloudchamberConfig as aq, type ConfigFields as ar, type ConfigModuleRuleType as as, type ConfiguredExport as at, type ContainerEngine as au, type ContainerObservability as av, type CustomDomainRoute as aw, type DispatchNamespaceOutbound as ax, type DockerConfiguration as ay, type DurableObjectBindings as az, type Config as b, getWranglerCacheDirFromEnv 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, getCloudflareContainerRegistry as bI, getCloudflareEnv as bJ, getCloudflareIncludeProcessEnvFromEnv as bK, getCloudflareLoadDevVarsFromDotEnv as bL, getCloudflaredPathFromEnv as bM, getComplianceRegionSubdomain as bN, getD1ExtraLocationChoices as bO, getDisableConfigWatching as bP, getLocalExplorerEnabledFromEnv as bQ, getLocalObservabilityEnabledFromEnv as bR, getNoSkillsUpdatePromptsFromEnv as bS, getOpenNextDeployFromEnv as bT, getOutputFileDirectoryFromEnv as bU, getOutputFilePathFromEnv as bV, getRegistryPath as bW, getSanitizeLogs as bX, getSubdomainMixedStateCheckDisabled as bY, getTraceHeader as bZ, getWorkersCIBranchName 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, getWranglerHideBanner as c0, getWranglerSendErrorReportsFromEnv as c1, getWranglerSendMetricsFromEnv as c2, hasCursor as c3, hasMorePages as c4, isDoNotTrackEnabled as c5, isWAFBlockResponse as c6, maybeAddTraceHeader as c7, parseRetryAfterMs as c8, parseRetryAfterValue as c9, performApiFetchBase as ca, renderError as cb, throwFetchError as cc, truncate as cd, 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, bG as getCloudflareApiBaseUrl, bI as getCloudflareComplianceRegion, bJ as getCloudflareContainerRegistry, bO as getComplianceRegionSubdomain } from './compliance-Dta138UP.mjs';
1
+ export { q as COMPLIANCE_REGION_CONFIG_PUBLIC, r as COMPLIANCE_REGION_CONFIG_UNKNOWN, f as ComplianceConfig, bF as getCloudflareApiBaseUrl, bH as getCloudflareComplianceRegion, bI as getCloudflareContainerRegistry, bN as getComplianceRegionSubdomain } from './compliance-yQnxg2l5.mjs';
2
2
  import 'node:url';
3
3
  import 'undici';
4
4
  import '@cloudflare/workers-shared';
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-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';
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-yQnxg2l5.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 CfWorkerContext, am as CfWorkerInit, an as CfWorkerLoader, ao as CfWorkerSourceMap, ap as CfWorkflow, aq as CloudchamberConfig, ar as ConfigFields, as as ConfigModuleRuleType, at as ConfiguredExport, au as ContainerEngine, av as ContainerObservability, aw as CustomDomainRoute, ax as DispatchNamespaceOutbound, ay as DockerConfiguration, az as DurableObjectBindings, aA as DurableObjectContainerImage, 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 getCloudflareContainerRegistry, bJ as getCloudflareEnv, bK as getCloudflareIncludeProcessEnvFromEnv, bL as getCloudflareLoadDevVarsFromDotEnv, bM as getCloudflaredPathFromEnv, bN as getComplianceRegionSubdomain, bO as getD1ExtraLocationChoices, bP as getDisableConfigWatching, bQ as getLocalExplorerEnabledFromEnv, bR as getLocalObservabilityEnabledFromEnv, bS as getNoSkillsUpdatePromptsFromEnv, bT as getOpenNextDeployFromEnv, bU as getOutputFileDirectoryFromEnv, bV as getOutputFilePathFromEnv, bW as getRegistryPath, bX as getSanitizeLogs, bY as getSubdomainMixedStateCheckDisabled, bZ as getTraceHeader, b_ as getWorkersCIBranchName, b$ as getWranglerCacheDirFromEnv, c0 as getWranglerHideBanner, c1 as getWranglerSendErrorReportsFromEnv, c2 as getWranglerSendMetricsFromEnv, c3 as hasCursor, c4 as hasMorePages, c5 as isDoNotTrackEnabled, c6 as isWAFBlockResponse, c7 as maybeAddTraceHeader, c8 as parseRetryAfterMs, c9 as parseRetryAfterValue, ca as performApiFetchBase, cb as renderError, cc as throwFetchError, cd as truncate } from './compliance-yQnxg2l5.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';
@@ -101,7 +101,7 @@ declare const bucketFormatMessage = "Bucket names must begin and end with an alp
101
101
  * Config field names for bindings (e.g., "kv_namespaces", "d1_databases").
102
102
  * These are the keys used in Wrangler's config file
103
103
  */
104
- type ConfigBindingFieldName = "data_blobs" | "durable_objects" | "kv_namespaces" | "send_email" | "queues" | "d1_databases" | "vectorize" | "ai_search_namespaces" | "ai_search" | "websearch" | "agent_memory" | "hyperdrive" | "r2_buckets" | "logfwdr" | "services" | "analytics_engine_datasets" | "text_blobs" | "browser" | "ai" | "images" | "stream" | "media" | "version_metadata" | "unsafe" | "vars" | "wasm_modules" | "dispatch_namespaces" | "mtls_certificates" | "workflows" | "pipelines" | "secrets_store_secrets" | "artifacts" | "ratelimits" | "assets" | "unsafe_hello_world" | "flagship" | "worker_loaders" | "vpc_services" | "vpc_networks";
104
+ type ConfigBindingFieldName = "data_blobs" | "durable_objects" | "kv_namespaces" | "send_email" | "queues" | "d1_databases" | "vectorize" | "ai_search_namespaces" | "ai_search" | "agent_memory" | "hyperdrive" | "r2_buckets" | "logfwdr" | "services" | "analytics_engine_datasets" | "text_blobs" | "browser" | "ai" | "images" | "stream" | "media" | "version_metadata" | "unsafe" | "vars" | "wasm_modules" | "dispatch_namespaces" | "mtls_certificates" | "workflows" | "pipelines" | "secrets_store_secrets" | "artifacts" | "ratelimits" | "assets" | "unsafe_hello_world" | "flagship" | "worker_loaders" | "vpc_services" | "vpc_networks";
105
105
  /**
106
106
  * Get a friendly name for a binding type, handling unsafe bindings
107
107
  */
@@ -156,12 +156,27 @@ declare function partitionExports(exports: Exports | undefined): PartitionedExpo
156
156
  /** Temporary Wrangler-owned image map until native Container image metadata is available. */
157
157
  declare const CONTAINER_IMAGES_BINDING = "EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES";
158
158
  type DurableObjectContainerApp = ContainerApp & {
159
- class_name: string;
160
159
  name: string;
161
160
  scheduling_policy: "durable_object";
161
+ unsafe?: {
162
+ configuration?: {
163
+ experimental_flags?: string[];
164
+ };
165
+ };
166
+ };
167
+ type ResolvedDurableObjectContainerApp = DurableObjectContainerApp & {
168
+ class_name: string;
162
169
  };
163
170
  declare function isDurableObjectContainerApp(container: ContainerApp): container is DurableObjectContainerApp;
164
171
  declare function getDurableObjectContainerApps(containers: ContainerApp[] | undefined): DurableObjectContainerApp[];
172
+ /**
173
+ * Resolve validated Durable Object-managed Containers to their owning classes.
174
+ * Keep the original configuration unchanged so export-link validation can still
175
+ * distinguish explicit class names from references through `exports`.
176
+ *
177
+ * @throws {UserError} If a Container is not linked to a Durable Object class.
178
+ */
179
+ declare function getResolvedDurableObjectContainerApps(containers: ContainerApp[] | undefined, exports: Exports | undefined): ResolvedDurableObjectContainerApp[];
165
180
  /**
166
181
  * A container can be linked to a Durable Object from either direction:
167
182
  *
@@ -1297,4 +1312,4 @@ declare function toUrlPath(filePath: string): UrlPath;
1297
1312
  */
1298
1313
  declare const friendlyBindingNames: Record<ConfigBindingFieldName, string>;
1299
1314
 
1300
- 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, getDurableObjectClassNameToUseSQLiteMap, 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, validateDurableObjectContainerApplications, validatePagesConfig, writeOutput };
1315
+ 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, type ResolvedDurableObjectContainerApp, 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, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getResolvedDurableObjectContainerApps, 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, validateDurableObjectContainerApplications, validatePagesConfig, writeOutput };
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
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, CONTAINER_IMAGES_BINDING, dir, parseTOML, modify, applyEdits, format, dist_default, parseJSONC } from './chunk-T5JQYOMX.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, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation, validateDurableObjectContainerApplications } from './chunk-T5JQYOMX.mjs';
5
- import { assertNever } from './chunk-KBTXSRPS.mjs';
6
- export { DEFAULT_COMPAT_DATE, assertNever, constructWranglerConfig, mapWorkerMetadataBindings } from './chunk-KBTXSRPS.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-JGKSDUFK.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, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getResolvedDurableObjectContainerApps, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation, validateDurableObjectContainerApplications } from './chunk-JGKSDUFK.mjs';
5
+ import { assertNever } from './chunk-5H6GBNUC.mjs';
6
+ export { DEFAULT_COMPAT_DATE, assertNever, constructWranglerConfig, mapWorkerMetadataBindings } from './chunk-5H6GBNUC.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
8
  import { getCloudflareEnv, getCloudflareContainerRegistry, getCloudflareApiBaseUrl, getTraceHeader, getCloudflaredPathFromEnv, getOutputFilePathFromEnv, getOutputFileDirectoryFromEnv, getCIOverrideName, getWranglerCacheDirFromEnv } from './chunk-IYSONYTF.mjs';
9
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';
@@ -1692,7 +1692,6 @@ var defaultWranglerConfig = {
1692
1692
  vectorize: [],
1693
1693
  ai_search_namespaces: [],
1694
1694
  ai_search: [],
1695
- websearch: void 0,
1696
1695
  agent_memory: [],
1697
1696
  hyperdrive: [],
1698
1697
  workflows: [],
@@ -17214,7 +17213,6 @@ var friendlyBindingNames = {
17214
17213
  vectorize: "Vectorize Index",
17215
17214
  ai_search_namespaces: "AI Search Namespace",
17216
17215
  ai_search: "AI Search Instance",
17217
- websearch: "Web Search",
17218
17216
  agent_memory: "Agent Memory",
17219
17217
  hyperdrive: "Hyperdrive Config",
17220
17218
  r2_buckets: "R2 Bucket",
@@ -17268,7 +17266,6 @@ var bindingTypeFriendlyNames = {
17268
17266
  vectorize: "Vectorize Index",
17269
17267
  ai_search_namespace: "AI Search Namespace",
17270
17268
  ai_search: "AI Search Instance",
17271
- websearch: "Web Search",
17272
17269
  agent_memory: "Agent Memory",
17273
17270
  hyperdrive: "Hyperdrive Config",
17274
17271
  service: "Worker",
@@ -18543,16 +18540,6 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
18543
18540
  validateBindingArray(envName, validateAISearchBinding),
18544
18541
  []
18545
18542
  ),
18546
- websearch: notInheritable(
18547
- diagnostics,
18548
- topLevelEnv,
18549
- rawConfig,
18550
- rawEnv,
18551
- envName,
18552
- "websearch",
18553
- validateNamedSimpleBinding(envName),
18554
- void 0
18555
- ),
18556
18543
  agent_memory: notInheritable(
18557
18544
  diagnostics,
18558
18545
  topLevelEnv,
@@ -19805,7 +19792,6 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
19805
19792
  "ai",
19806
19793
  "ai_search_namespace",
19807
19794
  "ai_search",
19808
- "websearch",
19809
19795
  "agent_memory",
19810
19796
  "kv_namespace",
19811
19797
  "durable_object_namespace",
@@ -20021,8 +20007,25 @@ function validateDurableObjectContainerImages(diagnostics, field, images, compli
20021
20007
  valid = false;
20022
20008
  }
20023
20009
  }
20010
+ const isDockerfileBuild = hasDockerfile && !hasImage;
20011
+ if (isDockerfileBuild) {
20012
+ if (image.build_context !== void 0 && (typeof image.build_context !== "string" || image.build_context.length === 0)) {
20013
+ diagnostics.errors.push(
20014
+ `"${imageField}.build_context" must be a non-empty string.`
20015
+ );
20016
+ valid = false;
20017
+ }
20018
+ if (image.build_vars !== void 0 && (typeof image.build_vars !== "object" || image.build_vars === null || Array.isArray(image.build_vars) || Object.values(image.build_vars).some(
20019
+ (value) => typeof value !== "string"
20020
+ ))) {
20021
+ diagnostics.errors.push(
20022
+ `"${imageField}.build_vars" must be an object with string values.`
20023
+ );
20024
+ valid = false;
20025
+ }
20026
+ }
20024
20027
  const unsupportedFields = Object.keys(image).filter(
20025
- (property) => property !== "dockerfile" && property !== "image"
20028
+ (property) => property !== "dockerfile" && property !== "image" && !(isDockerfileBuild && (property === "build_context" || property === "build_vars"))
20026
20029
  );
20027
20030
  if (unsupportedFields.length > 0) {
20028
20031
  diagnostics.errors.push(
@@ -20034,6 +20037,32 @@ function validateDurableObjectContainerImages(diagnostics, field, images, compli
20034
20037
  return valid;
20035
20038
  }
20036
20039
  __name(validateDurableObjectContainerImages, "validateDurableObjectContainerImages");
20040
+ function validateDurableObjectContainerUnsafe(diagnostics, field, value) {
20041
+ if (value === void 0) {
20042
+ return;
20043
+ }
20044
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
20045
+ diagnostics.errors.push(`"${field}" should be an object.`);
20046
+ return;
20047
+ }
20048
+ const unsafe = value;
20049
+ const configuration = unsafe.configuration;
20050
+ if (Object.keys(unsafe).some((key) => key !== "configuration") || configuration !== void 0 && (typeof configuration !== "object" || configuration === null || Array.isArray(configuration) || Object.keys(configuration).some((key) => key !== "experimental_flags"))) {
20051
+ diagnostics.errors.push(
20052
+ `Only "${field}.configuration.experimental_flags" is supported for Durable Object-managed Containers.`
20053
+ );
20054
+ return;
20055
+ }
20056
+ if (configuration !== void 0) {
20057
+ const flags = configuration.experimental_flags;
20058
+ if (flags !== void 0 && (!Array.isArray(flags) || flags.some((flag) => typeof flag !== "string"))) {
20059
+ diagnostics.errors.push(
20060
+ `"${field}.configuration.experimental_flags" should be an array of strings.`
20061
+ );
20062
+ }
20063
+ }
20064
+ }
20065
+ __name(validateDurableObjectContainerUnsafe, "validateDurableObjectContainerUnsafe");
20037
20066
  function validateContainerApp(envName, topLevelName, configPath, options = {}) {
20038
20067
  const { generateDefaultName = true } = options;
20039
20068
  return (diagnostics, field, value, config2) => {
@@ -20049,19 +20078,16 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
20049
20078
  for (const containerAppOptional of value) {
20050
20079
  const isDurableObjectManaged = containerAppOptional.scheduling_policy === "durable_object";
20051
20080
  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"
20081
+ validateOptionalProperty(
20082
+ diagnostics,
20083
+ field,
20084
+ "class_name",
20085
+ containerAppOptional.class_name,
20086
+ "string"
20087
+ );
20088
+ if (isDurableObjectManaged && containerAppOptional.class_name === "") {
20089
+ diagnostics.errors.push(
20090
+ `"containers.class_name" must be a non-empty string when specified for a Durable Object-managed Container.`
20065
20091
  );
20066
20092
  }
20067
20093
  validateOptionalProperty(
@@ -20071,7 +20097,7 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
20071
20097
  containerAppOptional.name,
20072
20098
  "string"
20073
20099
  );
20074
- if (generateDefaultName && !containerAppOptional.name && (!isDurableObjectManaged || hasValidDurableObjectClassName)) {
20100
+ if (generateDefaultName && !containerAppOptional.name && (!isDurableObjectManaged || containerAppOptional.class_name === void 0 || hasValidDurableObjectClassName)) {
20075
20101
  if (containerAppOptional.class_name === void 0) {
20076
20102
  diagnostics.errors.push(
20077
20103
  `"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".`
@@ -20093,12 +20119,35 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
20093
20119
  containerAppOptional.images,
20094
20120
  options.complianceConfig
20095
20121
  );
20122
+ validateContainerObservability(
20123
+ diagnostics,
20124
+ `${field}.observability`,
20125
+ containerAppOptional.observability,
20126
+ config2
20127
+ );
20128
+ if (containerAppOptional.observability?.target_instance_count !== void 0 || containerAppOptional.observability?.target_instance_percentage !== void 0) {
20129
+ diagnostics.errors.push(
20130
+ `"${field}.observability" only supports enabling or disabling logs for Durable Object-managed Containers; instance targeting is not supported.`
20131
+ );
20132
+ }
20133
+ validateDurableObjectContainerUnsafe(
20134
+ diagnostics,
20135
+ `${field}.unsafe`,
20136
+ containerAppOptional.unsafe
20137
+ );
20096
20138
  const unsupportedFields = Object.keys(containerAppOptional).filter(
20097
- (key) => !["name", "class_name", "scheduling_policy", "images"].includes(key)
20139
+ (key) => ![
20140
+ "name",
20141
+ "class_name",
20142
+ "scheduling_policy",
20143
+ "images",
20144
+ "observability",
20145
+ "unsafe"
20146
+ ].includes(key)
20098
20147
  );
20099
20148
  if (unsupportedFields.length > 0) {
20100
20149
  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.`
20150
+ `Unsupported fields for Durable Object-managed Containers in ${field}: ${unsupportedFields.map((key) => `"${key}"`).join(",")}. Only "name", "class_name", "scheduling_policy", "images", "observability", and restricted "unsafe" settings are supported.`
20102
20151
  );
20103
20152
  }
20104
20153
  continue;
@@ -21940,6 +21989,8 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
21940
21989
  "d1_databases",
21941
21990
  "r2_buckets",
21942
21991
  "vectorize",
21992
+ "ai_search_namespaces",
21993
+ "ai_search",
21943
21994
  "hyperdrive",
21944
21995
  "services",
21945
21996
  "analytics_engine_datasets",
@@ -22026,6 +22077,18 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
22026
22077
  previews.vectorize,
22027
22078
  void 0
22028
22079
  ) && isValid;
22080
+ isValid = validateBindingArray(envName, validateAISearchNamespaceBinding)(
22081
+ diagnostics,
22082
+ `${field}.ai_search_namespaces`,
22083
+ previews.ai_search_namespaces,
22084
+ void 0
22085
+ ) && isValid;
22086
+ isValid = validateBindingArray(envName, validateAISearchBinding)(
22087
+ diagnostics,
22088
+ `${field}.ai_search`,
22089
+ previews.ai_search,
22090
+ void 0
22091
+ ) && isValid;
22029
22092
  isValid = validateBindingArray(envName, validateHyperdriveBinding)(
22030
22093
  diagnostics,
22031
22094
  `${field}.hyperdrive`,
@@ -23181,7 +23244,6 @@ var BINDING_LOCAL_SUPPORT = {
23181
23244
  flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
23182
23245
  vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
23183
23246
  vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
23184
- websearch: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
23185
23247
  agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
23186
23248
  };
23187
23249
  function getBindingLocalSupport(type) {
@@ -23679,11 +23741,6 @@ function convertConfigToBindings(config2, options) {
23679
23741
  }
23680
23742
  break;
23681
23743
  }
23682
- case "websearch": {
23683
- const { binding, ...x } = info;
23684
- output[binding] = { type: "websearch", ...x };
23685
- break;
23686
- }
23687
23744
  case "agent_memory": {
23688
23745
  for (const { binding, ...x } of info) {
23689
23746
  output[binding] = { type: "agent_memory", ...x };
@@ -23856,7 +23913,6 @@ function printBindings(bindings, options) {
23856
23913
  bindings
23857
23914
  );
23858
23915
  const ai_search = extractBindingsOfType("ai_search", bindings);
23859
- const websearch = extractBindingsOfType("websearch", bindings);
23860
23916
  const agent_memory = extractBindingsOfType("agent_memory", bindings);
23861
23917
  const hyperdrive = extractBindingsOfType("hyperdrive", bindings);
23862
23918
  const r2_buckets = extractBindingsOfType("r2_bucket", bindings);
@@ -24074,16 +24130,6 @@ function printBindings(bindings, options) {
24074
24130
  }))
24075
24131
  );
24076
24132
  }
24077
- if (websearch.length > 0) {
24078
- output.push(
24079
- ...websearch.map(({ binding }) => ({
24080
- name: binding,
24081
- type: getBindingTypeFriendlyName("websearch"),
24082
- value: void 0,
24083
- mode: getMode({ isSimulatedLocally: false })
24084
- }))
24085
- );
24086
- }
24087
24133
  if (agent_memory.length > 0) {
24088
24134
  output.push(
24089
24135
  ...agent_memory.map(({ binding, namespace }) => ({
@@ -24565,7 +24611,7 @@ ${allTailConsumers.map(({ service, streaming }) => {
24565
24611
  log(
24566
24612
  `${containersTitle}
24567
24613
  ${containers.map(
24568
- (container) => container.scheduling_policy === "durable_object" ? `- ${container.class_name} (durable_object)` : `- ${container.name} (${container.image})`
24614
+ (container) => container.scheduling_policy === "durable_object" ? `- ${container.class_name ?? container.name} (durable_object)` : `- ${container.name} (${container.image})`
24569
24615
  ).join("\n")}`
24570
24616
  );
24571
24617
  log("");