@cloudflare/workers-utils 0.43.0 → 0.45.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.
Files changed (32) hide show
  1. package/dist/browser.d.mts +2399 -3
  2. package/dist/browser.mjs +482 -2
  3. package/dist/{chunk-C6O4ION7.mjs → chunk-2Q77CKVU.mjs} +3 -1
  4. package/dist/{chunk-Z62CVNHJ.mjs → chunk-6G6FCMPX.mjs} +4 -1
  5. package/dist/{chunk-FLRJ77A6.mjs → chunk-AUSY7DKT.mjs} +6 -3
  6. package/dist/{chunk-IYSONYTF.mjs → chunk-FR75DWDU.mjs} +7 -5
  7. package/dist/{chunk-MCNIGVAF.mjs → chunk-M3RITKR3.mjs} +4 -1
  8. package/dist/{chunk-53IMCORZ.mjs → chunk-MIA26B4M.mjs} +3 -1
  9. package/dist/{chunk-34VZWBGB.mjs → chunk-MV2OJK3L.mjs} +4 -2
  10. package/dist/{chunk-WO2IAW6M.mjs → chunk-OWPFSLY6.mjs} +4 -1
  11. package/dist/{chunk-OWXQB7GP.mjs → chunk-PWC7WAOU.mjs} +4 -1
  12. package/dist/{chunk-3IYLA2JH.mjs → chunk-QSRIB43D.mjs} +5 -2
  13. package/dist/{chunk-Q72B4Q5Z.mjs → chunk-U6NEESU5.mjs} +6 -3
  14. package/dist/compatibility-date.mjs +5 -2
  15. package/dist/{compliance-DzwHmPKm.d.mts → compliance-CADarBwY.d.mts} +589 -514
  16. package/dist/compliance.d.mts +1 -1
  17. package/dist/compliance.mjs +10 -7
  18. package/dist/docker-path.mjs +6 -3
  19. package/dist/errors.mjs +5 -2
  20. package/dist/fs-helpers.mjs +5 -2
  21. package/dist/global-wrangler-config-path.mjs +6 -3
  22. package/dist/index.d.mts +48 -9
  23. package/dist/index.mjs +716 -37
  24. package/dist/local-env.mjs +4 -1
  25. package/dist/metafile-esm.json +1 -1
  26. package/dist/{open-PBXRGS4R.mjs → open-PCXX3ZDZ.mjs} +3 -1
  27. package/dist/prometheus-metrics.mjs +5 -2
  28. package/dist/test-helpers/index.d.mts +1 -1
  29. package/dist/test-helpers/index.mjs +8 -5
  30. package/dist/zod-format.mjs +5 -2
  31. package/package.json +4 -4
  32. package/dist/chunk-DKSA7K25.mjs +0 -468
@@ -21,554 +21,293 @@ interface FetchError {
21
21
  } & Record<string, unknown>;
22
22
  }
23
23
 
24
+ declare const LOGGER_LEVELS: {
25
+ readonly none: -1;
26
+ readonly error: 0;
27
+ readonly warn: 1;
28
+ readonly info: 2;
29
+ readonly log: 3;
30
+ readonly debug: 4;
31
+ };
32
+ type LoggerLevel = keyof typeof LOGGER_LEVELS;
33
+ type Logger = {
34
+ loggerLevel?: LoggerLevel;
35
+ debug: typeof console.debug;
36
+ debugWithSanitization?: (label: string, ...args: unknown[]) => void;
37
+ log: typeof console.log;
38
+ info: typeof console.info;
39
+ warn: typeof console.warn;
40
+ error: typeof console.error;
41
+ once?: {
42
+ info: typeof console.info;
43
+ log: typeof console.log;
44
+ warn: typeof console.warn;
45
+ error: typeof console.error;
46
+ };
47
+ console?<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
48
+ };
49
+
50
+ type ApiCredentials = {
51
+ apiToken: string;
52
+ } | {
53
+ authKey: string;
54
+ authEmail: string;
55
+ };
56
+ interface FetchResult<ResponseType = unknown> {
57
+ success: boolean;
58
+ result: ResponseType;
59
+ errors: FetchError[];
60
+ messages?: (string | {
61
+ code?: number;
62
+ message: string;
63
+ })[];
64
+ result_info?: unknown;
65
+ }
66
+ type FetchResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams, abortSignal?: AbortSignal) => Promise<ResponseType>;
67
+ type FetchListResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams) => Promise<ResponseType[]>;
68
+ type FetchPagedListResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams) => Promise<ResponseType[]>;
24
69
  /**
25
- * `WRANGLER_C3_COMMAND` can override the command used by `wrangler init` when delegating to C3.
26
- *
27
- * By default this will use `create cloudflare`.
28
- *
29
- * To run against the beta release of C3 use:
30
- *
31
- * ```sh
32
- * # Tell Wrangler to use the beta version of create-cloudflare
33
- * WRANGLER_C3_COMMAND="create cloudflare@beta" npx wrangler init
34
- * ```
35
- *
36
- * To test the integration between wrangler and C3 locally, use:
37
- *
38
- * ```sh
39
- * # Ensure both Wrangler and C3 are built
40
- * npm run build
41
- * # Tell Wrangler to use the local version of create-cloudflare
42
- * WRANGLER_C3_COMMAND="exec ./packages/create-cloudflare" npx wrangler init temp
43
- * ```
44
70
  *
45
- * Note that you cannot use `WRANGLER_C3_COMMAND="create cloudflare@2"` if you are
46
- * running Wrangler from inside the monorepo as the bin paths get messed up.
47
- */
48
- declare const getC3CommandFromEnv: () => string;
49
- /** Whether `DO_NOT_TRACK` is set to a supported telemetry opt-out value. */
50
- declare function isDoNotTrackEnabled(): boolean;
51
- /**
52
- * `WRANGLER_SEND_METRICS` controls whether we attempt to send metrics information to Sparrow.
53
- * `DO_NOT_TRACK` takes precedence when it is set to an opt-out value.
71
+ * Note this requires its caller to handle credentials
72
+ * (need to call requireLoggedIn and requireApiToken)
54
73
  */
55
- declare function getWranglerSendMetricsFromEnv(): boolean | undefined;
74
+ declare function performApiFetchBase(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<Response$1>;
75
+ declare function fetchInternalBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<{
76
+ response: ResponseType;
77
+ status: number;
78
+ retryAfterMs?: number;
79
+ }>;
80
+ declare function fetchResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<ResponseType>;
81
+ declare function fetchListResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, credentials?: ApiCredentials): Promise<ResponseType[]>;
82
+ declare function truncate(text: string, maxLength: number): string;
83
+ declare function isWAFBlockResponse(headers: Headers): boolean;
56
84
  /**
57
- * `WRANGLER_NO_SKILLS_UPDATE_PROMPTS` suppresses the prompt that offers to
58
- * update Cloudflare agent skills when they are out of date.
85
+ * Parses a `Retry-After` header value (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)
86
+ * into milliseconds to wait before retrying, or `undefined` if absent/unparsable.
59
87
  *
60
- * Set to `"true"` to never be prompted for skills updates.
88
+ * Per the HTTP spec, `Retry-After` may either be a number of delay-seconds,
89
+ * or an HTTP-date after which the request may be retried.
61
90
  */
62
- declare const getNoSkillsUpdatePromptsFromEnv: () => boolean | undefined;
91
+ declare function parseRetryAfterValue(retryAfter: string | null | undefined): number | undefined;
92
+ /** Same as {@link parseRetryAfterValue}, reading the value from a `Headers` object. */
93
+ declare function parseRetryAfterMs(headers: Headers): number | undefined;
94
+ declare function extractWAFBlockRayId(headers: Headers): string | undefined;
95
+ declare function extractAccountTag(resource: string): string | undefined;
96
+ interface PageResultInfo {
97
+ page: number;
98
+ per_page: number;
99
+ count: number;
100
+ total_count: number;
101
+ }
102
+ declare function hasMorePages(result_info: unknown): result_info is PageResultInfo;
103
+ declare function renderError(err: FetchError | {
104
+ code?: number;
105
+ message?: string;
106
+ documentation_url?: string;
107
+ }, level?: number): string;
108
+ declare function addAuthorizationHeader(headers: Headers, auth: ApiCredentials, overrideExisting?: boolean): void;
109
+ declare function throwFetchError(resource: string, response: FetchResult<unknown>, status: number, retryAfterMs?: number): never;
63
110
  /**
64
- * `WRANGLER_SEND_ERROR_REPORTS` controls whether we attempt to send error reports to Sentry.
111
+ * Fetch a raw KV value from the Cloudflare API.
65
112
  *
66
- * Defaults to `false` to avoid noisy false-positive reports. Users can opt in
67
- * by setting `WRANGLER_SEND_ERROR_REPORTS=true`.
113
+ * This is special-cased because it's the only API endpoint that returns raw
114
+ * binary data instead of a JSON envelope.
115
+ *
116
+ * Note: callers must call encodeURIComponent on `key` before passing it.
68
117
  */
69
- declare const getWranglerSendErrorReportsFromEnv: () => boolean;
118
+ declare function fetchKVGetValueBase(complianceConfig: ComplianceConfig, accountId: string, namespaceId: string, key: string, userAgent: string, logger: Logger, credentials: ApiCredentials): Promise<ArrayBuffer>;
119
+ type FetchKVGetValueFetcher = (complianceConfig: ComplianceConfig, accountId: string, namespaceId: string, key: string) => Promise<ArrayBuffer>;
120
+ declare function hasCursor(result_info: unknown): result_info is {
121
+ cursor: string;
122
+ };
123
+ declare function maybeAddTraceHeader(headers: Headers): void;
124
+
70
125
  /**
71
- * Set `WRANGLER_API_ENVIRONMENT` environment variable to "staging" to tell Wrangler to hit the staging APIs rather than production.
126
+ * A symbol to inherit a binding from the deployed worker.
72
127
  */
73
- declare const getCloudflareApiEnvironmentFromEnv: () => "production" | "staging";
128
+ declare const INHERIT_SYMBOL: unique symbol;
129
+ declare const SERVICE_TAG_PREFIX = "cf:service=";
130
+ declare const ENVIRONMENT_TAG_PREFIX = "cf:environment=";
131
+ declare const PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
74
132
  /**
75
- * The compliance region to use for the API requests.
133
+ * Config formats that use JSON parsing
76
134
  */
77
- type ComplianceConfig = Partial<Pick<Config, "compliance_region">>;
78
- /** Used for commands that explicitly do not support compliance regions other than "public" */
79
- declare const COMPLIANCE_REGION_CONFIG_PUBLIC: ComplianceConfig;
135
+ declare const JSON_CONFIG_FORMATS: readonly string[];
136
+
80
137
  /**
81
- * Used for commands where there is no configuration available and
82
- * we rely upon the CLOUDFLARE_COMPLIANCE_REGION environment variable
83
- * to determine the compliance region.
138
+ * The type of Worker
84
139
  */
85
- declare const COMPLIANCE_REGION_CONFIG_UNKNOWN: ComplianceConfig;
140
+ type CfScriptFormat = "modules" | "service-worker";
86
141
  /**
87
- * Set `CLOUDFLARE_COMPLIANCE_REGION` environment variable to "fedramp_high"
88
- * or set the `compliance_region` property in the Wrangler configuration
89
- * to tell Wrangler to run in FedRAMP High compliance region mode, rather than "public" mode.
142
+ * A module type.
90
143
  */
91
- declare const getCloudflareComplianceRegion: (complianceConfig: ComplianceConfig) => "public" | "fedramp_high";
144
+ type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement";
92
145
  /**
93
- * `CLOUDFLARE_API_BASE_URL` specifies the URL to the Cloudflare API.
94
- *
95
- * If this environment variable is not set, it will default to a URL computed from the
96
- * Cloudflare compliance region and the API environment.
146
+ * An imported module.
97
147
  */
98
- declare const getCloudflareApiBaseUrl: (complianceConfig: ComplianceConfig) => string;
148
+ interface CfModule {
149
+ /**
150
+ * The module name.
151
+ *
152
+ * @example
153
+ * './src/index.js'
154
+ */
155
+ name: string;
156
+ /**
157
+ * The absolute path of the module on disk, or `undefined` if this is a
158
+ * virtual module. Used as the source URL for this module, so source maps are
159
+ * correctly resolved.
160
+ *
161
+ * @example
162
+ * '/path/to/src/index.js'
163
+ */
164
+ filePath: string | undefined;
165
+ /**
166
+ * The module content, usually JavaScript or WASM code.
167
+ *
168
+ * @example
169
+ * export default {
170
+ * async fetch(request) {
171
+ * return new Response('Ok')
172
+ * }
173
+ * }
174
+ */
175
+ content: string | Buffer<ArrayBuffer>;
176
+ /**
177
+ * An optional sourcemap for this module if it's of a ESM or CJS type, this will only be present
178
+ * if we're deploying with sourcemaps enabled. Since we copy extra modules that aren't bundled
179
+ * we need to also copy the relevant sourcemaps into the final out directory.
180
+ */
181
+ sourceMap?: CfWorkerSourceMap;
182
+ /**
183
+ * The module type.
184
+ *
185
+ * If absent, will default to the main module's type.
186
+ */
187
+ type?: CfModuleType;
188
+ }
99
189
  /**
100
- * Compute the subdomain for the compliance region.
190
+ * A map of variable names to values.
101
191
  */
102
- declare function getComplianceRegionSubdomain(complianceConfig: ComplianceConfig): string;
192
+ interface CfVars {
193
+ [key: string]: string | Json;
194
+ }
103
195
  /**
104
- * Returns the managed container registry for the configured API environment and compliance region.
105
- *
106
- * @param complianceConfig - Compliance configuration used to select the public or FedRAMP registry.
107
- * @returns The managed registry hostname, respecting `CLOUDFLARE_CONTAINER_REGISTRY` and `WRANGLER_API_ENVIRONMENT`.
196
+ * A KV namespace.
108
197
  */
109
- declare function getCloudflareContainerRegistry(complianceConfig?: ComplianceConfig): string;
198
+ interface CfKvNamespace {
199
+ binding: string;
200
+ id?: string | typeof INHERIT_SYMBOL;
201
+ remote?: boolean;
202
+ raw?: boolean;
203
+ }
110
204
  /**
111
- * `WRANGLER_LOG_SANITIZE` specifies whether we sanitize debug logs.
112
- *
113
- * By default we do, since debug logs could be added to GitHub issues and shouldn't include sensitive information.
205
+ * A binding to send email.
114
206
  */
115
- declare const getSanitizeLogs: () => boolean;
207
+ type CfSendEmailBindings = {
208
+ name: string;
209
+ remote?: boolean;
210
+ allowed_sender_addresses?: string[];
211
+ } & ({
212
+ destination_address: string;
213
+ allowed_destination_addresses?: never;
214
+ } | {
215
+ destination_address?: never;
216
+ allowed_destination_addresses: string[];
217
+ } | {
218
+ destination_address?: never;
219
+ allowed_destination_addresses?: never;
220
+ });
116
221
  /**
117
- * `WRANGLER_OUTPUT_FILE_DIRECTORY` specifies a directory where we should write a file containing output data in ND-JSON format.
118
- *
119
- * If this is set a random file will be created in this directory, and certain Wrangler commands will write entries to this file.
120
- * This is overridden by the `WRANGLER_OUTPUT_FILE_PATH` environment variable.
222
+ * A binding to a wasm module (in service-worker format)
121
223
  */
122
- declare const getOutputFileDirectoryFromEnv: () => string | undefined;
224
+ interface CfWasmModuleBindings {
225
+ [key: string]: string | Uint8Array<ArrayBuffer>;
226
+ }
123
227
  /**
124
- * `WRANGLER_OUTPUT_FILE_PATH` specifies a path to a file where we should write output data in ND-JSON format.
125
- *
126
- * If this is set certain Wrangler commands will write entries to this file.
127
- * This overrides the `WRANGLER_OUTPUT_FILE_DIRECTORY` environment variable.
228
+ * A binding to a text blob (in service-worker format)
128
229
  */
129
- declare const getOutputFilePathFromEnv: () => string | undefined;
230
+ interface CfTextBlobBindings {
231
+ [key: string]: string;
232
+ }
130
233
  /**
131
- * `WRANGLER_CI_MATCH_TAG` specifies a Worker tag
132
- *
133
- * If this is set, Wrangler will ensure the Worker being targeted has this tag
134
- */
135
- declare const getCIMatchTag: () => string | undefined;
136
- /**
137
- * `WRANGLER_CI_OVERRIDE_NAME` specifies a Worker name
138
- *
139
- * If this is set, Wrangler will override the Worker name with this one
140
- */
141
- declare const getCIOverrideName: () => string | undefined;
142
- /**
143
- * `WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST` specifies whether --network=host should be set
144
- *
145
- * If this is set to true, Wrangler will use the --network=host flag when calling out to docker to build container images
146
- */
147
- declare const getCIOverrideNetworkModeHost: () => string | undefined;
148
- /**
149
- * `WRANGLER_CI_GENERATE_PREVIEW_ALIAS` specifies whether to generate a preview alias during version upload
150
- *
151
- * If this is set to true, Wrangler will attempt to autogenerate the preview alias by using the branch
152
- * name. If the branch name is too long and an alias cannot be created, a warning will be printed to the console.
153
- */
154
- declare const getCIGeneratePreviewAlias: () => "true" | "false";
155
- /**
156
- * `WORKERS_CI_BRANCH` is the branch name exposed by Workers CI
157
- *
158
- */
159
- declare const getWorkersCIBranchName: () => string | undefined;
160
- /**
161
- * `WRANGLER_BUILD_CONDITIONS` specifies the "build conditions" to use when importing packages at build time.
162
- *
163
- * See https://nodejs.org/api/packages.html#conditional-exports
164
- * and https://esbuild.github.io/api/#how-conditions-work.
165
- *
166
- * If this is set, Wrangler will configure esbuild to use this list of conditions.
167
- * The format is a string of comma separated conditions.
168
- */
169
- declare const getBuildConditionsFromEnv: () => string | undefined;
170
- /**
171
- * `WRANGLER_BUILD_PLATFORM` specifies the "build platform" to use when importing packages at build time.
172
- *
173
- * See https://esbuild.github.io/api/#platform
174
- * and https://esbuild.github.io/api/#how-conditions-work.
175
- *
176
- * If this is set, Wrangler will configure esbuild to use this platform.
177
- */
178
- declare const getBuildPlatformFromEnv: () => string | undefined;
179
- /**
180
- * `WRANGLER_REGISTRY_PATH` specifies the file based dev registry folder
181
- */
182
- declare const getRegistryPath: () => string;
183
- /**
184
- * `WRANGLER_D1_EXTRA_LOCATION_CHOICES` is an internal variable to let D1 team target their testing environments.
185
- *
186
- * External accounts cannot access testing environments, so should not set this variable.
187
- */
188
- declare const getD1ExtraLocationChoices: () => string | undefined;
189
-
190
- declare const getSubdomainMixedStateCheckDisabled: () => boolean;
191
- /**
192
- /**
193
- * `CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV` specifies whether to load vars for local dev from `.env` files.
194
- */
195
- declare const getCloudflareLoadDevVarsFromDotEnv: () => boolean;
196
- /**
197
- * `CLOUDFLARE_INCLUDE_PROCESS_ENV` specifies whether to include the `process.env` in vars loaded from `.env` for local development.
198
- */
199
- declare const getCloudflareIncludeProcessEnvFromEnv: () => boolean;
200
- declare const getTraceHeader: () => string | undefined;
201
- declare const getDisableConfigWatching: () => boolean;
202
- /**
203
- * Hide the Wrangler version banner and command status (deprecated/experimental) warnings
204
- */
205
- declare const getWranglerHideBanner: () => boolean;
206
- /**
207
- * `CLOUDFLARE_ENV` specifies the currently selected Wrangler/Cloudflare environment.
208
- */
209
- declare const getCloudflareEnv: () => string | undefined;
210
- /**
211
- * `OPEN_NEXT_DEPLOY` is an environment variables that indicates that the current process is being
212
- * run by the open-next deploy command
234
+ * A binding to a browser
213
235
  */
214
- declare const getOpenNextDeployFromEnv: () => string | undefined;
236
+ interface CfBrowserBinding {
237
+ binding: string;
238
+ raw?: boolean;
239
+ remote?: boolean;
240
+ }
241
+ /** A binding to Analytics SQL. */
242
+ interface CfAnalyticsSQLBinding {
243
+ binding: string;
244
+ remote?: boolean;
245
+ }
215
246
  /**
216
- * `X_LOCAL_EXPLORER` enables the local explorer UI at /cdn-cgi/local/explorer.
247
+ * A binding to the AI project
217
248
  */
218
- declare const getLocalExplorerEnabledFromEnv: () => boolean;
249
+ interface CfAIBinding {
250
+ binding: string;
251
+ staging?: boolean;
252
+ remote?: boolean;
253
+ raw?: boolean;
254
+ }
219
255
  /**
220
- * `X_LOCAL_OBSERVABILITY` turns on local-dev observability capture. Both
221
- * `wrangler dev` and the Vite plugin read it and pass it through as the one
222
- * `unsafeObservability` Miniflare option, which makes core attach the trace
223
- * collector to each user worker.
224
- *
225
- * Defaults to `true` so the Local Explorer's Observability tab captures traces
226
- * and logs out of the box. Set `X_LOCAL_OBSERVABILITY=false` to opt out — for
227
- * example if the extra per-worker services (collector + streaming tail) cause
228
- * trouble in a multi-process dev-registry setup.
256
+ * A binding to Cloudflare Images
229
257
  */
230
- declare const getLocalObservabilityEnabledFromEnv: () => boolean;
258
+ interface CfImagesBinding {
259
+ binding: string;
260
+ raw?: boolean;
261
+ remote?: boolean;
262
+ }
231
263
  /**
232
- * `X_BROWSER_HEADFUL` opens the browser in headful (visible) mode when using the
233
- * Browser Run API in local development.
234
- *
235
- * Set to "true" to enable:
236
- *
237
- * ```sh
238
- * X_BROWSER_HEADFUL=true vite dev
239
- * ```
240
- *
241
- * Note: when using `@cloudflare/playwright`, two Chrome windows may appear — the initial blank
242
- * page and the one created by `browser.newPage()`. This is expected due to how Playwright handles
243
- * browser contexts via CDP.
264
+ * A binding to Cloudflare Media Transformations
244
265
  */
245
- declare const getBrowserRenderingHeadfulFromEnv: () => boolean;
266
+ interface CfMediaBinding {
267
+ binding: string;
268
+ remote?: boolean;
269
+ }
246
270
  /**
247
- * `CLOUDFLARE_CF_FETCH_ENABLED` controls whether Miniflare fetches the `cf.json` file
248
- * containing request.cf properties from workers.cloudflare.com.
249
- *
250
- * - If set to "false", disables fetching and uses fallback data (no files created)
251
- * - If set to "true" or not set, uses the default behavior (fetches and caches cf.json)
252
- *
253
- * This is particularly useful for non-JavaScript projects that don't want
254
- * a node_modules directory created automatically.
255
- *
256
- * Example:
257
- * ```sh
258
- * # Disable cf fetching entirely
259
- * CLOUDFLARE_CF_FETCH_ENABLED=false npx wrangler dev
260
- * ```
271
+ * A binding to Cloudflare Stream
261
272
  */
262
- declare const getCfFetchEnabledFromEnv: () => boolean;
273
+ interface CfStreamBinding {
274
+ binding: string;
275
+ remote?: boolean;
276
+ }
263
277
  /**
264
- * `CLOUDFLARE_CF_FETCH_PATH` specifies a custom path for caching the cf.json file.
265
- *
266
- * - If set, uses the specified path instead of the default node_modules/.mf/cf.json
267
- * - If not set, uses the default location (node_modules/.mf/cf.json)
268
- *
269
- * Example:
270
- * ```sh
271
- * # Use a custom cache location
272
- * CLOUDFLARE_CF_FETCH_PATH=/tmp/cf-cache.json npx wrangler dev
273
- * ```
278
+ * A binding to the Worker Version's metadata
274
279
  */
275
- declare const getCfFetchPathFromEnv: () => string | undefined;
280
+ interface CfVersionMetadataBinding {
281
+ binding: string;
282
+ }
276
283
  /**
277
- * `WRANGLER_CACHE_DIR` specifies a custom directory for Wrangler's cache files.
278
- * This overrides the default `node_modules/.cache/wrangler` location.
279
- * Useful for Yarn PnP or projects without node_modules.
284
+ * A binding to a data blob (in service-worker format)
280
285
  */
281
- declare const getWranglerCacheDirFromEnv: () => string | undefined;
286
+ interface CfDataBlobBindings {
287
+ [key: string]: string | Uint8Array<ArrayBuffer>;
288
+ }
282
289
  /**
283
- * `CLOUDFLARED_PATH` specifies a custom path to a cloudflared binary.
284
- *
285
- * If set, Wrangler will use this cloudflared binary instead of downloading one.
286
- * The path must point to an existing executable file.
290
+ * A Durable Object.
287
291
  */
288
- declare const getCloudflaredPathFromEnv: () => string | undefined;
289
-
290
- declare const LOGGER_LEVELS: {
291
- readonly none: -1;
292
- readonly error: 0;
293
- readonly warn: 1;
294
- readonly info: 2;
295
- readonly log: 3;
296
- readonly debug: 4;
297
- };
298
- type LoggerLevel = keyof typeof LOGGER_LEVELS;
299
- type Logger = {
300
- loggerLevel?: LoggerLevel;
301
- debug: typeof console.debug;
302
- debugWithSanitization?: (label: string, ...args: unknown[]) => void;
303
- log: typeof console.log;
304
- info: typeof console.info;
305
- warn: typeof console.warn;
306
- error: typeof console.error;
307
- once?: {
308
- info: typeof console.info;
309
- log: typeof console.log;
310
- warn: typeof console.warn;
311
- error: typeof console.error;
292
+ interface CfDurableObject {
293
+ name: string;
294
+ class_name: string;
295
+ script_name?: string;
296
+ environment?: string;
297
+ }
298
+ interface CfWorkflow {
299
+ name: string;
300
+ class_name: string;
301
+ binding: string;
302
+ script_name?: string;
303
+ raw?: boolean;
304
+ limits?: {
305
+ steps?: number;
312
306
  };
313
- console?<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
314
- };
315
-
316
- type ApiCredentials = {
317
- apiToken: string;
318
- } | {
319
- authKey: string;
320
- authEmail: string;
321
- };
322
- interface FetchResult<ResponseType = unknown> {
323
- success: boolean;
324
- result: ResponseType;
325
- errors: FetchError[];
326
- messages?: (string | {
327
- code?: number;
328
- message: string;
329
- })[];
330
- result_info?: unknown;
331
- }
332
- type FetchResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams, abortSignal?: AbortSignal) => Promise<ResponseType>;
333
- type FetchListResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams) => Promise<ResponseType[]>;
334
- type FetchPagedListResultFetcher = <ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams) => Promise<ResponseType[]>;
335
- /**
336
- *
337
- * Note this requires its caller to handle credentials
338
- * (need to call requireLoggedIn and requireApiToken)
339
- */
340
- declare function performApiFetchBase(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<Response$1>;
341
- declare function fetchInternalBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<{
342
- response: ResponseType;
343
- status: number;
344
- retryAfterMs?: number;
345
- }>;
346
- declare function fetchResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<ResponseType>;
347
- declare function fetchListResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, credentials?: ApiCredentials): Promise<ResponseType[]>;
348
- declare function truncate(text: string, maxLength: number): string;
349
- declare function isWAFBlockResponse(headers: Headers): boolean;
350
- /**
351
- * Parses a `Retry-After` header value (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)
352
- * into milliseconds to wait before retrying, or `undefined` if absent/unparsable.
353
- *
354
- * Per the HTTP spec, `Retry-After` may either be a number of delay-seconds,
355
- * or an HTTP-date after which the request may be retried.
356
- */
357
- declare function parseRetryAfterValue(retryAfter: string | null | undefined): number | undefined;
358
- /** Same as {@link parseRetryAfterValue}, reading the value from a `Headers` object. */
359
- declare function parseRetryAfterMs(headers: Headers): number | undefined;
360
- declare function extractWAFBlockRayId(headers: Headers): string | undefined;
361
- declare function extractAccountTag(resource: string): string | undefined;
362
- interface PageResultInfo {
363
- page: number;
364
- per_page: number;
365
- count: number;
366
- total_count: number;
367
- }
368
- declare function hasMorePages(result_info: unknown): result_info is PageResultInfo;
369
- declare function renderError(err: FetchError | {
370
- code?: number;
371
- message?: string;
372
- documentation_url?: string;
373
- }, level?: number): string;
374
- declare function addAuthorizationHeader(headers: Headers, auth: ApiCredentials, overrideExisting?: boolean): void;
375
- declare function throwFetchError(resource: string, response: FetchResult<unknown>, status: number, retryAfterMs?: number): never;
376
- /**
377
- * Fetch a raw KV value from the Cloudflare API.
378
- *
379
- * This is special-cased because it's the only API endpoint that returns raw
380
- * binary data instead of a JSON envelope.
381
- *
382
- * Note: callers must call encodeURIComponent on `key` before passing it.
383
- */
384
- declare function fetchKVGetValueBase(complianceConfig: ComplianceConfig, accountId: string, namespaceId: string, key: string, userAgent: string, logger: Logger, credentials: ApiCredentials): Promise<ArrayBuffer>;
385
- type FetchKVGetValueFetcher = (complianceConfig: ComplianceConfig, accountId: string, namespaceId: string, key: string) => Promise<ArrayBuffer>;
386
- declare function hasCursor(result_info: unknown): result_info is {
387
- cursor: string;
388
- };
389
- declare function maybeAddTraceHeader(headers: Headers): void;
390
-
391
- /**
392
- * A symbol to inherit a binding from the deployed worker.
393
- */
394
- declare const INHERIT_SYMBOL: unique symbol;
395
- declare const SERVICE_TAG_PREFIX = "cf:service=";
396
- declare const ENVIRONMENT_TAG_PREFIX = "cf:environment=";
397
- declare const PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
398
- /**
399
- * Config formats that use JSON parsing
400
- */
401
- declare const JSON_CONFIG_FORMATS: readonly string[];
402
-
403
- /**
404
- * The type of Worker
405
- */
406
- type CfScriptFormat = "modules" | "service-worker";
407
- /**
408
- * A module type.
409
- */
410
- type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement";
411
- /**
412
- * An imported module.
413
- */
414
- interface CfModule {
415
- /**
416
- * The module name.
417
- *
418
- * @example
419
- * './src/index.js'
420
- */
421
- name: string;
422
- /**
423
- * The absolute path of the module on disk, or `undefined` if this is a
424
- * virtual module. Used as the source URL for this module, so source maps are
425
- * correctly resolved.
426
- *
427
- * @example
428
- * '/path/to/src/index.js'
429
- */
430
- filePath: string | undefined;
431
- /**
432
- * The module content, usually JavaScript or WASM code.
433
- *
434
- * @example
435
- * export default {
436
- * async fetch(request) {
437
- * return new Response('Ok')
438
- * }
439
- * }
440
- */
441
- content: string | Buffer<ArrayBuffer>;
442
- /**
443
- * An optional sourcemap for this module if it's of a ESM or CJS type, this will only be present
444
- * if we're deploying with sourcemaps enabled. Since we copy extra modules that aren't bundled
445
- * we need to also copy the relevant sourcemaps into the final out directory.
446
- */
447
- sourceMap?: CfWorkerSourceMap;
448
- /**
449
- * The module type.
450
- *
451
- * If absent, will default to the main module's type.
452
- */
453
- type?: CfModuleType;
454
- }
455
- /**
456
- * A map of variable names to values.
457
- */
458
- interface CfVars {
459
- [key: string]: string | Json;
460
- }
461
- /**
462
- * A KV namespace.
463
- */
464
- interface CfKvNamespace {
465
- binding: string;
466
- id?: string | typeof INHERIT_SYMBOL;
467
- remote?: boolean;
468
- raw?: boolean;
469
- }
470
- /**
471
- * A binding to send email.
472
- */
473
- type CfSendEmailBindings = {
474
- name: string;
475
- remote?: boolean;
476
- allowed_sender_addresses?: string[];
477
- } & ({
478
- destination_address: string;
479
- allowed_destination_addresses?: never;
480
- } | {
481
- destination_address?: never;
482
- allowed_destination_addresses: string[];
483
- } | {
484
- destination_address?: never;
485
- allowed_destination_addresses?: never;
486
- });
487
- /**
488
- * A binding to a wasm module (in service-worker format)
489
- */
490
- interface CfWasmModuleBindings {
491
- [key: string]: string | Uint8Array<ArrayBuffer>;
492
- }
493
- /**
494
- * A binding to a text blob (in service-worker format)
495
- */
496
- interface CfTextBlobBindings {
497
- [key: string]: string;
498
- }
499
- /**
500
- * A binding to a browser
501
- */
502
- interface CfBrowserBinding {
503
- binding: string;
504
- raw?: boolean;
505
- remote?: boolean;
506
- }
507
- /**
508
- * A binding to the AI project
509
- */
510
- interface CfAIBinding {
511
- binding: string;
512
- staging?: boolean;
513
- remote?: boolean;
514
- raw?: boolean;
515
- }
516
- /**
517
- * A binding to Cloudflare Images
518
- */
519
- interface CfImagesBinding {
520
- binding: string;
521
- raw?: boolean;
522
- remote?: boolean;
523
- }
524
- /**
525
- * A binding to Cloudflare Media Transformations
526
- */
527
- interface CfMediaBinding {
528
- binding: string;
529
- remote?: boolean;
530
- }
531
- /**
532
- * A binding to Cloudflare Stream
533
- */
534
- interface CfStreamBinding {
535
- binding: string;
536
- remote?: boolean;
537
- }
538
- /**
539
- * A binding to the Worker Version's metadata
540
- */
541
- interface CfVersionMetadataBinding {
542
- binding: string;
543
- }
544
- /**
545
- * A binding to a data blob (in service-worker format)
546
- */
547
- interface CfDataBlobBindings {
548
- [key: string]: string | Uint8Array<ArrayBuffer>;
549
- }
550
- /**
551
- * A Durable Object.
552
- */
553
- interface CfDurableObject {
554
- name: string;
555
- class_name: string;
556
- script_name?: string;
557
- environment?: string;
558
- }
559
- interface CfWorkflow {
560
- name: string;
561
- class_name: string;
562
- binding: string;
563
- script_name?: string;
564
- raw?: boolean;
565
- limits?: {
566
- steps?: number;
567
- };
568
- concurrency?: {
569
- limit?: number;
570
- };
571
- schedules?: string | string[];
307
+ concurrency?: {
308
+ limit?: number;
309
+ };
310
+ schedules?: string | string[];
572
311
  }
573
312
  interface CfQueue {
574
313
  binding: string;
@@ -731,6 +470,11 @@ interface CfPipeline {
731
470
  pipeline?: string;
732
471
  remote?: boolean;
733
472
  }
473
+ interface CfK2Binding {
474
+ binding: string;
475
+ stream: string;
476
+ remote?: boolean;
477
+ }
734
478
  interface CfUnsafeBinding {
735
479
  name: string;
736
480
  type: string;
@@ -826,6 +570,7 @@ interface CfWorkerInit {
826
570
  images?: Record<string, string>;
827
571
  }[] | undefined;
828
572
  migrations: CfDurableObjectMigrations | undefined;
573
+ code_update_strategy?: DurableObjectCodeUpdateStrategy;
829
574
  /**
830
575
  * Declarative exports configuration. Durable Object entries are sent instead
831
576
  * of `migrations`.
@@ -926,6 +671,9 @@ type WorkerMetadataBinding = {
926
671
  type: "browser";
927
672
  name: string;
928
673
  raw?: boolean;
674
+ } | {
675
+ type: "analytics";
676
+ name: string;
929
677
  } | {
930
678
  type: "ai";
931
679
  name: string;
@@ -1046,6 +794,10 @@ type WorkerMetadataBinding = {
1046
794
  name: string;
1047
795
  stream?: string;
1048
796
  pipeline?: string;
797
+ } | {
798
+ type: "k2";
799
+ name: string;
800
+ stream: string;
1049
801
  } | {
1050
802
  type: "secrets_store_secret";
1051
803
  name: string;
@@ -1149,6 +901,7 @@ type WorkerMetadataPut = {
1149
901
  compatibility_flags?: string[];
1150
902
  usage_model?: "bundled" | "unbound";
1151
903
  migrations?: CfDurableObjectMigrations;
904
+ code_update_strategy?: DurableObjectCodeUpdateStrategy;
1152
905
  exports?: CfExports;
1153
906
  capnp_schema?: string;
1154
907
  bindings: WorkerMetadataBinding[];
@@ -1346,6 +1099,8 @@ type Binding = {
1346
1099
  } | ({
1347
1100
  type: "browser";
1348
1101
  } & BindingOmit<CfBrowserBinding>) | ({
1102
+ type: "analytics";
1103
+ } & BindingOmit<CfAnalyticsSQLBinding>) | ({
1349
1104
  type: "ai";
1350
1105
  } & BindingOmit<CfAIBinding>) | ({
1351
1106
  type: "images";
@@ -1390,6 +1145,8 @@ type Binding = {
1390
1145
  } & BindingOmit<CfMTlsCertificate>) | ({
1391
1146
  type: "pipeline";
1392
1147
  } & BindingOmit<CfPipeline>) | ({
1148
+ type: "k2";
1149
+ } & BindingOmit<CfK2Binding>) | ({
1393
1150
  type: "secrets_store_secret";
1394
1151
  } & BindingOmit<CfSecretsStoreSecrets>) | ({
1395
1152
  type: "artifacts";
@@ -2448,6 +2205,26 @@ type DurableObjectBindings = {
2448
2205
  /** The service environment of the script_name to bind to */
2449
2206
  environment?: string;
2450
2207
  }[];
2208
+ type DurableObjectCodeUpdateStrategy = {
2209
+ /** How Durable Object code updates should be applied. */
2210
+ mode: "immediate" | "deferred";
2211
+ /**
2212
+ * Maximum time, in seconds, to wait for Durable Objects to hibernate.
2213
+ * Defaults to 300 (5 minutes) and cannot exceed 86400 (24 hours).
2214
+ * @minimum 0
2215
+ * @maximum 86400
2216
+ * @multipleOf 0.001
2217
+ * @default 300
2218
+ */
2219
+ max_delay?: number;
2220
+ };
2221
+ type DurableObjectsConfig = {
2222
+ bindings: DurableObjectBindings;
2223
+ code_update_strategy?: DurableObjectCodeUpdateStrategy;
2224
+ };
2225
+ type RawDurableObjectsConfig = Omit<DurableObjectsConfig, "bindings"> & {
2226
+ bindings?: DurableObjectBindings;
2227
+ };
2451
2228
  declare const ARTIFACTS_EVENT_TYPES: readonly ["cf.artifacts.repo.created", "cf.artifacts.repo.deleted", "cf.artifacts.repo.forked", "cf.artifacts.repo.imported", "cf.artifacts.repo.pushed", "cf.artifacts.repo.cloned", "cf.artifacts.repo.fetched", "cf.artifacts.repo.token.created", "cf.artifacts.repo.token.revoked"];
2452
2229
  type ArtifactsEventType = (typeof ARTIFACTS_EVENT_TYPES)[number];
2453
2230
  type ArtifactsEventTrigger = {
@@ -2561,7 +2338,7 @@ interface EnvironmentNonInheritable {
2561
2338
  required?: string[];
2562
2339
  };
2563
2340
  /**
2564
- * A list of durable objects that your Worker should be bound to.
2341
+ * Durable Object bindings and code update strategy for your Worker.
2565
2342
  *
2566
2343
  * For more information about Durable Objects, see the documentation at
2567
2344
  * https://developers.cloudflare.com/workers/learning/using-durable-objects
@@ -2574,9 +2351,7 @@ interface EnvironmentNonInheritable {
2574
2351
  * @default {bindings:[]}
2575
2352
  * @nonInheritable
2576
2353
  */
2577
- durable_objects: {
2578
- bindings: DurableObjectBindings;
2579
- };
2354
+ durable_objects: DurableObjectsConfig;
2580
2355
  /**
2581
2356
  * A list of workflows that your Worker should be bound to.
2582
2357
  *
@@ -2948,6 +2723,20 @@ interface EnvironmentNonInheritable {
2948
2723
  /** Whether the Browser binding should be remote or not in local development */
2949
2724
  remote?: boolean;
2950
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;
2951
2740
  /**
2952
2741
  * Binding to the AI project.
2953
2742
  *
@@ -3134,15 +2923,30 @@ interface EnvironmentNonInheritable {
3134
2923
  remote?: boolean;
3135
2924
  }[];
3136
2925
  /**
3137
- * Specifies Secret Store bindings that are bound to this Worker environment.
3138
- *
3139
- * NOTE: This field is not automatically inherited from the top level environment,
3140
- * and so must be specified in every named environment.
2926
+ * K2 producer bindings. Create streams using the Dashboard or API.
3141
2927
  *
2928
+ * This field must be specified separately in each named environment.
3142
2929
  * @default []
3143
2930
  * @nonInheritable
3144
2931
  */
3145
- secrets_store_secrets: {
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
+ }[];
2940
+ /**
2941
+ * Specifies Secret Store bindings that are bound to this Worker environment.
2942
+ *
2943
+ * NOTE: This field is not automatically inherited from the top level environment,
2944
+ * and so must be specified in every named environment.
2945
+ *
2946
+ * @default []
2947
+ * @nonInheritable
2948
+ */
2949
+ secrets_store_secrets: {
3146
2950
  /** The binding name used to refer to the bound service. */
3147
2951
  binding: string;
3148
2952
  /** Id of the secret store */
@@ -3283,7 +3087,9 @@ interface EnvironmentNonInheritable {
3283
3087
  * All the properties are optional, and will be replaced with defaults in the configuration that
3284
3088
  * is used in the rest of the codebase.
3285
3089
  */
3286
- type RawEnvironment = Partial<Environment>;
3090
+ type RawEnvironment = Partial<Omit<Environment, "durable_objects">> & {
3091
+ durable_objects?: RawDurableObjectsConfig;
3092
+ };
3287
3093
  /**
3288
3094
  * A bundling resolver rule, defining the modules type for paths that match the specified globs.
3289
3095
  */
@@ -3426,7 +3232,10 @@ type ContainerEngine = {
3426
3232
  *
3427
3233
  * @inheritable
3428
3234
  */
3429
- interface PreviewsConfig extends Partial<EnvironmentNonInheritable>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits" | "placement" | "cache">> {
3235
+ interface PreviewsConfig extends Partial<Omit<EnvironmentNonInheritable, "durable_objects">>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits" | "placement" | "cache">> {
3236
+ durable_objects?: {
3237
+ bindings: DurableObjectBindings;
3238
+ };
3430
3239
  }
3431
3240
 
3432
3241
  /**
@@ -3708,4 +3517,270 @@ interface EnvironmentMap {
3708
3517
  }
3709
3518
  declare const defaultWranglerConfig: Config;
3710
3519
 
3711
- export { type CfMediaBinding as $, type ApiCredentials as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type CfArtifacts as F, type CfAssetsBinding as G, type CfBrowserBinding as H, type CfCapnp as I, type CfD1Database as J, type CfDataBlobBindings as K, type Logger as L, type CfDevPluginCfg as M, type CfDispatchNamespace as N, type CfDurableObject as O, type CfDurableObjectMigrations as P, type CfExports as Q, type RawConfig as R, type CfFlagship as S, type CfHelloWorld as T, type CfHyperdrive as U, type CfImagesBinding as V, type WorkerEntrypointExport as W, type CfKvNamespace as X, type CfLogfwdr as Y, type CfLogfwdrBinding as Z, type CfMTlsCertificate as _, type RedirectedRawConfig as a, type Json as a$, type CfModule as a0, type CfModuleType as a1, type CfPipeline as a2, type CfPlacement as a3, type CfQueue as a4, type CfR2Bucket as a5, type CfRateLimit as a6, type CfScriptFormat as a7, type CfSecretsStoreSecrets as a8, type CfSendEmailBindings as a9, type DockerConfiguration as aA, type DurableObjectBindings as aB, type DurableObjectContainerImage as aC, type DurableObjectExportStorage as aD, type DurableObjectMigration as aE, ENVIRONMENT_TAG_PREFIX as aF, type Entry as aG, type Environment as aH, type EnvironmentNonInheritable as aI, type ExportsReconciliationEntryBase as aJ, type ExportsReconciliationErrorDetail as aK, type ExportsReconciliationInfo as aL, type ExportsReconciliationRename as aM, type ExportsReconciliationResult as aN, type ExportsReconciliationTransfer as aO, type ExportsReconciliationTransferPending as aP, type ExportsReconciliationWarning as aQ, type FetchKVGetValueFetcher as aR, type FetchListResultFetcher as aS, type FetchPagedListResultFetcher as aT, type FetchResult as aU, type FetchResultFetcher as aV, type File as aW, type Hook as aX, type HookValues as aY, INHERIT_SYMBOL as aZ, JSON_CONFIG_FORMATS as a_, type CfService as aa, type CfStreamBinding as ab, type CfTextBlobBindings as ac, type CfUnsafe as ad, type CfUnsafeBinding as ae, type CfUserLimits as af, type CfVars as ag, type CfVectorize as ah, type CfVersionMetadataBinding as ai, type CfVpcNetwork as aj, type CfVpcService as ak, type CfWasmModuleBindings as al, type CfWorkerContext as am, type CfWorkerInit as an, type CfWorkerLoader as ao, type CfWorkerSourceMap as ap, type CfWorkflow as aq, type CloudchamberConfig as ar, type ConfigFields as as, type ConfigModuleRuleType as at, type ConfiguredExport as au, type ConnectHandler as av, type ContainerEngine as aw, type ContainerObservability as ax, type CustomDomainRoute as ay, type DispatchNamespaceOutbound as az, type Config as b, getSanitizeLogs as b$, LOGGER_LEVELS as b0, type LegacyAssetPaths as b1, type LocalS3Credentials as b2, type LogLevel as b3, type LoggerLevel as b4, type NodeJSCompatMode as b5, type Observability as b6, PATH_TO_DEPLOY_CONFIG as b7, type PreviewsConfig as b8, type RawDevConfig as b9, getBuildConditionsFromEnv as bA, getBuildPlatformFromEnv as bB, getC3CommandFromEnv as bC, getCIGeneratePreviewAlias as bD, getCIMatchTag as bE, getCIOverrideName as bF, getCIOverrideNetworkModeHost as bG, getCfFetchEnabledFromEnv as bH, getCfFetchPathFromEnv as bI, getCloudflareApiBaseUrl as bJ, getCloudflareApiEnvironmentFromEnv as bK, getCloudflareComplianceRegion as bL, getCloudflareContainerRegistry as bM, getCloudflareEnv as bN, getCloudflareIncludeProcessEnvFromEnv as bO, getCloudflareLoadDevVarsFromDotEnv as bP, getCloudflaredPathFromEnv as bQ, getComplianceRegionSubdomain as bR, getD1ExtraLocationChoices as bS, getDisableConfigWatching as bT, getLocalExplorerEnabledFromEnv as bU, getLocalObservabilityEnabledFromEnv as bV, getNoSkillsUpdatePromptsFromEnv as bW, getOpenNextDeployFromEnv as bX, getOutputFileDirectoryFromEnv as bY, getOutputFilePathFromEnv as bZ, getRegistryPath as b_, type RawEnvironment as ba, type Rule as bb, SERVICE_TAG_PREFIX as bc, type ServiceFetch as bd, type ServiceMetadataRes as be, type StartDevWorkerInput as bf, type StreamingTailConsumer as bg, type TailConsumer as bh, type TcpConnectHandler as bi, type Trigger as bj, type UdpConnectHandler as bk, type UserLimits as bl, type ValidatedAssetsOptions as bm, type WorkerMetadata as bn, type WorkflowBinding as bo, type ZoneIdRoute as bp, type ZoneNameRoute as bq, addAuthorizationHeader as br, defaultWranglerConfig as bs, extractAccountTag as bt, extractWAFBlockRayId as bu, fetchInternalBase as bv, fetchKVGetValueBase as bw, fetchListResultBase as bx, fetchResultBase as by, getBrowserRenderingHeadfulFromEnv as bz, type WorkflowExport as c, getSubdomainMixedStateCheckDisabled as c0, getTraceHeader as c1, getWorkersCIBranchName as c2, getWranglerCacheDirFromEnv as c3, getWranglerHideBanner as c4, getWranglerSendErrorReportsFromEnv as c5, getWranglerSendMetricsFromEnv as c6, hasCursor as c7, hasMorePages as c8, isDoNotTrackEnabled as c9, isWAFBlockResponse as ca, maybeAddTraceHeader as cb, parseRetryAfterMs as cc, parseRetryAfterValue as cd, performApiFetchBase as ce, renderError as cf, throwFetchError as cg, truncate as ch, type ContainerApp as d, type WorkerMetadataBinding as e, type CfTailConsumer as f, type ComplianceConfig as g, type Route as h, ARTIFACTS_EVENT_TYPES as i, type Access as j, type ArtifactsEventTrigger as k, type ArtifactsEventType as l, type AssetConfigMetadata as m, type Assets as n, type AssetsOptions as o, type AsyncHook as p, type BinaryFile as q, COMPLIANCE_REGION_CONFIG_PUBLIC as r, COMPLIANCE_REGION_CONFIG_UNKNOWN as s, type CacheOptions as t, type CfAIBinding as u, type CfAISearch as v, type CfAISearchNamespace as w, type CfAccount as x, type CfAgentMemory as y, type CfAnalyticsEngineDataset as z };
3520
+ /**
3521
+ * `WRANGLER_C3_COMMAND` can override the command used by `wrangler init` when delegating to C3.
3522
+ *
3523
+ * By default this will use `create cloudflare`.
3524
+ *
3525
+ * To run against the beta release of C3 use:
3526
+ *
3527
+ * ```sh
3528
+ * # Tell Wrangler to use the beta version of create-cloudflare
3529
+ * WRANGLER_C3_COMMAND="create cloudflare@beta" npx wrangler init
3530
+ * ```
3531
+ *
3532
+ * To test the integration between wrangler and C3 locally, use:
3533
+ *
3534
+ * ```sh
3535
+ * # Ensure both Wrangler and C3 are built
3536
+ * npm run build
3537
+ * # Tell Wrangler to use the local version of create-cloudflare
3538
+ * WRANGLER_C3_COMMAND="exec ./packages/create-cloudflare" npx wrangler init temp
3539
+ * ```
3540
+ *
3541
+ * Note that you cannot use `WRANGLER_C3_COMMAND="create cloudflare@2"` if you are
3542
+ * running Wrangler from inside the monorepo as the bin paths get messed up.
3543
+ */
3544
+ declare const getC3CommandFromEnv: () => string;
3545
+ /** Whether `DO_NOT_TRACK` is set to a supported telemetry opt-out value. */
3546
+ declare function isDoNotTrackEnabled(): boolean;
3547
+ /**
3548
+ * `WRANGLER_SEND_METRICS` controls whether we attempt to send metrics information to Sparrow.
3549
+ * `DO_NOT_TRACK` takes precedence when it is set to an opt-out value.
3550
+ */
3551
+ declare function getWranglerSendMetricsFromEnv(): boolean | undefined;
3552
+ /**
3553
+ * `WRANGLER_NO_SKILLS_UPDATE_PROMPTS` suppresses the prompt that offers to
3554
+ * update Cloudflare agent skills when they are out of date.
3555
+ *
3556
+ * Set to `"true"` to never be prompted for skills updates.
3557
+ */
3558
+ declare const getNoSkillsUpdatePromptsFromEnv: () => boolean | undefined;
3559
+ /**
3560
+ * `WRANGLER_SEND_ERROR_REPORTS` controls whether we attempt to send error reports to Sentry.
3561
+ *
3562
+ * Defaults to `false` to avoid noisy false-positive reports. Users can opt in
3563
+ * by setting `WRANGLER_SEND_ERROR_REPORTS=true`.
3564
+ */
3565
+ declare const getWranglerSendErrorReportsFromEnv: () => boolean;
3566
+ /**
3567
+ * Set `WRANGLER_API_ENVIRONMENT` environment variable to "staging" to tell Wrangler to hit the staging APIs rather than production.
3568
+ */
3569
+ declare const getCloudflareApiEnvironmentFromEnv: () => "staging" | "production";
3570
+ /**
3571
+ * The compliance region to use for the API requests.
3572
+ */
3573
+ type ComplianceConfig = Partial<Pick<Config, "compliance_region">>;
3574
+ /** Used for commands that explicitly do not support compliance regions other than "public" */
3575
+ declare const COMPLIANCE_REGION_CONFIG_PUBLIC: ComplianceConfig;
3576
+ /**
3577
+ * Used for commands where there is no configuration available and
3578
+ * we rely upon the CLOUDFLARE_COMPLIANCE_REGION environment variable
3579
+ * to determine the compliance region.
3580
+ */
3581
+ declare const COMPLIANCE_REGION_CONFIG_UNKNOWN: ComplianceConfig;
3582
+ /**
3583
+ * Set `CLOUDFLARE_COMPLIANCE_REGION` environment variable to "fedramp_high"
3584
+ * or set the `compliance_region` property in the Wrangler configuration
3585
+ * to tell Wrangler to run in FedRAMP High compliance region mode, rather than "public" mode.
3586
+ */
3587
+ declare const getCloudflareComplianceRegion: (complianceConfig: ComplianceConfig) => "public" | "fedramp_high";
3588
+ /**
3589
+ * `CLOUDFLARE_API_BASE_URL` specifies the URL to the Cloudflare API.
3590
+ *
3591
+ * If this environment variable is not set, it will default to a URL computed from the
3592
+ * Cloudflare compliance region and the API environment.
3593
+ */
3594
+ declare const getCloudflareApiBaseUrl: (complianceConfig: ComplianceConfig) => string;
3595
+ /**
3596
+ * Compute the subdomain for the compliance region.
3597
+ */
3598
+ declare function getComplianceRegionSubdomain(complianceConfig: ComplianceConfig): string;
3599
+ /**
3600
+ * Returns the managed container registry for the configured API environment and compliance region.
3601
+ *
3602
+ * @param complianceConfig - Compliance configuration used to select the public or FedRAMP registry.
3603
+ * @returns The managed registry hostname, respecting `CLOUDFLARE_CONTAINER_REGISTRY` and `WRANGLER_API_ENVIRONMENT`.
3604
+ */
3605
+ declare function getCloudflareContainerRegistry(complianceConfig?: ComplianceConfig): string;
3606
+ /**
3607
+ * `WRANGLER_LOG_SANITIZE` specifies whether we sanitize debug logs.
3608
+ *
3609
+ * By default we do, since debug logs could be added to GitHub issues and shouldn't include sensitive information.
3610
+ */
3611
+ declare const getSanitizeLogs: () => boolean;
3612
+ /**
3613
+ * `WRANGLER_OUTPUT_FILE_DIRECTORY` specifies a directory where we should write a file containing output data in ND-JSON format.
3614
+ *
3615
+ * If this is set a random file will be created in this directory, and certain Wrangler commands will write entries to this file.
3616
+ * This is overridden by the `WRANGLER_OUTPUT_FILE_PATH` environment variable.
3617
+ */
3618
+ declare const getOutputFileDirectoryFromEnv: () => string | undefined;
3619
+ /**
3620
+ * `WRANGLER_OUTPUT_FILE_PATH` specifies a path to a file where we should write output data in ND-JSON format.
3621
+ *
3622
+ * If this is set certain Wrangler commands will write entries to this file.
3623
+ * This overrides the `WRANGLER_OUTPUT_FILE_DIRECTORY` environment variable.
3624
+ */
3625
+ declare const getOutputFilePathFromEnv: () => string | undefined;
3626
+ /**
3627
+ * `WRANGLER_CI_MATCH_TAG` specifies a Worker tag
3628
+ *
3629
+ * If this is set, Wrangler will ensure the Worker being targeted has this tag
3630
+ */
3631
+ declare const getCIMatchTag: () => string | undefined;
3632
+ /**
3633
+ * `WRANGLER_CI_OVERRIDE_NAME` specifies a Worker name
3634
+ *
3635
+ * If this is set, Wrangler will override the Worker name with this one
3636
+ */
3637
+ declare const getCIOverrideName: () => string | undefined;
3638
+ /**
3639
+ * `WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST` specifies whether --network=host should be set
3640
+ *
3641
+ * If this is set to true, Wrangler will use the --network=host flag when calling out to docker to build container images
3642
+ */
3643
+ declare const getCIOverrideNetworkModeHost: () => string | undefined;
3644
+ /**
3645
+ * `WRANGLER_CI_GENERATE_PREVIEW_ALIAS` specifies whether to generate a preview alias during version upload
3646
+ *
3647
+ * If this is set to true, Wrangler will attempt to autogenerate the preview alias by using the branch
3648
+ * name. If the branch name is too long and an alias cannot be created, a warning will be printed to the console.
3649
+ */
3650
+ declare const getCIGeneratePreviewAlias: () => "true" | "false";
3651
+ /**
3652
+ * `WORKERS_CI_BRANCH` is the branch name exposed by Workers CI
3653
+ *
3654
+ */
3655
+ declare const getWorkersCIBranchName: () => string | undefined;
3656
+ /**
3657
+ * `WRANGLER_BUILD_CONDITIONS` specifies the "build conditions" to use when importing packages at build time.
3658
+ *
3659
+ * See https://nodejs.org/api/packages.html#conditional-exports
3660
+ * and https://esbuild.github.io/api/#how-conditions-work.
3661
+ *
3662
+ * If this is set, Wrangler will configure esbuild to use this list of conditions.
3663
+ * The format is a string of comma separated conditions.
3664
+ */
3665
+ declare const getBuildConditionsFromEnv: () => string | undefined;
3666
+ /**
3667
+ * `WRANGLER_BUILD_PLATFORM` specifies the "build platform" to use when importing packages at build time.
3668
+ *
3669
+ * See https://esbuild.github.io/api/#platform
3670
+ * and https://esbuild.github.io/api/#how-conditions-work.
3671
+ *
3672
+ * If this is set, Wrangler will configure esbuild to use this platform.
3673
+ */
3674
+ declare const getBuildPlatformFromEnv: () => string | undefined;
3675
+ /**
3676
+ * `WRANGLER_REGISTRY_PATH` specifies the file based dev registry folder
3677
+ */
3678
+ declare const getRegistryPath: () => string;
3679
+ /**
3680
+ * `WRANGLER_D1_EXTRA_LOCATION_CHOICES` is an internal variable to let D1 team target their testing environments.
3681
+ *
3682
+ * External accounts cannot access testing environments, so should not set this variable.
3683
+ */
3684
+ declare const getD1ExtraLocationChoices: () => string | undefined;
3685
+
3686
+ declare const getSubdomainMixedStateCheckDisabled: () => boolean;
3687
+ /**
3688
+ /**
3689
+ * `CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV` specifies whether to load vars for local dev from `.env` files.
3690
+ */
3691
+ declare const getCloudflareLoadDevVarsFromDotEnv: () => boolean;
3692
+ /**
3693
+ * `CLOUDFLARE_INCLUDE_PROCESS_ENV` specifies whether to include the `process.env` in vars loaded from `.env` for local development.
3694
+ */
3695
+ declare const getCloudflareIncludeProcessEnvFromEnv: () => boolean;
3696
+ declare const getTraceHeader: () => string | undefined;
3697
+ declare const getDisableConfigWatching: () => boolean;
3698
+ /**
3699
+ * Hide the Wrangler version banner and command status (deprecated/experimental) warnings
3700
+ */
3701
+ declare const getWranglerHideBanner: () => boolean;
3702
+ /**
3703
+ * `CLOUDFLARE_ENV` specifies the currently selected Wrangler/Cloudflare environment.
3704
+ */
3705
+ declare const getCloudflareEnv: () => string | undefined;
3706
+ /**
3707
+ * `OPEN_NEXT_DEPLOY` is an environment variables that indicates that the current process is being
3708
+ * run by the open-next deploy command
3709
+ */
3710
+ declare const getOpenNextDeployFromEnv: () => string | undefined;
3711
+ /**
3712
+ * `X_LOCAL_EXPLORER` enables the local explorer UI at /cdn-cgi/local/explorer.
3713
+ */
3714
+ declare const getLocalExplorerEnabledFromEnv: () => boolean;
3715
+ /**
3716
+ * `X_LOCAL_OBSERVABILITY` turns on local-dev observability capture. Both
3717
+ * `wrangler dev` and the Vite plugin read it and pass it through as the one
3718
+ * `unsafeObservability` Miniflare option, which makes core attach the trace
3719
+ * collector to each user worker.
3720
+ *
3721
+ * Defaults to `true` so the Local Explorer's Observability tab captures traces
3722
+ * and logs out of the box. Set `X_LOCAL_OBSERVABILITY=false` to opt out — for
3723
+ * example if the extra per-worker services (collector + streaming tail) cause
3724
+ * trouble in a multi-process dev-registry setup.
3725
+ */
3726
+ declare const getLocalObservabilityEnabledFromEnv: () => boolean;
3727
+ /**
3728
+ * `X_BROWSER_HEADFUL` opens the browser in headful (visible) mode when using the
3729
+ * Browser Run API in local development.
3730
+ *
3731
+ * Set to "true" to enable:
3732
+ *
3733
+ * ```sh
3734
+ * X_BROWSER_HEADFUL=true vite dev
3735
+ * ```
3736
+ *
3737
+ * Note: when using `@cloudflare/playwright`, two Chrome windows may appear — the initial blank
3738
+ * page and the one created by `browser.newPage()`. This is expected due to how Playwright handles
3739
+ * browser contexts via CDP.
3740
+ */
3741
+ declare const getBrowserRenderingHeadfulFromEnv: () => boolean;
3742
+ /**
3743
+ * `CLOUDFLARE_CF_FETCH_ENABLED` controls whether Miniflare fetches the `cf.json` file
3744
+ * containing request.cf properties from workers.cloudflare.com.
3745
+ *
3746
+ * - If set to "false", disables fetching and uses fallback data (no files created)
3747
+ * - If set to "true" or not set, uses the default behavior (fetches and caches cf.json)
3748
+ *
3749
+ * This is particularly useful for non-JavaScript projects that don't want
3750
+ * a node_modules directory created automatically.
3751
+ *
3752
+ * Example:
3753
+ * ```sh
3754
+ * # Disable cf fetching entirely
3755
+ * CLOUDFLARE_CF_FETCH_ENABLED=false npx wrangler dev
3756
+ * ```
3757
+ */
3758
+ declare const getCfFetchEnabledFromEnv: () => boolean;
3759
+ /**
3760
+ * `CLOUDFLARE_CF_FETCH_PATH` specifies a custom path for caching the cf.json file.
3761
+ *
3762
+ * - If set, uses the specified path instead of the default node_modules/.mf/cf.json
3763
+ * - If not set, uses the default location (node_modules/.mf/cf.json)
3764
+ *
3765
+ * Example:
3766
+ * ```sh
3767
+ * # Use a custom cache location
3768
+ * CLOUDFLARE_CF_FETCH_PATH=/tmp/cf-cache.json npx wrangler dev
3769
+ * ```
3770
+ */
3771
+ declare const getCfFetchPathFromEnv: () => string | undefined;
3772
+ /**
3773
+ * `WRANGLER_CACHE_DIR` specifies a custom directory for Wrangler's cache files.
3774
+ * This overrides the default `node_modules/.cache/wrangler` location.
3775
+ * Useful for Yarn PnP or projects without node_modules.
3776
+ */
3777
+ declare const getWranglerCacheDirFromEnv: () => string | undefined;
3778
+ /**
3779
+ * `CLOUDFLARED_PATH` specifies a custom path to a cloudflared binary.
3780
+ *
3781
+ * If set, Wrangler will use this cloudflared binary instead of downloading one.
3782
+ * The path must point to an existing executable file.
3783
+ */
3784
+ declare const getCloudflaredPathFromEnv: () => string | undefined;
3785
+
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 };