wrangler 4.151.2 → 4.152.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.
- package/config-schema.json +39 -6
- package/package.json +23 -20
- package/templates/middleware/middleware-patch-console-prefix.ts +0 -7
- package/wrangler-dist/ProxyWorker.js +5 -0
- package/wrangler-dist/cli.d.ts +19 -1
- package/wrangler-dist/cli.js +2606 -2206
- package/wrangler-dist/experimental-config.d.mts +1 -1
- package/wrangler-dist/experimental-config.d.mts.map +1 -1
package/config-schema.json
CHANGED
|
@@ -969,6 +969,11 @@
|
|
|
969
969
|
"type": "string",
|
|
970
970
|
"description": "The local database connection string for `wrangler dev`",
|
|
971
971
|
"markdownDescription": "The local database connection string for `wrangler dev`"
|
|
972
|
+
},
|
|
973
|
+
"remote": {
|
|
974
|
+
"type": "boolean",
|
|
975
|
+
"description": "Connect to the deployed Hyperdrive configuration during local development instead of a local database.",
|
|
976
|
+
"markdownDescription": "Connect to the deployed Hyperdrive configuration during local development\ninstead of a local database."
|
|
972
977
|
}
|
|
973
978
|
},
|
|
974
979
|
"required": [
|
|
@@ -2819,6 +2824,11 @@
|
|
|
2819
2824
|
"type": "string",
|
|
2820
2825
|
"description": "The local database connection string for `wrangler dev`",
|
|
2821
2826
|
"markdownDescription": "The local database connection string for `wrangler dev`"
|
|
2827
|
+
},
|
|
2828
|
+
"remote": {
|
|
2829
|
+
"type": "boolean",
|
|
2830
|
+
"description": "Connect to the deployed Hyperdrive configuration during local development instead of a local database.",
|
|
2831
|
+
"markdownDescription": "Connect to the deployed Hyperdrive configuration during local development\ninstead of a local database."
|
|
2822
2832
|
}
|
|
2823
2833
|
},
|
|
2824
2834
|
"required": [
|
|
@@ -4074,6 +4084,11 @@
|
|
|
4074
4084
|
"description": "Optional default retention for instances of this Workflow, applied when an instance does not set its own retention. Accepts milliseconds or a duration string such as `\"3 days\"`, and is validated by the Workflows API at deploy time.",
|
|
4075
4085
|
"markdownDescription": "Optional default retention for instances of this Workflow, applied when an instance does not\nset its own retention. Accepts milliseconds or a duration string such as `\"3 days\"`, and is\nvalidated by the Workflows API at deploy time."
|
|
4076
4086
|
},
|
|
4087
|
+
"jurisdiction": {
|
|
4088
|
+
"$ref": "#/definitions/WorkflowJurisdiction",
|
|
4089
|
+
"description": "Optional jurisdiction that the Workflow's instances run and store their data in. It is set when the Workflow is created and cannot be changed afterwards.",
|
|
4090
|
+
"markdownDescription": "Optional jurisdiction that the Workflow's instances run and store their data in. It is set\nwhen the Workflow is created and cannot be changed afterwards."
|
|
4091
|
+
},
|
|
4077
4092
|
"type": {
|
|
4078
4093
|
"type": "string",
|
|
4079
4094
|
"const": "workflow"
|
|
@@ -4090,6 +4105,14 @@
|
|
|
4090
4105
|
"description": "A single declarative Workflow export entry in the `exports` config map. The map key is the exported class name (the class extending `WorkflowEntrypoint`); `name` is the workflow's stable identity, used for instance and storage namespacing, and is required. The remaining settings match the ones accepted by `workflows` bindings.",
|
|
4091
4106
|
"markdownDescription": "A single declarative Workflow export entry in the `exports` config map. The\nmap key is the exported class name (the class extending `WorkflowEntrypoint`);\n`name` is the workflow's stable identity, used for instance and storage\nnamespacing, and is required. The remaining settings match the ones accepted\nby `workflows` bindings."
|
|
4092
4107
|
},
|
|
4108
|
+
"WorkflowJurisdiction": {
|
|
4109
|
+
"type": "string",
|
|
4110
|
+
"enum": [
|
|
4111
|
+
"eu",
|
|
4112
|
+
"fedramp",
|
|
4113
|
+
"us"
|
|
4114
|
+
]
|
|
4115
|
+
},
|
|
4093
4116
|
"ArtifactsEventTrigger": {
|
|
4094
4117
|
"type": "object",
|
|
4095
4118
|
"properties": {
|
|
@@ -4409,19 +4432,19 @@
|
|
|
4409
4432
|
"type": "object",
|
|
4410
4433
|
"properties": {
|
|
4411
4434
|
"logpush": {
|
|
4412
|
-
"$ref": "#/definitions/interface-769040647-
|
|
4435
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-622902004818536"
|
|
4413
4436
|
},
|
|
4414
4437
|
"observability": {
|
|
4415
|
-
"$ref": "#/definitions/interface-769040647-
|
|
4438
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-622902004818536"
|
|
4416
4439
|
},
|
|
4417
4440
|
"limits": {
|
|
4418
|
-
"$ref": "#/definitions/interface-769040647-
|
|
4441
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-622902004818536"
|
|
4419
4442
|
},
|
|
4420
4443
|
"placement": {
|
|
4421
|
-
"$ref": "#/definitions/interface-769040647-
|
|
4444
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-622902004818536"
|
|
4422
4445
|
},
|
|
4423
4446
|
"cache": {
|
|
4424
|
-
"$ref": "#/definitions/interface-769040647-
|
|
4447
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-622902004818536"
|
|
4425
4448
|
},
|
|
4426
4449
|
"define": {
|
|
4427
4450
|
"type": "object",
|
|
@@ -5002,6 +5025,11 @@
|
|
|
5002
5025
|
"type": "string",
|
|
5003
5026
|
"description": "The local database connection string for `wrangler dev`",
|
|
5004
5027
|
"markdownDescription": "The local database connection string for `wrangler dev`"
|
|
5028
|
+
},
|
|
5029
|
+
"remote": {
|
|
5030
|
+
"type": "boolean",
|
|
5031
|
+
"description": "Connect to the deployed Hyperdrive configuration during local development instead of a local database.",
|
|
5032
|
+
"markdownDescription": "Connect to the deployed Hyperdrive configuration during local development\ninstead of a local database."
|
|
5005
5033
|
}
|
|
5006
5034
|
},
|
|
5007
5035
|
"required": [
|
|
@@ -5786,7 +5814,7 @@
|
|
|
5786
5814
|
"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`, `placement`, `cache`",
|
|
5787
5815
|
"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`, `placement`, `cache`"
|
|
5788
5816
|
},
|
|
5789
|
-
"interface-769040647-
|
|
5817
|
+
"interface-769040647-14884-25493-769040647-0-622902004818536": {
|
|
5790
5818
|
"type": "object",
|
|
5791
5819
|
"properties": {
|
|
5792
5820
|
"name": {
|
|
@@ -6291,6 +6319,11 @@
|
|
|
6291
6319
|
"additionalProperties": false,
|
|
6292
6320
|
"description": "Optional default retention for instances of this Workflow, applied when an instance does not set its own retention. Accepts milliseconds or a duration string such as `\"3 days\"`, and is validated by the Workflows API at deploy time.",
|
|
6293
6321
|
"markdownDescription": "Optional default retention for instances of this Workflow, applied when an instance does not\nset its own retention. Accepts milliseconds or a duration string such as `\"3 days\"`, and is\nvalidated by the Workflows API at deploy time."
|
|
6322
|
+
},
|
|
6323
|
+
"jurisdiction": {
|
|
6324
|
+
"$ref": "#/definitions/WorkflowJurisdiction",
|
|
6325
|
+
"description": "Optional jurisdiction that the Workflow's instances run and store their data in. It is set when the Workflow is created and cannot be changed afterwards.",
|
|
6326
|
+
"markdownDescription": "Optional jurisdiction that the Workflow's instances run and store their data in. It is set\nwhen the Workflow is created and cannot be changed afterwards."
|
|
6294
6327
|
}
|
|
6295
6328
|
},
|
|
6296
6329
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.152.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"path-to-regexp": "6.3.0",
|
|
73
73
|
"unenv": "2.0.0-rc.24",
|
|
74
74
|
"workerd": "1.20261019.1",
|
|
75
|
-
"@cloudflare/
|
|
76
|
-
"miniflare": "5.20261019.
|
|
77
|
-
"@cloudflare/
|
|
75
|
+
"@cloudflare/unenv-preset": "2.16.2",
|
|
76
|
+
"miniflare": "5.20261019.2-beta",
|
|
77
|
+
"@cloudflare/kv-asset-handler": "0.5.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
@@ -95,13 +95,14 @@
|
|
|
95
95
|
"@types/minimatch": "^5.1.2",
|
|
96
96
|
"@types/node": "22.15.17",
|
|
97
97
|
"@types/node-forge": "^1.3.11",
|
|
98
|
+
"@types/pg": "8.15.4",
|
|
98
99
|
"@types/prompts": "^2.0.14",
|
|
99
100
|
"@types/resolve": "^1.20.6",
|
|
100
101
|
"@types/shell-quote": "^1.7.2",
|
|
101
102
|
"@types/supports-color": "^8.1.1",
|
|
102
103
|
"@types/ws": "^8.5.7",
|
|
103
104
|
"@types/yargs": "^17.0.22",
|
|
104
|
-
"@vitest/ui": "
|
|
105
|
+
"@vitest/ui": "5.0.4",
|
|
105
106
|
"@webcontainer/env": "^1.1.0",
|
|
106
107
|
"am-i-vibing": "^0.5.0",
|
|
107
108
|
"capnweb": "0.12.0",
|
|
@@ -130,10 +131,12 @@
|
|
|
130
131
|
"minimatch": "^5.1.0",
|
|
131
132
|
"mock-socket": "^9.3.1",
|
|
132
133
|
"msw": "2.14.6",
|
|
134
|
+
"mysql2": "^3.15.3",
|
|
133
135
|
"node-forge": "^1.3.2",
|
|
134
136
|
"open": "11.0.0",
|
|
135
137
|
"p-queue": "^9.0.0",
|
|
136
138
|
"patch-console": "^1.0.0",
|
|
139
|
+
"pg": "8.16.3",
|
|
137
140
|
"pretty-bytes": "^6.0.0",
|
|
138
141
|
"prompts": "^2.4.2",
|
|
139
142
|
"qr": "^0.6.0",
|
|
@@ -154,29 +157,29 @@
|
|
|
154
157
|
"tsup": "8.3.0",
|
|
155
158
|
"typescript": "5.8.3",
|
|
156
159
|
"undici": "7.29.1",
|
|
157
|
-
"vitest": "
|
|
160
|
+
"vitest": "5.0.4",
|
|
158
161
|
"vitest-websocket-mock": "^0.4.0",
|
|
159
162
|
"ws": "8.21.0",
|
|
160
163
|
"xxhash-wasm": "^1.0.1",
|
|
161
164
|
"yaml": "^2.8.1",
|
|
162
165
|
"yargs": "^17.7.2",
|
|
163
166
|
"zod": "4.6.5",
|
|
164
|
-
"@cloudflare/autoconfig": "0.
|
|
165
|
-
"@cloudflare/
|
|
166
|
-
"@cloudflare/
|
|
167
|
-
"@cloudflare/config": "0.
|
|
168
|
-
"@cloudflare/containers-shared": "0.23.0",
|
|
169
|
-
"@cloudflare/deploy-helpers": "0.22.0",
|
|
170
|
-
"@cloudflare/pages-shared": "^0.13.199",
|
|
171
|
-
"@cloudflare/runtime-types": "0.1.13",
|
|
172
|
-
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
173
|
-
"@cloudflare/workers-auth": "0.14.0",
|
|
167
|
+
"@cloudflare/autoconfig": "0.8.0",
|
|
168
|
+
"@cloudflare/cli-shared-helpers": "0.2.8",
|
|
169
|
+
"@cloudflare/build-output-utils": "0.9.4",
|
|
170
|
+
"@cloudflare/config": "0.28.0",
|
|
174
171
|
"@cloudflare/pages-functions": "0.1.1",
|
|
175
|
-
"@cloudflare/
|
|
176
|
-
"@cloudflare/
|
|
172
|
+
"@cloudflare/containers-shared": "0.23.2",
|
|
173
|
+
"@cloudflare/runtime-types": "0.1.15",
|
|
174
|
+
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
175
|
+
"@cloudflare/workers-auth": "0.15.0",
|
|
177
176
|
"@cloudflare/workers-shared": "0.20.1",
|
|
178
|
-
"@cloudflare/workers-
|
|
179
|
-
"@cloudflare/
|
|
177
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
178
|
+
"@cloudflare/workers-utils": "0.48.0",
|
|
179
|
+
"@cloudflare/workflows-shared": "0.15.2",
|
|
180
|
+
"@cloudflare/pages-shared": "^0.13.201",
|
|
181
|
+
"@cloudflare/remote-bindings": "0.0.52",
|
|
182
|
+
"@cloudflare/deploy-helpers": "0.23.0"
|
|
180
183
|
},
|
|
181
184
|
"peerDependencies": {
|
|
182
185
|
"@cloudflare/workers-types": "^5.20261019.1"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference path="middleware-patch-console-prefix.d.ts"/>
|
|
2
2
|
|
|
3
3
|
import { prefix } from "config:middleware/patch-console-prefix";
|
|
4
|
-
import type { Middleware } from "./common";
|
|
5
4
|
|
|
6
5
|
// Directly patch console methods to add worker prefix.
|
|
7
6
|
// We capture the original method once and replace with a wrapper.
|
|
@@ -13,9 +12,3 @@ import type { Middleware } from "./common";
|
|
|
13
12
|
},
|
|
14
13
|
});
|
|
15
14
|
});
|
|
16
|
-
|
|
17
|
-
const passthrough: Middleware = (request, env, _ctx, middlewareCtx) => {
|
|
18
|
-
return middlewareCtx.next(request, env);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default passthrough;
|
|
@@ -71,6 +71,11 @@ var ProxyWorker = class {
|
|
|
71
71
|
if (isRequestFromProxyController(request, this.env)) {
|
|
72
72
|
return this.processProxyControllerRequest(request);
|
|
73
73
|
}
|
|
74
|
+
if (this.env.UNSUPPORTED_RUNTIME_MESSAGE) {
|
|
75
|
+
return new Response(this.env.UNSUPPORTED_RUNTIME_MESSAGE, {
|
|
76
|
+
status: 503
|
|
77
|
+
});
|
|
78
|
+
}
|
|
74
79
|
const deferred = createDeferred();
|
|
75
80
|
this.requestQueue.set(request, deferred);
|
|
76
81
|
this.processQueue();
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -1002,6 +1002,12 @@ type TestHarness = {
|
|
|
1002
1002
|
* await server.fetch("http://example.com/api/data");
|
|
1003
1003
|
* // Dispatches a request to the API Worker with URL "http://example.com/api/data"
|
|
1004
1004
|
* ```
|
|
1005
|
+
*
|
|
1006
|
+
* Under Bun, this method, `server.getWorker()`'s `fetch()`, `email()` and
|
|
1007
|
+
* `scheduled()`, and the URL returned by `listen()` cannot reach the Worker,
|
|
1008
|
+
* because Bun's `fetch()` ignores the undici `dispatcher` that Miniflare routes
|
|
1009
|
+
* requests through. The methods throw a `UserError` and the URL answers with a
|
|
1010
|
+
* 503. `server.getWorker().getEnv()` and `getExport()` keep working under Bun.
|
|
1005
1011
|
*/
|
|
1006
1012
|
fetch: DispatchFetch;
|
|
1007
1013
|
/**
|
|
@@ -1652,7 +1658,7 @@ interface WorkerEntrypointExport {
|
|
|
1652
1658
|
* namespacing, and is required. The remaining settings match the ones accepted
|
|
1653
1659
|
* by `workflows` bindings.
|
|
1654
1660
|
*/
|
|
1655
|
-
interface WorkflowExport extends Pick<WorkflowBinding, "limits" | "concurrency" | "schedules" | "default_retention"> {
|
|
1661
|
+
interface WorkflowExport extends Pick<WorkflowBinding, "limits" | "concurrency" | "schedules" | "default_retention" | "jurisdiction"> {
|
|
1656
1662
|
type: "workflow";
|
|
1657
1663
|
name: string;
|
|
1658
1664
|
}
|
|
@@ -2057,6 +2063,8 @@ type ArtifactsEventTrigger = {
|
|
|
2057
2063
|
workflow_name: string;
|
|
2058
2064
|
}[];
|
|
2059
2065
|
};
|
|
2066
|
+
declare const WORKFLOW_JURISDICTIONS: readonly ["eu", "fedramp", "us"];
|
|
2067
|
+
type WorkflowJurisdiction = (typeof WORKFLOW_JURISDICTIONS)[number];
|
|
2060
2068
|
type WorkflowBinding = {
|
|
2061
2069
|
/** The name of the binding used to refer to the Workflow */
|
|
2062
2070
|
binding: string;
|
|
@@ -2089,6 +2097,11 @@ type WorkflowBinding = {
|
|
|
2089
2097
|
/** How long to retain errored instances */
|
|
2090
2098
|
error_retention?: number | string;
|
|
2091
2099
|
};
|
|
2100
|
+
/**
|
|
2101
|
+
* Optional jurisdiction that the Workflow's instances run and store their data in. It is set
|
|
2102
|
+
* when the Workflow is created and cannot be changed afterwards.
|
|
2103
|
+
*/
|
|
2104
|
+
jurisdiction?: WorkflowJurisdiction;
|
|
2092
2105
|
};
|
|
2093
2106
|
type ConnectHandlerConfigBase = {
|
|
2094
2107
|
/** The port to listen on. */
|
|
@@ -2474,6 +2487,11 @@ interface EnvironmentNonInheritable {
|
|
|
2474
2487
|
id: string;
|
|
2475
2488
|
/** The local database connection string for `wrangler dev` */
|
|
2476
2489
|
localConnectionString?: string;
|
|
2490
|
+
/**
|
|
2491
|
+
* Connect to the deployed Hyperdrive configuration during local development
|
|
2492
|
+
* instead of a local database.
|
|
2493
|
+
*/
|
|
2494
|
+
remote?: boolean;
|
|
2477
2495
|
}[];
|
|
2478
2496
|
/**
|
|
2479
2497
|
* Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
|