wrangler 3.114.11 → 3.114.12
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 +6 -6
- package/wrangler-dist/cli.js +56 -20
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.114.
|
3
|
+
"version": "3.114.12",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -57,9 +57,9 @@
|
|
57
57
|
"esbuild": "0.17.19",
|
58
58
|
"path-to-regexp": "6.3.0",
|
59
59
|
"unenv": "2.0.0-rc.14",
|
60
|
-
"workerd": "1.
|
61
|
-
"
|
62
|
-
"
|
60
|
+
"workerd": "1.20250718.0",
|
61
|
+
"miniflare": "3.20250718.0",
|
62
|
+
"@cloudflare/kv-asset-handler": "0.3.4"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -137,9 +137,9 @@
|
|
137
137
|
"xdg-app-paths": "^8.3.0",
|
138
138
|
"xxhash-wasm": "^1.0.1",
|
139
139
|
"yargs": "^17.7.2",
|
140
|
-
"@cloudflare/cli": "1.1.1",
|
141
140
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
142
|
-
"@cloudflare/
|
141
|
+
"@cloudflare/cli": "1.1.1",
|
142
|
+
"@cloudflare/pages-shared": "0.13.19",
|
143
143
|
"@cloudflare/workers-shared": "0.15.1",
|
144
144
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
145
145
|
},
|
package/wrangler-dist/cli.js
CHANGED
@@ -81450,7 +81450,7 @@ var import_undici3 = __toESM(require_undici());
|
|
81450
81450
|
|
81451
81451
|
// package.json
|
81452
81452
|
var name = "wrangler";
|
81453
|
-
var version = "3.114.
|
81453
|
+
var version = "3.114.12";
|
81454
81454
|
|
81455
81455
|
// src/environment-variables/misc-variables.ts
|
81456
81456
|
init_import_meta_url();
|
@@ -102547,7 +102547,10 @@ async function getPackageManager(cwd2) {
|
|
102547
102547
|
return { ...PnpmPackageManager, cwd: cwd2 };
|
102548
102548
|
} else {
|
102549
102549
|
throw new UserError(
|
102550
|
-
"Unable to find a package manager. Supported managers are: npm, yarn, and pnpm."
|
102550
|
+
"Unable to find a package manager. Supported managers are: npm, yarn, and pnpm.",
|
102551
|
+
{
|
102552
|
+
telemetryMessage: true
|
102553
|
+
}
|
102551
102554
|
);
|
102552
102555
|
}
|
102553
102556
|
}
|
@@ -120163,7 +120166,8 @@ async function getEntry(args, config, command2) {
|
|
120163
120166
|
} else {
|
120164
120167
|
if (config.pages_build_output_dir && command2 === "dev") {
|
120165
120168
|
throw new UserError(
|
120166
|
-
"It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead."
|
120169
|
+
"It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead.",
|
120170
|
+
{ telemetryMessage: true }
|
120167
120171
|
);
|
120168
120172
|
}
|
120169
120173
|
const compatibilityDateStr = [
|
@@ -120226,7 +120230,8 @@ async function getEntry(args, config, command2) {
|
|
120226
120230
|
${addScriptName}
|
120227
120231
|
${addScriptNameExamples}
|
120228
120232
|
${migrateText}
|
120229
|
-
${migrateUrl}
|
120233
|
+
${migrateUrl}`,
|
120234
|
+
{ telemetryMessage: "tried to use DO with service worker" }
|
120230
120235
|
);
|
120231
120236
|
}
|
120232
120237
|
return {
|
@@ -136702,6 +136707,11 @@ var r2ObjectGetCommand = createCommand({
|
|
136702
136707
|
type: "string"
|
136703
136708
|
}
|
136704
136709
|
},
|
136710
|
+
behaviour: {
|
136711
|
+
printBanner({ pipe }) {
|
136712
|
+
return !pipe;
|
136713
|
+
}
|
136714
|
+
},
|
136705
136715
|
positionalArgs: ["objectPath"],
|
136706
136716
|
async handler(objectGetYargs, { config }) {
|
136707
136717
|
const { objectPath, pipe, jurisdiction } = objectGetYargs;
|
@@ -147512,13 +147522,23 @@ function printTokenPermissions(user) {
|
|
147512
147522
|
`\u{1F513} To see token permissions visit https://dash.cloudflare.com/${user.authType === "User API Token" ? "profile" : user.accounts[0].id}/api-tokens.`
|
147513
147523
|
);
|
147514
147524
|
}
|
147515
|
-
logger.log(
|
147516
|
-
`\u{1F513} Token Permissions: If scopes are missing, you may need to logout and re-login.`
|
147517
|
-
);
|
147525
|
+
logger.log(`\u{1F513} Token Permissions:`);
|
147518
147526
|
logger.log(`Scope (Access)`);
|
147527
|
+
const expectedScopes = new Set(DefaultScopeKeys);
|
147519
147528
|
for (const [scope, access4] of permissions) {
|
147529
|
+
expectedScopes.delete(`${scope}:${access4}`);
|
147520
147530
|
logger.log(`- ${scope} ${access4 ? `(${access4})` : ``}`);
|
147521
147531
|
}
|
147532
|
+
if (expectedScopes.size > 0) {
|
147533
|
+
logger.log("");
|
147534
|
+
logger.log(
|
147535
|
+
formatMessage({
|
147536
|
+
text: "Wrangler is missing some expected Oauth scopes. To fix this, run `wrangler login` to refresh your token. The missing scopes are:",
|
147537
|
+
kind: "warning",
|
147538
|
+
notes: [...expectedScopes.values()].map((s5) => ({ text: `- ${s5}` }))
|
147539
|
+
})
|
147540
|
+
);
|
147541
|
+
}
|
147522
147542
|
}
|
147523
147543
|
__name(printTokenPermissions, "printTokenPermissions");
|
147524
147544
|
async function printMembershipInfo(user, accountFilter) {
|
@@ -153958,12 +153978,15 @@ Edits that have been made via the script API will be overridden by your local co
|
|
153958
153978
|
}
|
153959
153979
|
if (!(props.compatibilityDate || config.compatibility_date)) {
|
153960
153980
|
const compatibilityDateStr = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1 + "").padStart(2, "0")}-${((/* @__PURE__ */ new Date()).getDate() + "").padStart(2, "0")}`;
|
153961
|
-
throw new UserError(
|
153981
|
+
throw new UserError(
|
153982
|
+
`A compatibility_date is required when publishing. Add the following to your ${configFileName(config.configPath)} file:
|
153962
153983
|
\`\`\`
|
153963
153984
|
${formatConfigSnippet({ compatibility_date: compatibilityDateStr }, config.configPath, false)}
|
153964
153985
|
\`\`\`
|
153965
153986
|
Or you could pass it in your terminal as \`--compatibility-date ${compatibilityDateStr}\`
|
153966
|
-
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information
|
153987
|
+
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information.`,
|
153988
|
+
{ telemetryMessage: "missing compatibiltiy date when deploying" }
|
153989
|
+
);
|
153967
153990
|
}
|
153968
153991
|
const routes = props.routes ?? config.routes ?? (config.route ? [config.route] : []) ?? [];
|
153969
153992
|
validateRoutes3(routes, props.assetsOptions);
|
@@ -154016,22 +154039,26 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
154016
154039
|
}
|
154017
154040
|
if (!props.isWorkersSite && Boolean(props.legacyAssetPaths) && format11 === "service-worker") {
|
154018
154041
|
throw new UserError(
|
154019
|
-
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/"
|
154042
|
+
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/",
|
154043
|
+
{ telemetryMessage: true }
|
154020
154044
|
);
|
154021
154045
|
}
|
154022
154046
|
if (config.wasm_modules && format11 === "modules") {
|
154023
154047
|
throw new UserError(
|
154024
|
-
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code"
|
154048
|
+
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code",
|
154049
|
+
{ telemetryMessage: true }
|
154025
154050
|
);
|
154026
154051
|
}
|
154027
154052
|
if (config.text_blobs && format11 === "modules") {
|
154028
154053
|
throw new UserError(
|
154029
|
-
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file
|
154054
|
+
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
|
154055
|
+
{ telemetryMessage: "[text_blobs] with an ES module worker" }
|
154030
154056
|
);
|
154031
154057
|
}
|
154032
154058
|
if (config.data_blobs && format11 === "modules") {
|
154033
154059
|
throw new UserError(
|
154034
|
-
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file
|
154060
|
+
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
|
154061
|
+
{ telemetryMessage: "[data_blobs] with an ES module worker" }
|
154035
154062
|
);
|
154036
154063
|
}
|
154037
154064
|
let sourceMapSize;
|
@@ -154323,7 +154350,8 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
154323
154350
|
err.preventReport();
|
154324
154351
|
if (err.notes[0].text === "binding DB of type d1 must have a valid `id` specified [code: 10021]") {
|
154325
154352
|
throw new UserError(
|
154326
|
-
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development"
|
154353
|
+
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development",
|
154354
|
+
{ telemetryMessage: true }
|
154327
154355
|
);
|
154328
154356
|
}
|
154329
154357
|
const maybeNameToFilePath = /* @__PURE__ */ __name((moduleName) => {
|
@@ -154426,7 +154454,8 @@ async function publishRoutesFallback(routes, {
|
|
154426
154454
|
}) {
|
154427
154455
|
if (notProd) {
|
154428
154456
|
throw new UserError(
|
154429
|
-
"Service environments combined with an API token that doesn't have 'All Zones' permissions is not supported.\nEither turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth"
|
154457
|
+
"Service environments combined with an API token that doesn't have 'All Zones' permissions is not supported.\nEither turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth",
|
154458
|
+
{ telemetryMessage: true }
|
154430
154459
|
);
|
154431
154460
|
}
|
154432
154461
|
logger.warn(
|
@@ -154485,7 +154514,8 @@ async function publishRoutesFallback(routes, {
|
|
154485
154514
|
continue;
|
154486
154515
|
} else {
|
154487
154516
|
throw new UserError(
|
154488
|
-
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}"
|
154517
|
+
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}".`,
|
154518
|
+
{ telemetryMessage: "route already associated with another worker" }
|
154489
154519
|
);
|
154490
154520
|
}
|
154491
154521
|
}
|
@@ -154572,7 +154602,8 @@ async function updateQueueConsumers(scriptName, config) {
|
|
154572
154602
|
} else {
|
154573
154603
|
if (scriptName === void 0) {
|
154574
154604
|
throw new UserError(
|
154575
|
-
"Script name is required to update queue consumers"
|
154605
|
+
"Script name is required to update queue consumers",
|
154606
|
+
{ telemetryMessage: true }
|
154576
154607
|
);
|
154577
154608
|
}
|
154578
154609
|
const body = {
|
@@ -154936,7 +154967,8 @@ function validateAssetsArgsAndConfig(args, config) {
|
|
154936
154967
|
}
|
154937
154968
|
if ("legacy" in args ? args.assets && args.legacy.site : (args.assets || config?.assets) && (args.site || config?.site)) {
|
154938
154969
|
throw new UserError(
|
154939
|
-
"Cannot use assets and Workers Sites in the same Worker.\nPlease remove either the `site` or `assets` field from your configuration file."
|
154970
|
+
"Cannot use assets and Workers Sites in the same Worker.\nPlease remove either the `site` or `assets` field from your configuration file.",
|
154971
|
+
{ telemetryMessage: true }
|
154940
154972
|
);
|
154941
154973
|
}
|
154942
154974
|
const noOpEntrypoint = path65.resolve(
|
@@ -156110,7 +156142,10 @@ function getBindings2(configParam, env6, local, args) {
|
|
156110
156142
|
({ binding, preview_bucket_name, bucket_name, jurisdiction }) => {
|
156111
156143
|
if (!preview_bucket_name && !local) {
|
156112
156144
|
throw new UserError(
|
156113
|
-
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file
|
156145
|
+
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file`,
|
156146
|
+
{
|
156147
|
+
telemetryMessage: "no preview r2 bucket configured in remote dev"
|
156148
|
+
}
|
156114
156149
|
);
|
156115
156150
|
}
|
156116
156151
|
return {
|
@@ -156133,7 +156168,8 @@ function getBindings2(configParam, env6, local, args) {
|
|
156133
156168
|
const connectionStringFromEnv = process.env[`WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive2.binding}`];
|
156134
156169
|
if (local && connectionStringFromEnv === void 0 && hyperdrive2.localConnectionString === void 0) {
|
156135
156170
|
throw new UserError(
|
156136
|
-
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive2.binding}' variable or "${hyperdrive2.binding}"'s "localConnectionString" to the Postgres connection string
|
156171
|
+
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive2.binding}' variable or "${hyperdrive2.binding}"'s "localConnectionString" to the Postgres connection string.`,
|
156172
|
+
{ telemetryMessage: "no local hyperdrive connection string" }
|
156137
156173
|
);
|
156138
156174
|
}
|
156139
156175
|
if (connectionStringFromEnv) {
|