wrangler 4.15.2 → 4.16.1

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.
@@ -329,7 +329,7 @@ declare type Binding = {
329
329
 
330
330
  declare type BindingOmit<T> = Omit<T, "binding">;
331
331
 
332
- declare type BindingsOpt = StartDevWorkerInput["bindings"];
332
+ declare type BindingsOpt = NonNullable<StartDevWorkerInput["bindings"]>;
333
333
 
334
334
  declare interface BlobPropertyBag {
335
335
  type?: string
@@ -588,6 +588,7 @@ declare interface CfD1Database {
588
588
  migrations_table?: string;
589
589
  migrations_dir?: string;
590
590
  remote?: boolean;
591
+ raw?: boolean;
591
592
  }
592
593
 
593
594
  declare interface CfDispatchNamespace {
@@ -623,6 +624,7 @@ declare interface CfKvNamespace {
623
624
  binding: string;
624
625
  id?: string | typeof INHERIT_SYMBOL;
625
626
  remote?: boolean;
627
+ raw?: boolean;
626
628
  }
627
629
 
628
630
  declare interface CfLogfwdrBinding {
@@ -695,6 +697,7 @@ declare interface CfQueue {
695
697
  queue_name: string;
696
698
  delivery_delay?: number;
697
699
  remote?: boolean;
700
+ raw?: boolean;
698
701
  }
699
702
 
700
703
  declare interface CfR2Bucket {
@@ -702,6 +705,7 @@ declare interface CfR2Bucket {
702
705
  bucket_name?: string | typeof INHERIT_SYMBOL;
703
706
  jurisdiction?: string;
704
707
  remote?: boolean;
708
+ raw?: boolean;
705
709
  }
706
710
 
707
711
  /**
@@ -756,6 +760,7 @@ declare type CfUnsafeMetadata = Record<string, unknown>;
756
760
  declare interface CfVectorize {
757
761
  binding: string;
758
762
  index_name: string;
763
+ raw?: boolean;
759
764
  }
760
765
 
761
766
  declare interface CfWorkerSourceMap {
@@ -790,6 +795,7 @@ declare interface CfWorkflow {
790
795
  binding: string;
791
796
  script_name?: string;
792
797
  remote?: boolean;
798
+ raw?: boolean;
793
799
  }
794
800
 
795
801
  /**
@@ -956,6 +962,8 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
956
962
  send_metrics: boolean | undefined;
957
963
  /**
958
964
  * Options to configure the development server that your worker will use.
965
+ *
966
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#local-development-settings
959
967
  */
960
968
  dev: Dev;
961
969
  /**
@@ -963,6 +971,8 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
963
971
  * static assets with your Worker.
964
972
  *
965
973
  * More details at https://developers.cloudflare.com/workers/platform/sites
974
+ *
975
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-sites
966
976
  */
967
977
  site: {
968
978
  /**
@@ -1027,6 +1037,8 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
1027
1037
  /**
1028
1038
  * A map of module aliases. Lets you swap out a module for any others.
1029
1039
  * Corresponds with esbuild's `alias` config
1040
+ *
1041
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing
1030
1042
  */
1031
1043
  alias: {
1032
1044
  [key: string]: string;
@@ -1109,6 +1121,13 @@ declare type ContainerApp = {
1109
1121
  };
1110
1122
  /** How a rollout should be done, defining the size of it */
1111
1123
  rollout_step_percentage?: number;
1124
+ /**
1125
+ * How a rollout should be created. It supports the following modes:
1126
+ * - full_auto: The container application will be rolled out fully automatically.
1127
+ * - none: The container application won't have a roll out or update.
1128
+ * - manual: The container application will be rollout fully by manually actioning progress steps.
1129
+ */
1130
+ rollout_kind?: "full_auto" | "none" | "full_manual";
1112
1131
  };
1113
1132
 
1114
1133
  declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
@@ -1718,6 +1737,7 @@ declare interface EnvironmentInheritable {
1718
1737
  * Whether we use <name>.<subdomain>.workers.dev to
1719
1738
  * test and deploy your Worker.
1720
1739
  *
1740
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
1721
1741
  *
1722
1742
  * @default true
1723
1743
  * @breaking
@@ -1738,6 +1758,8 @@ declare interface EnvironmentInheritable {
1738
1758
  *
1739
1759
  * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
1740
1760
  *
1761
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
1762
+ *
1741
1763
  * @inheritable
1742
1764
  */
1743
1765
  routes: Route[] | undefined;
@@ -1789,16 +1811,20 @@ declare interface EnvironmentInheritable {
1789
1811
  *
1790
1812
  * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1791
1813
  *
1792
- * @default {crons:[]}
1814
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
1815
+ *
1816
+ * @default {crons: undefined}
1793
1817
  * @inheritable
1794
1818
  */
1795
1819
  triggers: {
1796
- crons: string[];
1820
+ crons: string[] | undefined;
1797
1821
  };
1798
1822
  /**
1799
1823
  * Specify limits for runtime behavior.
1800
1824
  * Only supported for the "standard" Usage Model
1801
1825
  *
1826
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
1827
+ *
1802
1828
  * @inheritable
1803
1829
  */
1804
1830
  limits: UserLimits | undefined;
@@ -1808,6 +1834,8 @@ declare interface EnvironmentInheritable {
1808
1834
  * to use Text, Data, and CompiledWasm modules, or when you wish to
1809
1835
  * have a .js file be treated as an ESModule instead of CommonJS.
1810
1836
  *
1837
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
1838
+ *
1811
1839
  * @inheritable
1812
1840
  */
1813
1841
  rules: Rule[];
@@ -1817,6 +1845,8 @@ declare interface EnvironmentInheritable {
1817
1845
  * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
1818
1846
  * for more details.
1819
1847
  *
1848
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
1849
+ *
1820
1850
  * @default {watch_dir:"./src"}
1821
1851
  */
1822
1852
  build: {
@@ -1877,6 +1907,9 @@ declare interface EnvironmentInheritable {
1877
1907
  logpush: boolean | undefined;
1878
1908
  /**
1879
1909
  * Include source maps when uploading this worker.
1910
+ *
1911
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
1912
+ *
1880
1913
  * @inheritable
1881
1914
  */
1882
1915
  upload_source_maps: boolean | undefined;
@@ -1896,12 +1929,16 @@ declare interface EnvironmentInheritable {
1896
1929
  *
1897
1930
  * More details at https://developers.cloudflare.com/workers/frameworks/
1898
1931
  *
1932
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
1933
+ *
1899
1934
  * @inheritable
1900
1935
  */
1901
1936
  assets: Assets | undefined;
1902
1937
  /**
1903
1938
  * Specify the observability behavior of the Worker.
1904
1939
  *
1940
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
1941
+ *
1905
1942
  * @inheritable
1906
1943
  */
1907
1944
  observability: Observability | undefined;
@@ -1949,6 +1986,8 @@ declare interface EnvironmentNonInheritable {
1949
1986
  * NOTE: This field is not automatically inherited from the top level environment,
1950
1987
  * and so must be specified in every named environment.
1951
1988
  *
1989
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
1990
+ *
1952
1991
  * @default {}
1953
1992
  * @nonInheritable
1954
1993
  */
@@ -1962,6 +2001,8 @@ declare interface EnvironmentNonInheritable {
1962
2001
  * NOTE: This field is not automatically inherited from the top level environment,
1963
2002
  * and so must be specified in every named environment.
1964
2003
  *
2004
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
2005
+ *
1965
2006
  * @default {bindings:[]}
1966
2007
  * @nonInheritable
1967
2008
  */
@@ -2005,6 +2046,8 @@ declare interface EnvironmentNonInheritable {
2005
2046
  * NOTE: This field is not automatically inherited from the top level environment,
2006
2047
  * and so must be specified in every named environment.
2007
2048
  *
2049
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
2050
+ *
2008
2051
  * @default []
2009
2052
  * @nonInheritable
2010
2053
  */
@@ -2024,6 +2067,8 @@ declare interface EnvironmentNonInheritable {
2024
2067
  * NOTE: This field is not automatically inherited from the top level environment,
2025
2068
  * and so must be specified in every named environment.
2026
2069
  *
2070
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
2071
+ *
2027
2072
  * @default []
2028
2073
  * @nonInheritable
2029
2074
  */
@@ -2041,6 +2086,8 @@ declare interface EnvironmentNonInheritable {
2041
2086
  * NOTE: This field is not automatically inherited from the top level environment,
2042
2087
  * and so must be specified in every named environment.
2043
2088
  *
2089
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
2090
+ *
2044
2091
  * @default {consumers:[],producers:[]}
2045
2092
  * @nonInheritable
2046
2093
  */
@@ -2084,6 +2131,8 @@ declare interface EnvironmentNonInheritable {
2084
2131
  * NOTE: This field is not automatically inherited from the top level environment,
2085
2132
  * and so must be specified in every named environment.
2086
2133
  *
2134
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
2135
+ *
2087
2136
  * @default []
2088
2137
  * @nonInheritable
2089
2138
  */
@@ -2105,6 +2154,8 @@ declare interface EnvironmentNonInheritable {
2105
2154
  * NOTE: This field is not automatically inherited from the top level environment,
2106
2155
  * and so must be specified in every named environment.
2107
2156
  *
2157
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
2158
+ *
2108
2159
  * @default []
2109
2160
  * @nonInheritable
2110
2161
  */
@@ -2132,6 +2183,8 @@ declare interface EnvironmentNonInheritable {
2132
2183
  * NOTE: This field is not automatically inherited from the top level environment,
2133
2184
  * and so must be specified in every named environment.
2134
2185
  *
2186
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
2187
+ *
2135
2188
  * @default []
2136
2189
  * @nonInheritable
2137
2190
  */
@@ -2147,6 +2200,8 @@ declare interface EnvironmentNonInheritable {
2147
2200
  * NOTE: This field is not automatically inherited from the top level environment,
2148
2201
  * and so must be specified in every named environment.
2149
2202
  *
2203
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
2204
+ *
2150
2205
  * @default []
2151
2206
  * @nonInheritable
2152
2207
  */
@@ -2164,6 +2219,8 @@ declare interface EnvironmentNonInheritable {
2164
2219
  * NOTE: This field is not automatically inherited from the top level environment,
2165
2220
  * and so must be specified in every named environment.
2166
2221
  *
2222
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
2223
+ *
2167
2224
  * @default []
2168
2225
  * @nonInheritable
2169
2226
  */
@@ -2187,6 +2244,8 @@ declare interface EnvironmentNonInheritable {
2187
2244
  * NOTE: This field is not automatically inherited from the top level environment,
2188
2245
  * and so must be specified in every named environment.
2189
2246
  *
2247
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
2248
+ *
2190
2249
  * @default []
2191
2250
  * @nonInheritable
2192
2251
  */
@@ -2202,6 +2261,8 @@ declare interface EnvironmentNonInheritable {
2202
2261
  * NOTE: This field is not automatically inherited from the top level environment,
2203
2262
  * and so must be specified in every named environment.
2204
2263
  *
2264
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
2265
+ *
2205
2266
  * @default {}
2206
2267
  * @nonInheritable
2207
2268
  */
@@ -2214,6 +2275,8 @@ declare interface EnvironmentNonInheritable {
2214
2275
  * NOTE: This field is not automatically inherited from the top level environment,
2215
2276
  * and so must be specified in every named environment.
2216
2277
  *
2278
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
2279
+ *
2217
2280
  * @default {}
2218
2281
  * @nonInheritable
2219
2282
  */
@@ -2227,6 +2290,8 @@ declare interface EnvironmentNonInheritable {
2227
2290
  * NOTE: This field is not automatically inherited from the top level environment,
2228
2291
  * and so must be specified in every named environment.
2229
2292
  *
2293
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
2294
+ *
2230
2295
  * @default {}
2231
2296
  * @nonInheritable
2232
2297
  */
@@ -2285,6 +2350,8 @@ declare interface EnvironmentNonInheritable {
2285
2350
  * NOTE: This field is not automatically inherited from the top level environment,
2286
2351
  * and so must be specified in every named environment.
2287
2352
  *
2353
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
2354
+ *
2288
2355
  * @default []
2289
2356
  * @nonInheritable
2290
2357
  */
@@ -2310,6 +2377,8 @@ declare interface EnvironmentNonInheritable {
2310
2377
  * NOTE: This field is not automatically inherited from the top level environment,
2311
2378
  * and so must be specified in every named environment.
2312
2379
  *
2380
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
2381
+ *
2313
2382
  * @default []
2314
2383
  * @nonInheritable
2315
2384
  */
@@ -2562,6 +2631,7 @@ declare type EventTarget_2 = typeof globalThis extends { EventTarget: infer T }
2562
2631
  declare class ExecutionContext {
2563
2632
  waitUntil(promise: Promise<any>): void;
2564
2633
  passThroughOnException(): void;
2634
+ props: any;
2565
2635
  }
2566
2636
 
2567
2637
  export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
@@ -2950,8 +3020,8 @@ declare interface MIMEType {
2950
3020
  declare type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
2951
3021
 
2952
3022
  declare type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
2953
- ["setConfig"]: (bindings: BindingsOpt) => Promise<void>;
2954
- ["mixedModeConnectionString"]: MixedModeConnectionString;
3023
+ updateBindings: (bindings: BindingsOpt) => Promise<void>;
3024
+ mixedModeConnectionString: MixedModeConnectionString;
2955
3025
  };
2956
3026
 
2957
3027
  /** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
@@ -26234,8 +26304,8 @@ declare interface StartDevWorkerInput {
26234
26304
  port?: number;
26235
26305
  secure?: boolean;
26236
26306
  };
26237
- /** Whether the worker runs on the edge or locally. */
26238
- remote?: boolean;
26307
+ /** Whether the worker runs on the edge or locally. Can also be set to "minimal" for minimal mode. */
26308
+ remote?: boolean | "minimal";
26239
26309
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
26240
26310
  auth?: AsyncHook<CfAccount, [Pick<Unstable_Config, "account_id">]>;
26241
26311
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
@@ -26613,11 +26683,17 @@ export declare interface Unstable_DevWorker {
26613
26683
  export declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26614
26684
 
26615
26685
  export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string, options?: {
26616
- imagesLocalMode: boolean;
26686
+ imagesLocalMode?: boolean;
26687
+ overrides?: {
26688
+ assets?: Partial<AssetsOptions>;
26689
+ };
26617
26690
  }): Unstable_MiniflareWorkerOptions;
26618
26691
 
26619
26692
  export declare function unstable_getMiniflareWorkerOptions(config: Unstable_Config, env?: string, options?: {
26620
- imagesLocalMode: boolean;
26693
+ imagesLocalMode?: boolean;
26694
+ overrides?: {
26695
+ assets?: Partial<AssetsOptions>;
26696
+ };
26621
26697
  }): Unstable_MiniflareWorkerOptions;
26622
26698
 
26623
26699
  export declare interface Unstable_MiniflareWorkerOptions {