wrangler 3.114.4 → 3.114.6
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 +8 -8
- package/wrangler-dist/cli.d.ts +1 -1
- package/wrangler-dist/cli.js +60 -38
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.114.
|
3
|
+
"version": "3.114.6",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -57,14 +57,14 @@
|
|
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.20250408.0",
|
61
|
+
"miniflare": "3.20250408.0",
|
62
|
+
"@cloudflare/kv-asset-handler": "0.3.4"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
66
66
|
"@cloudflare/types": "6.18.4",
|
67
|
-
"@cloudflare/workers-types": "^4.
|
67
|
+
"@cloudflare/workers-types": "^4.20250408.0",
|
68
68
|
"@cspotcode/source-map-support": "0.8.1",
|
69
69
|
"@iarna/toml": "^3.0.0",
|
70
70
|
"@microsoft/api-extractor": "^7.47.0",
|
@@ -137,14 +137,14 @@
|
|
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",
|
143
142
|
"@cloudflare/workers-shared": "0.15.0",
|
143
|
+
"@cloudflare/pages-shared": "0.13.16",
|
144
144
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
145
145
|
},
|
146
146
|
"peerDependencies": {
|
147
|
-
"@cloudflare/workers-types": "^4.
|
147
|
+
"@cloudflare/workers-types": "^4.20250408.0"
|
148
148
|
},
|
149
149
|
"peerDependenciesMeta": {
|
150
150
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -1176,6 +1176,7 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
1176
1176
|
build_image_major_version: number;
|
1177
1177
|
kv_namespaces?: any;
|
1178
1178
|
source?: {
|
1179
|
+
type: "github" | "gitlab";
|
1179
1180
|
config: {
|
1180
1181
|
owner: string;
|
1181
1182
|
repo_name: string;
|
@@ -1187,7 +1188,6 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
1187
1188
|
preview_branch_includes?: string[] | undefined;
|
1188
1189
|
preview_branch_excludes?: string[] | undefined;
|
1189
1190
|
};
|
1190
|
-
type: "github" | "gitlab";
|
1191
1191
|
} | undefined;
|
1192
1192
|
env_vars?: any;
|
1193
1193
|
durable_object_namespaces?: any;
|
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.6";
|
81454
81454
|
|
81455
81455
|
// src/environment-variables/misc-variables.ts
|
81456
81456
|
init_import_meta_url();
|
@@ -85217,52 +85217,74 @@ 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
|
-
|
85235
|
-
|
85236
|
-
|
85237
|
-
|
85238
|
-
|
85239
|
-
|
85240
|
-
|
85241
|
-
|
85242
|
-
|
85243
|
-
|
85244
|
-
|
85245
|
-
|
85246
|
-
|
85247
|
-
|
85248
|
-
|
85249
|
-
|
85250
|
-
|
85251
|
-
|
85252
|
-
|
85253
|
-
|
85254
|
-
|
85238
|
+
if (isRedirectedConfig) {
|
85239
|
+
diagnostics.errors.push(dedent`
|
85240
|
+
You have specified the environment "${envName}", but are using a redirected configuration, produced by a build tool such as Vite.
|
85241
|
+
You need to set the environment in your build tool, rather than via Wrangler.
|
85242
|
+
For example, if you are using Vite, refer to these docs: https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/
|
85243
|
+
`);
|
85244
|
+
} else {
|
85245
|
+
const envDiagnostics = new Diagnostics(
|
85246
|
+
`"env.${envName}" environment configuration`
|
85247
|
+
);
|
85248
|
+
const rawEnv = rawConfig.env?.[envName];
|
85249
|
+
if (rawEnv !== void 0) {
|
85250
|
+
activeEnv = normalizeAndValidateEnvironment(
|
85251
|
+
envDiagnostics,
|
85252
|
+
configPath,
|
85253
|
+
rawEnv,
|
85254
|
+
isDispatchNamespace,
|
85255
|
+
envName,
|
85256
|
+
topLevelEnv,
|
85257
|
+
isLegacyEnv2,
|
85258
|
+
rawConfig
|
85259
|
+
);
|
85260
|
+
diagnostics.addChild(envDiagnostics);
|
85261
|
+
} else if (!isPagesConfig(rawConfig)) {
|
85262
|
+
activeEnv = normalizeAndValidateEnvironment(
|
85263
|
+
envDiagnostics,
|
85264
|
+
configPath,
|
85265
|
+
topLevelEnv,
|
85266
|
+
// in this case reuse the topLevelEnv to ensure that nonInherited fields are not removed
|
85267
|
+
isDispatchNamespace,
|
85268
|
+
envName,
|
85269
|
+
topLevelEnv,
|
85270
|
+
isLegacyEnv2,
|
85271
|
+
rawConfig
|
85272
|
+
);
|
85273
|
+
const envNames = rawConfig.env ? `The available configured environment names are: ${JSON.stringify(
|
85274
|
+
Object.keys(rawConfig.env)
|
85275
|
+
)}
|
85255
85276
|
` : "";
|
85256
|
-
|
85277
|
+
const message = `No environment found in configuration with name "${envName}".
|
85257
85278
|
Before using \`--env=${envName}\` there should be an equivalent environment section in the configuration.
|
85258
85279
|
${envNames}
|
85259
85280
|
Consider adding an environment configuration section to the ${configFileName(configPath)} file:
|
85260
85281
|
\`\`\`
|
85261
85282
|
[env.` + envName + "]\n```\n";
|
85262
|
-
|
85263
|
-
|
85264
|
-
|
85265
|
-
|
85283
|
+
if (envNames.length > 0) {
|
85284
|
+
diagnostics.errors.push(message);
|
85285
|
+
} else {
|
85286
|
+
diagnostics.warnings.push(message);
|
85287
|
+
}
|
85266
85288
|
}
|
85267
85289
|
}
|
85268
85290
|
}
|
@@ -147390,7 +147412,7 @@ async function printMembershipInfo(user, accountFilter) {
|
|
147390
147412
|
} catch (e7) {
|
147391
147413
|
if (isAuthenticationError(e7)) {
|
147392
147414
|
logger.log(
|
147393
|
-
`\u{1F3A2} Unable to get membership roles. Make sure you have permissions to read the account
|
147415
|
+
`\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
147416
|
);
|
147395
147417
|
return;
|
147396
147418
|
} else {
|