wrangler 4.15.0 → 4.15.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.15.0",
3
+ "version": "4.15.2",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -56,8 +56,8 @@
56
56
  "path-to-regexp": "6.3.0",
57
57
  "unenv": "2.0.0-rc.15",
58
58
  "workerd": "1.20250508.0",
59
- "@cloudflare/kv-asset-handler": "0.4.0",
60
- "miniflare": "4.20250508.0"
59
+ "miniflare": "4.20250508.2",
60
+ "@cloudflare/kv-asset-handler": "0.4.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
@@ -135,11 +135,11 @@
135
135
  "xdg-app-paths": "^8.3.0",
136
136
  "xxhash-wasm": "^1.0.1",
137
137
  "yargs": "^17.7.2",
138
+ "@cloudflare/cli": "1.1.1",
138
139
  "@cloudflare/eslint-config-worker": "1.1.0",
140
+ "@cloudflare/pages-shared": "^0.13.39",
139
141
  "@cloudflare/workers-shared": "0.17.5",
140
- "@cloudflare/workers-tsconfig": "0.0.0",
141
- "@cloudflare/pages-shared": "^0.13.37",
142
- "@cloudflare/cli": "1.1.1"
142
+ "@cloudflare/workers-tsconfig": "0.0.0"
143
143
  },
144
144
  "peerDependencies": {
145
145
  "@cloudflare/workers-types": "^4.20250508.0"
@@ -0,0 +1,13 @@
1
+ function stripCfConnectingIPHeader(input, init) {
2
+ const request = new Request(input, init);
3
+ request.headers.delete("CF-Connecting-IP");
4
+ return request;
5
+ }
6
+
7
+ globalThis.fetch = new Proxy(globalThis.fetch, {
8
+ apply(target, thisArg, argArray) {
9
+ return Reflect.apply(target, thisArg, [
10
+ stripCfConnectingIPHeader.apply(null, argArray),
11
+ ]);
12
+ },
13
+ });
@@ -81414,7 +81414,7 @@ var import_undici3 = __toESM(require_undici());
81414
81414
 
81415
81415
  // package.json
81416
81416
  var name = "wrangler";
81417
- var version = "4.15.0";
81417
+ var version = "4.15.2";
81418
81418
 
81419
81419
  // src/environment-variables/misc-variables.ts
81420
81420
  init_import_meta_url();
@@ -85703,7 +85703,9 @@ function printBindings(bindings, tailConsumers = [], context2 = {}) {
85703
85703
  entries: analytics_engine_datasets.map(({ binding, dataset }) => {
85704
85704
  return {
85705
85705
  key: binding,
85706
- value: addSuffix(dataset ?? binding)
85706
+ value: addSuffix(dataset ?? binding, {
85707
+ isSimulatedLocally: true
85708
+ })
85707
85709
  };
85708
85710
  })
85709
85711
  });
@@ -107283,6 +107285,24 @@ async function bundleWorker(entry, destination, {
107283
107285
  }
107284
107286
  inject.push(checkedFetchFileToInject);
107285
107287
  }
107288
+ if (targetConsumer === "dev" && local) {
107289
+ const stripCfConnectingIpHeaderFileToInject = path29.join(
107290
+ tmpDir.path,
107291
+ "strip-cf-connecting-ip-header.js"
107292
+ );
107293
+ if (!fs11.existsSync(stripCfConnectingIpHeaderFileToInject)) {
107294
+ fs11.writeFileSync(
107295
+ stripCfConnectingIpHeaderFileToInject,
107296
+ fs11.readFileSync(
107297
+ path29.resolve(
107298
+ getBasePath(),
107299
+ "templates/strip-cf-connecting-ip-header.js"
107300
+ )
107301
+ )
107302
+ );
107303
+ }
107304
+ inject.push(stripCfConnectingIpHeaderFileToInject);
107305
+ }
107286
107306
  if (getFlag("MULTIWORKER")) {
107287
107307
  middlewareToLoad.push({
107288
107308
  name: "patch-console-prefix",
@@ -115466,6 +115486,8 @@ var CommandRegistry = class {
115466
115486
  }
115467
115487
  /**
115468
115488
  * Registers a specific namespace if not already registered.
115489
+ * TODO: Remove this once all commands use the command registry.
115490
+ * See https://github.com/cloudflare/workers-sdk/pull/7357#discussion_r1862138470 for more details.
115469
115491
  */
115470
115492
  registerNamespace(namespace) {
115471
115493
  if (this.#registeredNamespaces.has(namespace)) {
@@ -125765,13 +125787,6 @@ function getBindingsFromArgs(args) {
125765
125787
  logger.warn("Could not parse R2 binding:", r22.toString());
125766
125788
  return;
125767
125789
  }
125768
- const bucketName = ref || binding.toString();
125769
- if (!isValidR2BucketName(bucketName)) {
125770
- logger.error(
125771
- `The bucket name "${bucketName}" is invalid. ${bucketFormatMessage}`
125772
- );
125773
- return;
125774
- }
125775
125790
  return { binding, bucket_name: ref || binding.toString() };
125776
125791
  }).filter(Boolean);
125777
125792
  }
@@ -152272,7 +152287,7 @@ function createCLIParser(argv) {
152272
152287
  definition: secretsStoreSecretDuplicateCommand
152273
152288
  }
152274
152289
  ]);
152275
- registry.registerNamespace("cert");
152290
+ registry.registerNamespace("secrets-store");
152276
152291
  registry.define([
152277
152292
  {
152278
152293
  command: "wrangler workflows",
@@ -156292,6 +156307,11 @@ If you are trying to develop Pages and Workers together, please use \`wrangler p
156292
156307
  "Browser Rendering is not supported locally. Please use `wrangler dev --remote` instead."
156293
156308
  );
156294
156309
  }
156310
+ if (extractBindingsOfType("analytics_engine", resolved.bindings).length && !resolved.dev.remote && resolved.build.format === "service-worker") {
156311
+ logger.warn(
156312
+ "Analytics Engine is not supported locally when using the service-worker format. Please migrate to the module worker format: https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/"
156313
+ );
156314
+ }
156295
156315
  validateAssetsArgsAndConfig(resolved);
156296
156316
  const services = extractBindingsOfType("service", resolved.bindings);
156297
156317
  if (services && services.length > 0 && resolved.dev?.remote) {