wrangler 4.19.2 → 4.20.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.
@@ -807,6 +807,10 @@
807
807
  "certificate_id": {
808
808
  "type": "string",
809
809
  "description": "The uuid of the uploaded mTLS certificate"
810
+ },
811
+ "remote": {
812
+ "type": "boolean",
813
+ "description": "Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`)"
810
814
  }
811
815
  },
812
816
  "required": [
@@ -908,6 +912,28 @@
908
912
  "description": "Specifies Secret Store bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
909
913
  "default": []
910
914
  },
915
+ "unsafe_hello_world": {
916
+ "type": "array",
917
+ "items": {
918
+ "type": "object",
919
+ "properties": {
920
+ "binding": {
921
+ "type": "string",
922
+ "description": "The binding name used to refer to the bound service."
923
+ },
924
+ "enable_timer": {
925
+ "type": "boolean",
926
+ "description": "Whether the timer is enabled"
927
+ }
928
+ },
929
+ "required": [
930
+ "binding"
931
+ ],
932
+ "additionalProperties": false
933
+ },
934
+ "description": "**DO NOT USE**. Hello World Binding Config to serve as an explanatory example.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
935
+ "default": []
936
+ },
911
937
  "pages_build_output_dir": {
912
938
  "type": "string",
913
939
  "description": "The directory of static assets to serve.\n\nThe presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules."
@@ -1787,6 +1813,10 @@
1787
1813
  "certificate_id": {
1788
1814
  "type": "string",
1789
1815
  "description": "The uuid of the uploaded mTLS certificate"
1816
+ },
1817
+ "remote": {
1818
+ "type": "boolean",
1819
+ "description": "Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`)"
1790
1820
  }
1791
1821
  },
1792
1822
  "required": [
@@ -1887,6 +1917,28 @@
1887
1917
  },
1888
1918
  "description": "Specifies Secret Store bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1889
1919
  "default": []
1920
+ },
1921
+ "unsafe_hello_world": {
1922
+ "type": "array",
1923
+ "items": {
1924
+ "type": "object",
1925
+ "properties": {
1926
+ "binding": {
1927
+ "type": "string",
1928
+ "description": "The binding name used to refer to the bound service."
1929
+ },
1930
+ "enable_timer": {
1931
+ "type": "boolean",
1932
+ "description": "Whether the timer is enabled"
1933
+ }
1934
+ },
1935
+ "required": [
1936
+ "binding"
1937
+ ],
1938
+ "additionalProperties": false
1939
+ },
1940
+ "description": "**DO NOT USE**. Hello World Binding Config to serve as an explanatory example.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1941
+ "default": []
1890
1942
  }
1891
1943
  },
1892
1944
  "additionalProperties": false,
@@ -2097,8 +2149,18 @@
2097
2149
  "description": "How to handle requests that do not match an asset."
2098
2150
  },
2099
2151
  "run_worker_first": {
2100
- "type": "boolean",
2101
- "description": "If true, route every request to the User Worker, whether or not it matches an asset. If false, then respond to requests that match an asset with that asset directly."
2152
+ "anyOf": [
2153
+ {
2154
+ "type": "array",
2155
+ "items": {
2156
+ "type": "string"
2157
+ }
2158
+ },
2159
+ {
2160
+ "type": "boolean"
2161
+ }
2162
+ ],
2163
+ "description": "Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.\n\nCan also be `true`, indicating that every request should be routed to the User Worker."
2102
2164
  }
2103
2165
  },
2104
2166
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.19.2",
3
+ "version": "4.20.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -57,7 +57,7 @@
57
57
  "unenv": "2.0.0-rc.17",
58
58
  "workerd": "1.20250604.0",
59
59
  "@cloudflare/kv-asset-handler": "0.4.0",
60
- "miniflare": "4.20250604.0"
60
+ "miniflare": "4.20250604.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
@@ -83,7 +83,7 @@
83
83
  "@types/supports-color": "^8.1.1",
84
84
  "@types/ws": "^8.5.7",
85
85
  "@types/yargs": "^17.0.22",
86
- "@vitest/ui": "~3.1.1",
86
+ "@vitest/ui": "~3.2.0",
87
87
  "@webcontainer/env": "^1.1.0",
88
88
  "chalk": "^5.2.0",
89
89
  "chokidar": "^4.0.1",
@@ -129,15 +129,16 @@
129
129
  "typescript": "^5.7.2",
130
130
  "undici": "^5.28.5",
131
131
  "update-check": "^1.5.4",
132
- "vitest": "~3.1.1",
132
+ "vitest": "~3.2.0",
133
133
  "vitest-websocket-mock": "^0.4.0",
134
134
  "ws": "8.18.0",
135
135
  "xdg-app-paths": "^8.3.0",
136
136
  "xxhash-wasm": "^1.0.1",
137
137
  "yargs": "^17.7.2",
138
138
  "@cloudflare/cli": "1.1.1",
139
+ "@cloudflare/containers-shared": "0.1.0",
139
140
  "@cloudflare/eslint-config-worker": "1.1.0",
140
- "@cloudflare/pages-shared": "^0.13.44",
141
+ "@cloudflare/pages-shared": "^0.13.45",
141
142
  "@cloudflare/workers-shared": "0.17.6",
142
143
  "@cloudflare/workers-tsconfig": "0.0.0"
143
144
  },
@@ -838,6 +838,8 @@ interface EnvironmentNonInheritable {
838
838
  binding: string;
839
839
  /** The uuid of the uploaded mTLS certificate */
840
840
  certificate_id: string;
841
+ /** Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`) */
842
+ remote?: boolean;
841
843
  }[];
842
844
  /**
843
845
  * Specifies a list of Tail Workers that are bound to this Worker environment
@@ -902,6 +904,21 @@ interface EnvironmentNonInheritable {
902
904
  /** Name of the secret */
903
905
  secret_name: string;
904
906
  }[];
907
+ /**
908
+ * **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
909
+ *
910
+ * NOTE: This field is not automatically inherited from the top level environment,
911
+ * and so must be specified in every named environment.
912
+ *
913
+ * @default []
914
+ * @nonInheritable
915
+ */
916
+ unsafe_hello_world: {
917
+ /** The binding name used to refer to the bound service. */
918
+ binding: string;
919
+ /** Whether the timer is enabled */
920
+ enable_timer?: boolean;
921
+ }[];
905
922
  }
906
923
  /**
907
924
  * The raw environment configuration that we read from the config file.
@@ -950,10 +967,11 @@ type Assets = {
950
967
  /** How to handle requests that do not match an asset. */
951
968
  not_found_handling?: "single-page-application" | "404-page" | "none";
952
969
  /**
953
- * If true, route every request to the User Worker, whether or not it matches an asset.
954
- * If false, then respond to requests that match an asset with that asset directly.
955
- * */
956
- run_worker_first?: boolean;
970
+ * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
971
+ *
972
+ * Can also be `true`, indicating that every request should be routed to the User Worker.
973
+ */
974
+ run_worker_first?: string[] | boolean;
957
975
  };
958
976
  interface Observability {
959
977
  /** If observability is enabled for this Worker */
@@ -1359,6 +1377,10 @@ interface CfSecretsStoreSecrets {
1359
1377
  store_id: string;
1360
1378
  secret_name: string;
1361
1379
  }
1380
+ interface CfHelloWorld {
1381
+ binding: string;
1382
+ enable_timer?: boolean;
1383
+ }
1362
1384
  interface CfHyperdrive {
1363
1385
  binding: string;
1364
1386
  id: string;
@@ -1389,6 +1411,7 @@ interface CfDispatchNamespace {
1389
1411
  interface CfMTlsCertificate {
1390
1412
  binding: string;
1391
1413
  certificate_id: string;
1414
+ remote?: boolean;
1392
1415
  }
1393
1416
  interface CfLogfwdrBinding {
1394
1417
  name: string;
@@ -1706,6 +1729,7 @@ type AssetsOptions = {
1706
1729
  assetConfig: AssetConfig;
1707
1730
  _redirects?: string;
1708
1731
  _headers?: string;
1732
+ run_worker_first?: boolean | string[];
1709
1733
  };
1710
1734
 
1711
1735
  type ApiCredentials = {
@@ -2041,7 +2065,9 @@ type Binding = {
2041
2065
  type: "secrets_store_secret";
2042
2066
  } & BindingOmit<CfSecretsStoreSecrets>) | ({
2043
2067
  type: "logfwdr";
2044
- } & NameOmit<CfLogfwdrBinding>) | {
2068
+ } & NameOmit<CfLogfwdrBinding>) | ({
2069
+ type: "unsafe_hello_world";
2070
+ } & BindingOmit<CfHelloWorld>) | {
2045
2071
  type: `unsafe_${string}`;
2046
2072
  } | {
2047
2073
  type: "assets";
@@ -2395,11 +2421,13 @@ type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
2395
2421
  updateBindings: (bindings: StartDevWorkerInput["bindings"]) => Promise<void>;
2396
2422
  mixedModeConnectionString: MixedModeConnectionString;
2397
2423
  };
2398
- declare function startMixedModeSession(bindings: StartDevWorkerInput["bindings"], options?: {
2424
+ type StartMixedModeSessionOptions = {
2425
+ workerName?: string;
2399
2426
  auth?: NonNullable<StartDevWorkerInput["dev"]>["auth"];
2400
2427
  /** If running in a non-public compliance region, set this here. */
2401
2428
  complianceRegion?: Config["compliance_region"];
2402
- }): Promise<MixedModeSession>;
2429
+ };
2430
+ declare function startMixedModeSession(bindings: StartDevWorkerInput["bindings"], options?: StartMixedModeSessionOptions): Promise<MixedModeSession>;
2403
2431
  declare function pickRemoteBindings(bindings: Record<string, Binding>): Record<string, Binding>;
2404
2432
 
2405
2433
  declare const LOGGER_LEVELS: {
@@ -2457,4 +2485,4 @@ interface Unstable_ASSETSBindingsOptions {
2457
2485
  }
2458
2486
  declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
2459
2487
 
2460
- export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type MixedModeSession as Experimental_MixedModeSession, type GetPlatformProxyOptions, type PlatformProxy, type SourcelessWorkerOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startMixedModeSession as experimental_startMixedModeSession, getPlatformProxy, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
2488
+ export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type MixedModeSession as Experimental_MixedModeSession, type GetPlatformProxyOptions, type PlatformProxy, type SourcelessWorkerOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, type StartMixedModeSessionOptions as experimental_StartMixedModeSessionOptions, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startMixedModeSession as experimental_startMixedModeSession, getPlatformProxy, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };