wrangler 4.66.0 → 4.67.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.
- package/package.json +12 -12
- package/templates/remoteBindings/ProxyServerWorker.ts +0 -40
- package/templates/tsconfig.json +0 -1
- package/wrangler-dist/ProxyServerWorker.js +855 -72
- package/wrangler-dist/cli.d.ts +2 -2
- package/wrangler-dist/cli.js +4245 -3589
- package/wrangler-dist/metafile-cjs.json +1 -1
- package/templates/init-tests/test-jest-new-worker.js +0 -23
- package/templates/init-tests/test-vitest-new-worker.js +0 -24
- package/templates/init-tests/test-vitest-new-worker.ts +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.67.1",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -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.
|
|
57
|
+
"workerd": "1.20260302.0",
|
|
58
58
|
"@cloudflare/kv-asset-handler": "0.4.2",
|
|
59
|
-
"@cloudflare/unenv-preset": "2.
|
|
60
|
-
"miniflare": "4.
|
|
59
|
+
"@cloudflare/unenv-preset": "2.14.0",
|
|
60
|
+
"miniflare": "4.20260302.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.
|
|
66
|
+
"@cloudflare/workers-types": "^4.20260302.0",
|
|
67
67
|
"@cspotcode/source-map-support": "0.8.1",
|
|
68
68
|
"@netlify/build-info": "^10.2.0",
|
|
69
69
|
"@sentry/node": "^7.86.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@vitest/ui": "~3.2.0",
|
|
90
90
|
"@webcontainer/env": "^1.1.0",
|
|
91
91
|
"am-i-vibing": "^0.1.0",
|
|
92
|
-
"capnweb": "^0.
|
|
92
|
+
"capnweb": "^0.5.0",
|
|
93
93
|
"chalk": "^5.2.0",
|
|
94
94
|
"chokidar": "^4.0.1",
|
|
95
95
|
"ci-info": "^4.4.0",
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
"devtools-protocol": "^0.0.1182435",
|
|
104
104
|
"dotenv": "^16.3.1",
|
|
105
105
|
"dotenv-expand": "^12.0.2",
|
|
106
|
+
"empathic": "^2.0.0",
|
|
106
107
|
"eslint": "^9.39.1",
|
|
107
108
|
"esprima": "4.0.1",
|
|
108
109
|
"execa": "^6.1.0",
|
|
109
|
-
"find-up": "^6.3.0",
|
|
110
110
|
"get-port": "^7.0.0",
|
|
111
111
|
"glob-to-regexp": "^0.4.1",
|
|
112
112
|
"https-proxy-agent": "7.0.2",
|
|
@@ -150,14 +150,14 @@
|
|
|
150
150
|
"@cloudflare/cli": "1.2.1",
|
|
151
151
|
"@cloudflare/containers-shared": "0.9.0",
|
|
152
152
|
"@cloudflare/eslint-config-shared": "1.2.1",
|
|
153
|
-
"@cloudflare/pages-shared": "^0.13.
|
|
154
|
-
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
153
|
+
"@cloudflare/pages-shared": "^0.13.110",
|
|
155
154
|
"@cloudflare/workers-shared": "0.19.0",
|
|
156
|
-
"@cloudflare/
|
|
157
|
-
"@cloudflare/workers-utils": "0.11.
|
|
155
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
156
|
+
"@cloudflare/workers-utils": "0.11.1",
|
|
157
|
+
"@cloudflare/workflows-shared": "0.4.0"
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
|
-
"@cloudflare/workers-types": "^4.
|
|
160
|
+
"@cloudflare/workers-types": "^4.20260302.0"
|
|
161
161
|
},
|
|
162
162
|
"peerDependenciesMeta": {
|
|
163
163
|
"@cloudflare/workers-types": {
|
|
@@ -21,39 +21,6 @@ class BindingNotFoundError extends Error {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Here be dragons! capnweb does not currently support ReadableStreams, which Media
|
|
26
|
-
* bindings use for input. As such, Media Bindings cannot be directly used via capnweb,
|
|
27
|
-
* and need to be special cased.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
function isSpecialCaseMediaBindingRequest(headers: Headers): boolean {
|
|
31
|
-
return headers.has("x-cf-media-input-options");
|
|
32
|
-
}
|
|
33
|
-
async function evaluateMediaBinding(
|
|
34
|
-
headers: Headers,
|
|
35
|
-
stream: ReadableStream,
|
|
36
|
-
binding: MediaBinding
|
|
37
|
-
): Promise<Response> {
|
|
38
|
-
const inputOptions = JSON.parse(
|
|
39
|
-
headers.get("x-cf-media-input-options") as string
|
|
40
|
-
);
|
|
41
|
-
const outputOptions = JSON.parse(
|
|
42
|
-
headers.get("x-cf-media-output-options") as string
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
const result = await binding
|
|
46
|
-
.input(stream)
|
|
47
|
-
.transform(inputOptions)
|
|
48
|
-
.output(outputOptions);
|
|
49
|
-
|
|
50
|
-
return new Response(await result.media(), {
|
|
51
|
-
headers: {
|
|
52
|
-
"x-cf-media-content-type": await result.contentType(),
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
24
|
/**
|
|
58
25
|
* For most bindings, we expose them as
|
|
59
26
|
* - RPC stubs directly to capnweb, or
|
|
@@ -187,13 +154,6 @@ export default {
|
|
|
187
154
|
originalHeaders.set(name, value);
|
|
188
155
|
}
|
|
189
156
|
}
|
|
190
|
-
if (isSpecialCaseMediaBindingRequest(originalHeaders)) {
|
|
191
|
-
return evaluateMediaBinding(
|
|
192
|
-
originalHeaders,
|
|
193
|
-
request.body as ReadableStream,
|
|
194
|
-
fetcher as unknown as MediaBinding
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
157
|
|
|
198
158
|
return fetcher.fetch(
|
|
199
159
|
request.headers.get("MF-URL") ?? "http://example.com",
|
package/templates/tsconfig.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"include": ["**/*.ts"],
|
|
7
7
|
"exclude": [
|
|
8
8
|
"__tests__",
|
|
9
|
-
"./init-tests/**",
|
|
10
9
|
// Note: `startDevWorker` and `middleware` should also be included but some work is needed
|
|
11
10
|
// for that first (see: https://github.com/cloudflare/workers-sdk/issues/8303)
|
|
12
11
|
"startDevWorker",
|