wrangler 3.29.0 → 3.30.0
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 +4 -4
- package/wrangler-dist/cli.d.ts +7 -0
- package/wrangler-dist/cli.js +13 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"source-map": "0.6.1",
|
|
97
97
|
"xxhash-wasm": "^1.0.1",
|
|
98
98
|
"@cloudflare/kv-asset-handler": "0.3.1",
|
|
99
|
-
"miniflare": "3.
|
|
99
|
+
"miniflare": "3.20240223.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@cloudflare/ai": "^1.0.35",
|
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
"yargs": "^17.7.2",
|
|
188
188
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
189
189
|
"@cloudflare/cli": "1.1.1",
|
|
190
|
-
"@cloudflare/
|
|
191
|
-
"@cloudflare/
|
|
190
|
+
"@cloudflare/pages-shared": "^0.11.15",
|
|
191
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
192
192
|
},
|
|
193
193
|
"optionalDependencies": {
|
|
194
194
|
"fsevents": "~2.3.2"
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -1360,6 +1360,13 @@ declare interface EnvironmentInheritable {
|
|
|
1360
1360
|
* @inheritable
|
|
1361
1361
|
*/
|
|
1362
1362
|
find_additional_modules: boolean | undefined;
|
|
1363
|
+
/**
|
|
1364
|
+
* Determines whether Wrangler will preserve bundled file names.
|
|
1365
|
+
* Defaults to false.
|
|
1366
|
+
* If left unset, files will be named using the pattern ${fileHash}-${basename},
|
|
1367
|
+
* for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
|
|
1368
|
+
*/
|
|
1369
|
+
preserve_file_names: boolean | undefined;
|
|
1363
1370
|
/**
|
|
1364
1371
|
* The directory in which module rules should be evaluated when including additional files into a worker deployment.
|
|
1365
1372
|
* This defaults to the directory containing the `main` entry point of the worker if not specified.
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -119643,7 +119643,7 @@ var import_node_assert2 = __toESM(require("node:assert"));
|
|
|
119643
119643
|
var import_undici3 = __toESM(require_undici());
|
|
119644
119644
|
|
|
119645
119645
|
// package.json
|
|
119646
|
-
var version = "3.
|
|
119646
|
+
var version = "3.30.0";
|
|
119647
119647
|
var package_default = {
|
|
119648
119648
|
name: "wrangler",
|
|
119649
119649
|
version,
|
|
@@ -122557,6 +122557,14 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, envNam
|
|
|
122557
122557
|
isBoolean,
|
|
122558
122558
|
void 0
|
|
122559
122559
|
),
|
|
122560
|
+
preserve_file_names: inheritable(
|
|
122561
|
+
diagnostics,
|
|
122562
|
+
topLevelEnv,
|
|
122563
|
+
rawEnv,
|
|
122564
|
+
"preserve_file_names",
|
|
122565
|
+
isBoolean,
|
|
122566
|
+
void 0
|
|
122567
|
+
),
|
|
122560
122568
|
base_dir: normalizeAndValidateBaseDirField(
|
|
122561
122569
|
configPath,
|
|
122562
122570
|
inheritable(
|
|
@@ -124991,7 +124999,7 @@ function createModuleCollector(props) {
|
|
|
124991
124999
|
);
|
|
124992
125000
|
const fileContent = await (0, import_promises2.readFile)(filePath);
|
|
124993
125001
|
const fileHash = import_node_crypto3.default.createHash("sha1").update(fileContent).digest("hex");
|
|
124994
|
-
const fileName = `./${fileHash}-${import_node_path9.default.basename(args.path)}`;
|
|
125002
|
+
const fileName = props.preserveFileNames ? args.path : `./${fileHash}-${import_node_path9.default.basename(args.path)}`;
|
|
124995
125003
|
const { rule } = rulesMatchers.find(({ regex: regex2 }) => regex2.test(fileName)) || {};
|
|
124996
125004
|
if (rule) {
|
|
124997
125005
|
modules.push({
|
|
@@ -125072,7 +125080,7 @@ function createModuleCollector(props) {
|
|
|
125072
125080
|
}
|
|
125073
125081
|
const fileContent = await (0, import_promises2.readFile)(filePath);
|
|
125074
125082
|
const fileHash = import_node_crypto3.default.createHash("sha1").update(fileContent).digest("hex");
|
|
125075
|
-
const fileName = props.preserveFileNames ?
|
|
125083
|
+
const fileName = props.preserveFileNames ? args.path : `./${fileHash}-${import_node_path9.default.basename(args.path)}`;
|
|
125076
125084
|
modules.push({
|
|
125077
125085
|
name: fileName,
|
|
125078
125086
|
filePath,
|
|
@@ -164983,7 +164991,8 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
164983
164991
|
// `moduleCollector` doesn't get used when `props.noBundle` is set, so
|
|
164984
164992
|
// `findAdditionalModules` always defaults to `false`
|
|
164985
164993
|
findAdditionalModules: config.find_additional_modules ?? false,
|
|
164986
|
-
rules: props.rules
|
|
164994
|
+
rules: props.rules,
|
|
164995
|
+
preserveFileNames: config.preserve_file_names ?? false
|
|
164987
164996
|
});
|
|
164988
164997
|
const { modules, dependencies, resolvedEntryPointPath, bundleType } = props.noBundle ? await noBundleWorker2(props.entry, props.rules, props.outDir) : await bundleWorker(
|
|
164989
164998
|
props.entry,
|