wrangler 4.59.1 → 4.59.2
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 +9 -9
- package/wrangler-dist/cli.js +133 -29
- package/wrangler-dist/metafile-cjs.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.59.
|
|
3
|
+
"version": "4.59.2",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"esbuild": "0.27.0",
|
|
55
55
|
"path-to-regexp": "6.3.0",
|
|
56
56
|
"unenv": "2.0.0-rc.24",
|
|
57
|
-
"workerd": "1.
|
|
58
|
-
"@cloudflare/kv-asset-handler": "0.4.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
57
|
+
"workerd": "1.20260114.0",
|
|
58
|
+
"@cloudflare/kv-asset-handler": "0.4.2",
|
|
59
|
+
"miniflare": "4.20260114.0",
|
|
60
|
+
"@cloudflare/unenv-preset": "2.10.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
64
64
|
"@cloudflare/types": "6.18.4",
|
|
65
|
-
"@cloudflare/workers-types": "^4.
|
|
65
|
+
"@cloudflare/workers-types": "^4.20260114.0",
|
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
|
67
67
|
"@netlify/build-info": "^10.2.0",
|
|
68
68
|
"@sentry/node": "^7.86.0",
|
|
@@ -151,14 +151,14 @@
|
|
|
151
151
|
"@cloudflare/cli": "1.2.0",
|
|
152
152
|
"@cloudflare/containers-shared": "0.8.0",
|
|
153
153
|
"@cloudflare/eslint-config-shared": "1.1.0",
|
|
154
|
-
"@cloudflare/pages-shared": "^0.13.
|
|
155
|
-
"@cloudflare/workers-shared": "0.18.9",
|
|
154
|
+
"@cloudflare/pages-shared": "^0.13.99",
|
|
156
155
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
156
|
+
"@cloudflare/workers-shared": "0.18.9",
|
|
157
157
|
"@cloudflare/workers-utils": "0.7.0",
|
|
158
158
|
"@cloudflare/workflows-shared": "0.4.0"
|
|
159
159
|
},
|
|
160
160
|
"peerDependencies": {
|
|
161
|
-
"@cloudflare/workers-types": "^4.
|
|
161
|
+
"@cloudflare/workers-types": "^4.20260114.0"
|
|
162
162
|
},
|
|
163
163
|
"peerDependenciesMeta": {
|
|
164
164
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -48570,7 +48570,7 @@ var name, version;
|
|
|
48570
48570
|
var init_package = __esm({
|
|
48571
48571
|
"package.json"() {
|
|
48572
48572
|
name = "wrangler";
|
|
48573
|
-
version = "4.59.
|
|
48573
|
+
version = "4.59.2";
|
|
48574
48574
|
}
|
|
48575
48575
|
});
|
|
48576
48576
|
|
|
@@ -120695,7 +120695,7 @@ function toErrorClass(rawError) {
|
|
|
120695
120695
|
case "invalid_token":
|
|
120696
120696
|
return new ErrorInvalidToken(rawError);
|
|
120697
120697
|
default:
|
|
120698
|
-
return new ErrorUnknown();
|
|
120698
|
+
return new ErrorUnknown(rawError);
|
|
120699
120699
|
}
|
|
120700
120700
|
}
|
|
120701
120701
|
function isReturningFromAuthServer(query) {
|
|
@@ -121314,7 +121314,7 @@ var init_user2 = __esm({
|
|
|
121314
121314
|
return "ErrorOAuth2";
|
|
121315
121315
|
}
|
|
121316
121316
|
};
|
|
121317
|
-
ErrorUnknown = class extends
|
|
121317
|
+
ErrorUnknown = class extends UserError {
|
|
121318
121318
|
static {
|
|
121319
121319
|
__name(this, "ErrorUnknown");
|
|
121320
121320
|
}
|
|
@@ -166307,6 +166307,66 @@ function isCertificateError(e8) {
|
|
|
166307
166307
|
(errorText) => message.includes(errorText) || causeMessage.includes(errorText)
|
|
166308
166308
|
);
|
|
166309
166309
|
}
|
|
166310
|
+
function isPermissionError(e8) {
|
|
166311
|
+
if (e8 && typeof e8 === "object" && "code" in e8 && (e8.code === "EPERM" || e8.code === "EACCES") && "message" in e8) {
|
|
166312
|
+
return true;
|
|
166313
|
+
}
|
|
166314
|
+
if (e8 instanceof Error && e8.cause) {
|
|
166315
|
+
return isPermissionError(e8.cause);
|
|
166316
|
+
}
|
|
166317
|
+
return false;
|
|
166318
|
+
}
|
|
166319
|
+
function isCloudflareAPI(text) {
|
|
166320
|
+
return text.includes("api.cloudflare.com") || text.includes("dash.cloudflare.com");
|
|
166321
|
+
}
|
|
166322
|
+
function isCloudflareAPIDNSError(e8) {
|
|
166323
|
+
const hasDNSErrorCode = /* @__PURE__ */ __name((obj) => {
|
|
166324
|
+
return obj !== null && typeof obj === "object" && "code" in obj && obj.code === "ENOTFOUND";
|
|
166325
|
+
}, "hasDNSErrorCode");
|
|
166326
|
+
if (hasDNSErrorCode(e8)) {
|
|
166327
|
+
const message = e8 instanceof Error ? e8.message : String(e8);
|
|
166328
|
+
if (isCloudflareAPI(message)) {
|
|
166329
|
+
return true;
|
|
166330
|
+
}
|
|
166331
|
+
if (e8 && typeof e8 === "object" && "hostname" in e8 && typeof e8.hostname === "string") {
|
|
166332
|
+
if (isCloudflareAPI(e8.hostname)) {
|
|
166333
|
+
return true;
|
|
166334
|
+
}
|
|
166335
|
+
}
|
|
166336
|
+
}
|
|
166337
|
+
if (e8 instanceof Error && e8.cause && hasDNSErrorCode(e8.cause)) {
|
|
166338
|
+
const causeMessage = e8.cause instanceof Error ? e8.cause.message : String(e8.cause);
|
|
166339
|
+
const parentMessage = e8.message;
|
|
166340
|
+
if (isCloudflareAPI(causeMessage) || isCloudflareAPI(parentMessage)) {
|
|
166341
|
+
return true;
|
|
166342
|
+
}
|
|
166343
|
+
if (typeof e8.cause === "object" && "hostname" in e8.cause && typeof e8.cause.hostname === "string") {
|
|
166344
|
+
if (isCloudflareAPI(e8.cause.hostname)) {
|
|
166345
|
+
return true;
|
|
166346
|
+
}
|
|
166347
|
+
}
|
|
166348
|
+
}
|
|
166349
|
+
return false;
|
|
166350
|
+
}
|
|
166351
|
+
function isCloudflareAPIConnectionTimeoutError(e8) {
|
|
166352
|
+
const hasTimeoutCode = /* @__PURE__ */ __name((obj) => {
|
|
166353
|
+
return obj !== null && typeof obj === "object" && "code" in obj && obj.code === "UND_ERR_CONNECT_TIMEOUT";
|
|
166354
|
+
}, "hasTimeoutCode");
|
|
166355
|
+
if (hasTimeoutCode(e8)) {
|
|
166356
|
+
const message = e8 instanceof Error ? e8.message : String(e8);
|
|
166357
|
+
if (isCloudflareAPI(message)) {
|
|
166358
|
+
return true;
|
|
166359
|
+
}
|
|
166360
|
+
}
|
|
166361
|
+
if (e8 instanceof Error && e8.cause && hasTimeoutCode(e8.cause)) {
|
|
166362
|
+
const causeMessage = e8.cause instanceof Error ? e8.cause.message : String(e8.cause);
|
|
166363
|
+
const parentMessage = e8.message;
|
|
166364
|
+
if (isCloudflareAPI(causeMessage) || isCloudflareAPI(parentMessage)) {
|
|
166365
|
+
return true;
|
|
166366
|
+
}
|
|
166367
|
+
}
|
|
166368
|
+
return false;
|
|
166369
|
+
}
|
|
166310
166370
|
async function handleError(e8, args, subCommandParts) {
|
|
166311
166371
|
let mayReport = true;
|
|
166312
166372
|
let errorType;
|
|
@@ -166317,6 +166377,59 @@ async function handleError(e8, args, subCommandParts) {
|
|
|
166317
166377
|
"Wrangler detected that a corporate proxy or VPN might be enabled on your machine, resulting in API calls failing due to a certificate mismatch. It is likely that you need to install the missing system roots provided by your corporate proxy vendor."
|
|
166318
166378
|
);
|
|
166319
166379
|
}
|
|
166380
|
+
if (isCloudflareAPIDNSError(e8)) {
|
|
166381
|
+
mayReport = false;
|
|
166382
|
+
errorType = "DNSError";
|
|
166383
|
+
logger.error(esm_default3`
|
|
166384
|
+
Unable to resolve Cloudflare's API hostname (api.cloudflare.com or dash.cloudflare.com).
|
|
166385
|
+
|
|
166386
|
+
This is typically caused by:
|
|
166387
|
+
- No internet connection or network connectivity issues
|
|
166388
|
+
- DNS resolver not configured or not responding
|
|
166389
|
+
- Firewall or VPN blocking DNS requests
|
|
166390
|
+
- Corporate network with restricted DNS
|
|
166391
|
+
|
|
166392
|
+
Please check your network connection and DNS settings.
|
|
166393
|
+
`);
|
|
166394
|
+
return errorType;
|
|
166395
|
+
}
|
|
166396
|
+
if (isPermissionError(e8)) {
|
|
166397
|
+
mayReport = false;
|
|
166398
|
+
errorType = "PermissionError";
|
|
166399
|
+
const errorMessage = e8 instanceof Error ? e8.message : String(e8);
|
|
166400
|
+
let path83 = null;
|
|
166401
|
+
if (e8 && typeof e8 === "object" && "path" in e8 && typeof e8.path === "string") {
|
|
166402
|
+
path83 = e8.path;
|
|
166403
|
+
}
|
|
166404
|
+
if (!path83 && e8 instanceof Error && e8.cause && typeof e8.cause === "object" && "path" in e8.cause && typeof e8.cause.path === "string") {
|
|
166405
|
+
path83 = e8.cause.path;
|
|
166406
|
+
}
|
|
166407
|
+
logger.debug(`Permission error: ${errorMessage}`);
|
|
166408
|
+
const errorDetails = path83 ? `
|
|
166409
|
+
Affected path: ${path83}
|
|
166410
|
+
` : `
|
|
166411
|
+
Error: ${errorMessage}
|
|
166412
|
+
`;
|
|
166413
|
+
logger.error(esm_default3`
|
|
166414
|
+
A permission error occurred while accessing the file system.
|
|
166415
|
+
${errorDetails}
|
|
166416
|
+
This is typically caused by:
|
|
166417
|
+
- Insufficient file or directory permissions
|
|
166418
|
+
- Files or directories being locked by another process
|
|
166419
|
+
- Antivirus or security software blocking access
|
|
166420
|
+
|
|
166421
|
+
Please check the file permissions and try again.
|
|
166422
|
+
`);
|
|
166423
|
+
return errorType;
|
|
166424
|
+
}
|
|
166425
|
+
if (isCloudflareAPIConnectionTimeoutError(e8)) {
|
|
166426
|
+
mayReport = false;
|
|
166427
|
+
errorType = "ConnectionTimeout";
|
|
166428
|
+
logger.error(
|
|
166429
|
+
"The request to Cloudflare's API timed out.\nThis is likely due to network connectivity issues or slow network speeds.\nPlease check your internet connection and try again."
|
|
166430
|
+
);
|
|
166431
|
+
return errorType;
|
|
166432
|
+
}
|
|
166320
166433
|
if (e8 instanceof CommandLineArgsError) {
|
|
166321
166434
|
logger.error(e8.message);
|
|
166322
166435
|
const nonFlagArgs = subCommandParts.filter(
|
|
@@ -166432,6 +166545,7 @@ var init_handle_errors = __esm({
|
|
|
166432
166545
|
init_dist();
|
|
166433
166546
|
init_source();
|
|
166434
166547
|
init_cloudflare();
|
|
166548
|
+
init_esm2();
|
|
166435
166549
|
init_src3();
|
|
166436
166550
|
init_cfetch();
|
|
166437
166551
|
init_config();
|
|
@@ -166451,6 +166565,10 @@ var init_handle_errors = __esm({
|
|
|
166451
166565
|
SSL_ERROR_UNABLE_TO_GET_ISSUER
|
|
166452
166566
|
];
|
|
166453
166567
|
__name(isCertificateError, "isCertificateError");
|
|
166568
|
+
__name(isPermissionError, "isPermissionError");
|
|
166569
|
+
__name(isCloudflareAPI, "isCloudflareAPI");
|
|
166570
|
+
__name(isCloudflareAPIDNSError, "isCloudflareAPIDNSError");
|
|
166571
|
+
__name(isCloudflareAPIConnectionTimeoutError, "isCloudflareAPIConnectionTimeoutError");
|
|
166454
166572
|
__name(handleError, "handleError");
|
|
166455
166573
|
}
|
|
166456
166574
|
});
|
|
@@ -169026,18 +169144,6 @@ var init_splitter = __esm({
|
|
|
169026
169144
|
__name(isCompoundStatementEnd, "isCompoundStatementEnd");
|
|
169027
169145
|
}
|
|
169028
169146
|
});
|
|
169029
|
-
function isSqliteUserError(error2) {
|
|
169030
|
-
if (!(error2 instanceof Error)) {
|
|
169031
|
-
return false;
|
|
169032
|
-
}
|
|
169033
|
-
const message = error2.message.toUpperCase();
|
|
169034
|
-
for (const code of SQLITE_RESULT_CODES) {
|
|
169035
|
-
if (message.includes(code)) {
|
|
169036
|
-
return true;
|
|
169037
|
-
}
|
|
169038
|
-
}
|
|
169039
|
-
return false;
|
|
169040
|
-
}
|
|
169041
169147
|
async function executeSql({
|
|
169042
169148
|
local,
|
|
169043
169149
|
remote,
|
|
@@ -169126,10 +169232,7 @@ async function executeLocally({
|
|
|
169126
169232
|
results = await db.batch(queries.map((query) => db.prepare(query)));
|
|
169127
169233
|
} catch (e8) {
|
|
169128
169234
|
const cause = e8?.cause ?? e8;
|
|
169129
|
-
|
|
169130
|
-
throw new UserError(cause.message);
|
|
169131
|
-
}
|
|
169132
|
-
throw cause;
|
|
169235
|
+
throw new UserError(cause.message);
|
|
169133
169236
|
} finally {
|
|
169134
169237
|
await mf.dispose();
|
|
169135
169238
|
}
|
|
@@ -169391,7 +169494,7 @@ async function checkForSQLiteBinary(filename) {
|
|
|
169391
169494
|
);
|
|
169392
169495
|
}
|
|
169393
169496
|
}
|
|
169394
|
-
var import_md5_file, import_undici12,
|
|
169497
|
+
var import_md5_file, import_undici12, d1ExecuteCommand;
|
|
169395
169498
|
var init_execute = __esm({
|
|
169396
169499
|
"src/d1/execute.ts"() {
|
|
169397
169500
|
init_import_meta_url();
|
|
@@ -169409,13 +169512,6 @@ var init_execute = __esm({
|
|
|
169409
169512
|
init_user3();
|
|
169410
169513
|
init_splitter();
|
|
169411
169514
|
init_utils4();
|
|
169412
|
-
SQLITE_RESULT_CODES = [
|
|
169413
|
-
"SQLITE_ERROR",
|
|
169414
|
-
"SQLITE_CONSTRAINT",
|
|
169415
|
-
"SQLITE_MISMATCH",
|
|
169416
|
-
"SQLITE_AUTH"
|
|
169417
|
-
];
|
|
169418
|
-
__name(isSqliteUserError, "isSqliteUserError");
|
|
169419
169515
|
d1ExecuteCommand = createCommand({
|
|
169420
169516
|
metadata: {
|
|
169421
169517
|
description: "Execute a command or SQL file",
|
|
@@ -222225,7 +222321,15 @@ var init_validate3 = __esm({
|
|
|
222225
222321
|
const directory = path4.resolve(args.directory);
|
|
222226
222322
|
const fileCountLimit = args.fileCountLimit ?? MAX_ASSET_COUNT_DEFAULT;
|
|
222227
222323
|
const walk = /* @__PURE__ */ __name(async (dir, fileMap2 = /* @__PURE__ */ new Map(), startingDir = dir) => {
|
|
222228
|
-
|
|
222324
|
+
let files;
|
|
222325
|
+
try {
|
|
222326
|
+
files = await fs13.readdir(dir);
|
|
222327
|
+
} catch (e8) {
|
|
222328
|
+
if (e8.code === "ENOENT") {
|
|
222329
|
+
throw new FatalError(e8.message);
|
|
222330
|
+
}
|
|
222331
|
+
throw e8;
|
|
222332
|
+
}
|
|
222229
222333
|
await Promise.all(
|
|
222230
222334
|
files.map(async (file) => {
|
|
222231
222335
|
const filepath = path4.join(dir, file);
|
|
@@ -226463,7 +226567,7 @@ var init_secret = __esm({
|
|
|
226463
226567
|
} catch (e8) {
|
|
226464
226568
|
if (e8 instanceof APIError && e8.code === VERSION_NOT_DEPLOYED_ERR_CODE) {
|
|
226465
226569
|
throw new UserError(
|
|
226466
|
-
"Secret edit failed. You attempted to modify a secret, but the latest version of your Worker isn't currently deployed
|
|
226570
|
+
"Secret edit failed. You attempted to modify a secret, but the latest version of your Worker isn't currently deployed.\nThis limitation exists to prevent accidental deployment when using Worker versions and secrets together.\nTo resolve this, you have two options:\n(1) use the `wrangler versions secret put` instead, which allows you to update secrets without deploying; or\n(2) deploy the latest version first, then modify secrets.\nAlternatively, you can use the Cloudflare dashboard to modify secrets and deploy the version."
|
|
226467
226571
|
);
|
|
226468
226572
|
} else {
|
|
226469
226573
|
throw e8;
|