wrangler 3.114.5 → 3.114.7
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 +68 -38
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.114.
|
3
|
+
"version": "3.114.7",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -58,8 +58,8 @@
|
|
58
58
|
"path-to-regexp": "6.3.0",
|
59
59
|
"unenv": "2.0.0-rc.14",
|
60
60
|
"workerd": "1.20250408.0",
|
61
|
-
"
|
62
|
-
"
|
61
|
+
"@cloudflare/kv-asset-handler": "0.3.4",
|
62
|
+
"miniflare": "3.20250408.0"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -138,10 +138,10 @@
|
|
138
138
|
"xxhash-wasm": "^1.0.1",
|
139
139
|
"yargs": "^17.7.2",
|
140
140
|
"@cloudflare/cli": "1.1.1",
|
141
|
-
"@cloudflare/eslint-config-worker": "1.1.0",
|
142
|
-
"@cloudflare/workers-shared": "0.15.0",
|
143
141
|
"@cloudflare/pages-shared": "0.13.16",
|
144
|
-
"@cloudflare/workers-
|
142
|
+
"@cloudflare/workers-shared": "0.15.0",
|
143
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
144
|
+
"@cloudflare/eslint-config-worker": "1.1.0"
|
145
145
|
},
|
146
146
|
"peerDependencies": {
|
147
147
|
"@cloudflare/workers-types": "^4.20250408.0"
|
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.7";
|
81454
81454
|
|
81455
81455
|
// src/environment-variables/misc-variables.ts
|
81456
81456
|
init_import_meta_url();
|
@@ -85217,52 +85217,76 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args)
|
|
85217
85217
|
rawConfig,
|
85218
85218
|
isDispatchNamespace
|
85219
85219
|
);
|
85220
|
+
const isRedirectedConfig = configPath && configPath !== userConfigPath;
|
85221
|
+
const definedEnvironments = Object.keys(rawConfig.env ?? {});
|
85222
|
+
if (isRedirectedConfig && definedEnvironments.length > 0) {
|
85223
|
+
diagnostics.errors.push(
|
85224
|
+
dedent`
|
85225
|
+
Redirected configurations cannot include environments but the following have been found:\n${definedEnvironments.map((env6) => ` - ${env6}`).join("\n")}
|
85226
|
+
|
85227
|
+
|
85228
|
+
Such configurations are generated by tools, meaning that one of the tools
|
85229
|
+
your application is using is generating the incorrect configuration.
|
85230
|
+
Report this issue to the tool's author so that this can be fixed there.
|
85231
|
+
`
|
85232
|
+
);
|
85233
|
+
}
|
85220
85234
|
const envName = args.env;
|
85221
85235
|
(0, import_node_assert.default)(envName === void 0 || typeof envName === "string");
|
85222
85236
|
let activeEnv = topLevelEnv;
|
85223
85237
|
if (envName !== void 0) {
|
85224
|
-
|
85225
|
-
|
85226
|
-
|
85227
|
-
|
85228
|
-
|
85229
|
-
|
85230
|
-
|
85231
|
-
|
85232
|
-
|
85233
|
-
|
85234
|
-
envName
|
85235
|
-
|
85236
|
-
|
85237
|
-
|
85238
|
-
|
85239
|
-
|
85240
|
-
|
85241
|
-
|
85242
|
-
|
85243
|
-
|
85244
|
-
|
85245
|
-
|
85246
|
-
|
85247
|
-
|
85248
|
-
|
85249
|
-
|
85250
|
-
|
85251
|
-
|
85252
|
-
|
85253
|
-
|
85254
|
-
|
85238
|
+
if (isRedirectedConfig) {
|
85239
|
+
if (!isPagesConfig(rawConfig)) {
|
85240
|
+
diagnostics.errors.push(dedent`
|
85241
|
+
You have specified the environment "${envName}", but are using a redirected configuration, produced by a build tool such as Vite.
|
85242
|
+
You need to set the environment in your build tool, rather than via Wrangler.
|
85243
|
+
For example, if you are using Vite, refer to these docs: https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/
|
85244
|
+
`);
|
85245
|
+
}
|
85246
|
+
} else {
|
85247
|
+
const envDiagnostics = new Diagnostics(
|
85248
|
+
`"env.${envName}" environment configuration`
|
85249
|
+
);
|
85250
|
+
const rawEnv = rawConfig.env?.[envName];
|
85251
|
+
if (rawEnv !== void 0) {
|
85252
|
+
activeEnv = normalizeAndValidateEnvironment(
|
85253
|
+
envDiagnostics,
|
85254
|
+
configPath,
|
85255
|
+
rawEnv,
|
85256
|
+
isDispatchNamespace,
|
85257
|
+
envName,
|
85258
|
+
topLevelEnv,
|
85259
|
+
isLegacyEnv2,
|
85260
|
+
rawConfig
|
85261
|
+
);
|
85262
|
+
diagnostics.addChild(envDiagnostics);
|
85263
|
+
} else if (!isPagesConfig(rawConfig)) {
|
85264
|
+
activeEnv = normalizeAndValidateEnvironment(
|
85265
|
+
envDiagnostics,
|
85266
|
+
configPath,
|
85267
|
+
topLevelEnv,
|
85268
|
+
// in this case reuse the topLevelEnv to ensure that nonInherited fields are not removed
|
85269
|
+
isDispatchNamespace,
|
85270
|
+
envName,
|
85271
|
+
topLevelEnv,
|
85272
|
+
isLegacyEnv2,
|
85273
|
+
rawConfig
|
85274
|
+
);
|
85275
|
+
const envNames = rawConfig.env ? `The available configured environment names are: ${JSON.stringify(
|
85276
|
+
Object.keys(rawConfig.env)
|
85277
|
+
)}
|
85255
85278
|
` : "";
|
85256
|
-
|
85279
|
+
const message = `No environment found in configuration with name "${envName}".
|
85257
85280
|
Before using \`--env=${envName}\` there should be an equivalent environment section in the configuration.
|
85258
85281
|
${envNames}
|
85259
85282
|
Consider adding an environment configuration section to the ${configFileName(configPath)} file:
|
85260
85283
|
\`\`\`
|
85261
85284
|
[env.` + envName + "]\n```\n";
|
85262
|
-
|
85263
|
-
|
85264
|
-
|
85265
|
-
|
85285
|
+
if (envNames.length > 0) {
|
85286
|
+
diagnostics.errors.push(message);
|
85287
|
+
} else {
|
85288
|
+
diagnostics.warnings.push(message);
|
85289
|
+
}
|
85266
85290
|
}
|
85267
85291
|
}
|
85268
85292
|
}
|
@@ -147390,7 +147414,7 @@ async function printMembershipInfo(user, accountFilter) {
|
|
147390
147414
|
} catch (e7) {
|
147391
147415
|
if (isAuthenticationError(e7)) {
|
147392
147416
|
logger.log(
|
147393
|
-
`\u{1F3A2} Unable to get membership roles. Make sure you have permissions to read the account
|
147417
|
+
`\u{1F3A2} Unable to get membership roles. Make sure you have permissions to read the account. Are you missing the \`User->Memberships->Read\` permission?`
|
147394
147418
|
);
|
147395
147419
|
return;
|
147396
147420
|
} else {
|
@@ -147531,6 +147555,12 @@ var whoamiCommand = createCommand({
|
|
147531
147555
|
// src/utils/logPossibleBugMessage.ts
|
147532
147556
|
init_import_meta_url();
|
147533
147557
|
async function logPossibleBugMessage() {
|
147558
|
+
if (process.versions.bun) {
|
147559
|
+
logger.warn(
|
147560
|
+
`Wrangler does not support the Bun runtime. Please try this command again using Node.js via \`npm\` or \`pnpm\`. Alternatively, make sure you're not passing the \`--bun\` flag when running \`bun run wrangler ...\``
|
147561
|
+
);
|
147562
|
+
return;
|
147563
|
+
}
|
147534
147564
|
logger.log(
|
147535
147565
|
`${fgGreenColor}%s${resetColor}`,
|
147536
147566
|
"If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose"
|