wrangler 4.96.0 → 4.98.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.
@@ -719,6 +719,11 @@
719
719
  "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').",
720
720
  "markdownDescription": "The path to the directory of migrations for this D1 database (defaults to './migrations')."
721
721
  },
722
+ "migrations_pattern": {
723
+ "type": "string",
724
+ "description": "A glob pattern (relative to the Wrangler config file) used to discover migration files for this D1 database. Defaults to `${migrations_dir}/*.sql` if not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql` (as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and `migrations_pattern` must start with `${migrations_dir}/`. This keeps the relationship between the two settings explicit and lets Wrangler record each migration's name in the migrations table as a path relative to `migrations_dir`.",
725
+ "markdownDescription": "A glob pattern (relative to the Wrangler config file) used to discover\nmigration files for this D1 database. Defaults to `${migrations_dir}/*.sql`\nif not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql`\n(as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and\n`migrations_pattern` must start with `${migrations_dir}/`. This keeps the\nrelationship between the two settings explicit and lets Wrangler record\neach migration's name in the migrations table as a path relative to\n`migrations_dir`."
726
+ },
722
727
  "database_internal_env": {
723
728
  "type": "string",
724
729
  "description": "Internal use only.",
@@ -863,7 +868,7 @@
863
868
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
864
869
  "default": []
865
870
  },
866
- "web_search": {
871
+ "websearch": {
867
872
  "type": "object",
868
873
  "properties": {
869
874
  "binding": {
@@ -2426,6 +2431,11 @@
2426
2431
  "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').",
2427
2432
  "markdownDescription": "The path to the directory of migrations for this D1 database (defaults to './migrations')."
2428
2433
  },
2434
+ "migrations_pattern": {
2435
+ "type": "string",
2436
+ "description": "A glob pattern (relative to the Wrangler config file) used to discover migration files for this D1 database. Defaults to `${migrations_dir}/*.sql` if not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql` (as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and `migrations_pattern` must start with `${migrations_dir}/`. This keeps the relationship between the two settings explicit and lets Wrangler record each migration's name in the migrations table as a path relative to `migrations_dir`.",
2437
+ "markdownDescription": "A glob pattern (relative to the Wrangler config file) used to discover\nmigration files for this D1 database. Defaults to `${migrations_dir}/*.sql`\nif not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql`\n(as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and\n`migrations_pattern` must start with `${migrations_dir}/`. This keeps the\nrelationship between the two settings explicit and lets Wrangler record\neach migration's name in the migrations table as a path relative to\n`migrations_dir`."
2438
+ },
2429
2439
  "database_internal_env": {
2430
2440
  "type": "string",
2431
2441
  "description": "Internal use only.",
@@ -2570,7 +2580,7 @@
2570
2580
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
2571
2581
  "default": []
2572
2582
  },
2573
- "web_search": {
2583
+ "websearch": {
2574
2584
  "type": "object",
2575
2585
  "properties": {
2576
2586
  "binding": {
@@ -3675,16 +3685,16 @@
3675
3685
  "additionalProperties": false,
3676
3686
  "properties": {
3677
3687
  "logpush": {
3678
- "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-491392004818536"
3688
+ "$ref": "#/definitions/interface-769040647-8409-18279-769040647-0-501432004818536"
3679
3689
  },
3680
3690
  "observability": {
3681
- "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-491392004818536"
3691
+ "$ref": "#/definitions/interface-769040647-8409-18279-769040647-0-501432004818536"
3682
3692
  },
3683
3693
  "limits": {
3684
- "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-491392004818536"
3694
+ "$ref": "#/definitions/interface-769040647-8409-18279-769040647-0-501432004818536"
3685
3695
  },
3686
3696
  "cache": {
3687
- "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-491392004818536"
3697
+ "$ref": "#/definitions/interface-769040647-8409-18279-769040647-0-501432004818536"
3688
3698
  },
3689
3699
  "define": {
3690
3700
  "type": "object",
@@ -4034,6 +4044,11 @@
4034
4044
  "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').",
4035
4045
  "markdownDescription": "The path to the directory of migrations for this D1 database (defaults to './migrations')."
4036
4046
  },
4047
+ "migrations_pattern": {
4048
+ "type": "string",
4049
+ "description": "A glob pattern (relative to the Wrangler config file) used to discover migration files for this D1 database. Defaults to `${migrations_dir}/*.sql` if not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql` (as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and `migrations_pattern` must start with `${migrations_dir}/`. This keeps the relationship between the two settings explicit and lets Wrangler record each migration's name in the migrations table as a path relative to `migrations_dir`.",
4050
+ "markdownDescription": "A glob pattern (relative to the Wrangler config file) used to discover\nmigration files for this D1 database. Defaults to `${migrations_dir}/*.sql`\nif not specified.\n\nUse this to opt in to nested layouts such as `migrations/*\\/migration.sql`\n(as produced by some ORMs).\n\nWhen `migrations_pattern` is set, `migrations_dir` must also be set, and\n`migrations_pattern` must start with `${migrations_dir}/`. This keeps the\nrelationship between the two settings explicit and lets Wrangler record\neach migration's name in the migrations table as a path relative to\n`migrations_dir`."
4051
+ },
4037
4052
  "database_internal_env": {
4038
4053
  "type": "string",
4039
4054
  "description": "Internal use only.",
@@ -4178,7 +4193,7 @@
4178
4193
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
4179
4194
  "default": []
4180
4195
  },
4181
- "web_search": {
4196
+ "websearch": {
4182
4197
  "type": "object",
4183
4198
  "properties": {
4184
4199
  "binding": {
@@ -4941,7 +4956,7 @@
4941
4956
  "description": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments. Previews are branches of your Worker's main instance used to test features during feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`",
4942
4957
  "markdownDescription": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments.\nPreviews are branches of your Worker's main instance used to test features\nduring feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`"
4943
4958
  },
4944
- "interface-769040647-8080-17950-769040647-0-491392004818536": {
4959
+ "interface-769040647-8409-18279-769040647-0-501432004818536": {
4945
4960
  "type": "object",
4946
4961
  "properties": {
4947
4962
  "name": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.96.0",
3
+ "version": "4.98.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -54,16 +54,16 @@
54
54
  "esbuild": "0.27.3",
55
55
  "path-to-regexp": "6.3.0",
56
56
  "unenv": "2.0.0-rc.24",
57
- "workerd": "1.20260529.1",
57
+ "workerd": "1.20260603.1",
58
58
  "@cloudflare/kv-asset-handler": "0.5.0",
59
59
  "@cloudflare/unenv-preset": "2.16.1",
60
- "miniflare": "4.20260529.0"
60
+ "miniflare": "4.20260603.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@bomb.sh/tab": "^0.0.12",
65
65
  "@cloudflare/types": "6.18.4",
66
- "@cloudflare/workers-types": "^4.20260529.1",
66
+ "@cloudflare/workers-types": "^4.20260603.1",
67
67
  "@cspotcode/source-map-support": "0.8.1",
68
68
  "@netlify/build-info": "^10.5.1",
69
69
  "@sentry/node": "^7.86.0",
@@ -76,7 +76,7 @@
76
76
  "@types/json-diff": "^1.0.3",
77
77
  "@types/mime": "^3.0.4",
78
78
  "@types/minimatch": "^5.1.2",
79
- "@types/node": "^22.10.1",
79
+ "@types/node": "22.15.17",
80
80
  "@types/node-forge": "^1.3.11",
81
81
  "@types/prompts": "^2.0.14",
82
82
  "@types/resolve": "^1.20.6",
@@ -87,11 +87,11 @@
87
87
  "@types/yargs": "^17.0.22",
88
88
  "@vitest/ui": "4.1.0",
89
89
  "@webcontainer/env": "^1.1.0",
90
- "am-i-vibing": "^0.1.1",
91
- "capnweb": "^0.5.0",
90
+ "am-i-vibing": "^0.4.0",
91
+ "capnweb": "0.5.0",
92
92
  "chalk": "^5.2.0",
93
93
  "chokidar": "^4.0.1",
94
- "ci-info": "^4.4.0",
94
+ "ci-info": "4.4.0",
95
95
  "cli-table3": "^0.6.3",
96
96
  "cloudflare": "^5.2.0",
97
97
  "cmd-shim": "^4.1.0",
@@ -110,14 +110,14 @@
110
110
  "itty-time": "^1.0.6",
111
111
  "javascript-time-ago": "^2.5.4",
112
112
  "json-diff": "^1.0.6",
113
- "jsonc-parser": "^3.2.0",
113
+ "jsonc-parser": "3.2.0",
114
114
  "md5-file": "5.0.0",
115
115
  "mime": "^3.0.0",
116
116
  "minimatch": "^5.1.0",
117
117
  "mock-socket": "^9.3.1",
118
118
  "msw": "2.12.4",
119
119
  "node-forge": "^1.3.2",
120
- "open": "^11.0.0",
120
+ "open": "11.0.0",
121
121
  "p-queue": "^9.0.0",
122
122
  "patch-console": "^1.0.0",
123
123
  "pretty-bytes": "^6.0.0",
@@ -128,16 +128,16 @@
128
128
  "rosie-skills": "^0.8.1",
129
129
  "semiver": "^1.1.0",
130
130
  "shell-quote": "^1.8.1",
131
- "signal-exit": "^3.0.7",
132
- "smol-toml": "^1.5.2",
131
+ "signal-exit": "3.0.7",
132
+ "smol-toml": "1.5.2",
133
133
  "source-map": "^0.6.1",
134
134
  "supports-color": "^9.2.2",
135
135
  "timeago.js": "4.0.2",
136
- "tree-kill": "^1.2.2",
136
+ "tree-kill": "1.2.2",
137
137
  "ts-dedent": "^2.2.0",
138
138
  "ts-json-schema-generator": "^1.5.0",
139
139
  "tsup": "8.3.0",
140
- "typescript": "~5.8.3",
140
+ "typescript": "5.8.3",
141
141
  "undici": "7.24.8",
142
142
  "vitest": "4.1.0",
143
143
  "vitest-websocket-mock": "^0.4.0",
@@ -145,18 +145,19 @@
145
145
  "xxhash-wasm": "^1.0.1",
146
146
  "yaml": "^2.8.1",
147
147
  "yargs": "^17.7.2",
148
- "@cloudflare/cli-shared-helpers": "0.1.5",
149
- "@cloudflare/containers-shared": "0.15.1",
148
+ "@cloudflare/cli-shared-helpers": "0.1.7",
150
149
  "@cloudflare/codemod": "1.1.0",
151
- "@cloudflare/deploy-helpers": "0.1.0",
152
- "@cloudflare/pages-shared": "^0.13.141",
153
- "@cloudflare/workers-shared": "0.19.6",
150
+ "@cloudflare/containers-shared": "0.15.1",
151
+ "@cloudflare/deploy-helpers": "0.1.2",
152
+ "@cloudflare/pages-shared": "^0.13.143",
153
+ "@cloudflare/workers-auth": "0.1.1",
154
154
  "@cloudflare/workers-tsconfig": "0.0.0",
155
- "@cloudflare/workers-utils": "0.22.0",
156
- "@cloudflare/workflows-shared": "0.11.1"
155
+ "@cloudflare/workers-shared": "0.19.6",
156
+ "@cloudflare/workflows-shared": "0.11.1",
157
+ "@cloudflare/workers-utils": "0.23.0"
157
158
  },
158
159
  "peerDependencies": {
159
- "@cloudflare/workers-types": "^4.20260529.1"
160
+ "@cloudflare/workers-types": "^4.20260603.1"
160
161
  },
161
162
  "peerDependenciesMeta": {
162
163
  "@cloudflare/workers-types": {
@@ -164,7 +165,7 @@
164
165
  }
165
166
  },
166
167
  "optionalDependencies": {
167
- "fsevents": "~2.3.2"
168
+ "fsevents": "2.3.3"
168
169
  },
169
170
  "engines": {
170
171
  "node": ">=22.0.0"
@@ -1,4 +1,4 @@
1
- import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, Config as Config$1, Binding, DurableObjectMigration as DurableObjectMigration$1, ContainerApp as ContainerApp$1, Trigger, CfTailConsumer, ServiceFetch, ContainerEngine as ContainerEngine$1, CfUnsafe, CfScriptFormat, AssetsOptions as AssetsOptions$1, ConfigBindingFieldName, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, RawConfig as RawConfig$1, PackageJSON, ParseError, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
1
+ import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, ApiCredentials, Config as Config$1, Binding, DurableObjectMigration as DurableObjectMigration$1, ContainerApp as ContainerApp$1, Trigger, CfTailConsumer, ServiceFetch, ContainerEngine as ContainerEngine$1, CfUnsafe, CfScriptFormat, AssetsOptions as AssetsOptions$1, ConfigBindingFieldName, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, RawConfig as RawConfig$1, PackageJSON, ParseError, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
2
2
  export { Binding, experimental_patchConfig, experimental_readRawConfig, defaultWranglerConfig as unstable_defaultWranglerConfig } from '@cloudflare/workers-utils';
3
3
  import { Json as Json$1, WorkerRegistry, Miniflare, MiniflareOptions, Mutex, Response as Response$1, NodeJSCompatMode, DispatchFetch, RemoteProxyConnectionString, WorkerOptions, ModuleRule, Request } from 'miniflare';
4
4
  import * as undici from 'undici';
@@ -192,13 +192,13 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
192
192
  };
193
193
  };
194
194
  latest_stage: {
195
- status: "skipped" | "active" | "canceled" | "success" | "idle" | "failure";
195
+ status: "skipped" | "active" | "canceled" | "idle" | "success" | "failure";
196
196
  name: "build" | "queued" | "deploy" | "initialize" | "clone_repo";
197
197
  started_on: string | null;
198
198
  ended_on: string | null;
199
199
  };
200
200
  stages: {
201
- status: "skipped" | "active" | "canceled" | "success" | "idle" | "failure";
201
+ status: "skipped" | "active" | "canceled" | "idle" | "success" | "failure";
202
202
  name: "build" | "queued" | "deploy" | "initialize" | "clone_repo";
203
203
  started_on: string | null;
204
204
  ended_on: string | null;
@@ -303,13 +303,6 @@ type Experimental_GenerateTypesResult = GenerateTypesResult;
303
303
  */
304
304
  declare function generateTypes(options: Experimental_GenerateTypesOptions): Promise<Experimental_GenerateTypesResult>;
305
305
 
306
- type ApiCredentials = {
307
- apiToken: string;
308
- } | {
309
- authKey: string;
310
- authEmail: string;
311
- };
312
-
313
306
  /**
314
307
  * Information about Wrangler's bundling process that needs passed through
315
308
  * for DevTools sourcemap transformation
@@ -857,6 +850,14 @@ type AssetsOptions = {
857
850
  run_worker_first?: boolean | string[];
858
851
  };
859
852
 
853
+ /**
854
+ * Wrangler configuration types. The JSDoc on these fields is also the source
855
+ * of truth for the equivalent fields in `@cloudflare/config`
856
+ * (`packages/config/src/types.ts` — `UserConfig` — and the binding option
857
+ * interfaces in `packages/config/src/config.ts`). When editing prose here,
858
+ * mirror the changes there.
859
+ */
860
+
860
861
  /**
861
862
  * The `Environment` interface declares all the configuration fields that
862
863
  * can be specified for an environment.
@@ -1744,6 +1745,21 @@ interface EnvironmentNonInheritable {
1744
1745
  migrations_table?: string;
1745
1746
  /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
1746
1747
  migrations_dir?: string;
1748
+ /**
1749
+ * A glob pattern (relative to the Wrangler config file) used to discover
1750
+ * migration files for this D1 database. Defaults to `${migrations_dir}/*.sql`
1751
+ * if not specified.
1752
+ *
1753
+ * Use this to opt in to nested layouts such as `migrations/*\/migration.sql`
1754
+ * (as produced by some ORMs).
1755
+ *
1756
+ * When `migrations_pattern` is set, `migrations_dir` must also be set, and
1757
+ * `migrations_pattern` must start with `${migrations_dir}/`. This keeps the
1758
+ * relationship between the two settings explicit and lets Wrangler record
1759
+ * each migration's name in the migrations table as a path relative to
1760
+ * `migrations_dir`.
1761
+ */
1762
+ migrations_pattern?: string;
1747
1763
  /** Internal use only. */
1748
1764
  database_internal_env?: string;
1749
1765
  /** Whether the D1 database should be remote or not in local development */
@@ -1832,7 +1848,7 @@ interface EnvironmentNonInheritable {
1832
1848
  * @default {}
1833
1849
  * @nonInheritable
1834
1850
  */
1835
- web_search: {
1851
+ websearch: {
1836
1852
  /** The binding name used to refer to Web Search in the Worker. */
1837
1853
  binding: string;
1838
1854
  /** Whether the Web Search binding should be remote or not in local development */
@@ -3075,6 +3091,24 @@ declare function runAutoConfig(autoConfigDetails: AutoConfigDetails, autoConfigO
3075
3091
  * Make a fetch request, and extract the `result` from the JSON response.
3076
3092
  */
3077
3093
  declare function fetchResult<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams, abortSignal?: AbortSignal, apiToken?: ApiCredentials): Promise<ResponseType>;
3094
+ /**
3095
+ * Make a fetch request for a list of values,
3096
+ * extracting the `result` from the JSON response,
3097
+ * and repeating the request if the results are paginated.
3098
+ */
3099
+ declare function fetchListResult<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init?: RequestInit, queryParams?: URLSearchParams): Promise<ResponseType[]>;
3100
+
3101
+ interface ConfirmOptions {
3102
+ defaultValue?: boolean;
3103
+ fallbackValue?: boolean;
3104
+ }
3105
+ declare function confirm(text: string, { defaultValue, fallbackValue }?: ConfirmOptions): Promise<boolean>;
3106
+ interface PromptOptions {
3107
+ defaultValue?: string;
3108
+ isSecret?: boolean;
3109
+ validate?: (value: string) => boolean | string | Promise<boolean | string>;
3110
+ }
3111
+ declare function prompt(text: string, options?: PromptOptions): Promise<string>;
3078
3112
 
3079
3113
  type ExperimentalFlags = {
3080
3114
  MULTIWORKER: boolean;
@@ -3190,6 +3224,16 @@ type HandlerContext = {
3190
3224
  * Use fetchResult to make *auth'd* requests to the Cloudflare API.
3191
3225
  */
3192
3226
  fetchResult: typeof fetchResult;
3227
+ fetchListResult: typeof fetchListResult;
3228
+ /**
3229
+ * Interactive prompts
3230
+ */
3231
+ confirm: typeof confirm;
3232
+ prompt: typeof prompt;
3233
+ /**
3234
+ * Whether the process is non-interactive or running in CI.
3235
+ */
3236
+ isNonInteractiveOrCI: () => boolean;
3193
3237
  /**
3194
3238
  * Error classes provided to the command implementor as a convenience
3195
3239
  * to aid discoverability and to encourage their usage.
@@ -3261,6 +3305,13 @@ type CommandDefinition<NamedArgDefs extends NamedArgDefinitions = NamedArgDefini
3261
3305
  * @default true
3262
3306
  */
3263
3307
  sendMetrics?: boolean;
3308
+ /**
3309
+ * Skip the AI coding agent skills installation prompt for this command.
3310
+ * Set to `true` for commands whose stdout is captured by the shell (e.g. `complete`),
3311
+ * where interactive prompts would corrupt the output.
3312
+ * @default false
3313
+ */
3314
+ skipSkillsPrompt?: boolean;
3264
3315
  };
3265
3316
  /**
3266
3317
  * A plain key-value object describing the CLI args for this command.