wrangler 3.111.0 → 3.113.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/package.json +12 -11
- package/templates/pages-dev-pipeline.ts +3 -2
- package/templates/tsconfig.json +8 -1
- package/wrangler-dist/cli.d.ts +23 -15
- package/wrangler-dist/cli.js +2862 -2719
- package/wrangler-dist/cli.js.map +4 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.113.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -50,20 +50,21 @@
|
|
50
50
|
"config-schema.json"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
+
"@cloudflare/unenv-preset": "2.0.0",
|
53
54
|
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
|
54
55
|
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
|
55
56
|
"blake3-wasm": "2.1.5",
|
56
57
|
"esbuild": "0.17.19",
|
57
58
|
"path-to-regexp": "6.3.0",
|
58
|
-
"unenv": "2.0.0-rc.
|
59
|
-
"workerd": "1.
|
59
|
+
"unenv": "2.0.0-rc.8",
|
60
|
+
"workerd": "1.20250224.0",
|
60
61
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
61
|
-
"miniflare": "3.
|
62
|
+
"miniflare": "3.20250224.0"
|
62
63
|
},
|
63
64
|
"devDependencies": {
|
64
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
65
66
|
"@cloudflare/types": "6.18.4",
|
66
|
-
"@cloudflare/workers-types": "^4.
|
67
|
+
"@cloudflare/workers-types": "^4.20250224.0",
|
67
68
|
"@cspotcode/source-map-support": "0.8.1",
|
68
69
|
"@iarna/toml": "^3.0.0",
|
69
70
|
"@microsoft/api-extractor": "^7.47.0",
|
@@ -137,14 +138,14 @@
|
|
137
138
|
"xdg-app-paths": "^8.3.0",
|
138
139
|
"xxhash-wasm": "^1.0.1",
|
139
140
|
"yargs": "^17.7.2",
|
141
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
142
|
+
"@cloudflare/pages-shared": "^0.13.12",
|
143
|
+
"@cloudflare/workers-shared": "0.14.5",
|
140
144
|
"@cloudflare/cli": "1.1.1",
|
141
|
-
"@cloudflare/
|
142
|
-
"@cloudflare/workers-shared": "0.14.4",
|
143
|
-
"@cloudflare/workers-tsconfig": "0.0.0",
|
144
|
-
"@cloudflare/eslint-config-worker": "1.1.0"
|
145
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
145
146
|
},
|
146
147
|
"peerDependencies": {
|
147
|
-
"@cloudflare/workers-types": "^4.
|
148
|
+
"@cloudflare/workers-types": "^4.20250224.0"
|
148
149
|
},
|
149
150
|
"peerDependenciesMeta": {
|
150
151
|
"@cloudflare/workers-types": {
|
@@ -169,7 +170,7 @@
|
|
169
170
|
"build": "pnpm run clean && pnpm run bundle && pnpm run emit-types && pnpm run generate-json-schema",
|
170
171
|
"bundle": "node -r esbuild-register scripts/bundle.ts",
|
171
172
|
"check:lint": "eslint . --max-warnings=0",
|
172
|
-
"check:type": "tsc",
|
173
|
+
"check:type": "tsc -p ./tsconfig.json && tsc -p ./templates/tsconfig.json",
|
173
174
|
"clean": "rimraf wrangler-dist miniflare-dist emitted-types",
|
174
175
|
"dev": "pnpm run clean && concurrently -c black,blue --kill-others-on-fail false \"pnpm run bundle --watch\" \"pnpm run check:type --watch --preserveWatchOutput\"",
|
175
176
|
"emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
|
@@ -20,10 +20,11 @@ export default <ExportedHandler<{ ASSETS: Fetcher }>>{
|
|
20
20
|
|
21
21
|
for (const include of routes.include) {
|
22
22
|
if (isRoutingRuleMatch(pathname, include)) {
|
23
|
-
|
23
|
+
const workerAsHandler = worker as ExportedHandler;
|
24
|
+
if (workerAsHandler.fetch === undefined) {
|
24
25
|
throw new TypeError("Entry point missing `fetch` handler");
|
25
26
|
}
|
26
|
-
return
|
27
|
+
return workerAsHandler.fetch(request, env, context);
|
27
28
|
}
|
28
29
|
}
|
29
30
|
|
package/templates/tsconfig.json
CHANGED
@@ -4,5 +4,12 @@
|
|
4
4
|
"types": ["@cloudflare/workers-types"]
|
5
5
|
},
|
6
6
|
"include": ["**/*.ts"],
|
7
|
-
"exclude": [
|
7
|
+
"exclude": [
|
8
|
+
"__tests__",
|
9
|
+
"./init-tests/**",
|
10
|
+
// Note: `startDevWorker` and `middleware` should also be included but some work is needed
|
11
|
+
// for that first (see: https://github.com/cloudflare/workers-sdk/issues/8303)
|
12
|
+
"startDevWorker",
|
13
|
+
"middleware"
|
14
|
+
]
|
8
15
|
}
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -74,20 +74,26 @@ declare type ApiCredentials = {
|
|
74
74
|
declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
|
75
75
|
|
76
76
|
declare const AssetConfigSchema: z.ZodObject<{
|
77
|
+
account_id: z.ZodOptional<z.ZodNumber>;
|
78
|
+
script_id: z.ZodOptional<z.ZodNumber>;
|
79
|
+
compatibility_date: z.ZodOptional<z.ZodString>;
|
80
|
+
compatibility_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
77
81
|
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
78
82
|
not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
|
79
|
-
serve_directly: z.ZodOptional<z.ZodBoolean>;
|
80
|
-
run_worker_first: z.ZodOptional<z.ZodBoolean>;
|
81
83
|
}, "strip", z.ZodTypeAny, {
|
84
|
+
account_id?: number;
|
85
|
+
script_id?: number;
|
86
|
+
compatibility_date?: string;
|
87
|
+
compatibility_flags?: string[];
|
82
88
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
83
89
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
84
|
-
serve_directly?: boolean;
|
85
|
-
run_worker_first?: boolean;
|
86
90
|
}, {
|
91
|
+
account_id?: number;
|
92
|
+
script_id?: number;
|
93
|
+
compatibility_date?: string;
|
94
|
+
compatibility_flags?: string[];
|
87
95
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
88
96
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
89
|
-
serve_directly?: boolean;
|
90
|
-
run_worker_first?: boolean;
|
91
97
|
}>;
|
92
98
|
|
93
99
|
declare type Assets = {
|
@@ -111,8 +117,10 @@ declare type Assets = {
|
|
111
117
|
declare type AssetsOptions = {
|
112
118
|
directory: string;
|
113
119
|
binding?: string;
|
114
|
-
|
120
|
+
routerConfig: RouterConfig;
|
115
121
|
assetConfig: AssetConfig;
|
122
|
+
_redirects?: string;
|
123
|
+
_headers?: string;
|
116
124
|
};
|
117
125
|
|
118
126
|
declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
|
@@ -26019,23 +26027,23 @@ declare namespace RetryHandler {
|
|
26019
26027
|
|
26020
26028
|
declare type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
|
26021
26029
|
|
26022
|
-
declare type
|
26030
|
+
declare type RouterConfig = z.infer<typeof RouterConfigSchema>;
|
26023
26031
|
|
26024
|
-
declare const
|
26025
|
-
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
26026
|
-
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
26032
|
+
declare const RouterConfigSchema: z.ZodObject<{
|
26027
26033
|
account_id: z.ZodOptional<z.ZodNumber>;
|
26028
26034
|
script_id: z.ZodOptional<z.ZodNumber>;
|
26035
|
+
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
26036
|
+
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
26029
26037
|
}, "strip", z.ZodTypeAny, {
|
26030
|
-
has_user_worker?: boolean;
|
26031
|
-
invoke_user_worker_ahead_of_assets?: boolean;
|
26032
26038
|
account_id?: number;
|
26033
26039
|
script_id?: number;
|
26034
|
-
}, {
|
26035
|
-
has_user_worker?: boolean;
|
26036
26040
|
invoke_user_worker_ahead_of_assets?: boolean;
|
26041
|
+
has_user_worker?: boolean;
|
26042
|
+
}, {
|
26037
26043
|
account_id?: number;
|
26038
26044
|
script_id?: number;
|
26045
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
26046
|
+
has_user_worker?: boolean;
|
26039
26047
|
}>;
|
26040
26048
|
|
26041
26049
|
/**
|