wrangler 0.0.0-e2e6912bc → 0.0.0-e2f5756c2

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.
@@ -6,7 +6,6 @@ import type { DispatchFetch } from 'miniflare';
6
6
  import { Duplex } from 'stream';
7
7
  import { EventEmitter } from 'events';
8
8
  import { EventEmitter as EventEmitter_2 } from 'node:events';
9
- import { IncomingMessage } from 'http';
10
9
  import type { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
11
10
  import { IpcNetConnectOpts } from 'net';
12
11
  import type { Json } from 'miniflare';
@@ -21,8 +20,6 @@ import { Readable } from 'stream';
21
20
  import { ReadableStream as ReadableStream_2 } from 'stream/web';
22
21
  import type { Request as Request_3 } from 'miniflare';
23
22
  import { Response as Response_3 } from 'miniflare';
24
- import { Server } from 'http';
25
- import { ServerResponse } from 'http';
26
23
  import { Socket } from 'net';
27
24
  import { TcpNetConnectOpts } from 'net';
28
25
  import { TLSSocket } from 'tls';
@@ -79,23 +76,36 @@ declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
79
76
  declare const AssetConfigSchema: z.ZodObject<{
80
77
  html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
81
78
  not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
79
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
82
80
  }, "strip", z.ZodTypeAny, {
83
81
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
84
82
  not_found_handling?: "none" | "single-page-application" | "404-page";
83
+ serve_directly?: boolean;
85
84
  }, {
86
85
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
87
86
  not_found_handling?: "none" | "single-page-application" | "404-page";
87
+ serve_directly?: boolean;
88
88
  }>;
89
89
 
90
90
  declare type Assets = {
91
91
  /** Absolute path to assets directory */
92
- directory: string;
92
+ directory?: string;
93
+ /** Name of `env` binding property in the User Worker. */
93
94
  binding?: string;
95
+ /** How to handle HTML requests. */
94
96
  html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
97
+ /** How to handle requests that do not match an asset. */
95
98
  not_found_handling?: "single-page-application" | "404-page" | "none";
99
+ /**
100
+ * If true, then respond to requests that match an asset with that asset directly.
101
+ * If false, route every request to the User Worker, whether or not it matches an asset.
102
+ * */
103
+ experimental_serve_directly?: boolean;
96
104
  };
97
105
 
98
- declare type AssetsOptions = Pick<Assets, "directory" | "binding"> & {
106
+ declare type AssetsOptions = {
107
+ directory: string;
108
+ binding?: string;
99
109
  routingConfig: RoutingConfig;
100
110
  assetConfig: AssetConfig;
101
111
  };
@@ -449,8 +459,8 @@ declare type CfCapnp = {
449
459
 
450
460
  declare interface CfD1Database {
451
461
  binding: string;
452
- database_id: string;
453
- database_name: string;
462
+ database_id?: string | typeof INHERIT_SYMBOL;
463
+ database_name?: string;
454
464
  preview_database_id?: string;
455
465
  database_internal_env?: string;
456
466
  migrations_table?: string;
@@ -488,7 +498,7 @@ declare interface CfHyperdrive {
488
498
  */
489
499
  declare interface CfKvNamespace {
490
500
  binding: string;
491
- id: string;
501
+ id?: string | typeof INHERIT_SYMBOL;
492
502
  }
493
503
 
494
504
  declare interface CfLogfwdrBinding {
@@ -564,7 +574,7 @@ declare interface CfQueue {
564
574
 
565
575
  declare interface CfR2Bucket {
566
576
  binding: string;
567
- bucket_name: string;
577
+ bucket_name?: string | typeof INHERIT_SYMBOL;
568
578
  jurisdiction?: string;
569
579
  }
570
580
 
@@ -759,28 +769,19 @@ declare type CloudchamberConfig = {
759
769
  ipv4?: boolean;
760
770
  };
761
771
 
762
- /**
763
- * This is the static type definition for the configuration object.
764
- *
765
- * It reflects a normalized and validated version of the configuration that you can write in wrangler.toml,
766
- * and optionally augment with arguments passed directly to wrangler.
767
- *
768
- * For more information about the configuration object, see the
769
- * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
770
- *
771
- * Notes:
772
- *
773
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
774
- * in the top level config and should not appear in any environments.
775
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
776
- * - All top level fields in config and environments are optional in the wrangler.toml file.
777
- *
778
- * Legend for the annotations:
779
- *
780
- * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
781
- * - `@todo`: there's more work to be done (with details attached).
782
- */
783
- declare type Config = ConfigFields<DevConfig> & PagesConfigFields & Environment;
772
+ declare interface ComputedFields {
773
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
774
+ configPath: string | undefined;
775
+ /** The path to the user's Wrangler configuration file (if any), which may have been redirected to another file that used to create this configuration. */
776
+ userConfigPath: string | undefined;
777
+ /**
778
+ * The original top level name for the Worker in the raw configuration.
779
+ *
780
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
781
+ * It can be useful to know what the top-level name was before the flattening.
782
+ */
783
+ topLevelName: string | undefined;
784
+ }
784
785
 
785
786
  declare class ConfigController extends Controller<ConfigControllerEventMap> {
786
787
  #private;
@@ -797,7 +798,6 @@ declare type ConfigControllerEventMap = ControllerEventMap & {
797
798
  };
798
799
 
799
800
  declare interface ConfigFields<Dev extends RawDevConfig> {
800
- configPath: string | undefined;
801
801
  /**
802
802
  * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
803
803
  * These have been superseded by Services, but there may be projects that won't
@@ -826,7 +826,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
826
826
  /**
827
827
  * The directory containing your static assets.
828
828
  *
829
- * It must be a path relative to your wrangler.toml file.
829
+ * It must be a path relative to your Wrangler configuration file.
830
830
  * Example: bucket = "./public"
831
831
  *
832
832
  * If there is a `site` field then it must contain this `bucket` field.
@@ -904,7 +904,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
904
904
  [key: string]: string;
905
905
  } | undefined;
906
906
  /**
907
- * By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
907
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
908
908
  *
909
909
  * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
910
910
  *
@@ -932,6 +932,32 @@ url: string | URL_2 | UrlObject,
932
932
  options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
933
933
  ): Promise<Dispatcher.ConnectData>;
934
934
 
935
+ /**
936
+ * Configuration for a container application
937
+ */
938
+ declare type ContainerApp = {
939
+ name: string;
940
+ instances: number;
941
+ scheduling_policy?: "regional" | "moon";
942
+ configuration: {
943
+ image: string;
944
+ labels?: {
945
+ name: string;
946
+ value: string;
947
+ }[];
948
+ secrets?: {
949
+ name: string;
950
+ type: "env";
951
+ secret: string;
952
+ }[];
953
+ };
954
+ constraints?: {
955
+ regions?: string[];
956
+ cities?: string[];
957
+ tier?: number;
958
+ };
959
+ };
960
+
935
961
  declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
936
962
  emitErrorEvent(data: ErrorEvent): void;
937
963
  }
@@ -1006,14 +1032,14 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
1006
1032
  type: string;
1007
1033
  };
1008
1034
  latest_stage: {
1035
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1009
1036
  name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1010
- status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1011
1037
  started_on: string | null;
1012
1038
  ended_on: string | null;
1013
1039
  };
1014
1040
  stages: {
1041
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1015
1042
  name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1016
- status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1017
1043
  started_on: string | null;
1018
1044
  ended_on: string | null;
1019
1045
  }[];
@@ -1021,8 +1047,8 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
1021
1047
  modified_on: string;
1022
1048
  short_id: string;
1023
1049
  build_image_major_version: number;
1050
+ kv_namespaces?: any;
1024
1051
  source?: {
1025
- type: "github" | "gitlab";
1026
1052
  config: {
1027
1053
  owner: string;
1028
1054
  repo_name: string;
@@ -1030,12 +1056,12 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
1030
1056
  pr_comments_enabled?: boolean | undefined;
1031
1057
  deployments_enabled?: boolean | undefined;
1032
1058
  production_deployments_enabled?: boolean | undefined;
1033
- preview_deployment_setting?: "none" | "all" | "custom" | undefined;
1059
+ preview_deployment_setting?: "none" | "custom" | "all" | undefined;
1034
1060
  preview_branch_includes?: string[] | undefined;
1035
1061
  preview_branch_excludes?: string[] | undefined;
1036
1062
  };
1063
+ type: "github" | "gitlab";
1037
1064
  } | undefined;
1038
- kv_namespaces?: any;
1039
1065
  env_vars?: any;
1040
1066
  durable_object_namespaces?: any;
1041
1067
  is_skipped?: boolean | undefined;
@@ -1044,6 +1070,30 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
1044
1070
  } | undefined;
1045
1071
  }>;
1046
1072
 
1073
+ declare interface DeprecatedConfigFields {
1074
+ /**
1075
+ * The project "type". A holdover from Wrangler v1.x.
1076
+ * Valid values were "webpack", "javascript", and "rust".
1077
+ *
1078
+ * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
1079
+ * @breaking
1080
+ */
1081
+ type?: "webpack" | "javascript" | "rust";
1082
+ /**
1083
+ * Path to the webpack config to use when building your worker.
1084
+ * A holdover from Wrangler v1.x, used with `type: "webpack"`.
1085
+ *
1086
+ * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
1087
+ * @breaking
1088
+ */
1089
+ webpack_config?: string;
1090
+ /**
1091
+ * Configuration only used by a standalone use of the miniflare binary.
1092
+ * @deprecated
1093
+ */
1094
+ miniflare?: unknown;
1095
+ }
1096
+
1047
1097
  /**
1048
1098
  * Deprecated upload configuration.
1049
1099
  */
@@ -1056,9 +1106,9 @@ declare interface DeprecatedUpload {
1056
1106
  format?: "modules" | "service-worker";
1057
1107
  /**
1058
1108
  * The directory you wish to upload your Worker from,
1059
- * relative to the wrangler.toml file.
1109
+ * relative to the Wrangler configuration file.
1060
1110
  *
1061
- * Defaults to the directory containing the wrangler.toml file.
1111
+ * Defaults to the directory containing the Wrangler configuration file.
1062
1112
  *
1063
1113
  * @deprecated
1064
1114
  */
@@ -1468,8 +1518,8 @@ declare interface EnablePagesAssetsServiceBindingOptions {
1468
1518
  declare type Entry = {
1469
1519
  /** A worker's entrypoint */
1470
1520
  file: string;
1471
- /** A worker's directory. Usually where the wrangler.toml file is located */
1472
- directory: string;
1521
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
1522
+ projectRoot: string;
1473
1523
  /** Is this a module worker or a service worker? */
1474
1524
  format: CfScriptFormat;
1475
1525
  /** The directory that contains all of a `--no-bundle` worker's modules. Usually `${directory}/src`. Defaults to path.dirname(file) */
@@ -1491,6 +1541,39 @@ declare type Entry = {
1491
1541
  declare interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {
1492
1542
  }
1493
1543
 
1544
+ /**
1545
+ * The environment configuration properties that have been deprecated.
1546
+ */
1547
+ declare interface EnvironmentDeprecated {
1548
+ /**
1549
+ * The zone ID of the zone you want to deploy to. You can find this
1550
+ * in your domain page on the dashboard.
1551
+ *
1552
+ * @deprecated This is unnecessary since we can deduce this from routes directly.
1553
+ */
1554
+ zone_id?: string;
1555
+ /**
1556
+ * Legacy way of defining KVNamespaces that is no longer supported.
1557
+ *
1558
+ * @deprecated DO NOT USE. This was a legacy bug from Wrangler v1, that we do not want to support.
1559
+ */
1560
+ "kv-namespaces"?: string;
1561
+ /**
1562
+ * A list of services that your Worker should be bound to.
1563
+ *
1564
+ * @default []
1565
+ * @deprecated DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.
1566
+ */
1567
+ experimental_services?: {
1568
+ /** The binding name used to refer to the Service */
1569
+ name: string;
1570
+ /** The name of the Service being bound */
1571
+ service: string;
1572
+ /** The Service's environment */
1573
+ environment: string;
1574
+ }[];
1575
+ }
1576
+
1494
1577
  /**
1495
1578
  * The `EnvironmentInheritable` interface declares all the configuration fields for an environment
1496
1579
  * that can be inherited (and overridden) from the top-level environment.
@@ -1523,11 +1606,11 @@ declare interface EnvironmentInheritable {
1523
1606
  compatibility_date: string | undefined;
1524
1607
  /**
1525
1608
  * A list of flags that enable features from upcoming features of
1526
- * the Workers runtime, usually used together with compatibility_flags.
1609
+ * the Workers runtime, usually used together with compatibility_date.
1527
1610
  *
1528
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1611
+ * More details at https://developers.cloudflare.com/workers/platform/compatibility-flags
1529
1612
  *
1530
- * @default `[]`
1613
+ * @default []
1531
1614
  * @inheritable
1532
1615
  */
1533
1616
  compatibility_flags: string[];
@@ -1565,13 +1648,20 @@ declare interface EnvironmentInheritable {
1565
1648
  * Whether we use <name>.<subdomain>.workers.dev to
1566
1649
  * test and deploy your Worker.
1567
1650
  *
1568
- * // Carmen according to our tests the default is undefined
1569
- * // warning: you must force "workers_dev: true" in tests to match expected behavior
1570
- * @default `true` (This is a breaking change from Wrangler v1)
1651
+ *
1652
+ * @default true
1571
1653
  * @breaking
1572
1654
  * @inheritable
1573
1655
  */
1574
1656
  workers_dev: boolean | undefined;
1657
+ /**
1658
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
1659
+ * serve Preview URLs for your Worker.
1660
+ *
1661
+ * @default true
1662
+ * @inheritable
1663
+ */
1664
+ preview_urls: boolean | undefined;
1575
1665
  /**
1576
1666
  * A list of routes that your Worker should be published to.
1577
1667
  * Only one of `routes` or `route` is required.
@@ -1600,14 +1690,14 @@ declare interface EnvironmentInheritable {
1600
1690
  /**
1601
1691
  * The function to use to replace jsx syntax.
1602
1692
  *
1603
- * @default `"React.createElement"`
1693
+ * @default "React.createElement"
1604
1694
  * @inheritable
1605
1695
  */
1606
1696
  jsx_factory: string;
1607
1697
  /**
1608
1698
  * The function to use to replace jsx fragment syntax.
1609
1699
  *
1610
- * @default `"React.Fragment"`
1700
+ * @default "React.Fragment"
1611
1701
  * @inheritable
1612
1702
  */
1613
1703
  jsx_fragment: string;
@@ -1629,7 +1719,7 @@ declare interface EnvironmentInheritable {
1629
1719
  *
1630
1720
  * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1631
1721
  *
1632
- * @default `{crons:[]}`
1722
+ * @default {crons:[]}
1633
1723
  * @inheritable
1634
1724
  */
1635
1725
  triggers: {
@@ -1715,7 +1805,7 @@ declare interface EnvironmentInheritable {
1715
1805
  /**
1716
1806
  * List of bindings that you will send to logfwdr
1717
1807
  *
1718
- * @default `{bindings:[]}`
1808
+ * @default {bindings:[]}
1719
1809
  * @inheritable
1720
1810
  */
1721
1811
  logfwdr: {
@@ -1769,6 +1859,24 @@ declare interface EnvironmentInheritable {
1769
1859
  observability: Observability | undefined;
1770
1860
  }
1771
1861
 
1862
+ declare interface EnvironmentMap {
1863
+ /**
1864
+ * The `env` section defines overrides for the configuration for different environments.
1865
+ *
1866
+ * All environment fields can be specified at the top level of the config indicating the default environment settings.
1867
+ *
1868
+ * - Some fields are inherited and overridable in each environment.
1869
+ * - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
1870
+ *
1871
+ * For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
1872
+ *
1873
+ * @default {}
1874
+ */
1875
+ env?: {
1876
+ [envName: string]: Unstable_RawEnvironment;
1877
+ };
1878
+ }
1879
+
1772
1880
  /**
1773
1881
  * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
1774
1882
  * that cannot be inherited from the top-level environment, and must be defined specifically.
@@ -1783,7 +1891,7 @@ declare interface EnvironmentNonInheritable {
1783
1891
  * NOTE: This field is not automatically inherited from the top level environment,
1784
1892
  * and so must be specified in every named environment.
1785
1893
  *
1786
- * @default `{}`
1894
+ * @default {}
1787
1895
  * @nonInheritable
1788
1896
  */
1789
1897
  define: Record<string, string>;
@@ -1793,7 +1901,7 @@ declare interface EnvironmentNonInheritable {
1793
1901
  * NOTE: This field is not automatically inherited from the top level environment,
1794
1902
  * and so must be specified in every named environment.
1795
1903
  *
1796
- * @default `{}`
1904
+ * @default {}
1797
1905
  * @nonInheritable
1798
1906
  */
1799
1907
  vars: Record<string, string | Json>;
@@ -1806,7 +1914,7 @@ declare interface EnvironmentNonInheritable {
1806
1914
  * NOTE: This field is not automatically inherited from the top level environment,
1807
1915
  * and so must be specified in every named environment.
1808
1916
  *
1809
- * @default `{bindings:[]}`
1917
+ * @default {bindings:[]}
1810
1918
  * @nonInheritable
1811
1919
  */
1812
1920
  durable_objects: {
@@ -1818,7 +1926,7 @@ declare interface EnvironmentNonInheritable {
1818
1926
  * NOTE: This field is not automatically inherited from the top level environment,
1819
1927
  * and so must be specified in every named environment.
1820
1928
  *
1821
- * @default `[]`
1929
+ * @default []
1822
1930
  * @nonInheritable
1823
1931
  */
1824
1932
  workflows: WorkflowBinding[];
@@ -1828,10 +1936,25 @@ declare interface EnvironmentNonInheritable {
1828
1936
  * NOTE: This field is not automatically inherited from the top level environment,
1829
1937
  * and so must be specified in every named environment.
1830
1938
  *
1831
- * @default `{}`
1939
+ * @default {}
1832
1940
  * @nonInheritable
1833
1941
  */
1834
1942
  cloudchamber: CloudchamberConfig;
1943
+ /**
1944
+ * Container related configuration
1945
+ */
1946
+ containers: {
1947
+ /**
1948
+ * Container app configuration
1949
+ *
1950
+ * NOTE: This field is not automatically inherited from the top level environment,
1951
+ * and so must be specified in every named environment.
1952
+ *
1953
+ * @default {}
1954
+ * @nonInheritable
1955
+ */
1956
+ app: ContainerApp[];
1957
+ };
1835
1958
  /**
1836
1959
  * These specify any Workers KV Namespaces you want to
1837
1960
  * access from inside your Worker.
@@ -1842,14 +1965,14 @@ declare interface EnvironmentNonInheritable {
1842
1965
  * NOTE: This field is not automatically inherited from the top level environment,
1843
1966
  * and so must be specified in every named environment.
1844
1967
  *
1845
- * @default `[]`
1968
+ * @default []
1846
1969
  * @nonInheritable
1847
1970
  */
1848
1971
  kv_namespaces: {
1849
1972
  /** The binding name used to refer to the KV Namespace */
1850
1973
  binding: string;
1851
1974
  /** The ID of the KV namespace */
1852
- id: string;
1975
+ id?: string;
1853
1976
  /** The ID of the KV namespace used during `wrangler dev` */
1854
1977
  preview_id?: string;
1855
1978
  }[];
@@ -1859,7 +1982,7 @@ declare interface EnvironmentNonInheritable {
1859
1982
  * NOTE: This field is not automatically inherited from the top level environment,
1860
1983
  * and so must be specified in every named environment.
1861
1984
  *
1862
- * @default `[]`
1985
+ * @default []
1863
1986
  * @nonInheritable
1864
1987
  */
1865
1988
  send_email: {
@@ -1876,7 +1999,7 @@ declare interface EnvironmentNonInheritable {
1876
1999
  * NOTE: This field is not automatically inherited from the top level environment,
1877
2000
  * and so must be specified in every named environment.
1878
2001
  *
1879
- * @default `{consumers:[],producers:[]}`
2002
+ * @default {consumers:[],producers:[]}
1880
2003
  * @nonInheritable
1881
2004
  */
1882
2005
  queues: {
@@ -1917,14 +2040,14 @@ declare interface EnvironmentNonInheritable {
1917
2040
  * NOTE: This field is not automatically inherited from the top level environment,
1918
2041
  * and so must be specified in every named environment.
1919
2042
  *
1920
- * @default `[]`
2043
+ * @default []
1921
2044
  * @nonInheritable
1922
2045
  */
1923
2046
  r2_buckets: {
1924
2047
  /** The binding name used to refer to the R2 bucket in the Worker. */
1925
2048
  binding: string;
1926
2049
  /** The name of this R2 bucket at the edge. */
1927
- bucket_name: string;
2050
+ bucket_name?: string;
1928
2051
  /** The preview name of this R2 bucket at the edge. */
1929
2052
  preview_bucket_name?: string;
1930
2053
  /** The jurisdiction that the bucket exists in. Default if not present. */
@@ -1936,16 +2059,16 @@ declare interface EnvironmentNonInheritable {
1936
2059
  * NOTE: This field is not automatically inherited from the top level environment,
1937
2060
  * and so must be specified in every named environment.
1938
2061
  *
1939
- * @default `[]`
2062
+ * @default []
1940
2063
  * @nonInheritable
1941
2064
  */
1942
2065
  d1_databases: {
1943
2066
  /** The binding name used to refer to the D1 database in the Worker. */
1944
2067
  binding: string;
1945
2068
  /** The name of this D1 database. */
1946
- database_name: string;
2069
+ database_name?: string;
1947
2070
  /** The UUID of this D1 database (not required). */
1948
- database_id: string;
2071
+ database_id?: string;
1949
2072
  /** The UUID of this D1 database for Wrangler Dev (if specified). */
1950
2073
  preview_database_id?: string;
1951
2074
  /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
@@ -1961,7 +2084,7 @@ declare interface EnvironmentNonInheritable {
1961
2084
  * NOTE: This field is not automatically inherited from the top level environment,
1962
2085
  * and so must be specified in every named environment.
1963
2086
  *
1964
- * @default `[]`
2087
+ * @default []
1965
2088
  * @nonInheritable
1966
2089
  */
1967
2090
  vectorize: {
@@ -1976,7 +2099,7 @@ declare interface EnvironmentNonInheritable {
1976
2099
  * NOTE: This field is not automatically inherited from the top level environment,
1977
2100
  * and so must be specified in every named environment.
1978
2101
  *
1979
- * @default `[]`
2102
+ * @default []
1980
2103
  * @nonInheritable
1981
2104
  */
1982
2105
  hyperdrive: {
@@ -1993,7 +2116,7 @@ declare interface EnvironmentNonInheritable {
1993
2116
  * NOTE: This field is not automatically inherited from the top level environment,
1994
2117
  * and so must be specified in every named environment.
1995
2118
  *
1996
- * @default `[]`
2119
+ * @default []
1997
2120
  * @nonInheritable
1998
2121
  */
1999
2122
  services: {
@@ -2012,7 +2135,7 @@ declare interface EnvironmentNonInheritable {
2012
2135
  * NOTE: This field is not automatically inherited from the top level environment,
2013
2136
  * and so must be specified in every named environment.
2014
2137
  *
2015
- * @default `[]`
2138
+ * @default []
2016
2139
  * @nonInheritable
2017
2140
  */
2018
2141
  analytics_engine_datasets: {
@@ -2027,7 +2150,7 @@ declare interface EnvironmentNonInheritable {
2027
2150
  * NOTE: This field is not automatically inherited from the top level environment,
2028
2151
  * and so must be specified in every named environment.
2029
2152
  *
2030
- * @default `{}`
2153
+ * @default {}
2031
2154
  * @nonInheritable
2032
2155
  */
2033
2156
  browser: {
@@ -2039,7 +2162,7 @@ declare interface EnvironmentNonInheritable {
2039
2162
  * NOTE: This field is not automatically inherited from the top level environment,
2040
2163
  * and so must be specified in every named environment.
2041
2164
  *
2042
- * @default `{}`
2165
+ * @default {}
2043
2166
  * @nonInheritable
2044
2167
  */
2045
2168
  ai: {
@@ -2058,7 +2181,7 @@ declare interface EnvironmentNonInheritable {
2058
2181
  * NOTE: This field is not automatically inherited from the top level environment,
2059
2182
  * and so must be specified in every named environment.
2060
2183
  *
2061
- * @default `{}`
2184
+ * @default {}
2062
2185
  * @nonInheritable
2063
2186
  */
2064
2187
  unsafe: {
@@ -2098,7 +2221,7 @@ declare interface EnvironmentNonInheritable {
2098
2221
  * NOTE: This field is not automatically inherited from the top level environment,
2099
2222
  * and so must be specified in every named environment.
2100
2223
  *
2101
- * @default `[]`
2224
+ * @default []
2102
2225
  * @nonInheritable
2103
2226
  */
2104
2227
  mtls_certificates: {
@@ -2113,7 +2236,7 @@ declare interface EnvironmentNonInheritable {
2113
2236
  * NOTE: This field is not automatically inherited from the top level environment,
2114
2237
  * and so must be specified in every named environment.
2115
2238
  *
2116
- * @default `[]`
2239
+ * @default []
2117
2240
  * @nonInheritable
2118
2241
  */
2119
2242
  tail_consumers?: TailConsumer[];
@@ -2123,7 +2246,7 @@ declare interface EnvironmentNonInheritable {
2123
2246
  * NOTE: This field is not automatically inherited from the top level environment,
2124
2247
  * and so must be specified in every named environment.
2125
2248
  *
2126
- * @default `[]`
2249
+ * @default []
2127
2250
  * @nonInheritable
2128
2251
  */
2129
2252
  dispatch_namespaces: {
@@ -2140,7 +2263,7 @@ declare interface EnvironmentNonInheritable {
2140
2263
  * NOTE: This field is not automatically inherited from the top level environment,
2141
2264
  * and so must be specified in every named environment.
2142
2265
  *
2143
- * @default `[]`
2266
+ * @default []
2144
2267
  * @nonInheritable
2145
2268
  */
2146
2269
  pipelines: {
@@ -2151,7 +2274,7 @@ declare interface EnvironmentNonInheritable {
2151
2274
  }[];
2152
2275
  }
2153
2276
 
2154
- declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
2277
+ declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker" | "MultiworkerRuntimeController"> | BaseErrorEvent<"ProxyController", {
2155
2278
  config?: StartDevWorkerOptions;
2156
2279
  bundle?: Bundle;
2157
2280
  }> | BaseErrorEvent<"BundlerController", {
@@ -2360,6 +2483,14 @@ declare class ExecutionContext {
2360
2483
  passThroughOnException(): void;
2361
2484
  }
2362
2485
 
2486
+ export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
2487
+
2488
+ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, options?: ReadConfigOptions) => {
2489
+ rawConfig: Unstable_RawConfig;
2490
+ configPath: string | undefined;
2491
+ userConfigPath: string | undefined;
2492
+ };
2493
+
2363
2494
  declare function fetch_2 (
2364
2495
  input: RequestInfo,
2365
2496
  init?: RequestInit_2
@@ -2540,7 +2671,7 @@ declare class FormData_2 {
2540
2671
  declare type FormDataEntryValue = string | File
2541
2672
 
2542
2673
  /**
2543
- * By reading from a `wrangler.toml` file this function generates proxy binding objects that can be
2674
+ * By reading from a Wrangler configuration file this function generates proxy binding objects that can be
2544
2675
  * used to simulate the interaction with bindings during local development in a Node.js environment
2545
2676
  *
2546
2677
  * @deprecated use `getPlatformProxy` instead
@@ -2560,7 +2691,7 @@ declare function getGlobalDispatcher(): Dispatcher;
2560
2691
  declare function getGlobalOrigin(): URL | undefined;
2561
2692
 
2562
2693
  /**
2563
- * By reading from a `wrangler.toml` file this function generates proxy objects that can be
2694
+ * By reading from a Wrangler configuration file this function generates proxy objects that can be
2564
2695
  * used to simulate the interaction with the Cloudflare platform during local development
2565
2696
  * in a Node.js environment
2566
2697
  *
@@ -2580,19 +2711,12 @@ export declare type GetPlatformProxyOptions = {
2580
2711
  /**
2581
2712
  * The path to the config file to use.
2582
2713
  * If no path is specified the default behavior is to search from the
2583
- * current directory up the filesystem for a `wrangler.toml` to use.
2714
+ * current directory up the filesystem for a Wrangler configuration file to use.
2584
2715
  *
2585
2716
  * Note: this field is optional but if a path is specified it must
2586
2717
  * point to a valid file on the filesystem
2587
2718
  */
2588
2719
  configPath?: string;
2589
- /**
2590
- * Flag to indicate the utility to read a json config file (`wrangler.json`/`wrangler.jsonc`)
2591
- * instead of the toml one (`wrangler.toml`)
2592
- *
2593
- * Note: this feature is experimental
2594
- */
2595
- experimentalJsonConfig?: boolean;
2596
2720
  /**
2597
2721
  * Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
2598
2722
  * used by wrangler v3: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
@@ -2601,12 +2725,6 @@ export declare type GetPlatformProxyOptions = {
2601
2725
  persist?: boolean | {
2602
2726
  path: string;
2603
2727
  };
2604
- /**
2605
- * Use the experimental file-based dev registry for service discovery
2606
- *
2607
- * Note: this feature is experimental
2608
- */
2609
- experimentalRegistry?: boolean;
2610
2728
  };
2611
2729
 
2612
2730
  declare function getSetCookies (headers: Headers_2): Cookie[]
@@ -2637,16 +2755,14 @@ declare type Hook<T extends HookValues, Args extends unknown[] = []> = T | ((...
2637
2755
  declare type HookValues = string | number | boolean | object | undefined | null;
2638
2756
 
2639
2757
  /**
2640
- * @property terminate Terminates HTTP server.
2758
+ * The header type declaration of `undici`.
2641
2759
  */
2642
- declare type HttpTerminator = {
2643
- readonly terminate: () => Promise<void>;
2644
- };
2760
+ declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2645
2761
 
2646
2762
  /**
2647
- * The header type declaration of `undici`.
2763
+ * A symbol to inherit a binding from the deployed worker.
2648
2764
  */
2649
- declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2765
+ declare const INHERIT_SYMBOL: unique symbol;
2650
2766
 
2651
2767
  declare type InspectorProxyWorkerIncomingWebSocketMessage = {
2652
2768
  type: ReloadStartEvent["type"];
@@ -2680,8 +2796,8 @@ declare class Logger {
2680
2796
  #private;
2681
2797
  constructor();
2682
2798
  private overrideLoggerLevel?;
2683
- get loggerLevel(): "error" | "none" | "warn" | "info" | "log" | "debug";
2684
- set loggerLevel(val: "error" | "none" | "warn" | "info" | "log" | "debug");
2799
+ get loggerLevel(): "log" | "error" | "none" | "debug" | "info" | "warn";
2800
+ set loggerLevel(val: "log" | "error" | "none" | "debug" | "info" | "warn");
2685
2801
  columns: number;
2686
2802
  debug: (...args: unknown[]) => void;
2687
2803
  debugWithSanitization: (label: string, ...args: unknown[]) => void;
@@ -2928,13 +3044,24 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
2928
3044
 
2929
3045
  declare type NameOmit<T> = Omit<T, "name">;
2930
3046
 
3047
+ declare type NormalizeAndValidateConfigArgs = {
3048
+ name?: string;
3049
+ env?: string;
3050
+ "legacy-env"?: boolean;
3051
+ "dispatch-namespace"?: string;
3052
+ remote?: boolean;
3053
+ localProtocol?: string;
3054
+ upstreamProtocol?: string;
3055
+ script?: string;
3056
+ };
3057
+
2931
3058
  declare interface Observability {
2932
3059
  /** If observability is enabled for this Worker */
2933
- enabled: boolean;
3060
+ enabled?: boolean;
2934
3061
  /** The sampling rate */
2935
3062
  head_sampling_rate?: number;
2936
3063
  logs?: {
2937
- enabled: boolean;
3064
+ enabled?: boolean;
2938
3065
  /** The sampling rate */
2939
3066
  head_sampling_rate?: number;
2940
3067
  /** Set to false to disable invocation logs */
@@ -2946,18 +3073,7 @@ declare interface PagesConfigFields {
2946
3073
  /**
2947
3074
  * The directory of static assets to serve.
2948
3075
  *
2949
- * The presence of this field in `wrangler.toml` indicates a Pages project,
2950
- * and will prompt the handling of the configuration file according to the
2951
- * Pages-specific validation rules.
2952
- */
2953
- pages_build_output_dir?: string;
2954
- }
2955
-
2956
- declare interface PagesConfigFields {
2957
- /**
2958
- * The directory of static assets to serve.
2959
- *
2960
- * The presence of this field in `wrangler.toml` indicates a Pages project,
3076
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
2961
3077
  * and will prompt the handling of the configuration file according to the
2962
3078
  * Pages-specific validation rules.
2963
3079
  */
@@ -25576,10 +25692,19 @@ declare type ProxyWorkerOutgoingRequestBody = {
25576
25692
  args: Parameters<typeof console.debug>;
25577
25693
  };
25578
25694
 
25579
- declare type QueueConsumer = NonNullable<Config["queues"]["consumers"]>[number];
25695
+ declare type QueueConsumer = NonNullable<Unstable_Config["queues"]["consumers"]>[number];
25580
25696
 
25581
25697
  declare type RawDevConfig = Partial<DevConfig>;
25582
25698
 
25699
+ declare type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
25700
+ config?: string;
25701
+ script?: string;
25702
+ };
25703
+
25704
+ declare type ReadConfigOptions = ResolveConfigPathOptions & {
25705
+ hideWarnings?: boolean;
25706
+ };
25707
+
25583
25708
  declare type ReadyEvent = {
25584
25709
  type: "ready";
25585
25710
  proxyWorker: Miniflare;
@@ -25708,6 +25833,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25708
25833
 
25709
25834
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25710
25835
 
25836
+ declare type ResolveConfigPathOptions = {
25837
+ useRedirectIfAvailable?: boolean;
25838
+ };
25839
+
25711
25840
  declare class Response_2 implements BodyMixin {
25712
25841
  constructor (body?: BodyInit, init?: ResponseInit_2)
25713
25842
 
@@ -25870,10 +25999,13 @@ declare type RoutingConfig = z.infer<typeof RoutingConfigSchema>;
25870
25999
 
25871
26000
  declare const RoutingConfigSchema: z.ZodObject<{
25872
26001
  has_user_worker: z.ZodOptional<z.ZodBoolean>;
26002
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
25873
26003
  }, "strip", z.ZodTypeAny, {
25874
26004
  has_user_worker?: boolean;
26005
+ invoke_user_worker_ahead_of_assets?: boolean;
25875
26006
  }, {
25876
26007
  has_user_worker?: boolean;
26008
+ invoke_user_worker_ahead_of_assets?: boolean;
25877
26009
  }>;
25878
26010
 
25879
26011
  /**
@@ -25952,7 +26084,7 @@ declare interface StartDevWorkerInput {
25952
26084
  name?: string;
25953
26085
  /**
25954
26086
  * The javascript or typescript entry-point of the worker.
25955
- * This is the `main` property of a wrangler.toml.
26087
+ * This is the `main` property of a Wrangler configuration file.
25956
26088
  * You can specify a file path or provide the contents directly.
25957
26089
  */
25958
26090
  entrypoint?: string;
@@ -26002,7 +26134,7 @@ declare interface StartDevWorkerInput {
26002
26134
  jsxFactory?: string;
26003
26135
  jsxFragment?: string;
26004
26136
  tsconfig?: string;
26005
- nodejsCompatMode?: Hook<NodeJSCompatMode, [Config]>;
26137
+ nodejsCompatMode?: Hook<NodeJSCompatMode, [Unstable_Config]>;
26006
26138
  moduleRoot?: string;
26007
26139
  };
26008
26140
  /** Options applying to the worker's development preview environment. */
@@ -26016,7 +26148,7 @@ declare interface StartDevWorkerInput {
26016
26148
  /** Whether the worker runs on the edge or locally. */
26017
26149
  remote?: boolean;
26018
26150
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
26019
- auth?: AsyncHook<CfAccount, [Pick<Config, "account_id">]>;
26151
+ auth?: AsyncHook<CfAccount, [Pick<Unstable_Config, "account_id">]>;
26020
26152
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
26021
26153
  persist?: string;
26022
26154
  /** Controls which logs are logged 🤙. */
@@ -26043,14 +26175,16 @@ declare interface StartDevWorkerInput {
26043
26175
  /** An undici MockAgent to declaratively mock fetch calls to particular resources. */
26044
26176
  mockFetch?: undici.MockAgent;
26045
26177
  /** Describes the registry of other Workers running locally */
26046
- registry?: WorkerRegistry;
26178
+ registry?: WorkerRegistry | null;
26047
26179
  testScheduled?: boolean;
26048
26180
  /** Whether to use Vectorize mixed mode -- the worker is run locally but accesses to Vectorize are made remotely */
26049
26181
  bindVectorizeToProd?: boolean;
26182
+ /** Treat this as the primary worker in a multiworker setup (i.e. the first Worker in Miniflare's options) */
26183
+ multiworkerPrimary?: boolean;
26050
26184
  };
26051
26185
  legacy?: {
26052
- site?: Hook<Config["site"], [Config]>;
26053
- legacyAssets?: Hook<Config["legacy_assets"], [Config]>;
26186
+ site?: Hook<Unstable_Config["site"], [Unstable_Config]>;
26187
+ legacyAssets?: Hook<Unstable_Config["legacy_assets"], [Unstable_Config]>;
26054
26188
  enableServiceEnvironments?: boolean;
26055
26189
  };
26056
26190
  unsafe?: Omit<CfUnsafe, "bindings">;
@@ -26058,8 +26192,8 @@ declare interface StartDevWorkerInput {
26058
26192
  }
26059
26193
 
26060
26194
  declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26061
- /** A worker's directory. Usually where the wrangler.toml file is located */
26062
- directory: string;
26195
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
26196
+ projectRoot: string;
26063
26197
  build: StartDevWorkerInput["build"] & {
26064
26198
  nodejsCompatMode: NodeJSCompatMode;
26065
26199
  format: CfScriptFormat;
@@ -26071,8 +26205,8 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26071
26205
  processEntrypoint: boolean;
26072
26206
  };
26073
26207
  legacy: StartDevWorkerInput["legacy"] & {
26074
- legacyAssets?: Config["legacy_assets"];
26075
- site?: Config["site"];
26208
+ legacyAssets?: Unstable_Config["legacy_assets"];
26209
+ site?: Unstable_Config["site"];
26076
26210
  };
26077
26211
  dev: StartDevWorkerInput["dev"] & {
26078
26212
  persist: string;
@@ -26080,6 +26214,7 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26080
26214
  };
26081
26215
  entrypoint: string;
26082
26216
  assets?: AssetsOptions;
26217
+ name: string;
26083
26218
  };
26084
26219
 
26085
26220
  /** A faster version of `request`. */
@@ -26251,10 +26386,39 @@ declare namespace undici {
26251
26386
  }
26252
26387
  }
26253
26388
 
26389
+ export declare interface Unstable_ASSETSBindingsOptions {
26390
+ log: Logger;
26391
+ proxyPort?: number;
26392
+ directory?: string;
26393
+ }
26394
+
26395
+ /**
26396
+ * This is the static type definition for the configuration object.
26397
+ *
26398
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
26399
+ * and optionally augment with arguments passed directly to wrangler.
26400
+ *
26401
+ * For more information about the configuration object, see the
26402
+ * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
26403
+ *
26404
+ * Notes:
26405
+ *
26406
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26407
+ * in the top level config and should not appear in any environments.
26408
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
26409
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
26410
+ *
26411
+ * Legend for the annotations:
26412
+ *
26413
+ * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
26414
+ * - `@todo`: there's more work to be done (with details attached).
26415
+ */
26416
+ export declare type Unstable_Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
26417
+
26254
26418
  /**
26255
26419
  * unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
26256
26420
  */
26257
- export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
26421
+ export declare function unstable_dev(script: string, options?: Unstable_DevOptions, apiOptions?: unknown): Promise<Unstable_DevWorker>;
26258
26422
 
26259
26423
  export declare class unstable_DevEnv extends EventEmitter_2 {
26260
26424
  config: ConfigController;
@@ -26272,37 +26436,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
26272
26436
  emitErrorEvent(ev: ErrorEvent): void;
26273
26437
  }
26274
26438
 
26275
- export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26276
-
26277
- export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): {
26278
- workerOptions: SourcelessWorkerOptions;
26279
- define: Record<string, string>;
26280
- main?: string;
26281
- };
26282
-
26283
- export declare const unstable_pages: {
26284
- deploy: typeof deploy;
26285
- };
26286
-
26287
- /**
26288
- * Split an SQLQuery into an array of statements
26289
- */
26290
- export declare function unstable_splitSqlQuery(sql: string): string[];
26291
-
26292
- export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26293
-
26294
- export declare const unstable_startWorkerRegistryServer: (port: number) => Promise<{
26295
- server: Server<IncomingMessage, ServerResponse>;
26296
- terminator: HttpTerminator;
26297
- }>;
26298
-
26299
- export declare interface UnstableASSETSBindingsOptions {
26300
- log: Logger;
26301
- proxyPort?: number;
26302
- directory?: string;
26303
- }
26304
-
26305
- export declare interface UnstableDevOptions {
26439
+ export declare interface Unstable_DevOptions {
26306
26440
  config?: string;
26307
26441
  env?: string;
26308
26442
  ip?: string;
@@ -26325,7 +26459,7 @@ export declare interface UnstableDevOptions {
26325
26459
  vars?: Record<string, string | Json>;
26326
26460
  kv?: {
26327
26461
  binding: string;
26328
- id: string;
26462
+ id?: string;
26329
26463
  preview_id?: string;
26330
26464
  }[];
26331
26465
  durableObjects?: {
@@ -26342,7 +26476,7 @@ export declare interface UnstableDevOptions {
26342
26476
  }[];
26343
26477
  r2?: {
26344
26478
  binding: string;
26345
- bucket_name: string;
26479
+ bucket_name?: string;
26346
26480
  preview_bucket_name?: string;
26347
26481
  }[];
26348
26482
  ai?: {
@@ -26377,7 +26511,7 @@ export declare interface UnstableDevOptions {
26377
26511
  };
26378
26512
  }
26379
26513
 
26380
- export declare interface UnstableDevWorker {
26514
+ export declare interface Unstable_DevWorker {
26381
26515
  port: number;
26382
26516
  address: string;
26383
26517
  stop: () => Promise<void>;
@@ -26385,6 +26519,46 @@ export declare interface UnstableDevWorker {
26385
26519
  waitUntilExit: () => Promise<void>;
26386
26520
  }
26387
26521
 
26522
+ export declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26523
+
26524
+ export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): Unstable_MiniflareWorkerOptions;
26525
+
26526
+ export declare function unstable_getMiniflareWorkerOptions(config: Unstable_Config): Unstable_MiniflareWorkerOptions;
26527
+
26528
+ export declare interface Unstable_MiniflareWorkerOptions {
26529
+ workerOptions: SourcelessWorkerOptions;
26530
+ define: Record<string, string>;
26531
+ main?: string;
26532
+ }
26533
+
26534
+ export declare const unstable_pages: {
26535
+ deploy: typeof deploy;
26536
+ };
26537
+
26538
+ export declare type Unstable_RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & Unstable_RawEnvironment & DeprecatedConfigFields & EnvironmentMap & {
26539
+ $schema?: string;
26540
+ };
26541
+
26542
+ /**
26543
+ * The raw environment configuration that we read from the config file.
26544
+ *
26545
+ * All the properties are optional, and will be replaced with defaults in the configuration that
26546
+ * is used in the rest of the codebase.
26547
+ */
26548
+ export declare type Unstable_RawEnvironment = Partial<Environment> & EnvironmentDeprecated;
26549
+
26550
+ /**
26551
+ * Get the Wrangler configuration; read it from the give `configPath` if available.
26552
+ */
26553
+ export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Unstable_Config;
26554
+
26555
+ /**
26556
+ * Split an SQLQuery into an array of statements
26557
+ */
26558
+ export declare function unstable_splitSqlQuery(sql: string): string[];
26559
+
26560
+ export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26561
+
26388
26562
  /** Upgrade to a different protocol. */
26389
26563
  declare function upgrade(
26390
26564
  url: string | URL_2 | UrlObject,