@cloudflare/workers-utils 0.44.0 → 0.45.1

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.
@@ -77,6 +77,9 @@ type WorkerMetadataBinding = {
77
77
  type: "browser";
78
78
  name: string;
79
79
  raw?: boolean;
80
+ } | {
81
+ type: "analytics";
82
+ name: string;
80
83
  } | {
81
84
  type: "ai";
82
85
  name: string;
@@ -197,6 +200,10 @@ type WorkerMetadataBinding = {
197
200
  name: string;
198
201
  stream?: string;
199
202
  pipeline?: string;
203
+ } | {
204
+ type: "k2";
205
+ name: string;
206
+ stream: string;
200
207
  } | {
201
208
  type: "secrets_store_secret";
202
209
  name: string;
@@ -1640,6 +1647,20 @@ interface EnvironmentNonInheritable {
1640
1647
  /** Whether the Browser binding should be remote or not in local development */
1641
1648
  remote?: boolean;
1642
1649
  } | undefined;
1650
+ /**
1651
+ * An Analytics SQL binding.
1652
+ *
1653
+ * NOTE: This field is not automatically inherited from the top level environment,
1654
+ * and so must be specified in every named environment.
1655
+ *
1656
+ * @default {}
1657
+ * @nonInheritable
1658
+ */
1659
+ analytics: {
1660
+ binding: string;
1661
+ /** Whether the binding should connect to the remote service during local development. */
1662
+ remote?: boolean;
1663
+ } | undefined;
1643
1664
  /**
1644
1665
  * Binding to the AI project.
1645
1666
  *
@@ -1825,6 +1846,21 @@ interface EnvironmentNonInheritable {
1825
1846
  /** Whether the pipeline should be remote or not in local development */
1826
1847
  remote?: boolean;
1827
1848
  }[];
1849
+ /**
1850
+ * K2 producer bindings. Create streams using the Dashboard or API.
1851
+ *
1852
+ * This field must be specified separately in each named environment.
1853
+ * @default []
1854
+ * @nonInheritable
1855
+ */
1856
+ k2: {
1857
+ /** The binding name exposed on the Worker's env object. */
1858
+ binding: string;
1859
+ /** The ID of the K2 stream. */
1860
+ stream: string;
1861
+ /** Always uses the real stream in development. Set true to suppress the usage warning; false is unsupported. */
1862
+ remote?: boolean;
1863
+ }[];
1828
1864
  /**
1829
1865
  * Specifies Secret Store bindings that are bound to this Worker environment.
1830
1866
  *
package/dist/browser.mjs CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
4
  // src/default-compat-date.ts
5
- var DEFAULT_COMPAT_DATE = "2026-09-25";
5
+ var DEFAULT_COMPAT_DATE = "2026-10-01";
6
6
 
7
7
  // src/assert-never.ts
8
8
  function assertNever(_value) {
@@ -70,6 +70,13 @@ function mapWorkerMetadataBindings(bindings) {
70
70
  };
71
71
  }
72
72
  break;
73
+ case "analytics":
74
+ {
75
+ configObj.analytics = {
76
+ binding: binding.name
77
+ };
78
+ }
79
+ break;
73
80
  case "ai":
74
81
  {
75
82
  configObj.ai = {
@@ -325,6 +332,12 @@ function mapWorkerMetadataBindings(bindings) {
325
332
  }
326
333
  ];
327
334
  break;
335
+ case "k2":
336
+ configObj.k2 = [
337
+ ...configObj.k2 ?? [],
338
+ { binding: binding.name, stream: binding.stream }
339
+ ];
340
+ break;
328
341
  case "assets":
329
342
  configObj.assets = {
330
343
  binding: binding.name
@@ -238,6 +238,11 @@ interface CfBrowserBinding {
238
238
  raw?: boolean;
239
239
  remote?: boolean;
240
240
  }
241
+ /** A binding to Analytics SQL. */
242
+ interface CfAnalyticsSQLBinding {
243
+ binding: string;
244
+ remote?: boolean;
245
+ }
241
246
  /**
242
247
  * A binding to the AI project
243
248
  */
@@ -465,6 +470,11 @@ interface CfPipeline {
465
470
  pipeline?: string;
466
471
  remote?: boolean;
467
472
  }
473
+ interface CfK2Binding {
474
+ binding: string;
475
+ stream: string;
476
+ remote?: boolean;
477
+ }
468
478
  interface CfUnsafeBinding {
469
479
  name: string;
470
480
  type: string;
@@ -661,6 +671,9 @@ type WorkerMetadataBinding = {
661
671
  type: "browser";
662
672
  name: string;
663
673
  raw?: boolean;
674
+ } | {
675
+ type: "analytics";
676
+ name: string;
664
677
  } | {
665
678
  type: "ai";
666
679
  name: string;
@@ -781,6 +794,10 @@ type WorkerMetadataBinding = {
781
794
  name: string;
782
795
  stream?: string;
783
796
  pipeline?: string;
797
+ } | {
798
+ type: "k2";
799
+ name: string;
800
+ stream: string;
784
801
  } | {
785
802
  type: "secrets_store_secret";
786
803
  name: string;
@@ -1082,6 +1099,8 @@ type Binding = {
1082
1099
  } | ({
1083
1100
  type: "browser";
1084
1101
  } & BindingOmit<CfBrowserBinding>) | ({
1102
+ type: "analytics";
1103
+ } & BindingOmit<CfAnalyticsSQLBinding>) | ({
1085
1104
  type: "ai";
1086
1105
  } & BindingOmit<CfAIBinding>) | ({
1087
1106
  type: "images";
@@ -1126,6 +1145,8 @@ type Binding = {
1126
1145
  } & BindingOmit<CfMTlsCertificate>) | ({
1127
1146
  type: "pipeline";
1128
1147
  } & BindingOmit<CfPipeline>) | ({
1148
+ type: "k2";
1149
+ } & BindingOmit<CfK2Binding>) | ({
1129
1150
  type: "secrets_store_secret";
1130
1151
  } & BindingOmit<CfSecretsStoreSecrets>) | ({
1131
1152
  type: "artifacts";
@@ -2702,6 +2723,20 @@ interface EnvironmentNonInheritable {
2702
2723
  /** Whether the Browser binding should be remote or not in local development */
2703
2724
  remote?: boolean;
2704
2725
  } | undefined;
2726
+ /**
2727
+ * An Analytics SQL binding.
2728
+ *
2729
+ * NOTE: This field is not automatically inherited from the top level environment,
2730
+ * and so must be specified in every named environment.
2731
+ *
2732
+ * @default {}
2733
+ * @nonInheritable
2734
+ */
2735
+ analytics: {
2736
+ binding: string;
2737
+ /** Whether the binding should connect to the remote service during local development. */
2738
+ remote?: boolean;
2739
+ } | undefined;
2705
2740
  /**
2706
2741
  * Binding to the AI project.
2707
2742
  *
@@ -2887,6 +2922,21 @@ interface EnvironmentNonInheritable {
2887
2922
  /** Whether the pipeline should be remote or not in local development */
2888
2923
  remote?: boolean;
2889
2924
  }[];
2925
+ /**
2926
+ * K2 producer bindings. Create streams using the Dashboard or API.
2927
+ *
2928
+ * This field must be specified separately in each named environment.
2929
+ * @default []
2930
+ * @nonInheritable
2931
+ */
2932
+ k2: {
2933
+ /** The binding name exposed on the Worker's env object. */
2934
+ binding: string;
2935
+ /** The ID of the K2 stream. */
2936
+ stream: string;
2937
+ /** Always uses the real stream in development. Set true to suppress the usage warning; false is unsupported. */
2938
+ remote?: boolean;
2939
+ }[];
2890
2940
  /**
2891
2941
  * Specifies Secret Store bindings that are bound to this Worker environment.
2892
2942
  *
@@ -3733,4 +3783,4 @@ declare const getWranglerCacheDirFromEnv: () => string | undefined;
3733
3783
  */
3734
3784
  declare const getCloudflaredPathFromEnv: () => string | undefined;
3735
3785
 
3736
- export { type CfLogfwdrBinding as $, type ApiCredentials as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfAnalyticsEngineDataset as F, type CfArtifacts as G, type CfAssetsBinding as H, type CfBrowserBinding as I, type CfCapnp as J, type CfD1Database as K, type Logger as L, type CfDataBlobBindings as M, type CfDevPluginCfg as N, type CfDispatchNamespace as O, type CfDurableObject as P, type CfDurableObjectMigrations as Q, type RawConfig as R, type CfExports as S, type TailConsumer as T, type CfFlagship as U, type CfHelloWorld as V, type WorkerEntrypointExport as W, type CfHyperdrive as X, type CfImagesBinding as Y, type CfKvNamespace as Z, type CfLogfwdr as _, type RedirectedRawConfig as a, type Hook as a$, type CfMTlsCertificate as a0, type CfMediaBinding as a1, type CfModule as a2, type CfModuleType as a3, type CfPipeline as a4, type CfPlacement as a5, type CfQueue as a6, type CfR2Bucket as a7, type CfRateLimit as a8, type CfScriptFormat as a9, type CustomDomainRoute as aA, type DispatchNamespaceOutbound as aB, type DockerConfiguration as aC, type DurableObjectBindings as aD, type DurableObjectCodeUpdateStrategy as aE, type DurableObjectContainerImage as aF, type DurableObjectExportStorage as aG, type DurableObjectMigration as aH, type DurableObjectsConfig as aI, ENVIRONMENT_TAG_PREFIX as aJ, type Entry as aK, type Environment as aL, type EnvironmentNonInheritable as aM, type ExportsReconciliationEntryBase as aN, type ExportsReconciliationErrorDetail as aO, type ExportsReconciliationInfo as aP, type ExportsReconciliationRename as aQ, type ExportsReconciliationResult as aR, type ExportsReconciliationTransfer as aS, type ExportsReconciliationTransferPending as aT, type ExportsReconciliationWarning as aU, type FetchKVGetValueFetcher as aV, type FetchListResultFetcher as aW, type FetchPagedListResultFetcher as aX, type FetchResult as aY, type FetchResultFetcher as aZ, type File as a_, type CfSecretsStoreSecrets as aa, type CfSendEmailBindings as ab, type CfService as ac, type CfStreamBinding as ad, type CfTextBlobBindings as ae, type CfUnsafe as af, type CfUnsafeBinding as ag, type CfUserLimits as ah, type CfVars as ai, type CfVectorize as aj, type CfVersionMetadataBinding as ak, type CfVpcNetwork as al, type CfVpcService as am, type CfWasmModuleBindings as an, type CfWorkerContext as ao, type CfWorkerInit as ap, type CfWorkerLoader as aq, type CfWorkerSourceMap as ar, type CfWorkflow as as, type CloudchamberConfig as at, type ConfigFields as au, type ConfigModuleRuleType as av, type ConfiguredExport as aw, type ConnectHandler as ax, type ContainerEngine as ay, type ContainerObservability as az, type Config as b, getOutputFileDirectoryFromEnv as b$, type HookValues as b0, INHERIT_SYMBOL as b1, JSON_CONFIG_FORMATS as b2, type Json as b3, LOGGER_LEVELS as b4, type LegacyAssetPaths as b5, type LocalS3Credentials as b6, type LogLevel as b7, type LoggerLevel as b8, type NodeJSCompatMode as b9, fetchListResultBase as bA, fetchResultBase as bB, getBrowserRenderingHeadfulFromEnv as bC, getBuildConditionsFromEnv as bD, getBuildPlatformFromEnv as bE, getC3CommandFromEnv as bF, getCIGeneratePreviewAlias as bG, getCIMatchTag as bH, getCIOverrideName as bI, getCIOverrideNetworkModeHost as bJ, getCfFetchEnabledFromEnv as bK, getCfFetchPathFromEnv as bL, getCloudflareApiBaseUrl as bM, getCloudflareApiEnvironmentFromEnv as bN, getCloudflareComplianceRegion as bO, getCloudflareContainerRegistry as bP, getCloudflareEnv as bQ, getCloudflareIncludeProcessEnvFromEnv as bR, getCloudflareLoadDevVarsFromDotEnv as bS, getCloudflaredPathFromEnv as bT, getComplianceRegionSubdomain as bU, getD1ExtraLocationChoices as bV, getDisableConfigWatching as bW, getLocalExplorerEnabledFromEnv as bX, getLocalObservabilityEnabledFromEnv as bY, getNoSkillsUpdatePromptsFromEnv as bZ, getOpenNextDeployFromEnv as b_, type Observability as ba, PATH_TO_DEPLOY_CONFIG as bb, type PreviewsConfig as bc, type RawDevConfig as bd, type RawDurableObjectsConfig as be, type RawEnvironment as bf, type Rule as bg, SERVICE_TAG_PREFIX as bh, type ServiceFetch as bi, type ServiceMetadataRes as bj, type StartDevWorkerInput as bk, type StreamingTailConsumer as bl, type TcpConnectHandler as bm, type Trigger as bn, type UdpConnectHandler as bo, type UserLimits as bp, type ValidatedAssetsOptions as bq, type WorkflowBinding as br, type ZoneIdRoute as bs, type ZoneNameRoute as bt, addAuthorizationHeader as bu, defaultWranglerConfig as bv, extractAccountTag as bw, extractWAFBlockRayId as bx, fetchInternalBase as by, fetchKVGetValueBase as bz, type WorkflowExport as c, getOutputFilePathFromEnv as c0, getRegistryPath as c1, getSanitizeLogs as c2, getSubdomainMixedStateCheckDisabled as c3, getTraceHeader as c4, getWorkersCIBranchName as c5, getWranglerCacheDirFromEnv as c6, getWranglerHideBanner as c7, getWranglerSendErrorReportsFromEnv as c8, getWranglerSendMetricsFromEnv as c9, hasCursor as ca, hasMorePages as cb, isDoNotTrackEnabled as cc, isWAFBlockResponse as cd, maybeAddTraceHeader as ce, parseRetryAfterMs as cf, parseRetryAfterValue as cg, performApiFetchBase as ch, renderError as ci, throwFetchError as cj, truncate as ck, type ContainerApp as d, type WorkerMetadataBinding as e, type WorkerMetadata as f, type CfTailConsumer as g, type ComplianceConfig as h, type Route as i, ARTIFACTS_EVENT_TYPES as j, type Access as k, type ArtifactsEventTrigger as l, type ArtifactsEventType as m, type AssetConfigMetadata as n, type Assets as o, type AssetsOptions as p, type AsyncHook as q, type BinaryFile as r, COMPLIANCE_REGION_CONFIG_PUBLIC as s, COMPLIANCE_REGION_CONFIG_UNKNOWN as t, type CacheOptions as u, type CfAIBinding as v, type CfAISearch as w, type CfAISearchNamespace as x, type CfAccount as y, type CfAgentMemory as z };
3786
+ export { type CfKvNamespace as $, type ApiCredentials as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfAnalyticsEngineDataset as F, type CfAnalyticsSQLBinding as G, type CfArtifacts as H, type CfAssetsBinding as I, type CfBrowserBinding as J, type CfCapnp as K, type Logger as L, type CfD1Database as M, type CfDataBlobBindings as N, type CfDevPluginCfg as O, type CfDispatchNamespace as P, type CfDurableObject as Q, type RawConfig as R, type CfDurableObjectMigrations as S, type TailConsumer as T, type CfExports as U, type CfFlagship as V, type WorkerEntrypointExport as W, type CfHelloWorld as X, type CfHyperdrive as Y, type CfImagesBinding as Z, type CfK2Binding as _, type RedirectedRawConfig as a, type FetchResultFetcher as a$, type CfLogfwdr as a0, type CfLogfwdrBinding as a1, type CfMTlsCertificate as a2, type CfMediaBinding as a3, type CfModule as a4, type CfModuleType as a5, type CfPipeline as a6, type CfPlacement as a7, type CfQueue as a8, type CfR2Bucket as a9, type ContainerEngine as aA, type ContainerObservability as aB, type CustomDomainRoute as aC, type DispatchNamespaceOutbound as aD, type DockerConfiguration as aE, type DurableObjectBindings as aF, type DurableObjectCodeUpdateStrategy as aG, type DurableObjectContainerImage as aH, type DurableObjectExportStorage as aI, type DurableObjectMigration as aJ, type DurableObjectsConfig as aK, ENVIRONMENT_TAG_PREFIX as aL, type Entry as aM, type Environment as aN, type EnvironmentNonInheritable as aO, type ExportsReconciliationEntryBase as aP, type ExportsReconciliationErrorDetail as aQ, type ExportsReconciliationInfo as aR, type ExportsReconciliationRename as aS, type ExportsReconciliationResult as aT, type ExportsReconciliationTransfer as aU, type ExportsReconciliationTransferPending as aV, type ExportsReconciliationWarning as aW, type FetchKVGetValueFetcher as aX, type FetchListResultFetcher as aY, type FetchPagedListResultFetcher as aZ, type FetchResult as a_, type CfRateLimit as aa, type CfScriptFormat as ab, type CfSecretsStoreSecrets as ac, type CfSendEmailBindings as ad, type CfService as ae, type CfStreamBinding as af, type CfTextBlobBindings as ag, type CfUnsafe as ah, type CfUnsafeBinding as ai, type CfUserLimits as aj, type CfVars as ak, type CfVectorize as al, type CfVersionMetadataBinding as am, type CfVpcNetwork as an, type CfVpcService as ao, type CfWasmModuleBindings as ap, type CfWorkerContext as aq, type CfWorkerInit as ar, type CfWorkerLoader as as, type CfWorkerSourceMap as at, type CfWorkflow as au, type CloudchamberConfig as av, type ConfigFields as aw, type ConfigModuleRuleType as ax, type ConfiguredExport as ay, type ConnectHandler as az, type Config as b, getNoSkillsUpdatePromptsFromEnv as b$, type File as b0, type Hook as b1, type HookValues as b2, INHERIT_SYMBOL as b3, JSON_CONFIG_FORMATS as b4, type Json as b5, LOGGER_LEVELS as b6, type LegacyAssetPaths as b7, type LocalS3Credentials as b8, type LogLevel as b9, fetchInternalBase as bA, fetchKVGetValueBase as bB, fetchListResultBase as bC, fetchResultBase as bD, getBrowserRenderingHeadfulFromEnv as bE, getBuildConditionsFromEnv as bF, getBuildPlatformFromEnv as bG, getC3CommandFromEnv as bH, getCIGeneratePreviewAlias as bI, getCIMatchTag as bJ, getCIOverrideName as bK, getCIOverrideNetworkModeHost as bL, getCfFetchEnabledFromEnv as bM, getCfFetchPathFromEnv as bN, getCloudflareApiBaseUrl as bO, getCloudflareApiEnvironmentFromEnv as bP, getCloudflareComplianceRegion as bQ, getCloudflareContainerRegistry as bR, getCloudflareEnv as bS, getCloudflareIncludeProcessEnvFromEnv as bT, getCloudflareLoadDevVarsFromDotEnv as bU, getCloudflaredPathFromEnv as bV, getComplianceRegionSubdomain as bW, getD1ExtraLocationChoices as bX, getDisableConfigWatching as bY, getLocalExplorerEnabledFromEnv as bZ, getLocalObservabilityEnabledFromEnv as b_, type LoggerLevel as ba, type NodeJSCompatMode as bb, type Observability as bc, PATH_TO_DEPLOY_CONFIG as bd, type PreviewsConfig as be, type RawDevConfig as bf, type RawDurableObjectsConfig as bg, type RawEnvironment as bh, type Rule as bi, SERVICE_TAG_PREFIX as bj, type ServiceFetch as bk, type ServiceMetadataRes as bl, type StartDevWorkerInput as bm, type StreamingTailConsumer as bn, type TcpConnectHandler as bo, type Trigger as bp, type UdpConnectHandler as bq, type UserLimits as br, type ValidatedAssetsOptions as bs, type WorkflowBinding as bt, type ZoneIdRoute as bu, type ZoneNameRoute as bv, addAuthorizationHeader as bw, defaultWranglerConfig as bx, extractAccountTag as by, extractWAFBlockRayId as bz, type WorkflowExport as c, getOpenNextDeployFromEnv as c0, getOutputFileDirectoryFromEnv as c1, getOutputFilePathFromEnv as c2, getRegistryPath as c3, getSanitizeLogs as c4, getSubdomainMixedStateCheckDisabled as c5, getTraceHeader as c6, getWorkersCIBranchName as c7, getWranglerCacheDirFromEnv as c8, getWranglerHideBanner as c9, getWranglerSendErrorReportsFromEnv as ca, getWranglerSendMetricsFromEnv as cb, hasCursor as cc, hasMorePages as cd, isDoNotTrackEnabled as ce, isWAFBlockResponse as cf, maybeAddTraceHeader as cg, parseRetryAfterMs as ch, parseRetryAfterValue as ci, performApiFetchBase as cj, renderError as ck, throwFetchError as cl, truncate as cm, type ContainerApp as d, type WorkerMetadataBinding as e, type WorkerMetadata as f, type CfTailConsumer as g, type ComplianceConfig as h, type Route as i, ARTIFACTS_EVENT_TYPES as j, type Access as k, type ArtifactsEventTrigger as l, type ArtifactsEventType as m, type AssetConfigMetadata as n, type Assets as o, type AssetsOptions as p, type AsyncHook as q, type BinaryFile as r, COMPLIANCE_REGION_CONFIG_PUBLIC as s, COMPLIANCE_REGION_CONFIG_UNKNOWN as t, type CacheOptions as u, type CfAIBinding as v, type CfAISearch as w, type CfAISearchNamespace as x, type CfAccount as y, type CfAgentMemory as z };
@@ -1,4 +1,4 @@
1
- export { s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, h as ComplianceConfig, bM as getCloudflareApiBaseUrl, bO as getCloudflareComplianceRegion, bP as getCloudflareContainerRegistry, bU as getComplianceRegionSubdomain } from './compliance-CZ8Ownqu.mjs';
1
+ export { s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, h as ComplianceConfig, bO as getCloudflareApiBaseUrl, bQ as getCloudflareComplianceRegion, bR as getCloudflareContainerRegistry, bW as getComplianceRegionSubdomain } from './compliance-CADarBwY.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 WorkflowExport, d as ContainerApp, e as WorkerMetadataBinding, T as TailConsumer, f as WorkerMetadata, g as CfTailConsumer, L as Logger, A as ApiCredentials, h as ComplianceConfig, i as Route } from './compliance-CZ8Ownqu.mjs';
2
- export { j as ARTIFACTS_EVENT_TYPES, k as Access, l as ArtifactsEventTrigger, m as ArtifactsEventType, n as AssetConfigMetadata, o as Assets, p as AssetsOptions, q as AsyncHook, r as BinaryFile, s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, u as CacheOptions, v as CfAIBinding, w as CfAISearch, x as CfAISearchNamespace, y as CfAccount, z as CfAgentMemory, F as CfAnalyticsEngineDataset, G as CfArtifacts, H as CfAssetsBinding, I as CfBrowserBinding, J as CfCapnp, K as CfD1Database, M as CfDataBlobBindings, N as CfDevPluginCfg, O as CfDispatchNamespace, P as CfDurableObject, Q as CfDurableObjectMigrations, S as CfExports, U as CfFlagship, V as CfHelloWorld, X as CfHyperdrive, Y as CfImagesBinding, Z as CfKvNamespace, _ as CfLogfwdr, $ as CfLogfwdrBinding, a0 as CfMTlsCertificate, a1 as CfMediaBinding, a2 as CfModule, a3 as CfModuleType, a4 as CfPipeline, a5 as CfPlacement, a6 as CfQueue, a7 as CfR2Bucket, a8 as CfRateLimit, a9 as CfScriptFormat, aa as CfSecretsStoreSecrets, ab as CfSendEmailBindings, ac as CfService, ad as CfStreamBinding, ae as CfTextBlobBindings, af as CfUnsafe, ag as CfUnsafeBinding, ah as CfUserLimits, ai as CfVars, aj as CfVectorize, ak as CfVersionMetadataBinding, al as CfVpcNetwork, am as CfVpcService, an as CfWasmModuleBindings, ao as CfWorkerContext, ap as CfWorkerInit, aq as CfWorkerLoader, ar as CfWorkerSourceMap, as as CfWorkflow, at as CloudchamberConfig, au as ConfigFields, av as ConfigModuleRuleType, aw as ConfiguredExport, ax as ConnectHandler, ay as ContainerEngine, az as ContainerObservability, aA as CustomDomainRoute, aB as DispatchNamespaceOutbound, aC as DockerConfiguration, aD as DurableObjectBindings, aE as DurableObjectCodeUpdateStrategy, aF as DurableObjectContainerImage, aG as DurableObjectExportStorage, aH as DurableObjectMigration, aI as DurableObjectsConfig, aJ as ENVIRONMENT_TAG_PREFIX, aK as Entry, aL as Environment, aM as EnvironmentNonInheritable, aN as ExportsReconciliationEntryBase, aO as ExportsReconciliationErrorDetail, aP as ExportsReconciliationInfo, aQ as ExportsReconciliationRename, aR as ExportsReconciliationResult, aS as ExportsReconciliationTransfer, aT as ExportsReconciliationTransferPending, aU as ExportsReconciliationWarning, aV as FetchKVGetValueFetcher, aW as FetchListResultFetcher, aX as FetchPagedListResultFetcher, aY as FetchResult, aZ as FetchResultFetcher, a_ as File, a$ as Hook, b0 as HookValues, b1 as INHERIT_SYMBOL, b2 as JSON_CONFIG_FORMATS, b3 as Json, b4 as LOGGER_LEVELS, b5 as LegacyAssetPaths, b6 as LocalS3Credentials, b7 as LogLevel, b8 as LoggerLevel, b9 as NodeJSCompatMode, ba as Observability, bb as PATH_TO_DEPLOY_CONFIG, bc as PreviewsConfig, bd as RawDevConfig, be as RawDurableObjectsConfig, bf as RawEnvironment, a as RedirectedRawConfig, bg as Rule, bh as SERVICE_TAG_PREFIX, bi as ServiceFetch, bj as ServiceMetadataRes, bk as StartDevWorkerInput, bl as StreamingTailConsumer, bm as TcpConnectHandler, bn as Trigger, bo as UdpConnectHandler, bp as UserLimits, bq as ValidatedAssetsOptions, br as WorkflowBinding, bs as ZoneIdRoute, bt as ZoneNameRoute, bu as addAuthorizationHeader, bv as defaultWranglerConfig, bw as extractAccountTag, bx as extractWAFBlockRayId, by as fetchInternalBase, bz as fetchKVGetValueBase, bA as fetchListResultBase, bB as fetchResultBase, bC as getBrowserRenderingHeadfulFromEnv, bD as getBuildConditionsFromEnv, bE as getBuildPlatformFromEnv, bF as getC3CommandFromEnv, bG as getCIGeneratePreviewAlias, bH as getCIMatchTag, bI as getCIOverrideName, bJ as getCIOverrideNetworkModeHost, bK as getCfFetchEnabledFromEnv, bL as getCfFetchPathFromEnv, bM as getCloudflareApiBaseUrl, bN as getCloudflareApiEnvironmentFromEnv, bO as getCloudflareComplianceRegion, bP as getCloudflareContainerRegistry, bQ as getCloudflareEnv, bR as getCloudflareIncludeProcessEnvFromEnv, bS as getCloudflareLoadDevVarsFromDotEnv, bT as getCloudflaredPathFromEnv, bU as getComplianceRegionSubdomain, bV as getD1ExtraLocationChoices, bW as getDisableConfigWatching, bX as getLocalExplorerEnabledFromEnv, bY as getLocalObservabilityEnabledFromEnv, bZ as getNoSkillsUpdatePromptsFromEnv, b_ as getOpenNextDeployFromEnv, b$ as getOutputFileDirectoryFromEnv, c0 as getOutputFilePathFromEnv, c1 as getRegistryPath, c2 as getSanitizeLogs, c3 as getSubdomainMixedStateCheckDisabled, c4 as getTraceHeader, c5 as getWorkersCIBranchName, c6 as getWranglerCacheDirFromEnv, c7 as getWranglerHideBanner, c8 as getWranglerSendErrorReportsFromEnv, c9 as getWranglerSendMetricsFromEnv, ca as hasCursor, cb as hasMorePages, cc as isDoNotTrackEnabled, cd as isWAFBlockResponse, ce as maybeAddTraceHeader, cf as parseRetryAfterMs, cg as parseRetryAfterValue, ch as performApiFetchBase, ci as renderError, cj as throwFetchError, ck as truncate } from './compliance-CZ8Ownqu.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 WorkflowExport, d as ContainerApp, e as WorkerMetadataBinding, T as TailConsumer, f as WorkerMetadata, g as CfTailConsumer, L as Logger, A as ApiCredentials, h as ComplianceConfig, i as Route } from './compliance-CADarBwY.mjs';
2
+ export { j as ARTIFACTS_EVENT_TYPES, k as Access, l as ArtifactsEventTrigger, m as ArtifactsEventType, n as AssetConfigMetadata, o as Assets, p as AssetsOptions, q as AsyncHook, r as BinaryFile, s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, u as CacheOptions, v as CfAIBinding, w as CfAISearch, x as CfAISearchNamespace, y as CfAccount, z as CfAgentMemory, F as CfAnalyticsEngineDataset, G as CfAnalyticsSQLBinding, H as CfArtifacts, I as CfAssetsBinding, J as CfBrowserBinding, K as CfCapnp, M as CfD1Database, N as CfDataBlobBindings, O as CfDevPluginCfg, P as CfDispatchNamespace, Q as CfDurableObject, S as CfDurableObjectMigrations, U as CfExports, V as CfFlagship, X as CfHelloWorld, Y as CfHyperdrive, Z as CfImagesBinding, _ as CfK2Binding, $ as CfKvNamespace, a0 as CfLogfwdr, a1 as CfLogfwdrBinding, a2 as CfMTlsCertificate, a3 as CfMediaBinding, a4 as CfModule, a5 as CfModuleType, a6 as CfPipeline, a7 as CfPlacement, a8 as CfQueue, a9 as CfR2Bucket, aa as CfRateLimit, ab as CfScriptFormat, ac as CfSecretsStoreSecrets, ad as CfSendEmailBindings, ae as CfService, af as CfStreamBinding, ag as CfTextBlobBindings, ah as CfUnsafe, ai as CfUnsafeBinding, aj as CfUserLimits, ak as CfVars, al as CfVectorize, am as CfVersionMetadataBinding, an as CfVpcNetwork, ao as CfVpcService, ap as CfWasmModuleBindings, aq as CfWorkerContext, ar as CfWorkerInit, as as CfWorkerLoader, at as CfWorkerSourceMap, au as CfWorkflow, av as CloudchamberConfig, aw as ConfigFields, ax as ConfigModuleRuleType, ay as ConfiguredExport, az as ConnectHandler, aA as ContainerEngine, aB as ContainerObservability, aC as CustomDomainRoute, aD as DispatchNamespaceOutbound, aE as DockerConfiguration, aF as DurableObjectBindings, aG as DurableObjectCodeUpdateStrategy, aH as DurableObjectContainerImage, aI as DurableObjectExportStorage, aJ as DurableObjectMigration, aK as DurableObjectsConfig, aL as ENVIRONMENT_TAG_PREFIX, aM as Entry, aN as Environment, aO as EnvironmentNonInheritable, aP as ExportsReconciliationEntryBase, aQ as ExportsReconciliationErrorDetail, aR as ExportsReconciliationInfo, aS as ExportsReconciliationRename, aT as ExportsReconciliationResult, aU as ExportsReconciliationTransfer, aV as ExportsReconciliationTransferPending, aW as ExportsReconciliationWarning, aX as FetchKVGetValueFetcher, aY as FetchListResultFetcher, aZ as FetchPagedListResultFetcher, a_ as FetchResult, a$ as FetchResultFetcher, b0 as File, b1 as Hook, b2 as HookValues, b3 as INHERIT_SYMBOL, b4 as JSON_CONFIG_FORMATS, b5 as Json, b6 as LOGGER_LEVELS, b7 as LegacyAssetPaths, b8 as LocalS3Credentials, b9 as LogLevel, ba as LoggerLevel, bb as NodeJSCompatMode, bc as Observability, bd as PATH_TO_DEPLOY_CONFIG, be as PreviewsConfig, bf as RawDevConfig, bg as RawDurableObjectsConfig, bh as RawEnvironment, a as RedirectedRawConfig, bi as Rule, bj as SERVICE_TAG_PREFIX, bk as ServiceFetch, bl as ServiceMetadataRes, bm as StartDevWorkerInput, bn as StreamingTailConsumer, bo as TcpConnectHandler, bp as Trigger, bq as UdpConnectHandler, br as UserLimits, bs as ValidatedAssetsOptions, bt as WorkflowBinding, bu as ZoneIdRoute, bv as ZoneNameRoute, bw as addAuthorizationHeader, bx as defaultWranglerConfig, by as extractAccountTag, bz as extractWAFBlockRayId, bA as fetchInternalBase, bB as fetchKVGetValueBase, bC as fetchListResultBase, bD as fetchResultBase, bE as getBrowserRenderingHeadfulFromEnv, bF as getBuildConditionsFromEnv, bG as getBuildPlatformFromEnv, bH as getC3CommandFromEnv, bI as getCIGeneratePreviewAlias, bJ as getCIMatchTag, bK as getCIOverrideName, bL as getCIOverrideNetworkModeHost, bM as getCfFetchEnabledFromEnv, bN as getCfFetchPathFromEnv, bO as getCloudflareApiBaseUrl, bP as getCloudflareApiEnvironmentFromEnv, bQ as getCloudflareComplianceRegion, bR as getCloudflareContainerRegistry, bS as getCloudflareEnv, bT as getCloudflareIncludeProcessEnvFromEnv, bU as getCloudflareLoadDevVarsFromDotEnv, bV as getCloudflaredPathFromEnv, bW as getComplianceRegionSubdomain, bX as getD1ExtraLocationChoices, bY as getDisableConfigWatching, bZ as getLocalExplorerEnabledFromEnv, b_ as getLocalObservabilityEnabledFromEnv, b$ as getNoSkillsUpdatePromptsFromEnv, c0 as getOpenNextDeployFromEnv, c1 as getOutputFileDirectoryFromEnv, c2 as getOutputFilePathFromEnv, c3 as getRegistryPath, c4 as getSanitizeLogs, c5 as getSubdomainMixedStateCheckDisabled, c6 as getTraceHeader, c7 as getWorkersCIBranchName, c8 as getWranglerCacheDirFromEnv, c9 as getWranglerHideBanner, ca as getWranglerSendErrorReportsFromEnv, cb as getWranglerSendMetricsFromEnv, cc as hasCursor, cd as hasMorePages, ce as isDoNotTrackEnabled, cf as isWAFBlockResponse, cg as maybeAddTraceHeader, ch as parseRetryAfterMs, ci as parseRetryAfterValue, cj as performApiFetchBase, ck as renderError, cl as throwFetchError, cm as truncate } from './compliance-CADarBwY.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';
@@ -100,7 +100,7 @@ declare const bucketFormatMessage = "Bucket names must begin and end with an alp
100
100
  * Config field names for bindings (e.g., "kv_namespaces", "d1_databases").
101
101
  * These are the keys used in Wrangler's config file
102
102
  */
103
- 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";
103
+ 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" | "analytics" | "ai" | "images" | "stream" | "media" | "version_metadata" | "unsafe" | "vars" | "wasm_modules" | "dispatch_namespaces" | "mtls_certificates" | "workflows" | "pipelines" | "k2" | "secrets_store_secrets" | "artifacts" | "ratelimits" | "assets" | "unsafe_hello_world" | "flagship" | "worker_loaders" | "vpc_services" | "vpc_networks";
104
104
  /**
105
105
  * Get a friendly name for a binding type, handling unsafe bindings
106
106
  */
@@ -627,8 +627,8 @@ type VariableNames =
627
627
  | "CLOUDFLARE_API_BASE_URL"
628
628
  /** Set to "fedramp_high" for FedRAMP High compliance region. This will update the API/AUTH URLs used to make requests to Cloudflare. */
629
629
  | "CLOUDFLARE_COMPLIANCE_REGION"
630
- /** API token for R2 SQL service. */
631
- | "WRANGLER_R2_SQL_AUTH_TOKEN"
630
+ /** API token for Basin SQL service. */
631
+ | "WRANGLER_BASIN_SQL_AUTH_TOKEN"
632
632
  /** Controls whether to fetch the cf.json file. Set to "false" or "0" to disable fetching and use fallback data. Defaults to "true". */
633
633
  | "CLOUDFLARE_CF_FETCH_ENABLED"
634
634
  /** Custom path for caching the cf.json file. Overrides the default node_modules/.mf/cf.json location. */
package/dist/index.mjs CHANGED
@@ -2552,11 +2552,13 @@ var defaultWranglerConfig = {
2552
2552
  containers: void 0,
2553
2553
  send_email: [],
2554
2554
  browser: void 0,
2555
+ analytics: void 0,
2555
2556
  unsafe: {},
2556
2557
  mtls_certificates: [],
2557
2558
  tail_consumers: void 0,
2558
2559
  streaming_tail_consumers: void 0,
2559
2560
  pipelines: [],
2561
+ k2: [],
2560
2562
  vpc_services: [],
2561
2563
  vpc_networks: []
2562
2564
  };
@@ -3062,6 +3064,7 @@ var friendlyBindingNames = {
3062
3064
  analytics_engine_datasets: "Analytics Engine Dataset",
3063
3065
  text_blobs: "Text Blob",
3064
3066
  browser: "Browser Run",
3067
+ analytics: "Analytics SQL",
3065
3068
  ai: "AI",
3066
3069
  images: "Images",
3067
3070
  stream: "Stream",
@@ -3074,6 +3077,7 @@ var friendlyBindingNames = {
3074
3077
  mtls_certificates: "mTLS Certificate",
3075
3078
  workflows: "Workflow",
3076
3079
  pipelines: "Pipeline",
3080
+ k2: "K2 Stream",
3077
3081
  secrets_store_secrets: "Secrets Store Secret",
3078
3082
  artifacts: "Artifacts",
3079
3083
  ratelimits: "Rate Limit",
@@ -3094,6 +3098,7 @@ var bindingTypeFriendlyNames = {
3094
3098
  wasm_module: "Wasm Module",
3095
3099
  text_blob: "Text Blob",
3096
3100
  browser: "Browser Run",
3101
+ analytics: "Analytics SQL",
3097
3102
  ai: "AI",
3098
3103
  images: "Images",
3099
3104
  stream: "Stream",
@@ -3115,6 +3120,7 @@ var bindingTypeFriendlyNames = {
3115
3120
  dispatch_namespace: "Dispatch Namespace",
3116
3121
  mtls_certificate: "mTLS Certificate",
3117
3122
  pipeline: "Pipeline",
3123
+ k2: "K2 Stream",
3118
3124
  secrets_store_secret: "Secrets Store Secret",
3119
3125
  artifacts: "Artifacts",
3120
3126
  logfwdr: "logfwdr",
@@ -4482,6 +4488,16 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
4482
4488
  validateNamedSimpleBinding(envName),
4483
4489
  void 0
4484
4490
  ),
4491
+ analytics: notInheritable(
4492
+ diagnostics,
4493
+ topLevelEnv,
4494
+ rawConfig,
4495
+ rawEnv,
4496
+ envName,
4497
+ "analytics",
4498
+ validateNamedSimpleBinding(envName),
4499
+ void 0
4500
+ ),
4485
4501
  ai: notInheritable(
4486
4502
  diagnostics,
4487
4503
  topLevelEnv,
@@ -4532,6 +4548,16 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
4532
4548
  validateBindingArray(envName, validatePipelineBinding),
4533
4549
  []
4534
4550
  ),
4551
+ k2: notInheritable(
4552
+ diagnostics,
4553
+ topLevelEnv,
4554
+ rawConfig,
4555
+ rawEnv,
4556
+ envName,
4557
+ "k2",
4558
+ validateBindingArray(envName, validateK2Binding),
4559
+ []
4560
+ ),
4535
4561
  secrets_store_secrets: notInheritable(
4536
4562
  diagnostics,
4537
4563
  topLevelEnv,
@@ -5749,6 +5775,7 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
5749
5775
  "data_blob",
5750
5776
  "text_blob",
5751
5777
  "browser",
5778
+ "analytics",
5752
5779
  "ai",
5753
5780
  "ai_search_namespace",
5754
5781
  "ai_search",
@@ -5761,6 +5788,7 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
5761
5788
  "logfwdr",
5762
5789
  "mtls_certificate",
5763
5790
  "pipeline",
5791
+ "k2",
5764
5792
  "worker_loader",
5765
5793
  "vpc_service",
5766
5794
  "flagship",
@@ -7711,6 +7739,38 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
7711
7739
  ]);
7712
7740
  return isValid;
7713
7741
  }, "validatePipelineBinding");
7742
+ var validateK2Binding = /* @__PURE__ */ __name((diagnostics, field, value) => {
7743
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
7744
+ diagnostics.errors.push(
7745
+ `"${field}" bindings should be objects, but got ${JSON.stringify(value)}`
7746
+ );
7747
+ return false;
7748
+ }
7749
+ let isValid = true;
7750
+ if (!isRequiredProperty(value, "binding", "string")) {
7751
+ diagnostics.errors.push(`"${field}" must have a string "binding" field.`);
7752
+ isValid = false;
7753
+ }
7754
+ if (!isRequiredProperty(value, "stream", "string")) {
7755
+ diagnostics.errors.push(`"${field}" must have a string "stream" field.`);
7756
+ isValid = false;
7757
+ }
7758
+ if (!isRemoteValid(value, field, diagnostics)) {
7759
+ isValid = false;
7760
+ }
7761
+ if ("remote" in value && value.remote === false) {
7762
+ diagnostics.errors.push(
7763
+ `"${field}" does not support \`remote: false\`. K2 bindings always access remote resources; omit "remote" or set \`remote: true\`.`
7764
+ );
7765
+ isValid = false;
7766
+ }
7767
+ validateAdditionalProperties(diagnostics, field, Object.keys(value), [
7768
+ "binding",
7769
+ "stream",
7770
+ "remote"
7771
+ ]);
7772
+ return isValid;
7773
+ }, "validateK2Binding");
7714
7774
  var validateSecretsStoreSecretBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
7715
7775
  if (typeof value !== "object" || value === null) {
7716
7776
  diagnostics.errors.push(
@@ -8001,11 +8061,13 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
8001
8061
  "streaming_tail_consumers",
8002
8062
  "unsafe",
8003
8063
  "browser",
8064
+ "analytics",
8004
8065
  "ai",
8005
8066
  "images",
8006
8067
  "stream",
8007
8068
  "media",
8008
8069
  "pipelines",
8070
+ "k2",
8009
8071
  "secrets_store_secrets",
8010
8072
  "artifacts",
8011
8073
  "unsafe_hello_world",
@@ -8155,6 +8217,14 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
8155
8217
  void 0
8156
8218
  ) && isValid;
8157
8219
  }
8220
+ if (previews.analytics !== void 0) {
8221
+ isValid = validateNamedSimpleBinding(envName)(
8222
+ diagnostics,
8223
+ `${field}.analytics`,
8224
+ previews.analytics,
8225
+ void 0
8226
+ ) && isValid;
8227
+ }
8158
8228
  if (previews.ai !== void 0) {
8159
8229
  isValid = validateAIBinding(envName)(
8160
8230
  diagnostics,
@@ -8199,6 +8269,12 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
8199
8269
  previews.secrets_store_secrets,
8200
8270
  void 0
8201
8271
  ) && isValid;
8272
+ isValid = validateBindingArray(envName, validateK2Binding)(
8273
+ diagnostics,
8274
+ `${field}.k2`,
8275
+ previews.k2,
8276
+ void 0
8277
+ ) && isValid;
8202
8278
  isValid = validateBindingArray(envName, validateArtifactsBinding)(
8203
8279
  diagnostics,
8204
8280
  `${field}.artifacts`,
@@ -9339,6 +9415,7 @@ var BINDING_LOCAL_SUPPORT = {
9339
9415
  mtls_certificate: "remote",
9340
9416
  dispatch_namespace: "remote",
9341
9417
  // Reach out to the @cloudflare/wrangler team before adding anything here
9418
+ k2: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9342
9419
  ai: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9343
9420
  ai_search: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9344
9421
  ai_search_namespace: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
@@ -9346,7 +9423,8 @@ var BINDING_LOCAL_SUPPORT = {
9346
9423
  artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9347
9424
  vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9348
9425
  vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9349
- agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
9426
+ agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
9427
+ analytics: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
9350
9428
  };
9351
9429
  function getBindingLocalSupport(type) {
9352
9430
  if (type in BINDING_LOCAL_SUPPORT) {
@@ -9681,6 +9759,13 @@ function mapWorkerMetadataBindings(bindings) {
9681
9759
  };
9682
9760
  }
9683
9761
  break;
9762
+ case "analytics":
9763
+ {
9764
+ configObj.analytics = {
9765
+ binding: binding.name
9766
+ };
9767
+ }
9768
+ break;
9684
9769
  case "ai":
9685
9770
  {
9686
9771
  configObj.ai = {
@@ -9936,6 +10021,12 @@ function mapWorkerMetadataBindings(bindings) {
9936
10021
  }
9937
10022
  ];
9938
10023
  break;
10024
+ case "k2":
10025
+ configObj.k2 = [
10026
+ ...configObj.k2 ?? [],
10027
+ { binding: binding.name, stream: binding.stream }
10028
+ ];
10029
+ break;
9939
10030
  case "assets":
9940
10031
  configObj.assets = {
9941
10032
  binding: binding.name
@@ -10027,7 +10118,7 @@ function mapWorkerMetadataBindings(bindings) {
10027
10118
  __name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
10028
10119
 
10029
10120
  // src/default-compat-date.ts
10030
- var DEFAULT_COMPAT_DATE = "2026-09-25";
10121
+ var DEFAULT_COMPAT_DATE = "2026-10-01";
10031
10122
 
10032
10123
  // src/construct-wrangler-config.ts
10033
10124
  function constructWranglerConfig(config) {
@@ -10179,6 +10270,11 @@ function convertConfigToBindings(config, options) {
10179
10270
  output[binding] = { type: "browser", ...x };
10180
10271
  break;
10181
10272
  }
10273
+ case "analytics": {
10274
+ const { binding, ...x } = info;
10275
+ output[binding] = { type: "analytics", ...x };
10276
+ break;
10277
+ }
10182
10278
  case "durable_objects": {
10183
10279
  for (const { name, ...x } of info.bindings ?? []) {
10184
10280
  output[name] = { type: "durable_object_namespace", ...x };
@@ -10334,6 +10430,15 @@ function convertConfigToBindings(config, options) {
10334
10430
  }
10335
10431
  break;
10336
10432
  }
10433
+ case "k2": {
10434
+ if (pages) {
10435
+ break;
10436
+ }
10437
+ for (const { binding, ...x } of info) {
10438
+ output[binding] = { type: "k2", ...x };
10439
+ }
10440
+ break;
10441
+ }
10337
10442
  case "secrets_store_secrets": {
10338
10443
  for (const { binding, ...x } of info) {
10339
10444
  output[binding] = { type: "secrets_store_secret", ...x };
@@ -10491,6 +10596,7 @@ function printBindings(bindings, options) {
10491
10596
  );
10492
10597
  const text_blobs = extractBindingsOfType("text_blob", bindings);
10493
10598
  const browser = extractBindingsOfType("browser", bindings);
10599
+ const analytics = extractBindingsOfType("analytics", bindings);
10494
10600
  const images = extractBindingsOfType("images", bindings);
10495
10601
  const stream = extractBindingsOfType("stream", bindings);
10496
10602
  const ai = extractBindingsOfType("ai", bindings);
@@ -10508,6 +10614,7 @@ function printBindings(bindings, options) {
10508
10614
  );
10509
10615
  const mtls_certificates = extractBindingsOfType("mtls_certificate", bindings);
10510
10616
  const pipelines = extractBindingsOfType("pipeline", bindings);
10617
+ const k2 = extractBindingsOfType("k2", bindings);
10511
10618
  const ratelimits = extractBindingsOfType("ratelimit", bindings);
10512
10619
  const assets = extractBindingsOfType("assets", bindings);
10513
10620
  const unsafe_hello_world = extractBindingsOfType(
@@ -10887,6 +10994,18 @@ function printBindings(bindings, options) {
10887
10994
  }))
10888
10995
  );
10889
10996
  }
10997
+ if (analytics.length > 0) {
10998
+ output.push(
10999
+ ...analytics.map(({ binding, remote }) => ({
11000
+ name: binding,
11001
+ type: getBindingTypeFriendlyName("analytics"),
11002
+ value: void 0,
11003
+ mode: getMode({
11004
+ isSimulatedLocally: (remote === true || remote === void 0) && !context.remoteBindingsDisabled ? false : void 0
11005
+ })
11006
+ }))
11007
+ );
11008
+ }
10890
11009
  if (images.length > 0) {
10891
11010
  output.push(
10892
11011
  ...images.map(({ binding, remote }) => ({
@@ -10949,6 +11068,19 @@ function printBindings(bindings, options) {
10949
11068
  )
10950
11069
  );
10951
11070
  }
11071
+ if (k2.length > 0) {
11072
+ output.push(
11073
+ ...k2.map(({ binding, stream: k2Stream }) => ({
11074
+ name: binding,
11075
+ type: getBindingTypeFriendlyName("k2"),
11076
+ value: k2Stream,
11077
+ mode: getMode({
11078
+ // K2 always writes to the real stream; `remote: false` is rejected during validation.
11079
+ isSimulatedLocally: context.remoteBindingsDisabled ? void 0 : false
11080
+ })
11081
+ }))
11082
+ );
11083
+ }
10952
11084
  if (ratelimits.length > 0) {
10953
11085
  output.push(
10954
11086
  ...ratelimits.map(({ name, simple }) => ({
@@ -12267,13 +12399,16 @@ You can try:
12267
12399
  __name(validateBinary, "validateBinary");
12268
12400
  function redactCloudflaredArgsForLogging(args) {
12269
12401
  const redacted = [...args];
12402
+ const sensitiveArgs = ["--token", "--allowed-mail"];
12270
12403
  for (let i = 0; i < redacted.length; i++) {
12271
12404
  const arg = redacted[i];
12272
- if (arg === "--token" && i + 1 < redacted.length) {
12273
- redacted[i + 1] = "[REDACTED]";
12274
- }
12275
- if (arg.startsWith("--token=")) {
12276
- redacted[i] = "--token=[REDACTED]";
12405
+ for (const sensitiveArg of sensitiveArgs) {
12406
+ if (arg === sensitiveArg && i + 1 < redacted.length) {
12407
+ redacted[i + 1] = "[REDACTED]";
12408
+ }
12409
+ if (arg.startsWith(`${sensitiveArg}=`)) {
12410
+ redacted[i] = `${sensitiveArg}=[REDACTED]`;
12411
+ }
12277
12412
  }
12278
12413
  }
12279
12414
  return redacted;
@@ -12552,6 +12687,27 @@ async function spawnCloudflared(args, options) {
12552
12687
  confirmDownload: options?.confirmDownload,
12553
12688
  logger
12554
12689
  });
12690
+ if (args.some(
12691
+ (arg) => arg === "--allowed-mail" || arg.startsWith("--allowed-mail=")
12692
+ )) {
12693
+ const minimumVersion = "2026.9.2";
12694
+ const installedVersion = getInstalledVersion(binPath);
12695
+ if (!installedVersion || isVersionOutdated(installedVersion, minimumVersion)) {
12696
+ throw new UserError(
12697
+ `[cloudflared] --allowed-mail requires cloudflared ${minimumVersion} or later.
12698
+
12699
+ ` + (installedVersion ? `The selected binary (${binPath}) is version ${installedVersion}.
12700
+
12701
+ ` : `Could not determine the version of the selected binary (${binPath}).
12702
+
12703
+ `) + `Update cloudflared in your PATH or set CLOUDFLARED_PATH to a compatible binary.
12704
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
12705
+ {
12706
+ telemetryMessage: "tunnel cloudflared allowed mail unsupported version"
12707
+ }
12708
+ );
12709
+ }
12710
+ }
12555
12711
  logger?.debug(
12556
12712
  `Spawning cloudflared: ${binPath} ${redactCloudflaredArgsForLogging(args).join(" ")}`
12557
12713
  );