wrangler 4.12.0 → 4.12.1

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.12.0",
3
+ "version": "4.12.1",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -55,14 +55,14 @@
55
55
  "esbuild": "0.25.2",
56
56
  "path-to-regexp": "6.3.0",
57
57
  "unenv": "2.0.0-rc.15",
58
- "workerd": "1.20250416.0",
59
- "@cloudflare/kv-asset-handler": "0.4.0",
60
- "miniflare": "4.20250416.0"
58
+ "workerd": "1.20250417.0",
59
+ "miniflare": "4.20250417.0",
60
+ "@cloudflare/kv-asset-handler": "0.4.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@cloudflare/types": "6.18.4",
65
- "@cloudflare/workers-types": "^4.20250415.0",
65
+ "@cloudflare/workers-types": "^4.20250417.0",
66
66
  "@cspotcode/source-map-support": "0.8.1",
67
67
  "@iarna/toml": "^3.0.0",
68
68
  "@microsoft/api-extractor": "^7.47.0",
@@ -135,14 +135,14 @@
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",
139
138
  "@cloudflare/eslint-config-worker": "1.1.0",
140
- "@cloudflare/pages-shared": "^0.13.29",
141
- "@cloudflare/workers-tsconfig": "0.0.0",
142
- "@cloudflare/workers-shared": "0.17.2"
139
+ "@cloudflare/pages-shared": "^0.13.30",
140
+ "@cloudflare/cli": "1.1.1",
141
+ "@cloudflare/workers-shared": "0.17.2",
142
+ "@cloudflare/workers-tsconfig": "0.0.0"
143
143
  },
144
144
  "peerDependencies": {
145
- "@cloudflare/workers-types": "^4.20250415.0"
145
+ "@cloudflare/workers-types": "^4.20250417.0"
146
146
  },
147
147
  "peerDependenciesMeta": {
148
148
  "@cloudflare/workers-types": {
@@ -81185,7 +81185,7 @@ var import_undici3 = __toESM(require_undici());
81185
81185
 
81186
81186
  // package.json
81187
81187
  var name = "wrangler";
81188
- var version = "4.12.0";
81188
+ var version = "4.12.1";
81189
81189
 
81190
81190
  // src/environment-variables/misc-variables.ts
81191
81191
  init_import_meta_url();
@@ -92951,6 +92951,12 @@ function buildMiniflareBindingOptions(config) {
92951
92951
  hyperdrives: Object.fromEntries(
92952
92952
  bindings.hyperdrive?.map(hyperdriveEntry) ?? []
92953
92953
  ),
92954
+ analyticsEngineDatasets: Object.fromEntries(
92955
+ bindings.analytics_engine_datasets?.map((binding) => [
92956
+ binding.binding,
92957
+ { dataset: binding.dataset ?? "dataset" }
92958
+ ]) ?? []
92959
+ ),
92954
92960
  workflows: Object.fromEntries(bindings.workflows?.map(workflowEntry) ?? []),
92955
92961
  secretsStoreSecrets: Object.fromEntries(
92956
92962
  bindings.secrets_store_secrets?.map((binding) => [
@@ -93020,7 +93026,8 @@ function buildPersistOptions(localPersistencePath) {
93020
93026
  r2Persist: import_node_path15.default.join(v3Path, "r2"),
93021
93027
  d1Persist: import_node_path15.default.join(v3Path, "d1"),
93022
93028
  workflowsPersist: import_node_path15.default.join(v3Path, "workflows"),
93023
- secretsStorePersist: import_node_path15.default.join(v3Path, "secrets-store")
93029
+ secretsStorePersist: import_node_path15.default.join(v3Path, "secrets-store"),
93030
+ analyticsEngineDatasetsPersist: import_node_path15.default.join(v3Path, "analytics-engine")
93024
93031
  };
93025
93032
  }
93026
93033
  }
@@ -103496,7 +103503,6 @@ async function bundleWorker(entry, destination, {
103496
103503
  alias,
103497
103504
  define,
103498
103505
  checkFetch,
103499
- mockAnalyticsEngineDatasets,
103500
103506
  targetConsumer,
103501
103507
  testScheduled,
103502
103508
  inject: injectOption,
@@ -103511,16 +103517,6 @@ async function bundleWorker(entry, destination, {
103511
103517
  const tmpDir = getWranglerTmpDir(projectRoot, "bundle");
103512
103518
  const entryFile = entry.file;
103513
103519
  const middlewareToLoad = [];
103514
- if (targetConsumer === "dev" && mockAnalyticsEngineDatasets && mockAnalyticsEngineDatasets.length > 0) {
103515
- middlewareToLoad.push({
103516
- name: "mock-analytics-engine",
103517
- path: "templates/middleware/middleware-mock-analytics-engine.ts",
103518
- config: {
103519
- bindings: mockAnalyticsEngineDatasets.map(({ binding }) => binding)
103520
- },
103521
- supports: ["modules", "service-worker"]
103522
- });
103523
- }
103524
103520
  if (targetConsumer === "dev" && !process.env.WRANGLER_DISABLE_REQUEST_BODY_DRAINING) {
103525
103521
  middlewareToLoad.push({
103526
103522
  name: "ensure-req-body-drained",
@@ -120063,8 +120059,6 @@ function buildWorkerFromFunctions({
120063
120059
  sourcemap,
120064
120060
  watch: watch2,
120065
120061
  nodejsCompatMode,
120066
- // TODO: mock AE datasets in Pages functions for dev
120067
- mockAnalyticsEngineDatasets: [],
120068
120062
  define: {
120069
120063
  __FALLBACK_SERVICE__: JSON.stringify(fallbackService)
120070
120064
  },
@@ -120124,8 +120118,6 @@ function buildRawWorker({
120124
120118
  sourcemap,
120125
120119
  watch: watch2,
120126
120120
  nodejsCompatMode,
120127
- // TODO: mock AE datasets in Pages functions for dev
120128
- mockAnalyticsEngineDatasets: [],
120129
120121
  define: {},
120130
120122
  alias: {},
120131
120123
  doBindings: [],
@@ -120449,8 +120441,6 @@ function buildPluginFromFunctions({
120449
120441
  }
120450
120442
  ],
120451
120443
  checkFetch: local && checkFetch,
120452
- // TODO: mock AE datasets in Pages functions for dev
120453
- mockAnalyticsEngineDatasets: [],
120454
120444
  targetConsumer: local ? "dev" : "deploy",
120455
120445
  local,
120456
120446
  projectRoot: getPagesProjectRoot(),
@@ -148109,7 +148099,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
148109
148099
  define: { ...config.define, ...props.defines },
148110
148100
  alias: { ...config.alias, ...props.alias },
148111
148101
  checkFetch: false,
148112
- mockAnalyticsEngineDatasets: [],
148113
148102
  // We want to know if the build is for development or publishing
148114
148103
  // This could potentially cause issues as we no longer have identical behaviour between dev and deploy?
148115
148104
  targetConsumer: "deploy",
@@ -151416,8 +151405,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
151416
151405
  define: { ...config.define, ...props.defines },
151417
151406
  checkFetch: false,
151418
151407
  alias: config.alias,
151419
- // We do not mock AE datasets when deploying
151420
- mockAnalyticsEngineDatasets: [],
151421
151408
  // We want to know if the build is for development or publishing
151422
151409
  // This could potentially cause issues as we no longer have identical behaviour between dev and deploy?
151423
151410
  targetConsumer: "deploy",
@@ -153676,7 +153663,6 @@ function runBuild({
153676
153663
  alias,
153677
153664
  noBundle,
153678
153665
  findAdditionalModules: findAdditionalModules2,
153679
- mockAnalyticsEngineDatasets,
153680
153666
  durableObjects,
153681
153667
  workflows,
153682
153668
  local,
@@ -153743,7 +153729,6 @@ function runBuild({
153743
153729
  workflowBindings: workflows,
153744
153730
  alias,
153745
153731
  define,
153746
- mockAnalyticsEngineDatasets,
153747
153732
  targetConsumer,
153748
153733
  testScheduled,
153749
153734
  plugins: [logBuildOutput(nodejsCompatMode, onStart, updateBundle)],
@@ -153874,7 +153859,6 @@ var BundlerController = class extends Controller {
153874
153859
  config.compatibilityDate,
153875
153860
  config.compatibilityFlags
153876
153861
  ),
153877
- mockAnalyticsEngineDatasets: bindings.analytics_engine_datasets ?? [],
153878
153862
  alias: config.build.alias,
153879
153863
  // We want to know if the build is for development or publishing
153880
153864
  // This could potentially cause issues as we no longer have identical behaviour between dev and deploy?
@@ -153986,7 +153970,6 @@ var BundlerController = class extends Controller {
153986
153970
  findAdditionalModules: config.build?.findAdditionalModules,
153987
153971
  durableObjects: bindings?.durable_objects ?? { bindings: [] },
153988
153972
  workflows: bindings?.workflows ?? [],
153989
- mockAnalyticsEngineDatasets: bindings.analytics_engine_datasets ?? [],
153990
153973
  local: !config.dev?.remote,
153991
153974
  // startDevWorker only applies to "dev"
153992
153975
  targetConsumer: "dev",
@@ -1,3 +0,0 @@
1
- declare module "config:middleware/mock-analytics-engine" {
2
- export const bindings: string[];
3
- }
@@ -1,30 +0,0 @@
1
- /// <reference path="middleware-mock-analytics-engine.d.ts"/>
2
-
3
- import { bindings } from "config:middleware/mock-analytics-engine";
4
- import type { Middleware } from "./common";
5
-
6
- const bindingsEnv = Object.fromEntries(
7
- bindings.map((binding) => [
8
- binding,
9
- {
10
- writeDataPoint() {
11
- // no op in dev
12
- },
13
- },
14
- ])
15
- ) satisfies Record<string, AnalyticsEngineDataset>;
16
-
17
- const analyticsEngine: Middleware = async (
18
- request,
19
- env,
20
- _ctx,
21
- middlewareCtx
22
- ) => {
23
- // we're going to directly modify env so it maintains referential equality
24
- for (const binding of bindings) {
25
- env[binding] ??= bindingsEnv[binding];
26
- }
27
- return await middlewareCtx.next(request, env);
28
- };
29
-
30
- export default analyticsEngine;