@cloudflare/workers-utils 0.47.3 → 0.49.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.
@@ -395,6 +395,11 @@ interface CfHyperdrive {
395
395
  binding: string;
396
396
  id: string;
397
397
  localConnectionString?: string;
398
+ /**
399
+ * Connect to the deployed Hyperdrive configuration during local development
400
+ * instead of a local database.
401
+ */
402
+ remote?: boolean;
398
403
  }
399
404
  interface CfDevPluginCfg {
400
405
  plugin: {
@@ -1841,7 +1846,7 @@ interface WorkerEntrypointExport {
1841
1846
  * namespacing, and is required. The remaining settings match the ones accepted
1842
1847
  * by `workflows` bindings.
1843
1848
  */
1844
- interface WorkflowExport extends Pick<WorkflowBinding, "limits" | "concurrency" | "schedules" | "default_retention"> {
1849
+ interface WorkflowExport extends Pick<WorkflowBinding, "limits" | "concurrency" | "schedules" | "default_retention" | "jurisdiction"> {
1845
1850
  type: "workflow";
1846
1851
  name: string;
1847
1852
  }
@@ -2246,6 +2251,8 @@ type ArtifactsEventTrigger = {
2246
2251
  workflow_name: string;
2247
2252
  }[];
2248
2253
  };
2254
+ declare const WORKFLOW_JURISDICTIONS: readonly ["eu", "fedramp", "us"];
2255
+ type WorkflowJurisdiction = (typeof WORKFLOW_JURISDICTIONS)[number];
2249
2256
  type WorkflowBinding = {
2250
2257
  /** The name of the binding used to refer to the Workflow */
2251
2258
  binding: string;
@@ -2278,6 +2285,11 @@ type WorkflowBinding = {
2278
2285
  /** How long to retain errored instances */
2279
2286
  error_retention?: number | string;
2280
2287
  };
2288
+ /**
2289
+ * Optional jurisdiction that the Workflow's instances run and store their data in. It is set
2290
+ * when the Workflow is created and cannot be changed afterwards.
2291
+ */
2292
+ jurisdiction?: WorkflowJurisdiction;
2281
2293
  };
2282
2294
  type ConnectHandlerConfigBase = {
2283
2295
  /** The port to listen on. */
@@ -2663,6 +2675,11 @@ interface EnvironmentNonInheritable {
2663
2675
  id: string;
2664
2676
  /** The local database connection string for `wrangler dev` */
2665
2677
  localConnectionString?: string;
2678
+ /**
2679
+ * Connect to the deployed Hyperdrive configuration during local development
2680
+ * instead of a local database.
2681
+ */
2682
+ remote?: boolean;
2666
2683
  }[];
2667
2684
  /**
2668
2685
  * Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
@@ -3799,4 +3816,4 @@ declare const getWranglerCacheDirFromEnv: () => string | undefined;
3799
3816
  */
3800
3817
  declare const getCloudflaredPathFromEnv: () => string | undefined;
3801
3818
 
3802
- 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 };
3819
+ 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, getLocalExplorerEnabledFromEnv 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, extractAccountTag as bA, extractWAFBlockRayId as bB, fetchInternalBase as bC, fetchKVGetValueBase as bD, fetchListResultBase as bE, fetchResultBase as bF, getBrowserRenderingHeadfulFromEnv as bG, getBuildConditionsFromEnv as bH, getBuildPlatformFromEnv as bI, getC3CommandFromEnv as bJ, getCIGeneratePreviewAlias as bK, getCIMatchTag as bL, getCIOverrideName as bM, getCIOverrideNetworkModeHost as bN, getCfFetchEnabledFromEnv as bO, getCfFetchPathFromEnv as bP, getCloudflareApiBaseUrl as bQ, getCloudflareApiEnvironmentFromEnv as bR, getCloudflareComplianceRegion as bS, getCloudflareContainerRegistry as bT, getCloudflareEnv as bU, getCloudflareIncludeProcessEnvFromEnv as bV, getCloudflareLoadDevVarsFromDotEnv as bW, getCloudflaredPathFromEnv as bX, getComplianceRegionSubdomain as bY, getD1ExtraLocationChoices as bZ, getDisableConfigWatching 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, WORKFLOW_JURISDICTIONS as bt, type WorkflowBinding as bu, type WorkflowJurisdiction as bv, type ZoneIdRoute as bw, type ZoneNameRoute as bx, addAuthorizationHeader as by, defaultWranglerConfig as bz, type WorkflowExport as c, getLocalObservabilityEnabledFromEnv as c0, getNoSkillsUpdatePromptsFromEnv as c1, getOpenNextDeployFromEnv as c2, getOutputFileDirectoryFromEnv as c3, getOutputFilePathFromEnv as c4, getRegistryPath as c5, getSanitizeLogs as c6, getSubdomainMixedStateCheckDisabled as c7, getTraceHeader as c8, getWorkersCIBranchName as c9, getWranglerCacheDirFromEnv as ca, getWranglerHideBanner as cb, getWranglerSendErrorReportsFromEnv as cc, getWranglerSendMetricsFromEnv as cd, hasCursor as ce, hasMorePages as cf, isDoNotTrackEnabled as cg, isWAFBlockResponse as ch, maybeAddTraceHeader as ci, parseRetryAfterMs as cj, parseRetryAfterValue as ck, performApiFetchBase as cl, renderError as cm, throwFetchError as cn, truncate as co, type ContainerApp as d, type WorkerMetadataBinding as e, type WorkerMetadata as f, type CfTailConsumer as g, type ComplianceConfig as h, type Route as i, ARTIFACTS_EVENT_TYPES as j, type Access as k, type ArtifactsEventTrigger as l, type ArtifactsEventType as m, type AssetConfigMetadata as n, type Assets as o, type AssetsOptions as p, type AsyncHook as q, type BinaryFile as r, COMPLIANCE_REGION_CONFIG_PUBLIC as s, COMPLIANCE_REGION_CONFIG_UNKNOWN as t, type CacheOptions as u, type CfAIBinding as v, type CfAISearch as w, type CfAISearchNamespace as x, type CfAccount as y, type CfAgentMemory as z };
@@ -1,4 +1,4 @@
1
- export { s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, h as ComplianceConfig, bO as getCloudflareApiBaseUrl, bQ as getCloudflareComplianceRegion, bR as getCloudflareContainerRegistry, bW as getComplianceRegionSubdomain } from './compliance-CE5Km9Jx.mjs';
1
+ export { s as COMPLIANCE_REGION_CONFIG_PUBLIC, t as COMPLIANCE_REGION_CONFIG_UNKNOWN, h as ComplianceConfig, bQ as getCloudflareApiBaseUrl, bS as getCloudflareComplianceRegion, bT as getCloudflareContainerRegistry, bY as getComplianceRegionSubdomain } from './compliance-NXalJMKU.mjs';
2
2
  import 'node:url';
3
3
  import 'undici';
4
4
  import '@cloudflare/workers-shared';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as WorkflowExport, d as ContainerApp, e as WorkerMetadataBinding, T as TailConsumer, f as WorkerMetadata, g as CfTailConsumer, L as Logger, A as ApiCredentials, h as ComplianceConfig, i as Route } from './compliance-CE5Km9Jx.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-CE5Km9Jx.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-NXalJMKU.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 WORKFLOW_JURISDICTIONS, bu as WorkflowBinding, bv as WorkflowJurisdiction, bw as ZoneIdRoute, bx as ZoneNameRoute, by as addAuthorizationHeader, bz as defaultWranglerConfig, bA as extractAccountTag, bB as extractWAFBlockRayId, bC as fetchInternalBase, bD as fetchKVGetValueBase, bE as fetchListResultBase, bF as fetchResultBase, bG as getBrowserRenderingHeadfulFromEnv, bH as getBuildConditionsFromEnv, bI as getBuildPlatformFromEnv, bJ as getC3CommandFromEnv, bK as getCIGeneratePreviewAlias, bL as getCIMatchTag, bM as getCIOverrideName, bN as getCIOverrideNetworkModeHost, bO as getCfFetchEnabledFromEnv, bP as getCfFetchPathFromEnv, bQ as getCloudflareApiBaseUrl, bR as getCloudflareApiEnvironmentFromEnv, bS as getCloudflareComplianceRegion, bT as getCloudflareContainerRegistry, bU as getCloudflareEnv, bV as getCloudflareIncludeProcessEnvFromEnv, bW as getCloudflareLoadDevVarsFromDotEnv, bX as getCloudflaredPathFromEnv, bY as getComplianceRegionSubdomain, bZ as getD1ExtraLocationChoices, b_ as getDisableConfigWatching, b$ as getLocalExplorerEnabledFromEnv, c0 as getLocalObservabilityEnabledFromEnv, c1 as getNoSkillsUpdatePromptsFromEnv, c2 as getOpenNextDeployFromEnv, c3 as getOutputFileDirectoryFromEnv, c4 as getOutputFilePathFromEnv, c5 as getRegistryPath, c6 as getSanitizeLogs, c7 as getSubdomainMixedStateCheckDisabled, c8 as getTraceHeader, c9 as getWorkersCIBranchName, ca as getWranglerCacheDirFromEnv, cb as getWranglerHideBanner, cc as getWranglerSendErrorReportsFromEnv, cd as getWranglerSendMetricsFromEnv, ce as hasCursor, cf as hasMorePages, cg as isDoNotTrackEnabled, ch as isWAFBlockResponse, ci as maybeAddTraceHeader, cj as parseRetryAfterMs, ck as parseRetryAfterValue, cl as performApiFetchBase, cm as renderError, cn as throwFetchError, co as truncate } from './compliance-NXalJMKU.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';
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';
2
2
  export { MetricsRegistry } from './chunk-6G6FCMPX.mjs';
3
- import { external_exports } from './chunk-CAPCWVOB.mjs';
4
- export { formatZodError } from './chunk-CAPCWVOB.mjs';
3
+ import { external_exports } from './chunk-XEBMRQST.mjs';
4
+ export { formatZodError } from './chunk-XEBMRQST.mjs';
5
5
  import { isRedirectedRawConfig, configFileName, formatConfigSnippet, partitionExports, getDurableObjectExports, getContainerNameToClassNameMap, parsePackageJSON, readFileSync, ParseError, parseJSON, APIError, isLiveDurableObjectExport, dir, parseTOML, modify, applyEdits, format, stringify, parseJSONC } from './chunk-2HLTAS5V.mjs';
6
6
  export { APIError, ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, configFileName, configFormat, experimental_readRawConfig, findWranglerConfig, formatConfigSnippet, getContainerDurableObjectClassNames, getContainerNameToClassNameMap, getDurableObjectClassNameToUseSQLiteMap, getDurableObjectContainerApps, getDurableObjectExports, getResolvedDurableObjectContainerApps, hasDurableObjectExports, indexLocation, isDurableObjectContainerApp, isLiveDurableObjectExport, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveContainerClassName, resolveWranglerConfigPath, searchLocation, validateDurableObjectContainerApplications } from './chunk-2HLTAS5V.mjs';
7
7
  export { NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE, getTodaysCompatDate, isCompatDate, isNodejsCompatDefaultOn, resolveNodejsCompat, stripRedundantNodejsCompatFlags } from './chunk-2Q77CKVU.mjs';
@@ -1440,6 +1440,7 @@ var ARTIFACTS_EVENT_TYPES = [
1440
1440
  "cf.artifacts.repo.token.created",
1441
1441
  "cf.artifacts.repo.token.revoked"
1442
1442
  ];
1443
+ var WORKFLOW_JURISDICTIONS = ["eu", "fedramp", "us"];
1443
1444
 
1444
1445
  // src/config/config.ts
1445
1446
  var defaultWranglerConfig = {
@@ -4513,6 +4514,22 @@ function validateWorkflowConcurrency(diagnostics, field, kind, value) {
4513
4514
  return valid;
4514
4515
  }
4515
4516
  __name(validateWorkflowConcurrency, "validateWorkflowConcurrency");
4517
+ function validateWorkflowJurisdiction(diagnostics, field, kind, value) {
4518
+ const { jurisdiction } = value;
4519
+ if (jurisdiction === void 0 || WORKFLOW_JURISDICTIONS.some((valid) => valid === jurisdiction)) {
4520
+ return true;
4521
+ }
4522
+ const validJurisdictions = new Intl.ListFormat("en-US", {
4523
+ type: "disjunction"
4524
+ }).format(WORKFLOW_JURISDICTIONS.map((valid) => JSON.stringify(valid)));
4525
+ diagnostics.errors.push(
4526
+ `"${field}" ${kind} "jurisdiction" field must be one of ${validJurisdictions}, but got ${JSON.stringify(
4527
+ jurisdiction
4528
+ )}.`
4529
+ );
4530
+ return false;
4531
+ }
4532
+ __name(validateWorkflowJurisdiction, "validateWorkflowJurisdiction");
4516
4533
  var validateWorkflowBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
4517
4534
  if (typeof value !== "object" || value === null) {
4518
4535
  diagnostics.errors.push(
@@ -4568,6 +4585,7 @@ var validateWorkflowBinding = /* @__PURE__ */ __name((diagnostics, field, value)
4568
4585
  settings
4569
4586
  ) && isValid;
4570
4587
  isValid = validateWorkflowConcurrency(diagnostics, field, "bindings", settings) && isValid;
4588
+ isValid = validateWorkflowJurisdiction(diagnostics, field, "bindings", settings) && isValid;
4571
4589
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
4572
4590
  "binding",
4573
4591
  "name",
@@ -4576,7 +4594,8 @@ var validateWorkflowBinding = /* @__PURE__ */ __name((diagnostics, field, value)
4576
4594
  "limits",
4577
4595
  "concurrency",
4578
4596
  "schedules",
4579
- "default_retention"
4597
+ "default_retention",
4598
+ "jurisdiction"
4580
4599
  ]);
4581
4600
  return isValid;
4582
4601
  }, "validateWorkflowBinding");
@@ -6084,10 +6103,14 @@ var validateHyperdriveBinding = /* @__PURE__ */ __name((diagnostics, field, valu
6084
6103
  );
6085
6104
  isValid = false;
6086
6105
  }
6106
+ if (!isRemoteValid(value, field, diagnostics)) {
6107
+ isValid = false;
6108
+ }
6087
6109
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
6088
6110
  "binding",
6089
6111
  "id",
6090
- "localConnectionString"
6112
+ "localConnectionString",
6113
+ "remote"
6091
6114
  ]);
6092
6115
  return isValid;
6093
6116
  }, "validateHyperdriveBinding");
@@ -7686,6 +7709,12 @@ function validateWorkflowExport(diagnostics, exportName, workflowExport) {
7686
7709
  workflowExport
7687
7710
  ) && valid;
7688
7711
  valid = validateWorkflowConcurrency(diagnostics, field, "export", workflowExport) && valid;
7712
+ valid = validateWorkflowJurisdiction(
7713
+ diagnostics,
7714
+ field,
7715
+ "export",
7716
+ workflowExport
7717
+ ) && valid;
7689
7718
  valid = validateAdditionalProperties(
7690
7719
  diagnostics,
7691
7720
  field,
@@ -7696,7 +7725,8 @@ function validateWorkflowExport(diagnostics, exportName, workflowExport) {
7696
7725
  "limits",
7697
7726
  "concurrency",
7698
7727
  "schedules",
7699
- "default_retention"
7728
+ "default_retention",
7729
+ "jurisdiction"
7700
7730
  ]
7701
7731
  ) && valid;
7702
7732
  return valid;
@@ -8410,7 +8440,6 @@ var BINDING_LOCAL_SUPPORT = {
8410
8440
  assets: "local-only",
8411
8441
  unsafe_hello_world: "local-only",
8412
8442
  durable_object_namespace: "local-only",
8413
- hyperdrive: "local-only",
8414
8443
  fetcher: "local-only",
8415
8444
  analytics_engine: "local-only",
8416
8445
  secrets_store_secret: "local-only",
@@ -8419,6 +8448,7 @@ var BINDING_LOCAL_SUPPORT = {
8419
8448
  kv_namespace: "local-and-remote",
8420
8449
  r2_bucket: "local-and-remote",
8421
8450
  d1: "local-and-remote",
8451
+ hyperdrive: "local-and-remote",
8422
8452
  workflow: "local-only",
8423
8453
  browser: "local-and-remote",
8424
8454
  images: "local-and-remote",
@@ -9136,7 +9166,7 @@ function mapWorkerMetadataBindings(bindings) {
9136
9166
  __name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
9137
9167
 
9138
9168
  // src/default-compat-date.ts
9139
- var DEFAULT_COMPAT_DATE = "2026-10-19";
9169
+ var DEFAULT_COMPAT_DATE = "2026-10-23";
9140
9170
 
9141
9171
  // src/construct-wrangler-config.ts
9142
9172
  function constructWranglerConfig(config) {
@@ -9827,12 +9857,14 @@ function printBindings(bindings, options) {
9827
9857
  }
9828
9858
  if (hyperdrive.length > 0) {
9829
9859
  output.push(
9830
- ...hyperdrive.map(({ binding, id }) => {
9860
+ ...hyperdrive.map(({ binding, id, remote }) => {
9831
9861
  return {
9832
9862
  name: binding,
9833
9863
  type: getBindingTypeFriendlyName("hyperdrive"),
9834
9864
  value: id,
9835
- mode: getMode({ isSimulatedLocally: true })
9865
+ mode: getMode({
9866
+ isSimulatedLocally: context.remoteBindingsDisabled || !remote
9867
+ })
9836
9868
  };
9837
9869
  })
9838
9870
  );
@@ -12633,4 +12665,4 @@ __name(leadingMigrationNumber, "leadingMigrationNumber");
12633
12665
  // src/index.ts
12634
12666
  var friendlyBindingNames2 = friendlyBindingNames;
12635
12667
 
12636
- export { ARTIFACTS_EVENT_TYPES, BunPackageManager, DEFAULT_COMPAT_DATE, Diagnostics, LOGGER_LEVELS, NpmPackageManager, NubPackageManager, PatchConfigError, PnpmPackageManager, YarnPackageManager, addAuthorizationHeader, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, compareMigrationPaths, constructWranglerConfig, convertConfigToBindings, createConfigCache, defaultWranglerConfig, experimental_patchConfig, extractAccountTag, extractBindingsOfType, extractWAFBlockRayId, fetchInternalBase, fetchKVGetValueBase, fetchLatestNpmVersion, fetchListResultBase, fetchResultBase, formatTime, friendlyBindingNames2 as friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getD1MigrationFiles, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasCursor, hasMorePages, hasProperty, isCI, isDockerfile, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, isWAFBlockResponse, mapWorkerMetadataBindings, maybeAddTraceHeader, normalizeAndValidateConfig, normalizeRelativePath, openInBrowser, parseRetryAfterMs, parseRetryAfterValue, performApiFetchBase, printBindings, renderError, resolveNamedTunnel, retryOnAPIFailure, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, throwFetchError, toUrlPath, toValidWorkerName, truncate, validateBindingRemoteSetting, validatePagesConfig, writeOutput };
12668
+ export { ARTIFACTS_EVENT_TYPES, BunPackageManager, DEFAULT_COMPAT_DATE, Diagnostics, LOGGER_LEVELS, NpmPackageManager, NubPackageManager, PatchConfigError, PnpmPackageManager, WORKFLOW_JURISDICTIONS, YarnPackageManager, addAuthorizationHeader, assertNever, bucketFormatMessage, checkWorkerNameValidity, clearOutputFilePath, compareMigrationPaths, constructWranglerConfig, convertConfigToBindings, createConfigCache, defaultWranglerConfig, experimental_patchConfig, extractAccountTag, extractBindingsOfType, extractWAFBlockRayId, fetchInternalBase, fetchKVGetValueBase, fetchLatestNpmVersion, fetchListResultBase, fetchResultBase, formatTime, friendlyBindingNames2 as friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBindings, getD1MigrationFiles, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasCursor, hasMorePages, hasProperty, isCI, isDockerfile, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRequiredProperty, isUnsafeBindingType, isValidR2BucketName, isWAFBlockResponse, mapWorkerMetadataBindings, maybeAddTraceHeader, normalizeAndValidateConfig, normalizeRelativePath, openInBrowser, parseRetryAfterMs, parseRetryAfterValue, performApiFetchBase, printBindings, renderError, resolveNamedTunnel, retryOnAPIFailure, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, throwFetchError, toUrlPath, toValidWorkerName, truncate, validateBindingRemoteSetting, validatePagesConfig, writeOutput };
@@ -1,3 +1,5 @@
1
+ declare function caseInsensitiveEnv(): Record<string, string>;
2
+
1
3
  type LocalEnvValueSource = {
2
4
  type: "file";
3
5
  path: string;
@@ -8,6 +10,21 @@ interface LoadedEnv {
8
10
  values: Record<string, string>;
9
11
  sources: Record<string, LocalEnvValueSource>;
10
12
  }
13
+ /**
14
+ * Parses dotenv contents and expands variable references without changing the
15
+ * supplied process environment or adding its unrelated keys to the result.
16
+ *
17
+ * Process values override file values, including explicitly empty strings. On
18
+ * Windows, process keys are matched case-insensitively. References can use
19
+ * process values and earlier file values; unresolved references become empty
20
+ * strings. Escape a dollar sign with `\$` to keep it literal.
21
+ *
22
+ * @param contents The dotenv contents to parse and expand.
23
+ * @param processEnv The process values used for expansion and overrides.
24
+ * Defaults to `process.env`.
25
+ * @returns Expanded values for the keys declared in the dotenv contents.
26
+ */
27
+ declare function parseAndExpandDotEnv(contents: string, processEnv?: NodeJS.ProcessEnv): Record<string, string>;
11
28
  /**
12
29
  * Returns the local `.env` candidates in increasing precedence order.
13
30
  *
@@ -51,4 +68,4 @@ declare function loadEnv(envDir: string | false, mode?: string): Promise<LoadedE
51
68
  */
52
69
  declare function loadDevVars(envDir: string | false, mode?: string): Promise<Record<string, string> | undefined>;
53
70
 
54
- export { type LoadedEnv, type LocalEnvValueSource, getDevVarsCandidatePaths, getEnvPaths, loadDevVars, loadEnv };
71
+ export { type LoadedEnv, type LocalEnvValueSource, caseInsensitiveEnv, getDevVarsCandidatePaths, getEnvPaths, loadDevVars, loadEnv, parseAndExpandDotEnv };
@@ -82,6 +82,71 @@ var require_main = __commonJS({
82
82
 
83
83
  // src/local-env.ts
84
84
  var import_dotenv_expand = __toESM(require_main());
85
+
86
+ // src/case-insensitive-env.ts
87
+ function caseInsensitiveEnv() {
88
+ const tracked = /* @__PURE__ */ new Map();
89
+ const targetObj = {};
90
+ const canonical = /* @__PURE__ */ __name((property) => typeof property === "string" ? property.toLowerCase() : property, "canonical");
91
+ return new Proxy(targetObj, {
92
+ get(target, property, receiver) {
93
+ const actualProperty = tracked.get(canonical(property));
94
+ return actualProperty !== void 0 ? Reflect.get(target, actualProperty, receiver) : void 0;
95
+ },
96
+ set(target, property, value, receiver) {
97
+ const key = canonical(property);
98
+ const previous = tracked.get(key);
99
+ if (previous !== void 0 && previous !== property) {
100
+ Reflect.deleteProperty(target, previous);
101
+ }
102
+ tracked.set(key, property);
103
+ return Reflect.set(target, property, value, receiver);
104
+ },
105
+ has(target, property) {
106
+ const actualProperty = tracked.get(canonical(property));
107
+ return actualProperty !== void 0 ? Reflect.has(target, actualProperty) : false;
108
+ },
109
+ getOwnPropertyDescriptor(target, property) {
110
+ const actualProperty = tracked.get(canonical(property));
111
+ return actualProperty !== void 0 ? Reflect.getOwnPropertyDescriptor(target, actualProperty) : void 0;
112
+ },
113
+ defineProperty(target, property, descriptor) {
114
+ const key = canonical(property);
115
+ const previous = tracked.get(key);
116
+ if (previous !== void 0 && previous !== property) {
117
+ Reflect.deleteProperty(target, previous);
118
+ }
119
+ tracked.set(key, property);
120
+ return Reflect.defineProperty(target, property, descriptor);
121
+ },
122
+ deleteProperty(target, property) {
123
+ const key = canonical(property);
124
+ const actualProperty = tracked.get(key);
125
+ tracked.delete(key);
126
+ return actualProperty !== void 0 ? Reflect.deleteProperty(target, actualProperty) : Reflect.deleteProperty(target, property);
127
+ }
128
+ });
129
+ }
130
+ __name(caseInsensitiveEnv, "caseInsensitiveEnv");
131
+
132
+ // src/local-env.ts
133
+ function parseAndExpandDotEnv(contents, processEnv = process.env) {
134
+ return expandParsedDotEnv(parse(contents), processEnv);
135
+ }
136
+ __name(parseAndExpandDotEnv, "parseAndExpandDotEnv");
137
+ function expandParsedDotEnv(parsed, processEnv) {
138
+ const expanded = { ...parsed };
139
+ const expandedKeys = Object.keys(expanded);
140
+ const processEnvOverrides = copyProcessEnv(processEnv);
141
+ (0, import_dotenv_expand.expand)({ parsed: expanded, processEnv: copyProcessEnv(processEnv) });
142
+ for (const key of expandedKeys) {
143
+ if (Object.hasOwn(processEnvOverrides, key)) {
144
+ expanded[key] = processEnvOverrides[key];
145
+ }
146
+ }
147
+ return expanded;
148
+ }
149
+ __name(expandParsedDotEnv, "expandParsedDotEnv");
85
150
  function getEnvPaths(envDir, mode) {
86
151
  if (envDir === false) {
87
152
  return [];
@@ -123,9 +188,8 @@ async function loadEnv(envDir, mode) {
123
188
  parsedSources[key] = { type: "file", path: loaded.path };
124
189
  }
125
190
  }
126
- const processEnv = copyProcessEnv();
127
- (0, import_dotenv_expand.expand)({ parsed, processEnv: { ...processEnv } });
128
- const values = { ...parsed };
191
+ const processEnv = copyProcessEnv(process.env);
192
+ const values = expandParsedDotEnv(parsed, processEnv);
129
193
  const sources = { ...parsedSources };
130
194
  for (const [key, value] of Object.entries(processEnv)) {
131
195
  values[key] = value;
@@ -167,13 +231,15 @@ function isMissingFileError(error) {
167
231
  return error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR");
168
232
  }
169
233
  __name(isMissingFileError, "isMissingFileError");
170
- function copyProcessEnv() {
171
- return Object.fromEntries(
172
- Object.entries(process.env).filter(
173
- (entry) => entry[1] !== void 0
174
- )
175
- );
234
+ function copyProcessEnv(processEnv) {
235
+ const copied = process.platform === "win32" ? caseInsensitiveEnv() : {};
236
+ for (const [key, value] of Object.entries(processEnv)) {
237
+ if (value !== void 0) {
238
+ copied[key] = value;
239
+ }
240
+ }
241
+ return copied;
176
242
  }
177
243
  __name(copyProcessEnv, "copyProcessEnv");
178
244
 
179
- export { getDevVarsCandidatePaths, getEnvPaths, loadDevVars, loadEnv };
245
+ export { caseInsensitiveEnv, getDevVarsCandidatePaths, getEnvPaths, loadDevVars, loadEnv, parseAndExpandDotEnv };