@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
@@ -1,4 +1,4 @@
1
- export { r as COMPLIANCE_REGION_CONFIG_PUBLIC, s as COMPLIANCE_REGION_CONFIG_UNKNOWN, g as ComplianceConfig, bJ as getCloudflareApiBaseUrl, bL as getCloudflareComplianceRegion, bM as getCloudflareContainerRegistry, bR as getComplianceRegionSubdomain } from './compliance-DzwHmPKm.mjs';
1
+ export { s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, h as ComplianceConfig, bO as getCloudflareApiBaseUrl, bQ as getCloudflareComplianceRegion, bR as getCloudflareContainerRegistry, bW as getComplianceRegionSubdomain } from './compliance-CADarBwY.mjs';
2
2
  import 'node:url';
3
3
  import 'undici';
4
4
  import '@cloudflare/workers-shared';
@@ -1,7 +1,10 @@
1
- export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareApiBaseUrl, getCloudflareComplianceRegion, getCloudflareContainerRegistry, getComplianceRegionSubdomain } from './chunk-IYSONYTF.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';
1
+ import { createRequire } from 'node:module';
2
+ export { COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareApiBaseUrl, getCloudflareComplianceRegion, getCloudflareContainerRegistry, getComplianceRegionSubdomain } from './chunk-FR75DWDU.mjs';
3
+ import './chunk-M3RITKR3.mjs';
4
+ import './chunk-QSRIB43D.mjs';
5
+ import './chunk-OWPFSLY6.mjs';
6
+ import './chunk-MV2OJK3L.mjs';
7
+ import './chunk-MIA26B4M.mjs';
8
+ import './chunk-U6NEESU5.mjs';
9
+
10
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
@@ -1,3 +1,6 @@
1
- export { getDockerPath } from './chunk-3IYLA2JH.mjs';
2
- import './chunk-WO2IAW6M.mjs';
3
- import './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ export { getDockerPath } from './chunk-QSRIB43D.mjs';
3
+ import './chunk-OWPFSLY6.mjs';
4
+ import './chunk-U6NEESU5.mjs';
5
+
6
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
package/dist/errors.mjs CHANGED
@@ -1,2 +1,5 @@
1
- export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, UserError, createFatalError } from './chunk-WO2IAW6M.mjs';
2
- import './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, UserError, createFatalError } from './chunk-OWPFSLY6.mjs';
3
+ import './chunk-U6NEESU5.mjs';
4
+
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
@@ -1,2 +1,5 @@
1
- export { isDirectory, removeDir, removeDirSync } from './chunk-53IMCORZ.mjs';
2
- import './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ export { isDirectory, removeDir, removeDirSync } from './chunk-MIA26B4M.mjs';
3
+ import './chunk-U6NEESU5.mjs';
4
+
5
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
@@ -1,3 +1,6 @@
1
- export { getGlobalConfigPath, getGlobalWranglerCachePath } from './chunk-34VZWBGB.mjs';
2
- import './chunk-53IMCORZ.mjs';
3
- import './chunk-Q72B4Q5Z.mjs';
1
+ import { createRequire } from 'node:module';
2
+ export { getGlobalConfigPath, getGlobalWranglerCachePath } from './chunk-MV2OJK3L.mjs';
3
+ import './chunk-MIA26B4M.mjs';
4
+ import './chunk-U6NEESU5.mjs';
5
+
6
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
- import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as WorkflowExport, d as ContainerApp, e as WorkerMetadataBinding, f as CfTailConsumer, L as Logger, A as ApiCredentials, g as ComplianceConfig, h as Route } from './compliance-DzwHmPKm.mjs';
2
- export { i as ARTIFACTS_EVENT_TYPES, j as Access, k as ArtifactsEventTrigger, l as ArtifactsEventType, m as AssetConfigMetadata, n as Assets, o as AssetsOptions, p as AsyncHook, q as BinaryFile, r as COMPLIANCE_REGION_CONFIG_PUBLIC, s as COMPLIANCE_REGION_CONFIG_UNKNOWN, t as CacheOptions, u as CfAIBinding, v as CfAISearch, w as CfAISearchNamespace, x as CfAccount, y as CfAgentMemory, z as CfAnalyticsEngineDataset, F as CfArtifacts, G as CfAssetsBinding, H as CfBrowserBinding, I as CfCapnp, J as CfD1Database, K as CfDataBlobBindings, M as CfDevPluginCfg, N as CfDispatchNamespace, O as CfDurableObject, P as CfDurableObjectMigrations, Q as CfExports, S as CfFlagship, T as CfHelloWorld, U as CfHyperdrive, V as CfImagesBinding, X as CfKvNamespace, Y as CfLogfwdr, Z as CfLogfwdrBinding, _ as CfMTlsCertificate, $ as CfMediaBinding, a0 as CfModule, a1 as CfModuleType, a2 as CfPipeline, a3 as CfPlacement, a4 as CfQueue, a5 as CfR2Bucket, a6 as CfRateLimit, a7 as CfScriptFormat, a8 as CfSecretsStoreSecrets, a9 as CfSendEmailBindings, aa as CfService, ab as CfStreamBinding, ac as CfTextBlobBindings, ad as CfUnsafe, ae as CfUnsafeBinding, af as CfUserLimits, ag as CfVars, ah as CfVectorize, ai as CfVersionMetadataBinding, aj as CfVpcNetwork, ak as CfVpcService, al as CfWasmModuleBindings, am as CfWorkerContext, an as CfWorkerInit, ao as CfWorkerLoader, ap as CfWorkerSourceMap, aq as CfWorkflow, ar as CloudchamberConfig, as as ConfigFields, at as ConfigModuleRuleType, au as ConfiguredExport, av as ConnectHandler, aw as ContainerEngine, ax as ContainerObservability, ay as CustomDomainRoute, az as DispatchNamespaceOutbound, aA as DockerConfiguration, aB as DurableObjectBindings, aC as DurableObjectContainerImage, aD as DurableObjectExportStorage, aE as DurableObjectMigration, aF as ENVIRONMENT_TAG_PREFIX, aG as Entry, aH as Environment, aI as EnvironmentNonInheritable, aJ as ExportsReconciliationEntryBase, aK as ExportsReconciliationErrorDetail, aL as ExportsReconciliationInfo, aM as ExportsReconciliationRename, aN as ExportsReconciliationResult, aO as ExportsReconciliationTransfer, aP as ExportsReconciliationTransferPending, aQ as ExportsReconciliationWarning, aR as FetchKVGetValueFetcher, aS as FetchListResultFetcher, aT as FetchPagedListResultFetcher, aU as FetchResult, aV as FetchResultFetcher, aW as File, aX as Hook, aY as HookValues, aZ as INHERIT_SYMBOL, a_ as JSON_CONFIG_FORMATS, a$ as Json, b0 as LOGGER_LEVELS, b1 as LegacyAssetPaths, b2 as LocalS3Credentials, b3 as LogLevel, b4 as LoggerLevel, b5 as NodeJSCompatMode, b6 as Observability, b7 as PATH_TO_DEPLOY_CONFIG, b8 as PreviewsConfig, b9 as RawDevConfig, ba as RawEnvironment, a as RedirectedRawConfig, bb as Rule, bc as SERVICE_TAG_PREFIX, bd as ServiceFetch, be as ServiceMetadataRes, bf as StartDevWorkerInput, bg as StreamingTailConsumer, bh as TailConsumer, bi as TcpConnectHandler, bj as Trigger, bk as UdpConnectHandler, bl as UserLimits, bm as ValidatedAssetsOptions, bn as WorkerMetadata, bo as WorkflowBinding, bp as ZoneIdRoute, bq as ZoneNameRoute, br as addAuthorizationHeader, bs as defaultWranglerConfig, bt as extractAccountTag, bu as extractWAFBlockRayId, bv as fetchInternalBase, bw as fetchKVGetValueBase, bx as fetchListResultBase, by as fetchResultBase, bz as getBrowserRenderingHeadfulFromEnv, bA as getBuildConditionsFromEnv, bB as getBuildPlatformFromEnv, bC as getC3CommandFromEnv, bD as getCIGeneratePreviewAlias, bE as getCIMatchTag, bF as getCIOverrideName, bG as getCIOverrideNetworkModeHost, bH as getCfFetchEnabledFromEnv, bI as getCfFetchPathFromEnv, bJ as getCloudflareApiBaseUrl, bK as getCloudflareApiEnvironmentFromEnv, bL as getCloudflareComplianceRegion, bM as getCloudflareContainerRegistry, bN as getCloudflareEnv, bO as getCloudflareIncludeProcessEnvFromEnv, bP as getCloudflareLoadDevVarsFromDotEnv, bQ as getCloudflaredPathFromEnv, bR as getComplianceRegionSubdomain, bS as getD1ExtraLocationChoices, bT as getDisableConfigWatching, bU as getLocalExplorerEnabledFromEnv, bV as getLocalObservabilityEnabledFromEnv, bW as getNoSkillsUpdatePromptsFromEnv, bX as getOpenNextDeployFromEnv, bY as getOutputFileDirectoryFromEnv, bZ as getOutputFilePathFromEnv, b_ as getRegistryPath, b$ as getSanitizeLogs, c0 as getSubdomainMixedStateCheckDisabled, c1 as getTraceHeader, c2 as getWorkersCIBranchName, c3 as getWranglerCacheDirFromEnv, c4 as getWranglerHideBanner, c5 as getWranglerSendErrorReportsFromEnv, c6 as getWranglerSendMetricsFromEnv, c7 as hasCursor, c8 as hasMorePages, c9 as isDoNotTrackEnabled, ca as isWAFBlockResponse, cb as maybeAddTraceHeader, cc as parseRetryAfterMs, cd as parseRetryAfterValue, ce as performApiFetchBase, cf as renderError, cg as throwFetchError, ch as truncate } from './compliance-DzwHmPKm.mjs';
1
+ import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as WorkflowExport, d as ContainerApp, e as WorkerMetadataBinding, T as TailConsumer, f as WorkerMetadata, g as CfTailConsumer, L as Logger, A as ApiCredentials, h as ComplianceConfig, i as Route } from './compliance-CADarBwY.mjs';
2
+ export { j as ARTIFACTS_EVENT_TYPES, k as Access, l as ArtifactsEventTrigger, m as ArtifactsEventType, n as AssetConfigMetadata, o as Assets, p as AssetsOptions, q as AsyncHook, r as BinaryFile, s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, u as CacheOptions, v as CfAIBinding, w as CfAISearch, x as CfAISearchNamespace, y as CfAccount, z as CfAgentMemory, F as CfAnalyticsEngineDataset, G as CfAnalyticsSQLBinding, H as CfArtifacts, I as CfAssetsBinding, J as CfBrowserBinding, K as CfCapnp, M as CfD1Database, N as CfDataBlobBindings, O as CfDevPluginCfg, P as CfDispatchNamespace, Q as CfDurableObject, S as CfDurableObjectMigrations, U as CfExports, V as CfFlagship, X as CfHelloWorld, Y as CfHyperdrive, Z as CfImagesBinding, _ as CfK2Binding, $ as CfKvNamespace, a0 as CfLogfwdr, a1 as CfLogfwdrBinding, a2 as CfMTlsCertificate, a3 as CfMediaBinding, a4 as CfModule, a5 as CfModuleType, a6 as CfPipeline, a7 as CfPlacement, a8 as CfQueue, a9 as CfR2Bucket, aa as CfRateLimit, ab as CfScriptFormat, ac as CfSecretsStoreSecrets, ad as CfSendEmailBindings, ae as CfService, af as CfStreamBinding, ag as CfTextBlobBindings, ah as CfUnsafe, ai as CfUnsafeBinding, aj as CfUserLimits, ak as CfVars, al as CfVectorize, am as CfVersionMetadataBinding, an as CfVpcNetwork, ao as CfVpcService, ap as CfWasmModuleBindings, aq as CfWorkerContext, ar as CfWorkerInit, as as CfWorkerLoader, at as CfWorkerSourceMap, au as CfWorkflow, av as CloudchamberConfig, aw as ConfigFields, ax as ConfigModuleRuleType, ay as ConfiguredExport, az as ConnectHandler, aA as ContainerEngine, aB as ContainerObservability, aC as CustomDomainRoute, aD as DispatchNamespaceOutbound, aE as DockerConfiguration, aF as DurableObjectBindings, aG as DurableObjectCodeUpdateStrategy, aH as DurableObjectContainerImage, aI as DurableObjectExportStorage, aJ as DurableObjectMigration, aK as DurableObjectsConfig, aL as ENVIRONMENT_TAG_PREFIX, aM as Entry, aN as Environment, aO as EnvironmentNonInheritable, aP as ExportsReconciliationEntryBase, aQ as ExportsReconciliationErrorDetail, aR as ExportsReconciliationInfo, aS as ExportsReconciliationRename, aT as ExportsReconciliationResult, aU as ExportsReconciliationTransfer, aV as ExportsReconciliationTransferPending, aW as ExportsReconciliationWarning, aX as FetchKVGetValueFetcher, aY as FetchListResultFetcher, aZ as FetchPagedListResultFetcher, a_ as FetchResult, a$ as FetchResultFetcher, b0 as File, b1 as Hook, b2 as HookValues, b3 as INHERIT_SYMBOL, b4 as JSON_CONFIG_FORMATS, b5 as Json, b6 as LOGGER_LEVELS, b7 as LegacyAssetPaths, b8 as LocalS3Credentials, b9 as LogLevel, ba as LoggerLevel, bb as NodeJSCompatMode, bc as Observability, bd as PATH_TO_DEPLOY_CONFIG, be as PreviewsConfig, bf as RawDevConfig, bg as RawDurableObjectsConfig, bh as RawEnvironment, a as RedirectedRawConfig, bi as Rule, bj as SERVICE_TAG_PREFIX, bk as ServiceFetch, bl as ServiceMetadataRes, bm as StartDevWorkerInput, bn as StreamingTailConsumer, bo as TcpConnectHandler, bp as Trigger, bq as UdpConnectHandler, br as UserLimits, bs as ValidatedAssetsOptions, bt as WorkflowBinding, bu as ZoneIdRoute, bv as ZoneNameRoute, bw as addAuthorizationHeader, bx as defaultWranglerConfig, by as extractAccountTag, bz as extractWAFBlockRayId, bA as fetchInternalBase, bB as fetchKVGetValueBase, bC as fetchListResultBase, bD as fetchResultBase, bE as getBrowserRenderingHeadfulFromEnv, bF as getBuildConditionsFromEnv, bG as getBuildPlatformFromEnv, bH as getC3CommandFromEnv, bI as getCIGeneratePreviewAlias, bJ as getCIMatchTag, bK as getCIOverrideName, bL as getCIOverrideNetworkModeHost, bM as getCfFetchEnabledFromEnv, bN as getCfFetchPathFromEnv, bO as getCloudflareApiBaseUrl, bP as getCloudflareApiEnvironmentFromEnv, bQ as getCloudflareComplianceRegion, bR as getCloudflareContainerRegistry, bS as getCloudflareEnv, bT as getCloudflareIncludeProcessEnvFromEnv, bU as getCloudflareLoadDevVarsFromDotEnv, bV as getCloudflaredPathFromEnv, bW as getComplianceRegionSubdomain, bX as getD1ExtraLocationChoices, bY as getDisableConfigWatching, bZ as getLocalExplorerEnabledFromEnv, b_ as getLocalObservabilityEnabledFromEnv, b$ as getNoSkillsUpdatePromptsFromEnv, c0 as getOpenNextDeployFromEnv, c1 as getOutputFileDirectoryFromEnv, c2 as getOutputFilePathFromEnv, c3 as getRegistryPath, c4 as getSanitizeLogs, c5 as getSubdomainMixedStateCheckDisabled, c6 as getTraceHeader, c7 as getWorkersCIBranchName, c8 as getWranglerCacheDirFromEnv, c9 as getWranglerHideBanner, ca as getWranglerSendErrorReportsFromEnv, cb as getWranglerSendMetricsFromEnv, cc as hasCursor, cd as hasMorePages, ce as isDoNotTrackEnabled, cf as isWAFBlockResponse, cg as maybeAddTraceHeader, ch as parseRetryAfterMs, ci as parseRetryAfterValue, cj as performApiFetchBase, ck as renderError, cl as throwFetchError, cm as truncate } from './compliance-CADarBwY.mjs';
3
3
  import * as jsoncParser from 'jsonc-parser';
4
4
  import { UserError, TelemetryMessage } from './errors.mjs';
5
5
  export { CommandLineArgsError, DeprecationError, FatalError, JsonFriendlyFatalError, MissingConfigError, createFatalError } from './errors.mjs';
6
- export { constructWranglerConfig } from './browser.mjs';
6
+ import { AssetConfig } from '@cloudflare/workers-shared';
7
+ import { Cloudflare } from 'cloudflare';
7
8
  export { GetGlobalConfigPathOptions, getGlobalConfigPath, getGlobalWranglerCachePath } from './global-wrangler-config-path.mjs';
8
9
  import { CompatDate } from './compatibility-date.mjs';
9
10
  export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './compatibility-date.mjs';
@@ -14,8 +15,6 @@ export { formatZodError } from './zod-format.mjs';
14
15
  export { getDockerPath } from './docker-path.mjs';
15
16
  import 'node:url';
16
17
  import 'undici';
17
- import '@cloudflare/workers-shared';
18
- import 'cloudflare';
19
18
  import 'zod';
20
19
 
21
20
  type ResolveConfigPathOptions = {
@@ -101,7 +100,7 @@ declare const bucketFormatMessage = "Bucket names must begin and end with an alp
101
100
  * Config field names for bindings (e.g., "kv_namespaces", "d1_databases").
102
101
  * These are the keys used in Wrangler's config file
103
102
  */
104
- type ConfigBindingFieldName = "data_blobs" | "durable_objects" | "kv_namespaces" | "send_email" | "queues" | "d1_databases" | "vectorize" | "ai_search_namespaces" | "ai_search" | "agent_memory" | "hyperdrive" | "r2_buckets" | "logfwdr" | "services" | "analytics_engine_datasets" | "text_blobs" | "browser" | "ai" | "images" | "stream" | "media" | "version_metadata" | "unsafe" | "vars" | "wasm_modules" | "dispatch_namespaces" | "mtls_certificates" | "workflows" | "pipelines" | "secrets_store_secrets" | "artifacts" | "ratelimits" | "assets" | "unsafe_hello_world" | "flagship" | "worker_loaders" | "vpc_services" | "vpc_networks";
103
+ type ConfigBindingFieldName = "data_blobs" | "durable_objects" | "kv_namespaces" | "send_email" | "queues" | "d1_databases" | "vectorize" | "ai_search_namespaces" | "ai_search" | "agent_memory" | "hyperdrive" | "r2_buckets" | "logfwdr" | "services" | "analytics_engine_datasets" | "text_blobs" | "browser" | "analytics" | "ai" | "images" | "stream" | "media" | "version_metadata" | "unsafe" | "vars" | "wasm_modules" | "dispatch_namespaces" | "mtls_certificates" | "workflows" | "pipelines" | "k2" | "secrets_store_secrets" | "artifacts" | "ratelimits" | "assets" | "unsafe_hello_world" | "flagship" | "worker_loaders" | "vpc_services" | "vpc_networks";
105
104
  /**
106
105
  * Get a friendly name for a binding type, handling unsafe bindings
107
106
  */
@@ -514,6 +513,46 @@ declare function getInstalledPackageVersion(packageName: string, projectPath: st
514
513
  */
515
514
  declare function mapWorkerMetadataBindings(bindings: WorkerMetadataBinding[]): RawConfig;
516
515
 
516
+ type RoutesRes = {
517
+ id: string;
518
+ pattern: string;
519
+ zone_name: string;
520
+ script: string;
521
+ }[];
522
+ interface APIWorkerConfig {
523
+ name: string;
524
+ entrypoint: string;
525
+ tags: string[] | null;
526
+ compatibility_date: string;
527
+ compatibility_flags: string[];
528
+ logpush: boolean | undefined;
529
+ routes: RoutesRes;
530
+ tail_consumers: TailConsumer[] | undefined | null;
531
+ migration_tag?: string;
532
+ domains: Cloudflare.Workers.Domain[];
533
+ schedules: Cloudflare.Workers.Scripts.Schedules.ScheduleGetResponse.Schedule[];
534
+ assets?: AssetConfig;
535
+ bindings: WorkerMetadata["bindings"];
536
+ observability: Cloudflare.Workers.Beta.Worker.Observability | undefined;
537
+ limits: {
538
+ cpu_ms?: number;
539
+ subrequests?: number;
540
+ } | undefined;
541
+ placement: Cloudflare.Workers.Beta.Workers.Version.Placement | undefined;
542
+ subdomain: {
543
+ enabled: boolean;
544
+ previews_enabled: boolean;
545
+ };
546
+ }
547
+ /**
548
+ * Given information about a Worker,
549
+ * construct a Wrangler config file for the application.
550
+ *
551
+ * @param config - The Worker configuration sourced from the Cloudflare API
552
+ * @returns A Wrangler-compatible raw config object
553
+ */
554
+ declare function constructWranglerConfig(config: APIWorkerConfig): RawConfig;
555
+
517
556
  interface ConvertBindingsOptions {
518
557
  /**
519
558
  * Use preview IDs (preview_id, preview_bucket_name, preview_database_id) instead of production IDs when resolving a binding ID.
@@ -588,8 +627,8 @@ type VariableNames =
588
627
  | "CLOUDFLARE_API_BASE_URL"
589
628
  /** Set to "fedramp_high" for FedRAMP High compliance region. This will update the API/AUTH URLs used to make requests to Cloudflare. */
590
629
  | "CLOUDFLARE_COMPLIANCE_REGION"
591
- /** API token for R2 SQL service. */
592
- | "WRANGLER_R2_SQL_AUTH_TOKEN"
630
+ /** API token for Basin SQL service. */
631
+ | "WRANGLER_BASIN_SQL_AUTH_TOKEN"
593
632
  /** Controls whether to fetch the cf.json file. Set to "false" or "0" to disable fetching and use fallback data. Defaults to "true". */
594
633
  | "CLOUDFLARE_CF_FETCH_ENABLED"
595
634
  /** Custom path for caching the cf.json file. Overrides the default node_modules/.mf/cf.json location. */
@@ -1368,4 +1407,4 @@ declare function compareMigrationPaths(a: string, b: string): number;
1368
1407
  */
1369
1408
  declare const friendlyBindingNames: Record<ConfigBindingFieldName, string>;
1370
1409
 
1371
- export { APIError, ApiCredentials, Binding, type BindingLocalSupport, BunPackageManager, CfTailConsumer, CompatDate, ComplianceConfig, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, type ConvertBindingsOptions, type D1MigrationFile, DEFAULT_COMPAT_DATE, Diagnostics, type DurableObjectContainerApp, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, type GetD1MigrationFilesOptions, type LiveDurableObjectExport, type Location, Logger, type Message, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type OutputEntry, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, type PrintBindingsOptions, RawConfig, type ResolveConfigPathOptions, type ResolvedDurableObjectContainerApp, Route, TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadataBinding, WorkflowExport, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, compareMigrationPaths, configFileName, configFormat, convertConfigToBindings, createConfigCache, experimental_patchConfig, experimental_readRawConfig, extractBindingsOfType, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getD1MigrationFiles, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getResolvedDurableObjectContainerApps, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isDockerfile, isDurableObjectContainerApp, isInteractive, isLiveDurableObjectExport, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, normalizeRelativePath, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, printBindings, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNamedTunnel, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validateBindingRemoteSetting, validateDurableObjectContainerApplications, validatePagesConfig, writeOutput };
1410
+ export { APIError, ApiCredentials, Binding, type BindingLocalSupport, BunPackageManager, CfTailConsumer, CompatDate, ComplianceConfig, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, ContainerApp, type ConvertBindingsOptions, type D1MigrationFile, DEFAULT_COMPAT_DATE, Diagnostics, type DurableObjectContainerApp, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, type GetD1MigrationFilesOptions, type LiveDurableObjectExport, type Location, Logger, type Message, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type OutputEntry, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, type PrintBindingsOptions, RawConfig, type ResolveConfigPathOptions, type ResolvedDurableObjectContainerApp, Route, TailConsumer, TelemetryMessage, type Tunnel, type TunnelOptions, type UrlPath, UserError, WorkerEntrypointExport, WorkerMetadata, WorkerMetadataBinding, WorkflowExport, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, compareMigrationPaths, configFileName, configFormat, constructWranglerConfig, convertConfigToBindings, createConfigCache, experimental_patchConfig, experimental_readRawConfig, extractBindingsOfType, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getBooleanEnvironmentVariableFactory, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getD1MigrationFiles, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getResolvedDurableObjectContainerApps, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isDockerfile, isDurableObjectContainerApp, isInteractive, isLiveDurableObjectExport, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, normalizeRelativePath, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, printBindings, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveNamedTunnel, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toUrlPath, toValidWorkerName, validateBindingRemoteSetting, validateDurableObjectContainerApplications, validatePagesConfig, writeOutput };