wrangler 3.114.1 → 3.114.3
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 +7 -7
- package/wrangler-dist/cli.js +66 -13
- package/wrangler-dist/cli.js.map +0 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.114.
|
3
|
+
"version": "3.114.3",
|
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.20250310.0",
|
61
|
-
"
|
62
|
-
"
|
61
|
+
"miniflare": "3.20250310.1",
|
62
|
+
"@cloudflare/kv-asset-handler": "0.3.4"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -137,11 +137,11 @@
|
|
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/pages-shared": "
|
143
|
-
"@cloudflare/
|
144
|
-
"@cloudflare/workers-tsconfig": "0.0.0"
|
141
|
+
"@cloudflare/pages-shared": "0.13.14",
|
142
|
+
"@cloudflare/cli": "1.1.1",
|
143
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
144
|
+
"@cloudflare/workers-shared": "0.15.0"
|
145
145
|
},
|
146
146
|
"peerDependencies": {
|
147
147
|
"@cloudflare/workers-types": "^4.20250310.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.3";
|
81454
81454
|
|
81455
81455
|
// src/environment-variables/misc-variables.ts
|
81456
81456
|
init_import_meta_url();
|
@@ -88098,6 +88098,7 @@ var supportedPagesConfigFields = [
|
|
88098
88098
|
"compatibility_date",
|
88099
88099
|
"compatibility_flags",
|
88100
88100
|
"send_metrics",
|
88101
|
+
"no_bundle",
|
88101
88102
|
"limits",
|
88102
88103
|
"placement",
|
88103
88104
|
"vars",
|
@@ -120034,8 +120035,39 @@ async function getEntry(args, config, command2) {
|
|
120034
120035
|
"It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead."
|
120035
120036
|
);
|
120036
120037
|
}
|
120038
|
+
const compatibilityDateStr = [
|
120039
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
120040
|
+
((/* @__PURE__ */ new Date()).getMonth() + 1 + "").padStart(2, "0"),
|
120041
|
+
((/* @__PURE__ */ new Date()).getDate() + "").padStart(2, "0")
|
120042
|
+
].join("-");
|
120043
|
+
const updateConfigMessage = /* @__PURE__ */ __name((snippet) => esm_default2`
|
120044
|
+
${config.configPath ? `add the following to your "${configFileName(config.configPath)}" file:` : `create a "wrangler.jsonc" file containing:`}
|
120045
|
+
|
120046
|
+
\`\`\`
|
120047
|
+
${formatConfigSnippet(
|
120048
|
+
{
|
120049
|
+
...config.name ? {} : { name: "worker-name" },
|
120050
|
+
...config.compatibility_date ? {} : { compatibility_date: compatibilityDateStr },
|
120051
|
+
...snippet
|
120052
|
+
},
|
120053
|
+
config.configPath
|
120054
|
+
)}
|
120055
|
+
\`\`\`
|
120056
|
+
|
120057
|
+
`, "updateConfigMessage");
|
120058
|
+
const fullCommand = `${getNpxEquivalent()} wrangler ${command2}`;
|
120037
120059
|
throw new UserError(
|
120038
|
-
`
|
120060
|
+
esm_default2`
|
120061
|
+
Missing entry-point to Worker script or to assets directory
|
120062
|
+
|
120063
|
+
If there is code to deploy, you can either:
|
120064
|
+
- Specify an entry-point to your Worker script via the command line (ex: \`${fullCommand} src/index.ts\`)
|
120065
|
+
- Or ${updateConfigMessage({ main: "src/index.ts" })}
|
120066
|
+
|
120067
|
+
If are uploading a directory of assets, you can either:
|
120068
|
+
- Specify the path to the directory of assets via the command line: (ex: \`${fullCommand} --assets=./dist\`)
|
120069
|
+
- Or ${updateConfigMessage({ assets: { directory: "./dist" } })}`,
|
120070
|
+
{ telemetryMessage: "missing worker entrypoint or assets directory" }
|
120039
120071
|
);
|
120040
120072
|
}
|
120041
120073
|
await runCustomBuild(
|
@@ -120107,6 +120139,18 @@ function generateAddScriptNameExamples(localBindings) {
|
|
120107
120139
|
}).join("\n");
|
120108
120140
|
}
|
120109
120141
|
__name(generateAddScriptNameExamples, "generateAddScriptNameExamples");
|
120142
|
+
function getNpxEquivalent() {
|
120143
|
+
switch (sniffUserAgent()) {
|
120144
|
+
case "pnpm":
|
120145
|
+
return "pnpm";
|
120146
|
+
case "yarn":
|
120147
|
+
return "yarn";
|
120148
|
+
case "npm":
|
120149
|
+
default:
|
120150
|
+
return "npx";
|
120151
|
+
}
|
120152
|
+
}
|
120153
|
+
__name(getNpxEquivalent, "getNpxEquivalent");
|
120110
120154
|
|
120111
120155
|
// src/match-tag.ts
|
120112
120156
|
init_import_meta_url();
|
@@ -126234,7 +126278,8 @@ function Options12(yargs) {
|
|
126234
126278
|
},
|
126235
126279
|
"no-bundle": {
|
126236
126280
|
type: "boolean",
|
126237
|
-
default:
|
126281
|
+
default: void 0,
|
126282
|
+
conflicts: "bundle",
|
126238
126283
|
description: "Whether to run bundling on `_worker.js` before deploying"
|
126239
126284
|
},
|
126240
126285
|
config: {
|
@@ -126437,6 +126482,7 @@ To silence this warning, pass in --commit-dirty=true`
|
|
126437
126482
|
commitDirty = isGitDirty;
|
126438
126483
|
}
|
126439
126484
|
}
|
126485
|
+
const enableBundling = args.bundle ?? !(args.noBundle ?? config?.no_bundle);
|
126440
126486
|
const { deploymentResponse, formData } = await deploy2({
|
126441
126487
|
directory,
|
126442
126488
|
accountId,
|
@@ -126446,9 +126492,7 @@ To silence this warning, pass in --commit-dirty=true`
|
|
126446
126492
|
commitHash,
|
126447
126493
|
commitDirty,
|
126448
126494
|
skipCaching: args.skipCaching,
|
126449
|
-
|
126450
|
-
// There is no sane way to get the true value out of yargs, so here we are.
|
126451
|
-
bundle: args.bundle ?? !args.noBundle,
|
126495
|
+
bundle: enableBundling,
|
126452
126496
|
// Sourcemaps from deploy arguments will take precedence so people can try it for one-off deployments without updating their wrangler.toml
|
126453
126497
|
sourceMaps: config?.upload_source_maps || args.uploadSourceMaps,
|
126454
126498
|
args
|
@@ -127250,7 +127294,8 @@ function Options14(yargs) {
|
|
127250
127294
|
},
|
127251
127295
|
"no-bundle": {
|
127252
127296
|
type: "boolean",
|
127253
|
-
default:
|
127297
|
+
default: void 0,
|
127298
|
+
conflicts: "bundle",
|
127254
127299
|
description: "Whether to run bundling on `_worker.js`"
|
127255
127300
|
},
|
127256
127301
|
binding: {
|
@@ -127364,7 +127409,7 @@ var Handler14 = /* @__PURE__ */ __name(async (args) => {
|
|
127364
127409
|
}
|
127365
127410
|
if (args.env) {
|
127366
127411
|
throw new FatalError(
|
127367
|
-
"Pages does not support targeting an environment with the --env flag
|
127412
|
+
"Pages does not support targeting an environment with the --env flag during local development.",
|
127368
127413
|
1
|
127369
127414
|
);
|
127370
127415
|
}
|
@@ -127429,7 +127474,7 @@ The Worker script should be named \`_worker.js\` and located in the build output
|
|
127429
127474
|
const workerScriptPath = directory !== void 0 ? (0, import_node_path54.join)(directory, singleWorkerScriptPath) : (0, import_node_path54.resolve)(singleWorkerScriptPath);
|
127430
127475
|
const usingWorkerDirectory = (0, import_node_fs27.existsSync)(workerScriptPath) && (0, import_node_fs27.lstatSync)(workerScriptPath).isDirectory();
|
127431
127476
|
const usingWorkerScript = (0, import_node_fs27.existsSync)(workerScriptPath);
|
127432
|
-
const enableBundling = args.bundle ?? !args.noBundle;
|
127477
|
+
const enableBundling = args.bundle ?? !(args.noBundle ?? config.no_bundle);
|
127433
127478
|
const functionsDirectory = "./functions";
|
127434
127479
|
let usingFunctions = !usingWorkerScript && (0, import_node_fs27.existsSync)(functionsDirectory);
|
127435
127480
|
let scriptPath3 = "";
|
@@ -127438,7 +127483,7 @@ The Worker script should be named \`_worker.js\` and located in the build output
|
|
127438
127483
|
args.compatibilityFlags ?? config.compatibility_flags ?? [],
|
127439
127484
|
{
|
127440
127485
|
nodeCompat: args.nodeCompat,
|
127441
|
-
noBundle:
|
127486
|
+
noBundle: !enableBundling
|
127442
127487
|
}
|
127443
127488
|
);
|
127444
127489
|
const defineNavigatorUserAgent = isNavigatorDefined(
|
@@ -153377,7 +153422,13 @@ async function getEntryValue(entry) {
|
|
153377
153422
|
__name(getEntryValue, "getEntryValue");
|
153378
153423
|
function getModuleType(entry) {
|
153379
153424
|
if (entry instanceof Blob) {
|
153380
|
-
|
153425
|
+
const type = ModuleTypeToRuleType[mimeTypeModuleType[entry.type]];
|
153426
|
+
if (!type) {
|
153427
|
+
throw new Error(
|
153428
|
+
`Unable to determine module type for ${entry.type} mime type`
|
153429
|
+
);
|
153430
|
+
}
|
153431
|
+
return type;
|
153381
153432
|
} else {
|
153382
153433
|
return "Text";
|
153383
153434
|
}
|
@@ -154661,8 +154712,10 @@ ${resolvedAssetsPath}`,
|
|
154661
154712
|
);
|
154662
154713
|
}
|
154663
154714
|
}
|
154664
|
-
const redirects = maybeGetFile(
|
154665
|
-
|
154715
|
+
const redirects = maybeGetFile(
|
154716
|
+
path65.join(resolvedAssetsPath, REDIRECTS_FILENAME)
|
154717
|
+
);
|
154718
|
+
const headers = maybeGetFile(path65.join(resolvedAssetsPath, HEADERS_FILENAME));
|
154666
154719
|
const assetConfig = {
|
154667
154720
|
html_handling: config.assets?.html_handling,
|
154668
154721
|
not_found_handling: config.assets?.not_found_handling
|