wrangler 4.88.0 → 4.89.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.
@@ -330,6 +330,11 @@
330
330
  "description": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability",
331
331
  "markdownDescription": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability"
332
332
  },
333
+ "cache": {
334
+ "$ref": "#/definitions/CacheOptions",
335
+ "description": "Specify the cache behavior of the Worker.",
336
+ "markdownDescription": "Specify the cache behavior of the Worker."
337
+ },
333
338
  "compliance_region": {
334
339
  "type": "string",
335
340
  "enum": [
@@ -1974,6 +1979,11 @@
1974
1979
  "description": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability",
1975
1980
  "markdownDescription": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability"
1976
1981
  },
1982
+ "cache": {
1983
+ "$ref": "#/definitions/CacheOptions",
1984
+ "description": "Specify the cache behavior of the Worker.",
1985
+ "markdownDescription": "Specify the cache behavior of the Worker."
1986
+ },
1977
1987
  "compliance_region": {
1978
1988
  "type": "string",
1979
1989
  "enum": [
@@ -3530,18 +3540,35 @@
3530
3540
  },
3531
3541
  "additionalProperties": false
3532
3542
  },
3543
+ "CacheOptions": {
3544
+ "type": "object",
3545
+ "properties": {
3546
+ "enabled": {
3547
+ "type": "boolean",
3548
+ "description": "If cache is enabled for this Worker",
3549
+ "markdownDescription": "If cache is enabled for this Worker"
3550
+ }
3551
+ },
3552
+ "required": [
3553
+ "enabled"
3554
+ ],
3555
+ "additionalProperties": false
3556
+ },
3533
3557
  "PreviewsConfig": {
3534
3558
  "type": "object",
3535
3559
  "additionalProperties": false,
3536
3560
  "properties": {
3537
3561
  "logpush": {
3538
- "$ref": "#/definitions/interface-769040647-8080-17962-769040647-0-476602004818536"
3562
+ "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-476802004818536"
3539
3563
  },
3540
3564
  "observability": {
3541
- "$ref": "#/definitions/interface-769040647-8080-17962-769040647-0-476602004818536"
3565
+ "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-476802004818536"
3542
3566
  },
3543
3567
  "limits": {
3544
- "$ref": "#/definitions/interface-769040647-8080-17962-769040647-0-476602004818536"
3568
+ "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-476802004818536"
3569
+ },
3570
+ "cache": {
3571
+ "$ref": "#/definitions/interface-769040647-8080-17950-769040647-0-476802004818536"
3545
3572
  },
3546
3573
  "define": {
3547
3574
  "type": "object",
@@ -4737,10 +4764,10 @@
4737
4764
  "default": []
4738
4765
  }
4739
4766
  },
4740
- "description": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments. Previews are branches of your Worker's main instance used to test features during feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`",
4741
- "markdownDescription": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments.\nPreviews are branches of your Worker's main instance used to test features\nduring feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`"
4767
+ "description": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments. Previews are branches of your Worker's main instance used to test features during feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`",
4768
+ "markdownDescription": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments.\nPreviews are branches of your Worker's main instance used to test features\nduring feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`"
4742
4769
  },
4743
- "interface-769040647-8080-17962-769040647-0-476602004818536": {
4770
+ "interface-769040647-8080-17950-769040647-0-476802004818536": {
4744
4771
  "type": "object",
4745
4772
  "properties": {
4746
4773
  "name": {
@@ -5055,6 +5082,11 @@
5055
5082
  "description": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability",
5056
5083
  "markdownDescription": "Specify the observability behavior of the Worker.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability"
5057
5084
  },
5085
+ "cache": {
5086
+ "$ref": "#/definitions/CacheOptions",
5087
+ "description": "Specify the cache behavior of the Worker.",
5088
+ "markdownDescription": "Specify the cache behavior of the Worker."
5089
+ },
5058
5090
  "compliance_region": {
5059
5091
  "type": "string",
5060
5092
  "enum": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.88.0",
3
+ "version": "4.89.1",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -54,16 +54,16 @@
54
54
  "esbuild": "0.27.3",
55
55
  "path-to-regexp": "6.3.0",
56
56
  "unenv": "2.0.0-rc.24",
57
- "workerd": "1.20260504.1",
57
+ "workerd": "1.20260507.1",
58
58
  "@cloudflare/kv-asset-handler": "0.5.0",
59
- "miniflare": "4.20260504.0",
60
- "@cloudflare/unenv-preset": "2.16.1"
59
+ "@cloudflare/unenv-preset": "2.16.1",
60
+ "miniflare": "4.20260507.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@bomb.sh/tab": "^0.0.12",
65
65
  "@cloudflare/types": "6.18.4",
66
- "@cloudflare/workers-types": "^4.20260504.1",
66
+ "@cloudflare/workers-types": "^4.20260507.1",
67
67
  "@cspotcode/source-map-support": "0.8.1",
68
68
  "@netlify/build-info": "^10.5.1",
69
69
  "@sentry/node": "^7.86.0",
@@ -144,17 +144,17 @@
144
144
  "xxhash-wasm": "^1.0.1",
145
145
  "yaml": "^2.8.1",
146
146
  "yargs": "^17.7.2",
147
- "@cloudflare/cli-shared-helpers": "0.1.1",
147
+ "@cloudflare/cli-shared-helpers": "0.1.2",
148
148
  "@cloudflare/codemod": "1.1.0",
149
+ "@cloudflare/pages-shared": "^0.13.133",
149
150
  "@cloudflare/containers-shared": "0.14.1",
150
151
  "@cloudflare/workers-shared": "0.19.5",
152
+ "@cloudflare/workers-utils": "0.20.0",
151
153
  "@cloudflare/workflows-shared": "0.10.0",
152
- "@cloudflare/workers-tsconfig": "0.0.0",
153
- "@cloudflare/pages-shared": "^0.13.131",
154
- "@cloudflare/workers-utils": "0.19.0"
154
+ "@cloudflare/workers-tsconfig": "0.0.0"
155
155
  },
156
156
  "peerDependencies": {
157
- "@cloudflare/workers-types": "^4.20260504.1"
157
+ "@cloudflare/workers-types": "^4.20260507.1"
158
158
  },
159
159
  "peerDependenciesMeta": {
160
160
  "@cloudflare/workers-types": {
@@ -1461,7 +1461,6 @@ interface EnvironmentInheritable {
1461
1461
  * Specify the cache behavior of the Worker.
1462
1462
  *
1463
1463
  * @inheritable
1464
- * @hidden
1465
1464
  */
1466
1465
  cache: CacheOptions | undefined;
1467
1466
  /**
@@ -2355,11 +2354,11 @@ type ContainerEngine = {
2355
2354
  *
2356
2355
  * The `previews` block contains any intentionally divergent configuration intended solely for Previews, including:
2357
2356
  * - All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)
2358
- * - Select inheritable properties: `logpush`, `observability`, `limits`
2357
+ * - Select inheritable properties: `logpush`, `observability`, `limits`, `cache`
2359
2358
  *
2360
2359
  * @inheritable
2361
2360
  */
2362
- interface PreviewsConfig extends Partial<EnvironmentNonInheritable>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits">> {
2361
+ interface PreviewsConfig extends Partial<EnvironmentNonInheritable>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits" | "cache">> {
2363
2362
  }
2364
2363
 
2365
2364
  /**
@@ -39785,7 +39785,8 @@ ${resolution}`);
39785
39785
  "version_metadata",
39786
39786
  "logpush",
39787
39787
  "observability",
39788
- "limits"
39788
+ "limits",
39789
+ "cache"
39789
39790
  ]) && isValid22;
39790
39791
  isValid22 = validateVars(envName)(
39791
39792
  diagnostics,
@@ -40014,6 +40015,7 @@ ${resolution}`);
40014
40015
  "number"
40015
40016
  ) && isValid22;
40016
40017
  }
40018
+ isValid22 = validateCache(diagnostics, `${field}.cache`, previews.cache, void 0) && isValid22;
40017
40019
  return isValid22;
40018
40020
  }, "validatePreviewsConfig");
40019
40021
  validateMigrations = /* @__PURE__ */ __name2((diagnostics, field, value) => {
@@ -55811,7 +55813,7 @@ var name, version;
55811
55813
  var init_package = __esm({
55812
55814
  "package.json"() {
55813
55815
  name = "wrangler";
55814
- version = "4.88.0";
55816
+ version = "4.89.1";
55815
55817
  }
55816
55818
  });
55817
55819
  function getWranglerVersion() {
@@ -133134,34 +133136,57 @@ var init_cfetch = __esm({
133134
133136
  });
133135
133137
 
133136
133138
  // src/user/fetch-accounts.ts
133137
- async function fetchAllAccounts(complianceConfig) {
133138
- try {
133139
- const response = await fetchPagedListResult(complianceConfig, `/memberships`);
133140
- const accounts = response.map((r9) => r9.account);
133141
- if (accounts.length === 0) {
133142
- throw new UserError(
133143
- `Failed to automatically retrieve account IDs for the logged in user.
133144
- In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${configFileName(void 0)} file.`,
133145
- { telemetryMessage: "user account fetch empty" }
133146
- );
133147
- }
133148
- return accounts;
133149
- } catch (err) {
133150
- if (err.code === 9109) {
133139
+ function isMembershipsInaccessible(err) {
133140
+ const code = err?.code;
133141
+ return code !== void 0 && MEMBERSHIPS_INACCESSIBLE_CODES.includes(code);
133142
+ }
133143
+ async function fetchAllAccounts(complianceConfig, options = {}) {
133144
+ const { throwOnEmpty = true } = options;
133145
+ const [accountsRes, membershipsRes] = await Promise.allSettled([
133146
+ fetchPagedListResult(complianceConfig, `/accounts`),
133147
+ fetchPagedListResult(
133148
+ complianceConfig,
133149
+ `/memberships`
133150
+ )
133151
+ ]);
133152
+ if (accountsRes.status === "rejected") {
133153
+ throw accountsRes.reason;
133154
+ }
133155
+ if (membershipsRes.status === "rejected") {
133156
+ if (isMembershipsInaccessible(membershipsRes.reason)) {
133157
+ if (accountsRes.status === "fulfilled" && accountsRes.value.length > 0) {
133158
+ return accountsRes.value;
133159
+ }
133151
133160
  throw new UserError(
133152
133161
  `Failed to automatically retrieve account IDs for the logged in user.
133153
- You may have incorrect permissions on your API token. You can skip this account check by adding an \`account_id\` in your ${configFileName(void 0)} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID"`,
133162
+ You may have incorrect permissions on your API token. You can skip this account check by adding an \`account_id\` in your ${configFileName(void 0)} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,
133154
133163
  { telemetryMessage: "user account fetch permission denied" }
133155
133164
  );
133165
+ } else {
133166
+ throw membershipsRes.reason;
133156
133167
  }
133157
- throw err;
133158
133168
  }
133169
+ const membershipIds = new Set(membershipsRes.value.map((m6) => m6.account.id));
133170
+ const usableAccounts = accountsRes.value.filter(
133171
+ (a7) => membershipIds.has(a7.id)
133172
+ );
133173
+ if (usableAccounts.length === 0 && throwOnEmpty) {
133174
+ throw new UserError(
133175
+ `Failed to automatically retrieve account IDs for the logged in user.
133176
+ In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${configFileName(void 0)} file.`,
133177
+ { telemetryMessage: "user account fetch empty" }
133178
+ );
133179
+ }
133180
+ return usableAccounts;
133159
133181
  }
133182
+ var MEMBERSHIPS_INACCESSIBLE_CODES;
133160
133183
  var init_fetch_accounts = __esm({
133161
133184
  "src/user/fetch-accounts.ts"() {
133162
133185
  init_import_meta_url();
133163
133186
  init_dist();
133164
133187
  init_cfetch();
133188
+ MEMBERSHIPS_INACCESSIBLE_CODES = [9109, 1e4];
133189
+ __name(isMembershipsInaccessible, "isMembershipsInaccessible");
133165
133190
  __name(fetchAllAccounts, "fetchAllAccounts");
133166
133191
  }
133167
133192
  });
@@ -152063,8 +152088,7 @@ var init_ssh = __esm({
152063
152088
  metadata: {
152064
152089
  description: "SSH into a container",
152065
152090
  status: "stable",
152066
- owner: "Product: Cloudchamber",
152067
- hidden: true
152091
+ owner: "Product: Cloudchamber"
152068
152092
  },
152069
152093
  args: sshArgDefs,
152070
152094
  positionalArgs: ["ID"],
@@ -244464,8 +244488,12 @@ async function deploy2({
244464
244488
  logger.log(`\u2728 Uploading Worker bundle`);
244465
244489
  if (_routesCustom) {
244466
244490
  try {
244467
- const routesCustomJSON = JSON.parse(_routesCustom);
244468
- validateRoutes2(routesCustomJSON, path3.join(directory, "_routes.json"));
244491
+ const routesPath = path3.join(directory, "_routes.json");
244492
+ const routesCustomJSON = parseJSON(
244493
+ _routesCustom,
244494
+ routesPath
244495
+ );
244496
+ validateRoutes2(routesCustomJSON, routesPath);
244469
244497
  formData.append(
244470
244498
  "_routes.json",
244471
244499
  new File([_routesCustom], "_routes.json")
@@ -244475,6 +244503,13 @@ async function deploy2({
244475
244503
  if (err instanceof FatalError) {
244476
244504
  throw err;
244477
244505
  }
244506
+ if (err instanceof ParseError) {
244507
+ throw new FatalError(
244508
+ `Invalid _routes.json file at ${path3.join(directory, "_routes.json")}: ${err.text}`,
244509
+ { code: 1, telemetryMessage: "pages deploy invalid routes json" }
244510
+ );
244511
+ }
244512
+ throw err;
244478
244513
  }
244479
244514
  }
244480
244515
  }
@@ -244490,8 +244525,12 @@ async function deploy2({
244490
244525
  logger.log(`\u2728 Uploading Functions bundle`);
244491
244526
  if (_routesCustom) {
244492
244527
  try {
244493
- const routesCustomJSON = JSON.parse(_routesCustom);
244494
- validateRoutes2(routesCustomJSON, path3.join(directory, "_routes.json"));
244528
+ const routesPath = path3.join(directory, "_routes.json");
244529
+ const routesCustomJSON = parseJSON(
244530
+ _routesCustom,
244531
+ routesPath
244532
+ );
244533
+ validateRoutes2(routesCustomJSON, routesPath);
244495
244534
  formData.append(
244496
244535
  "_routes.json",
244497
244536
  new File([_routesCustom], "_routes.json")
@@ -244501,6 +244540,13 @@ async function deploy2({
244501
244540
  if (err instanceof FatalError) {
244502
244541
  throw err;
244503
244542
  }
244543
+ if (err instanceof ParseError) {
244544
+ throw new FatalError(
244545
+ `Invalid _routes.json file at ${path3.join(directory, "_routes.json")}: ${err.text}`,
244546
+ { code: 1, telemetryMessage: "pages deploy invalid routes json" }
244547
+ );
244548
+ }
244549
+ throw err;
244504
244550
  }
244505
244551
  } else if (routesOutputPath) {
244506
244552
  try {
@@ -285644,6 +285690,9 @@ function extractConfigBindings(config) {
285644
285690
  if (previews?.version_metadata) {
285645
285691
  env6[previews.version_metadata.binding] = { type: "version_metadata" };
285646
285692
  }
285693
+ if (config.assets?.binding) {
285694
+ env6[config.assets.binding] = { type: "assets" };
285695
+ }
285647
285696
  return env6;
285648
285697
  }
285649
285698
  function assemblePreviewScriptSettings(config) {
@@ -285676,6 +285725,9 @@ function assemblePreviewDefaults(config) {
285676
285725
  if (previews?.limits || config.limits) {
285677
285726
  previewDefaults.limits = previews?.limits ?? config.limits;
285678
285727
  }
285728
+ if (previews?.cache !== void 0 || config.cache !== void 0) {
285729
+ previewDefaults.cache = previews?.cache ?? config.cache;
285730
+ }
285679
285731
  if (config.placement) {
285680
285732
  previewDefaults.placement = parseConfigPlacement(config);
285681
285733
  }
@@ -285915,6 +285967,11 @@ async function assemblePreviewDeploymentSettings(config, scriptPath4, accountId,
285915
285967
  } else if (config.limits !== void 0) {
285916
285968
  request4.limits = config.limits;
285917
285969
  }
285970
+ if (previews?.cache !== void 0) {
285971
+ request4.cache = previews.cache;
285972
+ } else if (config.cache !== void 0) {
285973
+ request4.cache = config.cache;
285974
+ }
285918
285975
  if (config.placement) {
285919
285976
  request4.placement = parseConfigPlacement(config);
285920
285977
  }
@@ -285984,6 +286041,12 @@ function buildMergedVersionLevel(config, deployment) {
285984
286041
  fromConfig: !!config.placement?.mode
285985
286042
  };
285986
286043
  }
286044
+ if (deployment.cache !== void 0) {
286045
+ result.cache = {
286046
+ value: deployment.cache,
286047
+ fromConfig: previews?.cache !== void 0 || config.cache !== void 0
286048
+ };
286049
+ }
285987
286050
  if (config.assets) {
285988
286051
  result.assets = {
285989
286052
  value: {
@@ -286131,6 +286194,13 @@ function formatDeploymentResource(deployment, versionLevel, configName) {
286131
286194
  versionLevel.placement.fromConfig
286132
286195
  ]);
286133
286196
  }
286197
+ if (versionLevel.cache !== void 0) {
286198
+ settingsRows.push([
286199
+ "cache",
286200
+ versionLevel.cache.value?.enabled ? "enabled" : "disabled",
286201
+ versionLevel.cache.fromConfig
286202
+ ]);
286203
+ }
286134
286204
  if (settingsRows.length > 0) {
286135
286205
  lines.push("");
286136
286206
  lines.push(...formatAlignedRows(settingsRows));
@@ -286170,9 +286240,6 @@ function formatDeploymentResource(deployment, versionLevel, configName) {
286170
286240
  const footerLines = hasConfigValues ? ["", source_default.hex("#FFA500")(`\u25C6 from ${configName}`)] : void 0;
286171
286241
  return drawConnectedChildBox(lines, { footerLines, indent: " " });
286172
286242
  }
286173
- function isInheritableBinding(binding) {
286174
- return binding.type === "assets";
286175
- }
286176
286243
  function logMissingPreviewsBindingsWarning(topLevelBindings, remotePreviewDefaultBindings, localPreviewBindings) {
286177
286244
  const availableBindingNames = /* @__PURE__ */ new Set([
286178
286245
  ...Object.keys(remotePreviewDefaultBindings ?? {}),
@@ -286180,7 +286247,7 @@ function logMissingPreviewsBindingsWarning(topLevelBindings, remotePreviewDefaul
286180
286247
  ]);
286181
286248
  const missingBindings = Object.fromEntries(
286182
286249
  Object.entries(topLevelBindings ?? {}).filter(
286183
- ([name2, binding]) => !availableBindingNames.has(name2) && !isInheritableBinding(binding)
286250
+ ([name2]) => !availableBindingNames.has(name2)
286184
286251
  )
286185
286252
  );
286186
286253
  if (Object.keys(missingBindings).length === 0) {
@@ -286368,7 +286435,6 @@ var init_preview2 = __esm({
286368
286435
  __name(formatBindings, "formatBindings");
286369
286436
  __name(formatPreviewResource, "formatPreviewResource");
286370
286437
  __name(formatDeploymentResource, "formatDeploymentResource");
286371
- __name(isInheritableBinding, "isInheritableBinding");
286372
286438
  __name(logMissingPreviewsBindingsWarning, "logMissingPreviewsBindingsWarning");
286373
286439
  __name(handlePreviewCommand, "handlePreviewCommand");
286374
286440
  __name(handlePreviewDeleteCommand, "handlePreviewDeleteCommand");
@@ -289028,6 +289094,12 @@ function formatPreviewsSettings(workerName, previewDefaults) {
289028
289094
  if (typeof previewDefaults.placement?.mode === "string") {
289029
289095
  settingsRows.push(["placement", previewDefaults.placement.mode]);
289030
289096
  }
289097
+ if (previewDefaults.cache !== void 0) {
289098
+ settingsRows.push([
289099
+ "cache",
289100
+ previewDefaults.cache.enabled ? "enabled" : "disabled"
289101
+ ]);
289102
+ }
289031
289103
  if (settingsRows.length > 0) {
289032
289104
  const labelWidth = Math.max(...settingsRows.map(([label]) => label.length));
289033
289105
  for (const [label, value] of settingsRows) {
@@ -297642,7 +297714,7 @@ var init_helpers7 = __esm({
297642
297714
  telemetryMessage: false
297643
297715
  });
297644
297716
  }, "unsafeParseBooleanString");
297645
- checkTypesUpToDate = /* @__PURE__ */ __name(async (primaryConfig, envInterface, typesPath = DEFAULT_WORKERS_TYPES_FILE_PATH, serviceEntries = /* @__PURE__ */ new Map()) => {
297717
+ checkTypesUpToDate = /* @__PURE__ */ __name(async (primaryConfig, envInterface, typesPath = DEFAULT_WORKERS_TYPES_FILE_PATH, serviceEntries = /* @__PURE__ */ new Map(), cliEnvFile, cliEnv) => {
297646
297718
  let typesFileLines = new Array();
297647
297719
  try {
297648
297720
  typesFileLines = fs29.readFileSync(typesPath, "utf-8").split("\n");
@@ -297669,11 +297741,16 @@ var init_helpers7 = __esm({
297669
297741
  /\/\/ Generated by Wrangler by running `(?<command>.*)` \(hash: (?<hash>[a-zA-Z0-9]+)\)/
297670
297742
  )?.groups ?? {};
297671
297743
  const rawArgs = yargs_default(wranglerCommand).parseSync();
297744
+ const rawEnvFile = rawArgs.envFile;
297745
+ const envFile = cliEnvFile ?? (typeof rawEnvFile === "string" ? [rawEnvFile] : Array.isArray(rawEnvFile) ? rawEnvFile : void 0);
297746
+ const env6 = cliEnv ?? rawArgs.env;
297672
297747
  const args = {
297673
297748
  includeEnv: existingEnvHeader ? unsafeParseBooleanString(rawArgs.includeEnv ?? "true") : false,
297674
297749
  includeRuntime: existingRuntimeHeader ? unsafeParseBooleanString(rawArgs.includeRuntime ?? "true") : false,
297675
297750
  envInterface: envInterface ?? (rawArgs.envInterface ?? "Env"),
297676
- strictVars: unsafeParseBooleanString(rawArgs.strictVars ?? "true")
297751
+ strictVars: unsafeParseBooleanString(rawArgs.strictVars ?? "true"),
297752
+ envFile,
297753
+ env: env6
297677
297754
  };
297678
297755
  const configContainsEntrypoint = primaryConfig.main !== void 0 || !!primaryConfig.site?.["entry-point"];
297679
297756
  const entrypoint = configContainsEntrypoint ? await getEntry({}, primaryConfig, "types").catch(() => void 0) : void 0;
@@ -297683,7 +297760,7 @@ var init_helpers7 = __esm({
297683
297760
  try {
297684
297761
  const { envHeader } = await generateEnvTypes(
297685
297762
  primaryConfig,
297686
- { strictVars: args.strictVars },
297763
+ { strictVars: args.strictVars, envFile: args.envFile, env: args.env },
297687
297764
  args.envInterface,
297688
297765
  typesPath,
297689
297766
  entrypoint,
@@ -300572,7 +300649,9 @@ var init_type_generation = __esm({
300572
300649
  config,
300573
300650
  envInterface,
300574
300651
  outputPath,
300575
- secondaryEntries
300652
+ secondaryEntries,
300653
+ args.envFile,
300654
+ args.env
300576
300655
  );
300577
300656
  if (outOfDate) {
300578
300657
  throw new FatalError(
@@ -300915,7 +300994,10 @@ async function getEmail(complianceConfig) {
300915
300994
  }
300916
300995
  }
300917
300996
  async function getAccounts(complianceConfig) {
300918
- return await fetchPagedListResult(complianceConfig, "/accounts");
300997
+ return await fetchAllAccounts(complianceConfig, {
300998
+ // `whoami` is informational and should render an empty list rather than fail when the intersection is empty.
300999
+ throwOnEmpty: false
301000
+ });
300919
301001
  }
300920
301002
  async function getTokenPermissions() {
300921
301003
  return getScopes();
@@ -300929,6 +301011,7 @@ var init_whoami = __esm({
300929
301011
  init_handle_errors();
300930
301012
  init_logger();
300931
301013
  init_format_message();
301014
+ init_fetch_accounts();
300932
301015
  init_membership();
300933
301016
  init_user3();
300934
301017
  __name(whoami, "whoami");
@@ -313878,10 +313961,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
313878
313961
  }
313879
313962
  const uploadMs = Date.now() - start;
313880
313963
  logger.log("Uploaded", workerName, formatTime2(uploadMs));
313881
- if (props.dispatchNamespace !== void 0) {
313882
- deployWfpUserWorker(props.dispatchNamespace, versionId);
313883
- return { versionId, workerTag };
313884
- }
313885
313964
  if (normalisedContainerConfig.length) {
313886
313965
  assert56__default.default(versionId && accountId);
313887
313966
  await deployContainers(config, normalisedContainerConfig, {
@@ -313890,6 +313969,10 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
313890
313969
  scriptName
313891
313970
  });
313892
313971
  }
313972
+ if (props.dispatchNamespace !== void 0) {
313973
+ deployWfpUserWorker(props.dispatchNamespace, versionId);
313974
+ return { versionId, workerTag };
313975
+ }
313893
313976
  const targets = await triggersDeploy({
313894
313977
  ...props,
313895
313978
  firstDeploy: !workerExists,