wrangler 4.157.0 → 4.159.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/bin/wrangler.js +24 -10
- package/config-schema.json +21 -6
- package/package.json +21 -21
- package/wrangler-dist/cli.d.ts +7 -0
- package/wrangler-dist/cli.js +3985 -10475
- package/wrangler-dist/experimental-config.d.mts +1 -1
- package/wrangler-dist/experimental-config.d.mts.map +1 -1
package/bin/wrangler.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const { spawn } = require("child_process");
|
|
3
|
+
const { constants } = require("node:os");
|
|
3
4
|
const path = require("path");
|
|
4
5
|
|
|
5
|
-
const MIN_NODE_VERSION = "22.
|
|
6
|
+
const MIN_NODE_VERSION = "22.12.0";
|
|
6
7
|
let wranglerProcess;
|
|
7
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Convert a child's exit result to the status expected by shell callers.
|
|
11
|
+
*
|
|
12
|
+
* @param {number | null | undefined} code
|
|
13
|
+
* @param {string | null} signal
|
|
14
|
+
* @returns {number}
|
|
15
|
+
*/
|
|
16
|
+
function getExitCode(code, signal) {
|
|
17
|
+
if (code !== undefined && code !== null) {
|
|
18
|
+
return code;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const signalNumber = signal && constants.signals[signal];
|
|
22
|
+
return signalNumber ? 128 + signalNumber : 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
8
25
|
/**
|
|
9
26
|
* Executes ../wrangler-dist/cli.js
|
|
10
27
|
*/
|
|
@@ -33,9 +50,7 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
|
|
|
33
50
|
stdio: ["inherit", "inherit", "inherit", "ipc"],
|
|
34
51
|
}
|
|
35
52
|
)
|
|
36
|
-
.on("exit", (code) =>
|
|
37
|
-
process.exit(code === undefined || code === null ? 0 : code)
|
|
38
|
-
)
|
|
53
|
+
.on("exit", (code, signal) => process.exit(getExitCode(code, signal)))
|
|
39
54
|
.on("message", (message) => {
|
|
40
55
|
if (process.send) {
|
|
41
56
|
process.send(message);
|
|
@@ -82,10 +97,9 @@ function semiver(a, b, bool) {
|
|
|
82
97
|
|
|
83
98
|
if (module === require.main) {
|
|
84
99
|
wranglerProcess = runWrangler();
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
100
|
+
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
101
|
+
process.on(signal, () => {
|
|
102
|
+
wranglerProcess && wranglerProcess.kill(signal);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
91
105
|
}
|
package/config-schema.json
CHANGED
|
@@ -786,6 +786,11 @@
|
|
|
786
786
|
"description": "The UUID of this D1 database (not required).",
|
|
787
787
|
"markdownDescription": "The UUID of this D1 database (not required)."
|
|
788
788
|
},
|
|
789
|
+
"jurisdiction": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"description": "The jurisdiction where an automatically provisioned D1 database will be created.",
|
|
792
|
+
"markdownDescription": "The jurisdiction where an automatically provisioned D1 database will be created."
|
|
793
|
+
},
|
|
789
794
|
"preview_database_id": {
|
|
790
795
|
"type": "string",
|
|
791
796
|
"description": "The UUID of this D1 database for Wrangler Dev (if specified).",
|
|
@@ -2646,6 +2651,11 @@
|
|
|
2646
2651
|
"description": "The UUID of this D1 database (not required).",
|
|
2647
2652
|
"markdownDescription": "The UUID of this D1 database (not required)."
|
|
2648
2653
|
},
|
|
2654
|
+
"jurisdiction": {
|
|
2655
|
+
"type": "string",
|
|
2656
|
+
"description": "The jurisdiction where an automatically provisioned D1 database will be created.",
|
|
2657
|
+
"markdownDescription": "The jurisdiction where an automatically provisioned D1 database will be created."
|
|
2658
|
+
},
|
|
2649
2659
|
"preview_database_id": {
|
|
2650
2660
|
"type": "string",
|
|
2651
2661
|
"description": "The UUID of this D1 database for Wrangler Dev (if specified).",
|
|
@@ -4442,19 +4452,19 @@
|
|
|
4442
4452
|
"type": "object",
|
|
4443
4453
|
"properties": {
|
|
4444
4454
|
"logpush": {
|
|
4445
|
-
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-
|
|
4455
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-628442004818536"
|
|
4446
4456
|
},
|
|
4447
4457
|
"observability": {
|
|
4448
|
-
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-
|
|
4458
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-628442004818536"
|
|
4449
4459
|
},
|
|
4450
4460
|
"limits": {
|
|
4451
|
-
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-
|
|
4461
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-628442004818536"
|
|
4452
4462
|
},
|
|
4453
4463
|
"placement": {
|
|
4454
|
-
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-
|
|
4464
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-628442004818536"
|
|
4455
4465
|
},
|
|
4456
4466
|
"cache": {
|
|
4457
|
-
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-
|
|
4467
|
+
"$ref": "#/definitions/interface-769040647-14884-25493-769040647-0-628442004818536"
|
|
4458
4468
|
},
|
|
4459
4469
|
"define": {
|
|
4460
4470
|
"type": "object",
|
|
@@ -4852,6 +4862,11 @@
|
|
|
4852
4862
|
"description": "The UUID of this D1 database (not required).",
|
|
4853
4863
|
"markdownDescription": "The UUID of this D1 database (not required)."
|
|
4854
4864
|
},
|
|
4865
|
+
"jurisdiction": {
|
|
4866
|
+
"type": "string",
|
|
4867
|
+
"description": "The jurisdiction where an automatically provisioned D1 database will be created.",
|
|
4868
|
+
"markdownDescription": "The jurisdiction where an automatically provisioned D1 database will be created."
|
|
4869
|
+
},
|
|
4855
4870
|
"preview_database_id": {
|
|
4856
4871
|
"type": "string",
|
|
4857
4872
|
"description": "The UUID of this D1 database for Wrangler Dev (if specified).",
|
|
@@ -5829,7 +5844,7 @@
|
|
|
5829
5844
|
"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`",
|
|
5830
5845
|
"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`"
|
|
5831
5846
|
},
|
|
5832
|
-
"interface-769040647-14884-25493-769040647-0-
|
|
5847
|
+
"interface-769040647-14884-25493-769040647-0-628442004818536": {
|
|
5833
5848
|
"type": "object",
|
|
5834
5849
|
"properties": {
|
|
5835
5850
|
"name": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.159.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -72,17 +72,17 @@
|
|
|
72
72
|
"esbuild": "0.28.2",
|
|
73
73
|
"path-to-regexp": "6.3.0",
|
|
74
74
|
"unenv": "2.0.0-rc.24",
|
|
75
|
-
"workerd": "1.
|
|
75
|
+
"workerd": "1.20261109.1",
|
|
76
76
|
"@cloudflare/kv-asset-handler": "0.5.0",
|
|
77
77
|
"@cloudflare/unenv-preset": "2.16.2",
|
|
78
|
-
"miniflare": "5.
|
|
78
|
+
"miniflare": "5.20261109.0-beta"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
82
82
|
"@aws-sdk/s3-request-presigner": "^3.721.0",
|
|
83
83
|
"@bomb.sh/tab": "^0.0.12",
|
|
84
84
|
"@cloudflare/types": "6.18.4",
|
|
85
|
-
"@cloudflare/workers-types": "^5.
|
|
85
|
+
"@cloudflare/workers-types": "^5.20261109.1",
|
|
86
86
|
"@netlify/build-info": "10.5.1",
|
|
87
87
|
"@sentry/node": "^7.86.0",
|
|
88
88
|
"@sentry/types": "^7.86.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"jsonc-parser": "3.2.0",
|
|
129
129
|
"md5-file": "5.0.0",
|
|
130
130
|
"mime": "^3.0.0",
|
|
131
|
-
"minimatch": "^5.1.
|
|
131
|
+
"minimatch": "^5.1.9",
|
|
132
132
|
"mock-socket": "^9.3.1",
|
|
133
133
|
"msw": "2.14.6",
|
|
134
134
|
"mysql2": "^3.15.3",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"resolve": "^1.22.8",
|
|
145
145
|
"rosie-skills": "^0.8.1",
|
|
146
146
|
"semiver": "^1.1.0",
|
|
147
|
-
"shell-quote": "^1.
|
|
147
|
+
"shell-quote": "^1.11.0",
|
|
148
148
|
"signal-exit": "4.1.0",
|
|
149
149
|
"smol-toml": "1.9.0",
|
|
150
150
|
"supports-color": "^9.2.2",
|
|
@@ -161,28 +161,28 @@
|
|
|
161
161
|
"vitest-websocket-mock": "^0.4.0",
|
|
162
162
|
"ws": "8.21.0",
|
|
163
163
|
"xxhash-wasm": "^1.0.1",
|
|
164
|
-
"yaml": "^2.8.
|
|
164
|
+
"yaml": "^2.8.3",
|
|
165
165
|
"yargs": "^17.7.2",
|
|
166
166
|
"zod": "4.6.6",
|
|
167
|
-
"@cloudflare/autoconfig": "0.
|
|
168
|
-
"@cloudflare/build-output-utils": "0.9.
|
|
169
|
-
"@cloudflare/cli-shared-helpers": "0.3.
|
|
170
|
-
"@cloudflare/config": "0.
|
|
171
|
-
"@cloudflare/containers-shared": "0.
|
|
172
|
-
"@cloudflare/deploy-helpers": "0.
|
|
173
|
-
"@cloudflare/pages-functions": "0.1.
|
|
174
|
-
"@cloudflare/pages-shared": "^0.13.
|
|
175
|
-
"@cloudflare/remote-bindings": "0.0.
|
|
176
|
-
"@cloudflare/runtime-types": "0.1.
|
|
167
|
+
"@cloudflare/autoconfig": "0.10.0",
|
|
168
|
+
"@cloudflare/build-output-utils": "0.9.11",
|
|
169
|
+
"@cloudflare/cli-shared-helpers": "0.3.5",
|
|
170
|
+
"@cloudflare/config": "0.31.0",
|
|
171
|
+
"@cloudflare/containers-shared": "0.24.0",
|
|
172
|
+
"@cloudflare/deploy-helpers": "0.26.1",
|
|
173
|
+
"@cloudflare/pages-functions": "0.1.7",
|
|
174
|
+
"@cloudflare/pages-shared": "^0.13.210",
|
|
175
|
+
"@cloudflare/remote-bindings": "0.0.61",
|
|
176
|
+
"@cloudflare/runtime-types": "0.1.24",
|
|
177
177
|
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
178
|
-
"@cloudflare/workers-auth": "0.
|
|
178
|
+
"@cloudflare/workers-auth": "0.17.0",
|
|
179
179
|
"@cloudflare/workers-shared": "0.20.2",
|
|
180
180
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
181
|
-
"@cloudflare/workers-utils": "0.
|
|
181
|
+
"@cloudflare/workers-utils": "0.52.1",
|
|
182
182
|
"@cloudflare/workflows-shared": "0.15.3"
|
|
183
183
|
},
|
|
184
184
|
"peerDependencies": {
|
|
185
|
-
"@cloudflare/workers-types": "^5.
|
|
185
|
+
"@cloudflare/workers-types": "^5.20261109.1"
|
|
186
186
|
},
|
|
187
187
|
"peerDependenciesMeta": {
|
|
188
188
|
"@cloudflare/workers-types": {
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"fsevents": "2.3.3"
|
|
194
194
|
},
|
|
195
195
|
"engines": {
|
|
196
|
-
"node": ">=22.
|
|
196
|
+
"node": ">=22.12.0"
|
|
197
197
|
},
|
|
198
198
|
"volta": {
|
|
199
199
|
"extends": "../../package.json"
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -265,6 +265,11 @@ interface GenerateTypesOptions {
|
|
|
265
265
|
* Whether to include runtime types in the output.
|
|
266
266
|
*/
|
|
267
267
|
includeRuntime?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Whether to infer `Cloudflare.GlobalProps.mainModule` from the Worker entrypoint.
|
|
270
|
+
* Defaults to true. Disabling this opts out of module-derived `ctx.exports` types.
|
|
271
|
+
*/
|
|
272
|
+
includeMainModule?: boolean;
|
|
268
273
|
/**
|
|
269
274
|
* Path to the declaration file for generated types.
|
|
270
275
|
*/
|
|
@@ -2372,6 +2377,8 @@ interface EnvironmentNonInheritable {
|
|
|
2372
2377
|
database_name?: string;
|
|
2373
2378
|
/** The UUID of this D1 database (not required). */
|
|
2374
2379
|
database_id?: string;
|
|
2380
|
+
/** The jurisdiction where an automatically provisioned D1 database will be created. */
|
|
2381
|
+
jurisdiction?: string;
|
|
2375
2382
|
/** The UUID of this D1 database for Wrangler Dev (if specified). */
|
|
2376
2383
|
preview_database_id?: string;
|
|
2377
2384
|
/** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
|