@cloudflare/workers-utils 0.33.1 → 0.34.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 { T as TailConsumer, aP as WorkerMetadata, R as RawConfig } from './config-CRUFg2tu.mjs';
1
+ import { be as TailConsumer, bi as WorkerMetadata, R as RawConfig } from './config-BnUbzrPY.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-IV7UMGT2.mjs';
1
+ export { constructWranglerConfig } from './chunk-QKX75RGI.mjs';
2
2
  import './chunk-Q72B4Q5Z.mjs';
@@ -8,15 +8,15 @@ function hasKnownExportType(entry) {
8
8
  return type === "durable-object" || type === "worker";
9
9
  }
10
10
  __name(hasKnownExportType, "hasKnownExportType");
11
- function partitionExports(exports) {
11
+ function partitionExports(exports$1) {
12
12
  const partitioned = {
13
13
  "durable-object": {},
14
14
  worker: {}
15
15
  };
16
- if (exports === void 0) {
16
+ if (exports$1 === void 0) {
17
17
  return partitioned;
18
18
  }
19
- for (const [name, entry] of Object.entries(exports)) {
19
+ for (const [name, entry] of Object.entries(exports$1)) {
20
20
  if (!hasKnownExportType(entry)) {
21
21
  continue;
22
22
  }
@@ -27,20 +27,20 @@ function partitionExports(exports) {
27
27
  __name(partitionExports, "partitionExports");
28
28
 
29
29
  // src/config/durable-object-exports.ts
30
- function getDurableObjectExports(exports) {
31
- return partitionExports(exports)["durable-object"];
30
+ function getDurableObjectExports(exports$1) {
31
+ return partitionExports(exports$1)["durable-object"];
32
32
  }
33
33
  __name(getDurableObjectExports, "getDurableObjectExports");
34
- function hasDurableObjectExports(exports) {
35
- return Object.keys(getDurableObjectExports(exports)).length > 0;
34
+ function hasDurableObjectExports(exports$1) {
35
+ return Object.keys(getDurableObjectExports(exports$1)).length > 0;
36
36
  }
37
37
  __name(hasDurableObjectExports, "hasDurableObjectExports");
38
38
 
39
39
  // src/config/containers.ts
40
- function getContainerNameToClassNameMap(exports) {
40
+ function getContainerNameToClassNameMap(exports$1) {
41
41
  const containerNameToClassName = /* @__PURE__ */ new Map();
42
42
  for (const [className, entry] of Object.entries(
43
- getDurableObjectExports(exports)
43
+ getDurableObjectExports(exports$1)
44
44
  )) {
45
45
  if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) {
46
46
  containerNameToClassName.set(entry.container, className);
@@ -49,20 +49,20 @@ function getContainerNameToClassNameMap(exports) {
49
49
  return containerNameToClassName;
50
50
  }
51
51
  __name(getContainerNameToClassNameMap, "getContainerNameToClassNameMap");
52
- function resolveContainerClassName(container, exports) {
52
+ function resolveContainerClassName(container, exports$1) {
53
53
  if (container.class_name !== void 0) {
54
54
  return container.class_name;
55
55
  }
56
56
  if (container.name === void 0) {
57
57
  return void 0;
58
58
  }
59
- return getContainerNameToClassNameMap(exports).get(container.name);
59
+ return getContainerNameToClassNameMap(exports$1).get(container.name);
60
60
  }
61
61
  __name(resolveContainerClassName, "resolveContainerClassName");
62
- function getContainerDurableObjectClassNames(containers, exports) {
62
+ function getContainerDurableObjectClassNames(containers, exports$1) {
63
63
  const classNames = /* @__PURE__ */ new Set();
64
64
  for (const container of containers ?? []) {
65
- const className = resolveContainerClassName(container, exports);
65
+ const className = resolveContainerClassName(container, exports$1);
66
66
  if (className !== void 0) {
67
67
  classNames.add(className);
68
68
  }
@@ -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-08-15";
4
+ var DEFAULT_COMPAT_DATE = "2026-08-20";
5
5
 
6
6
  // src/assert-never.ts
7
7
  function assertNever(_value) {
@@ -1,5 +1,5 @@
1
1
  import { URLSearchParams } from 'node:url';
2
- import { RequestInit, Response as Response$1, Headers, MockAgent } from 'undici';
2
+ import { RequestInit, Headers, Response as Response$1, MockAgent } from 'undici';
3
3
  import { RouterConfig, AssetConfig } from '@cloudflare/workers-shared';
4
4
 
5
5
  interface FetchError {
@@ -555,7 +555,6 @@ interface CfWorkflow {
555
555
  class_name: string;
556
556
  binding: string;
557
557
  script_name?: string;
558
- remote?: boolean;
559
558
  raw?: boolean;
560
559
  limits?: {
561
560
  steps?: number;
@@ -1291,7 +1290,12 @@ type Trigger = {
1291
1290
  cron: string;
1292
1291
  } | ({
1293
1292
  type: "queue-consumer";
1294
- } & Omit<QueueConsumer, "type">);
1293
+ } & Omit<QueueConsumer, "type">) | {
1294
+ type: "connect";
1295
+ protocol: "tcp";
1296
+ port: number;
1297
+ address?: string;
1298
+ };
1295
1299
  type BindingOmit<T> = Omit<T, "binding">;
1296
1300
  type NameOmit<T> = Omit<T, "name">;
1297
1301
  type Binding = {
@@ -2366,8 +2370,6 @@ type WorkflowBinding = {
2366
2370
  class_name: string;
2367
2371
  /** The script where the Workflow is defined (if it's external to this Worker) */
2368
2372
  script_name?: string;
2369
- /** Whether the Workflow should be remote or not in local development */
2370
- remote?: boolean;
2371
2373
  /** Optional limits for the Workflow */
2372
2374
  limits?: {
2373
2375
  /** Maximum number of steps a Workflow instance can execute */
@@ -2565,6 +2567,26 @@ interface EnvironmentNonInheritable {
2565
2567
  retry_delay?: number;
2566
2568
  }[];
2567
2569
  };
2570
+ /**
2571
+ * Specifies raw sockets that this Worker should listen on.
2572
+ * Each entry opens a listening socket on the
2573
+ * given port that delivers incoming connections directly to the Worker's
2574
+ * `connect(socket, env, ctx)` handler.
2575
+ *
2576
+ * NOTE: This field is not automatically inherited from the top level environment,
2577
+ * and so must be specified in every named environment.
2578
+ *
2579
+ * @default []
2580
+ * @nonInheritable
2581
+ */
2582
+ connect: {
2583
+ /** The transport protocol to listen for. */
2584
+ protocol: "tcp";
2585
+ /** The port to listen on. */
2586
+ port: number;
2587
+ /** The address to bind to. Defaults to `127.0.0.1`. */
2588
+ address?: string;
2589
+ }[];
2568
2590
  /**
2569
2591
  * Specifies R2 buckets that are bound to this Worker environment.
2570
2592
  *
@@ -3566,4 +3588,4 @@ interface EnvironmentMap {
3566
3588
  }
3567
3589
  declare const defaultWranglerConfig: Config;
3568
3590
 
3569
- export { type CfTextBlobBindings as $, ARTIFACTS_EVENT_TYPES as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type DispatchNamespaceOutbound as F, type Assets as G, type Access as H, type CacheOptions as I, type DockerConfiguration as J, type ContainerEngine as K, type Logger as L, type CfScriptFormat as M, type CfModuleType as N, type Observability as O, type PreviewsConfig as P, type CfModule as Q, type RawConfig as R, type StreamingTailConsumer as S, type TailConsumer as T, type UserLimits as U, type CfVars as V, type WorkerEntrypointExport as W, type CfKvNamespace as X, type CfSendEmailBindings as Y, type ZoneIdRoute as Z, type CfWasmModuleBindings as _, type RedirectedRawConfig as a, type BinaryFile as a$, type CfBrowserBinding as a0, type CfAIBinding as a1, type CfImagesBinding as a2, type CfMediaBinding as a3, type CfStreamBinding as a4, type CfVersionMetadataBinding as a5, type CfDataBlobBindings as a6, type CfDurableObject as a7, type CfWorkflow as a8, type CfQueue as a9, type CfCapnp as aA, type CfUnsafe as aB, type CfDurableObjectMigrations as aC, type CfExports as aD, type CfPlacement as aE, type CfTailConsumer as aF, type CfUserLimits as aG, type CfWorkerInit as aH, type CfWorkerContext as aI, type CfWorkerSourceMap as aJ, type Json as aK, type AssetConfigMetadata as aL, type AssetsOptions as aM, type ValidatedAssetsOptions as aN, type LegacyAssetPaths as aO, type WorkerMetadata as aP, type ExportsReconciliationEntryBase as aQ, type ExportsReconciliationInfo as aR, type ExportsReconciliationWarning as aS, type ExportsReconciliationErrorDetail as aT, type ExportsReconciliationRename as aU, type ExportsReconciliationTransfer as aV, type ExportsReconciliationTransferPending as aW, type ExportsReconciliationResult as aX, type ServiceMetadataRes as aY, type ServiceFetch as aZ, type File as a_, type CfR2Bucket as aa, type CfD1Database as ab, type CfVectorize as ac, type CfAISearchNamespace as ad, type CfAISearch as ae, type CfWebSearch as af, type CfAgentMemory as ag, type CfSecretsStoreSecrets as ah, type CfArtifacts as ai, type CfHelloWorld as aj, type CfFlagship as ak, type CfWorkerLoader as al, type CfRateLimit as am, type CfHyperdrive as an, type CfDevPluginCfg as ao, type CfService as ap, type CfVpcService as aq, type CfVpcNetwork as ar, type CfAnalyticsEngineDataset as as, type CfDispatchNamespace as at, type CfMTlsCertificate as au, type CfLogfwdr as av, type CfLogfwdrBinding as aw, type CfAssetsBinding as ax, type CfPipeline as ay, type CfUnsafeBinding as az, type Config as b, truncate as b$, type Trigger as b0, type CfAccount as b1, type HookValues as b2, type Hook as b3, type AsyncHook as b4, type LogLevel as b5, type NodeJSCompatMode as b6, type StartDevWorkerInput as b7, type Entry as b8, INHERIT_SYMBOL as b9, getRegistryPath as bA, getD1ExtraLocationChoices as bB, getDockerPath as bC, getSubdomainMixedStateCheckDisabled as bD, getCloudflareLoadDevVarsFromDotEnv as bE, getCloudflareIncludeProcessEnvFromEnv as bF, getTraceHeader as bG, getDisableConfigWatching as bH, getWranglerHideBanner as bI, getCloudflareEnv as bJ, getOpenNextDeployFromEnv as bK, getLocalExplorerEnabledFromEnv as bL, getLocalObservabilityEnabledFromEnv as bM, getBrowserRenderingHeadfulFromEnv as bN, getCfFetchEnabledFromEnv as bO, getCfFetchPathFromEnv as bP, getWranglerCacheDirFromEnv as bQ, getCloudflaredPathFromEnv as bR, type ApiCredentials as bS, type FetchResult as bT, type FetchResultFetcher as bU, type FetchListResultFetcher as bV, type FetchPagedListResultFetcher as bW, performApiFetchBase as bX, fetchInternalBase as bY, fetchResultBase as bZ, fetchListResultBase as b_, SERVICE_TAG_PREFIX as ba, ENVIRONMENT_TAG_PREFIX as bb, PATH_TO_DEPLOY_CONFIG as bc, JSON_CONFIG_FORMATS as bd, getC3CommandFromEnv as be, isDoNotTrackEnabled as bf, getWranglerSendMetricsFromEnv as bg, getNoSkillsUpdatePromptsFromEnv as bh, getWranglerSendErrorReportsFromEnv as bi, getCloudflareApiEnvironmentFromEnv as bj, type ComplianceConfig as bk, COMPLIANCE_REGION_CONFIG_PUBLIC as bl, COMPLIANCE_REGION_CONFIG_UNKNOWN as bm, getCloudflareComplianceRegion as bn, getCloudflareApiBaseUrl as bo, getComplianceRegionSubdomain as bp, getSanitizeLogs as bq, getOutputFileDirectoryFromEnv as br, getOutputFilePathFromEnv as bs, getCIMatchTag as bt, getCIOverrideName as bu, getCIOverrideNetworkModeHost as bv, getCIGeneratePreviewAlias as bw, getWorkersCIBranchName as bx, getBuildConditionsFromEnv as by, getBuildPlatformFromEnv as bz, type ContainerApp as c, isWAFBlockResponse as c0, parseRetryAfterValue as c1, parseRetryAfterMs as c2, extractWAFBlockRayId as c3, extractAccountTag as c4, hasMorePages as c5, renderError as c6, addAuthorizationHeader as c7, throwFetchError as c8, fetchKVGetValueBase as c9, type FetchKVGetValueFetcher as ca, hasCursor as cb, maybeAddTraceHeader as cc, type WorkerMetadataBinding as d, type Route as e, type RawDevConfig as f, type ConfigFields as g, type RawEnvironment as h, defaultWranglerConfig as i, LOGGER_LEVELS as j, type LoggerLevel as k, type Environment as l, type LocalS3Credentials as m, type ZoneNameRoute as n, type CustomDomainRoute as o, type CloudchamberConfig as p, type DurableObjectMigration as q, type DurableObjectExportStorage as r, type ConfiguredExport as s, type DurableObjectBindings as t, type ArtifactsEventType as u, type ArtifactsEventTrigger as v, type WorkflowBinding as w, type EnvironmentNonInheritable as x, type Rule as y, type ConfigModuleRuleType as z };
3591
+ export { type CfPipeline as $, ARTIFACTS_EVENT_TYPES as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfCapnp as F, type CfD1Database as G, type CfDataBlobBindings as H, type CfDevPluginCfg as I, type CfDispatchNamespace as J, type CfDurableObject as K, type Logger as L, type CfDurableObjectMigrations as M, type CfExports as N, type CfFlagship as O, type CfHelloWorld as P, type CfHyperdrive as Q, type RawConfig as R, type CfImagesBinding as S, type CfKvNamespace as T, type CfLogfwdr as U, type CfLogfwdrBinding as V, type WorkerEntrypointExport as W, type CfMTlsCertificate as X, type CfMediaBinding as Y, type CfModule as Z, type CfModuleType as _, type RedirectedRawConfig as a, type LocalS3Credentials as a$, type CfPlacement as a0, type CfQueue as a1, type CfR2Bucket as a2, type CfRateLimit as a3, type CfScriptFormat as a4, type CfSecretsStoreSecrets as a5, type CfSendEmailBindings as a6, type CfService as a7, type CfStreamBinding as a8, type CfTailConsumer as a9, type DurableObjectExportStorage as aA, type DurableObjectMigration as aB, ENVIRONMENT_TAG_PREFIX as aC, type Entry as aD, type Environment as aE, type EnvironmentNonInheritable as aF, type ExportsReconciliationEntryBase as aG, type ExportsReconciliationErrorDetail as aH, type ExportsReconciliationInfo as aI, type ExportsReconciliationRename as aJ, type ExportsReconciliationResult as aK, type ExportsReconciliationTransfer as aL, type ExportsReconciliationTransferPending as aM, type ExportsReconciliationWarning as aN, type FetchKVGetValueFetcher as aO, type FetchListResultFetcher as aP, type FetchPagedListResultFetcher as aQ, type FetchResult as aR, type FetchResultFetcher as aS, type File as aT, type Hook as aU, type HookValues as aV, INHERIT_SYMBOL as aW, JSON_CONFIG_FORMATS as aX, type Json as aY, LOGGER_LEVELS as aZ, type LegacyAssetPaths as a_, type CfTextBlobBindings as aa, type CfUnsafe as ab, type CfUnsafeBinding as ac, type CfUserLimits as ad, type CfVars as ae, type CfVectorize as af, type CfVersionMetadataBinding as ag, type CfVpcNetwork as ah, type CfVpcService as ai, type CfWasmModuleBindings as aj, type CfWebSearch 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 ComplianceConfig as ar, type ConfigFields as as, type ConfigModuleRuleType as at, type ConfiguredExport as au, type ContainerEngine as av, type CustomDomainRoute as aw, type DispatchNamespaceOutbound as ax, type DockerConfiguration as ay, type DurableObjectBindings as az, type Config as b, getWranglerHideBanner as b$, type LogLevel as b0, type LoggerLevel as b1, type NodeJSCompatMode as b2, type Observability as b3, PATH_TO_DEPLOY_CONFIG as b4, type PreviewsConfig as b5, type RawDevConfig as b6, type RawEnvironment as b7, type Rule as b8, SERVICE_TAG_PREFIX as b9, getCIOverrideName as bA, getCIOverrideNetworkModeHost as bB, getCfFetchEnabledFromEnv as bC, getCfFetchPathFromEnv as bD, getCloudflareApiBaseUrl as bE, getCloudflareApiEnvironmentFromEnv as bF, getCloudflareComplianceRegion as bG, getCloudflareEnv as bH, getCloudflareIncludeProcessEnvFromEnv as bI, getCloudflareLoadDevVarsFromDotEnv as bJ, getCloudflaredPathFromEnv as bK, getComplianceRegionSubdomain as bL, getD1ExtraLocationChoices as bM, getDisableConfigWatching as bN, getDockerPath as bO, getLocalExplorerEnabledFromEnv as bP, getLocalObservabilityEnabledFromEnv as bQ, getNoSkillsUpdatePromptsFromEnv as bR, getOpenNextDeployFromEnv as bS, getOutputFileDirectoryFromEnv as bT, getOutputFilePathFromEnv as bU, getRegistryPath as bV, getSanitizeLogs as bW, getSubdomainMixedStateCheckDisabled as bX, getTraceHeader as bY, getWorkersCIBranchName as bZ, getWranglerCacheDirFromEnv as b_, type ServiceFetch as ba, type ServiceMetadataRes as bb, type StartDevWorkerInput as bc, type StreamingTailConsumer as bd, type TailConsumer as be, type Trigger as bf, type UserLimits as bg, type ValidatedAssetsOptions as bh, type WorkerMetadata as bi, type WorkflowBinding as bj, type ZoneIdRoute as bk, type ZoneNameRoute as bl, addAuthorizationHeader as bm, defaultWranglerConfig as bn, extractAccountTag as bo, extractWAFBlockRayId as bp, fetchInternalBase as bq, fetchKVGetValueBase as br, fetchListResultBase as bs, fetchResultBase as bt, getBrowserRenderingHeadfulFromEnv as bu, getBuildConditionsFromEnv as bv, getBuildPlatformFromEnv as bw, getC3CommandFromEnv as bx, getCIGeneratePreviewAlias as by, getCIMatchTag as bz, type ContainerApp as c, getWranglerSendErrorReportsFromEnv as c0, getWranglerSendMetricsFromEnv as c1, hasCursor as c2, hasMorePages as c3, isDoNotTrackEnabled as c4, isWAFBlockResponse as c5, maybeAddTraceHeader as c6, parseRetryAfterMs as c7, parseRetryAfterValue as c8, performApiFetchBase as c9, renderError as ca, throwFetchError as cb, truncate as cc, type WorkerMetadataBinding as d, type Route as e, type Access as f, type ApiCredentials as g, type ArtifactsEventTrigger as h, type ArtifactsEventType as i, type AssetConfigMetadata as j, type Assets as k, type AssetsOptions as l, type AsyncHook as m, type BinaryFile as n, COMPLIANCE_REGION_CONFIG_PUBLIC as o, COMPLIANCE_REGION_CONFIG_UNKNOWN as p, type CacheOptions as q, type CfAIBinding as r, type CfAISearch as s, type CfAISearchNamespace as t, type CfAccount as u, type CfAgentMemory as v, type CfAnalyticsEngineDataset as w, type CfArtifacts as x, type CfAssetsBinding as y, type CfBrowserBinding as z };
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, L as Logger, e as Route } from './config-CRUFg2tu.mjs';
2
- export { A as ARTIFACTS_EVENT_TYPES, H as Access, bS as ApiCredentials, v as ArtifactsEventTrigger, u as ArtifactsEventType, aL as AssetConfigMetadata, G as Assets, aM as AssetsOptions, b4 as AsyncHook, a$ as BinaryFile, bl as COMPLIANCE_REGION_CONFIG_PUBLIC, bm as COMPLIANCE_REGION_CONFIG_UNKNOWN, I as CacheOptions, a1 as CfAIBinding, ae as CfAISearch, ad as CfAISearchNamespace, b1 as CfAccount, ag as CfAgentMemory, as as CfAnalyticsEngineDataset, ai as CfArtifacts, ax as CfAssetsBinding, a0 as CfBrowserBinding, aA as CfCapnp, ab as CfD1Database, a6 as CfDataBlobBindings, ao as CfDevPluginCfg, at as CfDispatchNamespace, a7 as CfDurableObject, aC as CfDurableObjectMigrations, aD as CfExports, ak as CfFlagship, aj as CfHelloWorld, an as CfHyperdrive, a2 as CfImagesBinding, X as CfKvNamespace, av as CfLogfwdr, aw as CfLogfwdrBinding, au as CfMTlsCertificate, a3 as CfMediaBinding, Q as CfModule, N as CfModuleType, ay as CfPipeline, aE as CfPlacement, a9 as CfQueue, aa as CfR2Bucket, am as CfRateLimit, M as CfScriptFormat, ah as CfSecretsStoreSecrets, Y as CfSendEmailBindings, ap as CfService, a4 as CfStreamBinding, aF as CfTailConsumer, $ as CfTextBlobBindings, aB as CfUnsafe, az as CfUnsafeBinding, aG as CfUserLimits, V as CfVars, ac as CfVectorize, a5 as CfVersionMetadataBinding, ar as CfVpcNetwork, aq as CfVpcService, _ as CfWasmModuleBindings, af as CfWebSearch, aI as CfWorkerContext, aH as CfWorkerInit, al as CfWorkerLoader, aJ as CfWorkerSourceMap, a8 as CfWorkflow, p as CloudchamberConfig, bk as ComplianceConfig, g as ConfigFields, z as ConfigModuleRuleType, s as ConfiguredExport, K as ContainerEngine, o as CustomDomainRoute, F as DispatchNamespaceOutbound, J as DockerConfiguration, t as DurableObjectBindings, r as DurableObjectExportStorage, q as DurableObjectMigration, bb as ENVIRONMENT_TAG_PREFIX, b8 as Entry, l as Environment, x as EnvironmentNonInheritable, aQ as ExportsReconciliationEntryBase, aT as ExportsReconciliationErrorDetail, aR as ExportsReconciliationInfo, aU as ExportsReconciliationRename, aX as ExportsReconciliationResult, aV as ExportsReconciliationTransfer, aW as ExportsReconciliationTransferPending, aS as ExportsReconciliationWarning, ca as FetchKVGetValueFetcher, bV as FetchListResultFetcher, bW as FetchPagedListResultFetcher, bT as FetchResult, bU as FetchResultFetcher, a_ as File, b3 as Hook, b2 as HookValues, b9 as INHERIT_SYMBOL, bd as JSON_CONFIG_FORMATS, aK as Json, j as LOGGER_LEVELS, aO as LegacyAssetPaths, m as LocalS3Credentials, b5 as LogLevel, k as LoggerLevel, b6 as NodeJSCompatMode, O as Observability, bc as PATH_TO_DEPLOY_CONFIG, P as PreviewsConfig, f as RawDevConfig, h as RawEnvironment, a as RedirectedRawConfig, y as Rule, ba as SERVICE_TAG_PREFIX, aZ as ServiceFetch, aY as ServiceMetadataRes, b7 as StartDevWorkerInput, S as StreamingTailConsumer, T as TailConsumer, b0 as Trigger, U as UserLimits, aN as ValidatedAssetsOptions, aP as WorkerMetadata, w as WorkflowBinding, Z as ZoneIdRoute, n as ZoneNameRoute, c7 as addAuthorizationHeader, i as defaultWranglerConfig, c4 as extractAccountTag, c3 as extractWAFBlockRayId, bY as fetchInternalBase, c9 as fetchKVGetValueBase, b_ as fetchListResultBase, bZ as fetchResultBase, bN as getBrowserRenderingHeadfulFromEnv, by as getBuildConditionsFromEnv, bz as getBuildPlatformFromEnv, be as getC3CommandFromEnv, bw as getCIGeneratePreviewAlias, bt as getCIMatchTag, bu as getCIOverrideName, bv as getCIOverrideNetworkModeHost, bO as getCfFetchEnabledFromEnv, bP as getCfFetchPathFromEnv, bo as getCloudflareApiBaseUrl, bj as getCloudflareApiEnvironmentFromEnv, bn as getCloudflareComplianceRegion, bJ as getCloudflareEnv, bF as getCloudflareIncludeProcessEnvFromEnv, bE as getCloudflareLoadDevVarsFromDotEnv, bR as getCloudflaredPathFromEnv, bp as getComplianceRegionSubdomain, bB as getD1ExtraLocationChoices, bH as getDisableConfigWatching, bC as getDockerPath, bL as getLocalExplorerEnabledFromEnv, bM as getLocalObservabilityEnabledFromEnv, bh as getNoSkillsUpdatePromptsFromEnv, bK as getOpenNextDeployFromEnv, br as getOutputFileDirectoryFromEnv, bs as getOutputFilePathFromEnv, bA as getRegistryPath, bq as getSanitizeLogs, bD as getSubdomainMixedStateCheckDisabled, bG as getTraceHeader, bx as getWorkersCIBranchName, bQ as getWranglerCacheDirFromEnv, bI as getWranglerHideBanner, bi as getWranglerSendErrorReportsFromEnv, bg as getWranglerSendMetricsFromEnv, cb as hasCursor, c5 as hasMorePages, bf as isDoNotTrackEnabled, c0 as isWAFBlockResponse, cc as maybeAddTraceHeader, c2 as parseRetryAfterMs, c1 as parseRetryAfterValue, bX as performApiFetchBase, c6 as renderError, c8 as throwFetchError, b$ as truncate } from './config-CRUFg2tu.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, L as Logger, e as Route } from './config-BnUbzrPY.mjs';
2
+ export { A as ARTIFACTS_EVENT_TYPES, f as Access, g as ApiCredentials, h as ArtifactsEventTrigger, i as ArtifactsEventType, j as AssetConfigMetadata, k as Assets, l as AssetsOptions, m as AsyncHook, n as BinaryFile, o as COMPLIANCE_REGION_CONFIG_PUBLIC, p as COMPLIANCE_REGION_CONFIG_UNKNOWN, q as CacheOptions, r as CfAIBinding, s as CfAISearch, t as CfAISearchNamespace, u as CfAccount, v as CfAgentMemory, w as CfAnalyticsEngineDataset, x as CfArtifacts, y as CfAssetsBinding, z as CfBrowserBinding, F as CfCapnp, G as CfD1Database, H as CfDataBlobBindings, I as CfDevPluginCfg, J as CfDispatchNamespace, K as CfDurableObject, M as CfDurableObjectMigrations, N as CfExports, O as CfFlagship, P as CfHelloWorld, Q as CfHyperdrive, S as CfImagesBinding, T as CfKvNamespace, U as CfLogfwdr, V as CfLogfwdrBinding, X as CfMTlsCertificate, Y as CfMediaBinding, Z as CfModule, _ as CfModuleType, $ as CfPipeline, a0 as CfPlacement, a1 as CfQueue, a2 as CfR2Bucket, a3 as CfRateLimit, a4 as CfScriptFormat, a5 as CfSecretsStoreSecrets, a6 as CfSendEmailBindings, a7 as CfService, a8 as CfStreamBinding, a9 as CfTailConsumer, aa as CfTextBlobBindings, ab as CfUnsafe, ac as CfUnsafeBinding, ad as CfUserLimits, ae as CfVars, af as CfVectorize, ag as CfVersionMetadataBinding, ah as CfVpcNetwork, ai as CfVpcService, aj as CfWasmModuleBindings, ak as CfWebSearch, al as CfWorkerContext, am as CfWorkerInit, an as CfWorkerLoader, ao as CfWorkerSourceMap, ap as CfWorkflow, aq as CloudchamberConfig, ar as ComplianceConfig, as as ConfigFields, at as ConfigModuleRuleType, au as ConfiguredExport, av as ContainerEngine, aw as CustomDomainRoute, ax as DispatchNamespaceOutbound, ay as DockerConfiguration, az as DurableObjectBindings, aA as DurableObjectExportStorage, aB as DurableObjectMigration, aC as ENVIRONMENT_TAG_PREFIX, aD as Entry, aE as Environment, aF as EnvironmentNonInheritable, aG as ExportsReconciliationEntryBase, aH as ExportsReconciliationErrorDetail, aI as ExportsReconciliationInfo, aJ as ExportsReconciliationRename, aK as ExportsReconciliationResult, aL as ExportsReconciliationTransfer, aM as ExportsReconciliationTransferPending, aN as ExportsReconciliationWarning, aO as FetchKVGetValueFetcher, aP as FetchListResultFetcher, aQ as FetchPagedListResultFetcher, aR as FetchResult, aS as FetchResultFetcher, aT as File, aU as Hook, aV as HookValues, aW as INHERIT_SYMBOL, aX as JSON_CONFIG_FORMATS, aY as Json, aZ as LOGGER_LEVELS, a_ as LegacyAssetPaths, a$ as LocalS3Credentials, b0 as LogLevel, b1 as LoggerLevel, b2 as NodeJSCompatMode, b3 as Observability, b4 as PATH_TO_DEPLOY_CONFIG, b5 as PreviewsConfig, b6 as RawDevConfig, b7 as RawEnvironment, a as RedirectedRawConfig, b8 as Rule, b9 as SERVICE_TAG_PREFIX, ba as ServiceFetch, bb as ServiceMetadataRes, bc as StartDevWorkerInput, bd as StreamingTailConsumer, be as TailConsumer, bf as Trigger, bg as UserLimits, bh as ValidatedAssetsOptions, bi as WorkerMetadata, bj as WorkflowBinding, bk as ZoneIdRoute, bl as ZoneNameRoute, bm as addAuthorizationHeader, bn as defaultWranglerConfig, bo as extractAccountTag, bp as extractWAFBlockRayId, bq as fetchInternalBase, br as fetchKVGetValueBase, bs as fetchListResultBase, bt as fetchResultBase, bu as getBrowserRenderingHeadfulFromEnv, bv as getBuildConditionsFromEnv, bw as getBuildPlatformFromEnv, bx as getC3CommandFromEnv, by as getCIGeneratePreviewAlias, bz as getCIMatchTag, bA as getCIOverrideName, bB as getCIOverrideNetworkModeHost, bC as getCfFetchEnabledFromEnv, bD as getCfFetchPathFromEnv, bE as getCloudflareApiBaseUrl, bF as getCloudflareApiEnvironmentFromEnv, bG as getCloudflareComplianceRegion, bH as getCloudflareEnv, bI as getCloudflareIncludeProcessEnvFromEnv, bJ as getCloudflareLoadDevVarsFromDotEnv, bK as getCloudflaredPathFromEnv, bL as getComplianceRegionSubdomain, bM as getD1ExtraLocationChoices, bN as getDisableConfigWatching, bO as getDockerPath, bP as getLocalExplorerEnabledFromEnv, bQ as getLocalObservabilityEnabledFromEnv, bR as getNoSkillsUpdatePromptsFromEnv, bS as getOpenNextDeployFromEnv, bT as getOutputFileDirectoryFromEnv, bU as getOutputFilePathFromEnv, bV as getRegistryPath, bW as getSanitizeLogs, bX as getSubdomainMixedStateCheckDisabled, bY as getTraceHeader, bZ as getWorkersCIBranchName, b_ as getWranglerCacheDirFromEnv, b$ as getWranglerHideBanner, c0 as getWranglerSendErrorReportsFromEnv, c1 as getWranglerSendMetricsFromEnv, c2 as hasCursor, c3 as hasMorePages, c4 as isDoNotTrackEnabled, c5 as isWAFBlockResponse, c6 as maybeAddTraceHeader, c7 as parseRetryAfterMs, c8 as parseRetryAfterValue, c9 as performApiFetchBase, ca as renderError, cb as throwFetchError, cc as truncate } from './config-BnUbzrPY.mjs';
3
3
  import * as jsoncParser from 'jsonc-parser';
4
4
  export { constructWranglerConfig } from './browser.mjs';
5
5
  export { GetGlobalConfigPathOptions, getGlobalConfigPath, getGlobalWranglerCachePath } from './global-wrangler-config-path.mjs';
@@ -462,11 +462,14 @@ declare function assertNever(_value: never): void;
462
462
  /**
463
463
  * Resolves the filesystem path for an installed npm package.
464
464
  *
465
- * Tries two strategies:
466
- * 1. `require.resolve("<pkg>/package.json")` -- works when the package exports its package.json
467
- * 2. `require.resolve("<pkg>")` -- fallback for packages that don't export package.json
465
+ * Tries three strategies in order:
466
+ * 1. `require.resolve("<pkg>/package.json")` — works when the package exports its `package.json`
467
+ * 2. `require.resolve("<pkg>")` — fallback for packages that don't export `package.json`
468
+ * 3. Direct `node_modules` filesystem lookup — fallback for ESM-only packages whose exports
469
+ * map has no `"require"` or `"default"` condition (and no `"./package.json"` export),
470
+ * which makes them invisible to `require.resolve`
468
471
  *
469
- * @param packageName - The npm package name to resolve
472
+ * @param packageName - The npm package name to resolve (supports scoped packages like `@scope/pkg`)
470
473
  * @param projectPath - The project directory to resolve from
471
474
  * @returns The resolved directory path, or `undefined` if the package is not installed
472
475
  */
@@ -979,6 +982,152 @@ declare function isCI(): boolean;
979
982
  */
980
983
  declare function openInBrowser(url: string, logger: Logger): Promise<void>;
981
984
 
985
+ /**
986
+ * Write an entry to the output file.
987
+ *
988
+ * Control whether (and where) to write this file by setting either
989
+ * `WRANGLER_OUTPUT_FILE_DIRECTORY` or `WRANGLER_OUTPUT_FILE_PATH`.
990
+ *
991
+ * @param entry The structured output entry to append.
992
+ * @returns Nothing.
993
+ */
994
+ declare function writeOutput(entry: OutputEntry): void;
995
+ /**
996
+ * Clear the cached output file path.
997
+ *
998
+ * @returns Nothing.
999
+ */
1000
+ declare function clearOutputFilePath(): void;
1001
+ interface OutputEntryBase<T extends string> {
1002
+ version: number;
1003
+ type: T;
1004
+ }
1005
+ /**
1006
+ * All the different types of entry that can be written to the output file.
1007
+ */
1008
+ type OutputEntry = OutputEntrySession | OutputEntryDeployment | OutputEntryPreview | OutputEntryPagesDeployment | OutputEntryVersionUpload | OutputEntryVersionDeployment | OutputEntryPagesDeploymentDetailed | OutputEntryCommandFailed | OutputEntryAutoConfig;
1009
+ interface OutputEntrySession extends OutputEntryBase<"wrangler-session"> {
1010
+ version: 1;
1011
+ /** The semver version string taken from Wrangler's package.json. */
1012
+ wrangler_version: string;
1013
+ /** The arguments passed to Wrangler. */
1014
+ command_line_args: string[];
1015
+ /** The absolute path to a file that contains debug logs for this Wrangler instance. */
1016
+ log_file_path: string;
1017
+ }
1018
+ interface OutputEntryDeployment extends OutputEntryBase<"deploy"> {
1019
+ version: 1;
1020
+ /** The name of the Worker. */
1021
+ worker_name: string | null;
1022
+ /** The GUID that identifies the Worker. This never changes even if the name is changed. */
1023
+ worker_tag: string | null;
1024
+ /** A GUID that identifies this deployed version of the Worker. This version is associated with an automatically created deployment, with this version set at 100%. */
1025
+ version_id: string | null;
1026
+ /** A list of URLs that represent the HTTP triggers associated with this deployment */
1027
+ targets: string[] | undefined;
1028
+ /** set if the worker's name was overridden */
1029
+ worker_name_overridden: boolean;
1030
+ /** wrangler environment used */
1031
+ wrangler_environment: string | undefined;
1032
+ }
1033
+ interface OutputEntryPreview extends OutputEntryBase<"preview"> {
1034
+ version: 1;
1035
+ /** The name of the Worker. */
1036
+ worker_name: string | null;
1037
+ /** The ID of the Preview resource. */
1038
+ preview_id: string;
1039
+ /** The human-readable name of the Preview resource. */
1040
+ preview_name: string;
1041
+ /** The slug of the Preview resource. */
1042
+ preview_slug: string;
1043
+ /** A list of URLs associated with the Preview resource. */
1044
+ preview_urls: string[] | undefined;
1045
+ /** The ID of the Preview deployment resource. */
1046
+ deployment_id: string;
1047
+ /** A list of URLs associated with the Preview deployment. */
1048
+ deployment_urls: string[] | undefined;
1049
+ }
1050
+ interface OutputEntryAutoConfig extends OutputEntryBase<"autoconfig"> {
1051
+ version: 1;
1052
+ /** The command that triggered autoconfig */
1053
+ command: "setup" | "deploy";
1054
+ /** The summary of the autoconfig process */
1055
+ summary: {
1056
+ wranglerConfig?: {
1057
+ name?: string;
1058
+ compatibility_date?: string;
1059
+ };
1060
+ [key: string]: unknown;
1061
+ };
1062
+ }
1063
+ interface OutputEntryPagesDeployment extends OutputEntryBase<"pages-deploy"> {
1064
+ version: 1;
1065
+ /** The name of the Pages project. */
1066
+ pages_project: string | null;
1067
+ /** A GUID that identifies this Pages deployment. */
1068
+ deployment_id: string | null;
1069
+ /** The URL associated with this deployment */
1070
+ url: string | undefined;
1071
+ }
1072
+ interface OutputEntryPagesDeploymentDetailed extends OutputEntryBase<"pages-deploy-detailed"> {
1073
+ version: 1;
1074
+ /** The name of the Pages project. */
1075
+ pages_project: string | null;
1076
+ /** A GUID that identifies this Pages deployment. */
1077
+ deployment_id: string | null;
1078
+ /** The URL associated with this deployment */
1079
+ url: string | undefined;
1080
+ /** The Alias url, if it exists */
1081
+ alias: string | undefined;
1082
+ /** The environment being deployed to */
1083
+ environment: "production" | "preview";
1084
+ /** The production branch of the pages project */
1085
+ production_branch: string;
1086
+ deployment_trigger: {
1087
+ metadata: {
1088
+ /** Commit hash of the deployment trigger metadata for the pages project */
1089
+ commit_hash: string;
1090
+ };
1091
+ };
1092
+ }
1093
+ interface OutputEntryVersionUpload extends OutputEntryBase<"version-upload"> {
1094
+ version: 1;
1095
+ /** The name of the Worker. */
1096
+ worker_name: string | null;
1097
+ /** The GUID that identifies the Worker. This never changes even if the name is changed. */
1098
+ worker_tag: string | null;
1099
+ /** A GUID that identifies this uploaded, but not yet deployed, version of the Worker. This version will need to be "deployed" to receive traffic. */
1100
+ version_id: string | null;
1101
+ /** The preview URL associated with this version upload */
1102
+ preview_url: string | undefined;
1103
+ /** The ephemeral aliased preview URL associated with this version upload */
1104
+ preview_alias_url: string | undefined;
1105
+ /** set if the worker's name was overridden */
1106
+ worker_name_overridden: boolean;
1107
+ /** wrangler environment used */
1108
+ wrangler_environment: string | undefined;
1109
+ }
1110
+ interface OutputEntryVersionDeployment extends OutputEntryBase<"version-deploy"> {
1111
+ version: 1;
1112
+ /** The name of the Worker. */
1113
+ worker_name: string | null;
1114
+ /** The GUID that identifies the Worker. This never changes even if the name is changed. */
1115
+ worker_tag: string | null;
1116
+ /** The ID of the gradual rollout deployment. */
1117
+ deployment_id: string;
1118
+ /** The percentage of traffic that goes to each version. */
1119
+ version_traffic: Map<string, number>;
1120
+ }
1121
+ interface OutputEntryCommandFailed extends OutputEntryBase<"command-failed"> {
1122
+ version: 1;
1123
+ /** The code in the error. */
1124
+ code: number | undefined;
1125
+ /** The message in the error. */
1126
+ message: string | undefined;
1127
+ /** How many milliseconds to retry the operation after if available. */
1128
+ retry_after_ms: number | undefined;
1129
+ }
1130
+
982
1131
  declare function retryOnAPIFailure<T>(action: () => T | Promise<T>, logger: Logger, backoff?: number, attempts?: number, abortSignal?: AbortSignal): Promise<T>;
983
1132
 
984
1133
  declare function formatTime(duration: number): string;
@@ -1167,4 +1316,4 @@ declare function toUrlPath(filePath: string): UrlPath;
1167
1316
  */
1168
1317
  declare const friendlyBindingNames: Record<ConfigBindingFieldName, string>;
1169
1318
 
1170
- export { APIError, Binding, type BindingLocalSupport, BunPackageManager, CommandLineArgsError, type CompatDate, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, DEFAULT_COMPAT_DATE, DeprecationError, Diagnostics, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, FatalError, JsonFriendlyFatalError, type Location, Logger, type Message, MissingConfigError, NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, RawConfig, type ResolveConfigPathOptions, Route, type TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, _forceColour, assertNever, bucketFormatMessage, checkWorkerNameValidity, configFileName, configFormat, createConfigCache, createFatalError, experimental_patchConfig, experimental_readRawConfig, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, formatZodError, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getTodaysCompatDate, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isCompatDate, isDockerfile, isInteractive, isNodejsCompatDefaultOn, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNodejsCompat, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, stripRedundantNodejsCompatFlags, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validatePagesConfig };
1319
+ export { APIError, Binding, type BindingLocalSupport, BunPackageManager, CommandLineArgsError, type CompatDate, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, DEFAULT_COMPAT_DATE, DeprecationError, Diagnostics, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, FatalError, JsonFriendlyFatalError, type Location, Logger, type Message, MissingConfigError, NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type OutputEntry, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, RawConfig, type ResolveConfigPathOptions, Route, type TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, _forceColour, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, configFileName, configFormat, createConfigCache, createFatalError, experimental_patchConfig, experimental_readRawConfig, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, formatZodError, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getTodaysCompatDate, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isCompatDate, isDockerfile, isInteractive, isNodejsCompatDefaultOn, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNodejsCompat, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, stripRedundantNodejsCompatFlags, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validatePagesConfig, writeOutput };