@cloudflare/workers-utils 0.34.0 → 0.36.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.
@@ -0,0 +1,178 @@
1
+ import { dedent } from './chunk-MCNIGVAF.mjs';
2
+ import { getEnvironmentVariableFactory, getBooleanEnvironmentVariableFactory } from './chunk-3IYLA2JH.mjs';
3
+ import { UserError } from './chunk-WO2IAW6M.mjs';
4
+ import { getGlobalConfigPath } from './chunk-34VZWBGB.mjs';
5
+ import { __name } from './chunk-Q72B4Q5Z.mjs';
6
+ import path from 'node:path';
7
+
8
+ var getC3CommandFromEnv = getEnvironmentVariableFactory({
9
+ variableName: "WRANGLER_C3_COMMAND",
10
+ defaultValue: /* @__PURE__ */ __name(() => "create cloudflare", "defaultValue")
11
+ });
12
+ var getDoNotTrackFromEnv = getEnvironmentVariableFactory({
13
+ variableName: "DO_NOT_TRACK"
14
+ });
15
+ function isDoNotTrackEnabled() {
16
+ const value = getDoNotTrackFromEnv()?.toLowerCase();
17
+ return value === "1" || value === "true";
18
+ }
19
+ __name(isDoNotTrackEnabled, "isDoNotTrackEnabled");
20
+ var getWranglerSendMetricsVariableFromEnv = getBooleanEnvironmentVariableFactory({
21
+ variableName: "WRANGLER_SEND_METRICS"
22
+ });
23
+ function getWranglerSendMetricsFromEnv() {
24
+ if (isDoNotTrackEnabled()) {
25
+ return false;
26
+ }
27
+ return getWranglerSendMetricsVariableFromEnv();
28
+ }
29
+ __name(getWranglerSendMetricsFromEnv, "getWranglerSendMetricsFromEnv");
30
+ var getNoSkillsUpdatePromptsFromEnv = getBooleanEnvironmentVariableFactory({
31
+ variableName: "WRANGLER_NO_SKILLS_UPDATE_PROMPTS"
32
+ });
33
+ var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
34
+ variableName: "WRANGLER_SEND_ERROR_REPORTS",
35
+ defaultValue: false
36
+ });
37
+ var getCloudflareApiEnvironmentFromEnv = getEnvironmentVariableFactory(
38
+ {
39
+ variableName: "WRANGLER_API_ENVIRONMENT",
40
+ defaultValue: /* @__PURE__ */ __name(() => "production", "defaultValue"),
41
+ choices: ["production", "staging"]
42
+ }
43
+ );
44
+ var COMPLIANCE_REGION_CONFIG_PUBLIC = {
45
+ compliance_region: "public"
46
+ };
47
+ var COMPLIANCE_REGION_CONFIG_UNKNOWN = {
48
+ compliance_region: void 0
49
+ };
50
+ var getCloudflareComplianceRegionFromEnv = getEnvironmentVariableFactory({
51
+ variableName: "CLOUDFLARE_COMPLIANCE_REGION",
52
+ choices: ["public", "fedramp_high"]
53
+ });
54
+ var getCloudflareComplianceRegion = /* @__PURE__ */ __name((complianceConfig) => {
55
+ const complianceRegionFromEnv = getCloudflareComplianceRegionFromEnv();
56
+ if (complianceRegionFromEnv !== void 0 && complianceConfig?.compliance_region !== void 0 && complianceRegionFromEnv !== complianceConfig.compliance_region) {
57
+ throw new UserError(
58
+ dedent`
59
+ The compliance region has been set to different values in two places:
60
+ - \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable: \`${complianceRegionFromEnv}\`
61
+ - \`compliance_region\` configuration property: \`${complianceConfig.compliance_region}\`
62
+ `,
63
+ { telemetryMessage: false }
64
+ );
65
+ }
66
+ return complianceRegionFromEnv || complianceConfig?.compliance_region || "public";
67
+ }, "getCloudflareComplianceRegion");
68
+ var getCloudflareApiBaseUrlFromEnv = getEnvironmentVariableFactory({
69
+ variableName: "CLOUDFLARE_API_BASE_URL",
70
+ deprecatedName: "CF_API_BASE_URL"
71
+ });
72
+ var getCloudflareApiBaseUrl = /* @__PURE__ */ __name((complianceConfig) => getCloudflareApiBaseUrlFromEnv() ?? `https://api${getComplianceRegionSubdomain(complianceConfig)}${getStagingSubdomain()}.cloudflare.com/client/v4`, "getCloudflareApiBaseUrl");
73
+ function getComplianceRegionSubdomain(complianceConfig) {
74
+ return getCloudflareComplianceRegion(complianceConfig) === "fedramp_high" ? ".fed" : "";
75
+ }
76
+ __name(getComplianceRegionSubdomain, "getComplianceRegionSubdomain");
77
+ function getStagingSubdomain() {
78
+ return getCloudflareApiEnvironmentFromEnv() === "staging" ? ".staging" : "";
79
+ }
80
+ __name(getStagingSubdomain, "getStagingSubdomain");
81
+ var getSanitizeLogs = getBooleanEnvironmentVariableFactory({
82
+ variableName: "WRANGLER_LOG_SANITIZE",
83
+ defaultValue: true
84
+ });
85
+ var getOutputFileDirectoryFromEnv = getEnvironmentVariableFactory({
86
+ variableName: "WRANGLER_OUTPUT_FILE_DIRECTORY"
87
+ });
88
+ var getOutputFilePathFromEnv = getEnvironmentVariableFactory({
89
+ variableName: "WRANGLER_OUTPUT_FILE_PATH"
90
+ });
91
+ var getCIMatchTag = getEnvironmentVariableFactory({
92
+ variableName: "WRANGLER_CI_MATCH_TAG"
93
+ });
94
+ var getCIOverrideName = getEnvironmentVariableFactory({
95
+ variableName: "WRANGLER_CI_OVERRIDE_NAME"
96
+ });
97
+ var getCIOverrideNetworkModeHost = getEnvironmentVariableFactory({
98
+ variableName: "WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST"
99
+ });
100
+ var getCIGeneratePreviewAlias = getEnvironmentVariableFactory({
101
+ variableName: "WRANGLER_CI_GENERATE_PREVIEW_ALIAS",
102
+ defaultValue: /* @__PURE__ */ __name(() => "false", "defaultValue"),
103
+ choices: ["true", "false"]
104
+ });
105
+ var getWorkersCIBranchName = getEnvironmentVariableFactory({
106
+ variableName: "WORKERS_CI_BRANCH"
107
+ });
108
+ var getBuildConditionsFromEnv = getEnvironmentVariableFactory({
109
+ variableName: "WRANGLER_BUILD_CONDITIONS"
110
+ });
111
+ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({
112
+ variableName: "WRANGLER_BUILD_PLATFORM"
113
+ });
114
+ var getRegistryPath = getEnvironmentVariableFactory({
115
+ variableName: "WRANGLER_REGISTRY_PATH",
116
+ defaultValue() {
117
+ return path.join(getGlobalConfigPath(), "registry");
118
+ }
119
+ });
120
+ var getD1ExtraLocationChoices = getEnvironmentVariableFactory({
121
+ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES"
122
+ });
123
+ var getSubdomainMixedStateCheckDisabled = getBooleanEnvironmentVariableFactory({
124
+ variableName: "WRANGLER_DISABLE_SUBDOMAIN_MIXED_STATE_CHECK",
125
+ defaultValue: false
126
+ });
127
+ var getCloudflareLoadDevVarsFromDotEnv = getBooleanEnvironmentVariableFactory({
128
+ variableName: "CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV",
129
+ defaultValue: true
130
+ });
131
+ var getCloudflareIncludeProcessEnvFromEnv = getBooleanEnvironmentVariableFactory({
132
+ variableName: "CLOUDFLARE_INCLUDE_PROCESS_ENV",
133
+ defaultValue: false
134
+ });
135
+ var getTraceHeader = getEnvironmentVariableFactory({
136
+ variableName: "WRANGLER_TRACE_ID"
137
+ });
138
+ var getDisableConfigWatching = getBooleanEnvironmentVariableFactory({
139
+ variableName: "WRANGLER_CI_DISABLE_CONFIG_WATCHING",
140
+ defaultValue: false
141
+ });
142
+ var getWranglerHideBanner = getBooleanEnvironmentVariableFactory({
143
+ variableName: "WRANGLER_HIDE_BANNER",
144
+ defaultValue: false
145
+ });
146
+ var getCloudflareEnv = getEnvironmentVariableFactory({
147
+ variableName: "CLOUDFLARE_ENV"
148
+ });
149
+ var getOpenNextDeployFromEnv = getEnvironmentVariableFactory({
150
+ variableName: "OPEN_NEXT_DEPLOY"
151
+ });
152
+ var getLocalExplorerEnabledFromEnv = getBooleanEnvironmentVariableFactory({
153
+ variableName: "X_LOCAL_EXPLORER",
154
+ defaultValue: true
155
+ });
156
+ var getLocalObservabilityEnabledFromEnv = getBooleanEnvironmentVariableFactory({
157
+ variableName: "X_LOCAL_OBSERVABILITY",
158
+ defaultValue: true
159
+ });
160
+ var getBrowserRenderingHeadfulFromEnv = getBooleanEnvironmentVariableFactory({
161
+ variableName: "X_BROWSER_HEADFUL",
162
+ defaultValue: false
163
+ });
164
+ var getCfFetchEnabledFromEnv = getBooleanEnvironmentVariableFactory({
165
+ variableName: "CLOUDFLARE_CF_FETCH_ENABLED",
166
+ defaultValue: true
167
+ });
168
+ var getCfFetchPathFromEnv = getEnvironmentVariableFactory({
169
+ variableName: "CLOUDFLARE_CF_FETCH_PATH"
170
+ });
171
+ var getWranglerCacheDirFromEnv = getEnvironmentVariableFactory({
172
+ variableName: "WRANGLER_CACHE_DIR"
173
+ });
174
+ var getCloudflaredPathFromEnv = getEnvironmentVariableFactory({
175
+ variableName: "CLOUDFLARED_PATH"
176
+ });
177
+
178
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getNoSkillsUpdatePromptsFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, isDoNotTrackEnabled };
@@ -0,0 +1,80 @@
1
+ type YYYY = `${number}${number}${number}${number}`;
2
+ type MM = `${number}${number}`;
3
+ type DD = `${number}${number}`;
4
+ /**
5
+ * Represents a valid compatibility date, a string such as `2025-09-27`
6
+ */
7
+ type CompatDate = `${YYYY}-${MM}-${DD}`;
8
+ /**
9
+ * Discern whether a string represents a compatibility date (`YYYY-MM-DD`)
10
+ *
11
+ * @param str The target string
12
+ * @returns true if the string represents a compatibility date, false otherwise
13
+ */
14
+ declare function isCompatDate(str: string): str is CompatDate;
15
+ /**
16
+ * Returns today's date as a compatibility date string (`YYYY-MM-DD`).
17
+ */
18
+ declare function getTodaysCompatDate(): CompatDate;
19
+ /**
20
+ * The compatibility date on which the `nodejs_compat` and `nodejs_compat_v2`
21
+ * compatibility flags became enabled by default in workerd.
22
+ *
23
+ * From this date onwards, specifying either flag explicitly is a validation
24
+ * error ("The compatibility flag nodejs_compat became the default as of
25
+ * 2026-08-04 so does not need to be specified anymore"), so tooling must not
26
+ * add them to configurations using such a compatibility date.
27
+ *
28
+ * @see https://github.com/cloudflare/workerd/blob/main/src/workerd/io/compatibility-date.capnp
29
+ */
30
+ declare const NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
31
+ /**
32
+ * Whether workerd enables Node.js compatibility by default for the given
33
+ * compatibility date, i.e. without the `nodejs_compat` flag being specified.
34
+ *
35
+ * @param compatibilityDate The compatibility date to check
36
+ * @returns true if the date is on or after {@link NODEJS_COMPAT_DEFAULT_ON_DATE}
37
+ */
38
+ declare function isNodejsCompatDefaultOn(compatibilityDate: string | undefined): boolean;
39
+ /**
40
+ * The compatibility date on which `nodejs_compat` started implying
41
+ * `nodejs_compat_v2`.
42
+ */
43
+ declare const NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
44
+ /**
45
+ * Resolves whether workerd will enable the `nodejs_compat` and
46
+ * `nodejs_compat_v2` features, mirroring how workerd itself resolves them from
47
+ * the compatibility date and flags:
48
+ * - Both are enabled by default from {@link NODEJS_COMPAT_DEFAULT_ON_DATE}
49
+ * onwards, and each must be turned off separately from that date, with
50
+ * `no_nodejs_compat` and `no_nodejs_compat_v2` respectively.
51
+ * - Before that date, `nodejs_compat` implies `nodejs_compat_v2` from
52
+ * {@link NODEJS_COMPAT_V2_SWITCH_OVER_DATE} onwards.
53
+ *
54
+ * @param compatibilityDate The compatibility date
55
+ * @param compatibilityFlags The compatibility flags
56
+ */
57
+ declare function resolveNodejsCompat(compatibilityDate: string, compatibilityFlags: string[]): {
58
+ isNodejsCompatEnabled: boolean;
59
+ isNodejsCompatV2Enabled: boolean;
60
+ };
61
+ /**
62
+ * Removes the `nodejs_compat` and `nodejs_compat_v2` flags from a list of
63
+ * compatibility flags when the compatibility date already enables them.
64
+ *
65
+ * workerd rejects a compatibility flag that its compatibility date enables by
66
+ * default, so from {@link NODEJS_COMPAT_DEFAULT_ON_DATE} onwards specifying
67
+ * either flag stops a Worker from starting up. Removing them is a no-op for
68
+ * such a date, so tooling can accept the redundant flags rather than failing.
69
+ *
70
+ * A flag is kept when its matching opt-out is specified too, since workerd
71
+ * reports those as contradictory and the enable flag wins there - dropping it
72
+ * would silently switch Node.js compatibility off instead.
73
+ *
74
+ * @param compatibilityDate The compatibility date
75
+ * @param compatibilityFlags The compatibility flags
76
+ * @returns The flags, without the ones the date makes redundant
77
+ */
78
+ declare function stripRedundantNodejsCompatFlags(compatibilityDate: string | undefined, compatibilityFlags: string[]): string[];
79
+
80
+ export { type CompatDate, NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags };
@@ -0,0 +1,2 @@
1
+ export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './chunk-C6O4ION7.mjs';
2
+ import './chunk-Q72B4Q5Z.mjs';
@@ -179,12 +179,7 @@ declare const getRegistryPath: () => string;
179
179
  * External accounts cannot access testing environments, so should not set this variable.
180
180
  */
181
181
  declare const getD1ExtraLocationChoices: () => string | undefined;
182
- /**
183
- * `WRANGLER_DOCKER_BIN` specifies the path to a docker binary.
184
- *
185
- * By default it's `docker`.
186
- */
187
- declare const getDockerPath: () => string;
182
+
188
183
  declare const getSubdomainMixedStateCheckDisabled: () => boolean;
189
184
  /**
190
185
  /**
@@ -471,12 +466,16 @@ interface CfKvNamespace {
471
466
  type CfSendEmailBindings = {
472
467
  name: string;
473
468
  remote?: boolean;
469
+ allowed_sender_addresses?: string[];
474
470
  } & ({
475
- destination_address?: string;
471
+ destination_address: string;
472
+ allowed_destination_addresses?: never;
476
473
  } | {
477
- allowed_destination_addresses?: string[];
474
+ destination_address?: never;
475
+ allowed_destination_addresses: string[];
478
476
  } | {
479
- allowed_sender_addresses?: string[];
477
+ destination_address?: never;
478
+ allowed_destination_addresses?: never;
480
479
  });
481
480
  /**
482
481
  * A binding to a wasm module (in service-worker format)
@@ -559,6 +558,9 @@ interface CfWorkflow {
559
558
  limits?: {
560
559
  steps?: number;
561
560
  };
561
+ concurrency?: {
562
+ limit?: number;
563
+ };
562
564
  schedules?: string | string[];
563
565
  }
564
566
  interface CfQueue {
@@ -1296,8 +1298,9 @@ type Trigger = {
1296
1298
  port: number;
1297
1299
  address?: string;
1298
1300
  };
1299
- type BindingOmit<T> = Omit<T, "binding">;
1300
- type NameOmit<T> = Omit<T, "name">;
1301
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
1302
+ type BindingOmit<T> = DistributiveOmit<T, "binding">;
1303
+ type NameOmit<T> = DistributiveOmit<T, "name">;
1301
1304
  type Binding = {
1302
1305
  type: "plain_text";
1303
1306
  value: string;
@@ -2375,8 +2378,24 @@ type WorkflowBinding = {
2375
2378
  /** Maximum number of steps a Workflow instance can execute */
2376
2379
  steps?: number;
2377
2380
  };
2381
+ /** Optional concurrency configuration for the Workflow */
2382
+ concurrency?: {
2383
+ /** Maximum number of Workflow instances that can run concurrently */
2384
+ limit?: number;
2385
+ };
2378
2386
  /** Optional cron schedule(s) for automatically triggering workflow instances */
2379
2387
  schedules?: string | string[];
2388
+ /**
2389
+ * Optional default retention for instances of this Workflow, applied when an instance does not
2390
+ * set its own retention. Accepts milliseconds or a duration string such as `"3 days"`, and is
2391
+ * validated by the Workflows API at deploy time.
2392
+ */
2393
+ default_retention?: {
2394
+ /** How long to retain instances that completed successfully or were terminated */
2395
+ success_retention?: number | string;
2396
+ /** How long to retain errored instances */
2397
+ error_retention?: number | string;
2398
+ };
2380
2399
  };
2381
2400
  /**
2382
2401
  * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
@@ -3232,6 +3251,12 @@ interface Observability {
3232
3251
  enabled?: boolean;
3233
3252
  /** The sampling rate */
3234
3253
  head_sampling_rate?: number;
3254
+ /**
3255
+ * Whether query strings are removed from request URLs in logs and traces.
3256
+ *
3257
+ * @default false
3258
+ */
3259
+ redact_query_string?: boolean;
3235
3260
  logs?: {
3236
3261
  enabled?: boolean;
3237
3262
  /** The sampling rate */
@@ -3588,4 +3613,4 @@ interface EnvironmentMap {
3588
3613
  }
3589
3614
  declare const defaultWranglerConfig: Config;
3590
3615
 
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 };
3616
+ export { type CfModuleType as $, ARTIFACTS_EVENT_TYPES as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfBrowserBinding as F, type CfCapnp as G, type CfD1Database as H, type CfDataBlobBindings as I, type CfDevPluginCfg as J, type CfDispatchNamespace as K, type Logger as L, type CfDurableObject as M, type CfDurableObjectMigrations as N, type CfExports as O, type CfFlagship as P, type CfHelloWorld as Q, type RawConfig as R, type CfHyperdrive as S, type CfImagesBinding as T, type CfKvNamespace as U, type CfLogfwdr as V, type WorkerEntrypointExport as W, type CfLogfwdrBinding as X, type CfMTlsCertificate as Y, type CfMediaBinding as Z, type CfModule as _, type RedirectedRawConfig as a, type LocalS3Credentials as a$, type CfPipeline as a0, type CfPlacement as a1, type CfQueue as a2, type CfR2Bucket as a3, type CfRateLimit as a4, type CfScriptFormat as a5, type CfSecretsStoreSecrets as a6, type CfSendEmailBindings as a7, type CfService as a8, type CfStreamBinding 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, getWranglerSendErrorReportsFromEnv 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, getLocalExplorerEnabledFromEnv as bO, getLocalObservabilityEnabledFromEnv as bP, getNoSkillsUpdatePromptsFromEnv as bQ, getOpenNextDeployFromEnv as bR, getOutputFileDirectoryFromEnv as bS, getOutputFilePathFromEnv as bT, getRegistryPath as bU, getSanitizeLogs as bV, getSubdomainMixedStateCheckDisabled as bW, getTraceHeader as bX, getWorkersCIBranchName as bY, getWranglerCacheDirFromEnv as bZ, getWranglerHideBanner 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, getWranglerSendMetricsFromEnv as c0, hasCursor as c1, hasMorePages as c2, isDoNotTrackEnabled as c3, isWAFBlockResponse as c4, maybeAddTraceHeader as c5, parseRetryAfterMs as c6, parseRetryAfterValue as c7, performApiFetchBase as c8, renderError as c9, throwFetchError as ca, truncate as cb, type WorkerMetadataBinding as d, type CfTailConsumer as e, type Route as f, type Access as g, type ApiCredentials as h, type ArtifactsEventTrigger as i, type ArtifactsEventType as j, type AssetConfigMetadata as k, type Assets as l, type AssetsOptions as m, type AsyncHook as n, type BinaryFile as o, COMPLIANCE_REGION_CONFIG_PUBLIC as p, COMPLIANCE_REGION_CONFIG_UNKNOWN as q, type CacheOptions as r, type CfAIBinding as s, type CfAISearch as t, type CfAISearchNamespace as u, type CfAccount as v, type CfAgentMemory as w, type CfAnalyticsEngineDataset as x, type CfArtifacts as y, type CfAssetsBinding as z };
@@ -0,0 +1,4 @@
1
+ export { p as COMPLIANCE_REGION_CONFIG_PUBLIC, q as COMPLIANCE_REGION_CONFIG_UNKNOWN, ar as ComplianceConfig, bE as getCloudflareApiBaseUrl, bG as getCloudflareComplianceRegion, bL as getComplianceRegionSubdomain } from './compliance-j3-tqeao.mjs';
2
+ import 'node:url';
3
+ import 'undici';
4
+ import '@cloudflare/workers-shared';
@@ -0,0 +1,7 @@
1
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareApiBaseUrl, getCloudflareComplianceRegion, getComplianceRegionSubdomain } from './chunk-XUGGRRBO.mjs';
2
+ import './chunk-MCNIGVAF.mjs';
3
+ import './chunk-3IYLA2JH.mjs';
4
+ import './chunk-WO2IAW6M.mjs';
5
+ import './chunk-34VZWBGB.mjs';
6
+ import './chunk-53IMCORZ.mjs';
7
+ import './chunk-Q72B4Q5Z.mjs';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns the configured path to the Docker binary.
3
+ *
4
+ * @returns The value of `WRANGLER_DOCKER_BIN`, or `docker` when unset.
5
+ */
6
+ declare const getDockerPath: () => string;
7
+
8
+ export { getDockerPath };
@@ -0,0 +1,3 @@
1
+ export { getDockerPath } from './chunk-3IYLA2JH.mjs';
2
+ import './chunk-WO2IAW6M.mjs';
3
+ import './chunk-Q72B4Q5Z.mjs';
@@ -0,0 +1,55 @@
1
+ /**
2
+ * This is used to provide telemetry with a sanitised error
3
+ * message that could not have any user-identifying information.
4
+ * Set to `true` to duplicate `message`.
5
+ * */
6
+ type TelemetryMessage = {
7
+ telemetryMessage: string | boolean;
8
+ };
9
+ type UserErrorOptions = ErrorOptions & TelemetryMessage;
10
+ type FatalErrorOptions = UserErrorOptions & {
11
+ code?: number;
12
+ };
13
+ /**
14
+ * Base class for errors where the user has done something wrong. These are not
15
+ * reported to Sentry. API errors are intentionally *not* `UserError`s, and are
16
+ * reported to Sentry. This will help us understand which API errors need better
17
+ * messaging.
18
+ */
19
+ declare class UserError extends Error {
20
+ telemetryMessage: string | undefined;
21
+ constructor(message: string, options: UserErrorOptions);
22
+ }
23
+ declare class DeprecationError extends UserError {
24
+ constructor(message: string, options: TelemetryMessage);
25
+ }
26
+ declare class FatalError extends UserError {
27
+ readonly code: number | undefined;
28
+ constructor(message: string, options: FatalErrorOptions);
29
+ }
30
+ declare class CommandLineArgsError extends UserError {
31
+ }
32
+ /**
33
+ * JsonFriendlyFatalError is used to output JSON when wrangler crashes, useful for --json mode.
34
+ *
35
+ * To use, pass stringify'd json into the constructor like so:
36
+ * ```js
37
+ * throw new JsonFriendlyFatalError(JSON.stringify({ error: messageToDisplay }), {
38
+ * telemetryMessage: false,
39
+ * });
40
+ * ```
41
+ */
42
+ declare class JsonFriendlyFatalError extends FatalError {
43
+ }
44
+ declare class MissingConfigError extends Error {
45
+ telemetryMessage: string | undefined;
46
+ constructor(key: string);
47
+ }
48
+ /**
49
+ * Create either a FatalError or JsonFriendlyFatalError depending upon `isJson` parameter.
50
+ *
51
+ * If `isJson` is true, then the `message` is JSON stringified.
52
+ */
53
+ declare function createFatalError(message: unknown, isJson: boolean, options: FatalErrorOptions): Error;
54
+
55
+ export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, type TelemetryMessage, UserError, createFatalError };
@@ -0,0 +1,2 @@
1
+ export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, UserError, createFatalError } from './chunk-WO2IAW6M.mjs';
2
+ import './chunk-Q72B4Q5Z.mjs';