wrangler 3.113.0 → 3.114.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.113.0",
3
+ "version": "3.114.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -138,10 +138,10 @@
138
138
  "xdg-app-paths": "^8.3.0",
139
139
  "xxhash-wasm": "^1.0.1",
140
140
  "yargs": "^17.7.2",
141
+ "@cloudflare/cli": "1.1.1",
141
142
  "@cloudflare/eslint-config-worker": "1.1.0",
142
143
  "@cloudflare/pages-shared": "^0.13.12",
143
144
  "@cloudflare/workers-shared": "0.14.5",
144
- "@cloudflare/cli": "1.1.1",
145
145
  "@cloudflare/workers-tsconfig": "0.0.0"
146
146
  },
147
147
  "peerDependencies": {
@@ -81430,7 +81430,7 @@ var import_undici3 = __toESM(require_undici());
81430
81430
 
81431
81431
  // package.json
81432
81432
  var name = "wrangler";
81433
- var version = "3.113.0";
81433
+ var version = "3.114.0";
81434
81434
 
81435
81435
  // src/environment-variables/misc-variables.ts
81436
81436
  init_import_meta_url();
@@ -102608,7 +102608,7 @@ function tableFromLifecycleRulesResponse(rules) {
102608
102608
  actions.push(`${action} ${condition}`);
102609
102609
  }
102610
102610
  rows.push({
102611
- id: rule.id,
102611
+ name: rule.id,
102612
102612
  enabled: rule.enabled ? "Yes" : "No",
102613
102613
  prefix: rule.conditions.prefix || "(all prefixes)",
102614
102614
  action: actions.join(", ") || "(none)"
@@ -102651,7 +102651,7 @@ function tableFromBucketLockRulesResponse(rules) {
102651
102651
  for (const rule of rules) {
102652
102652
  const conditionString = formatLockCondition(rule.condition);
102653
102653
  rows.push({
102654
- id: rule.id,
102654
+ name: rule.id,
102655
102655
  enabled: rule.enabled ? "Yes" : "No",
102656
102656
  prefix: rule.prefix || "(all prefixes)",
102657
102657
  condition: conditionString
@@ -135489,15 +135489,16 @@ var r2BucketLifecycleAddCommand = createCommand({
135489
135489
  status: "stable",
135490
135490
  owner: "Product: R2"
135491
135491
  },
135492
- positionalArgs: ["bucket", "id", "prefix"],
135492
+ positionalArgs: ["bucket", "name", "prefix"],
135493
135493
  args: {
135494
135494
  bucket: {
135495
135495
  describe: "The name of the R2 bucket to add a lifecycle rule to",
135496
135496
  type: "string",
135497
135497
  demandOption: true
135498
135498
  },
135499
- id: {
135500
- describe: "A unique identifier for the lifecycle rule",
135499
+ name: {
135500
+ describe: "A unique name for the lifecycle rule, used to identify and manage it.",
135501
+ alias: "id",
135501
135502
  type: "string",
135502
135503
  requiresArg: true
135503
135504
  },
@@ -135553,7 +135554,7 @@ var r2BucketLifecycleAddCommand = createCommand({
135553
135554
  abortMultipartDays,
135554
135555
  jurisdiction,
135555
135556
  force,
135556
- id,
135557
+ name: name2,
135557
135558
  prefix
135558
135559
  }, { config }) {
135559
135560
  const accountId = await requireAuth(config);
@@ -135562,14 +135563,14 @@ var r2BucketLifecycleAddCommand = createCommand({
135562
135563
  bucket,
135563
135564
  jurisdiction
135564
135565
  );
135565
- if (!id && isInteractive2()) {
135566
- id = await prompt("Enter a unique identifier for the lifecycle rule");
135566
+ if (!name2 && isInteractive2()) {
135567
+ name2 = await prompt("Enter a unique name for the lifecycle rule");
135567
135568
  }
135568
- if (!id) {
135569
- throw new UserError("Must specify a rule ID.");
135569
+ if (!name2) {
135570
+ throw new UserError("Must specify a rule name.");
135570
135571
  }
135571
135572
  const newRule = {
135572
- id,
135573
+ id: name2,
135573
135574
  enabled: true,
135574
135575
  conditions: {}
135575
135576
  };
@@ -135684,7 +135685,7 @@ var r2BucketLifecycleAddCommand = createCommand({
135684
135685
  }
135685
135686
  if (!prefix && !force) {
135686
135687
  const confirmedAdd = await confirm(
135687
- `Are you sure you want to add lifecycle rule '${id}' to bucket '${bucket}' without a prefix? The lifecycle rule will apply to all objects in your bucket.`
135688
+ `Are you sure you want to add lifecycle rule '${name2}' to bucket '${bucket}' without a prefix? The lifecycle rule will apply to all objects in your bucket.`
135688
135689
  );
135689
135690
  if (!confirmedAdd) {
135690
135691
  logger.log("Add cancelled.");
@@ -135695,9 +135696,9 @@ var r2BucketLifecycleAddCommand = createCommand({
135695
135696
  newRule.conditions.prefix = prefix;
135696
135697
  }
135697
135698
  lifecycleRules.push(newRule);
135698
- logger.log(`Adding lifecycle rule '${id}' to bucket '${bucket}'...`);
135699
+ logger.log(`Adding lifecycle rule '${name2}' to bucket '${bucket}'...`);
135699
135700
  await putLifecycleRules(accountId, bucket, lifecycleRules, jurisdiction);
135700
- logger.log(`\u2728 Added lifecycle rule '${id}' to bucket '${bucket}'.`);
135701
+ logger.log(`\u2728 Added lifecycle rule '${name2}' to bucket '${bucket}'.`);
135701
135702
  }
135702
135703
  });
135703
135704
  var r2BucketLifecycleRemoveCommand = createCommand({
@@ -135713,8 +135714,9 @@ var r2BucketLifecycleRemoveCommand = createCommand({
135713
135714
  type: "string",
135714
135715
  demandOption: true
135715
135716
  },
135716
- id: {
135717
- describe: "The unique identifier of the lifecycle rule to remove",
135717
+ name: {
135718
+ describe: "The unique name of the lifecycle rule to remove",
135719
+ alias: "id",
135718
135720
  type: "string",
135719
135721
  demandOption: true,
135720
135722
  requiresArg: true
@@ -135728,22 +135730,22 @@ var r2BucketLifecycleRemoveCommand = createCommand({
135728
135730
  },
135729
135731
  async handler(args, { config }) {
135730
135732
  const accountId = await requireAuth(config);
135731
- const { bucket, id, jurisdiction } = args;
135733
+ const { bucket, name: name2, jurisdiction } = args;
135732
135734
  const lifecycleRules = await getLifecycleRules(
135733
135735
  accountId,
135734
135736
  bucket,
135735
135737
  jurisdiction
135736
135738
  );
135737
- const index = lifecycleRules.findIndex((rule) => rule.id === id);
135739
+ const index = lifecycleRules.findIndex((rule) => rule.id === name2);
135738
135740
  if (index === -1) {
135739
135741
  throw new UserError(
135740
- `Lifecycle rule with ID '${id}' not found in configuration for '${bucket}'.`
135742
+ `Lifecycle rule with ID '${name2}' not found in configuration for '${bucket}'.`
135741
135743
  );
135742
135744
  }
135743
135745
  lifecycleRules.splice(index, 1);
135744
- logger.log(`Removing lifecycle rule '${id}' from bucket '${bucket}'...`);
135746
+ logger.log(`Removing lifecycle rule '${name2}' from bucket '${bucket}'...`);
135745
135747
  await putLifecycleRules(accountId, bucket, lifecycleRules, jurisdiction);
135746
- logger.log(`Lifecycle rule '${id}' removed from bucket '${bucket}'.`);
135748
+ logger.log(`Lifecycle rule '${name2}' removed from bucket '${bucket}'.`);
135747
135749
  }
135748
135750
  });
135749
135751
  var r2BucketLifecycleSetCommand = createCommand({
@@ -135868,15 +135870,16 @@ var r2BucketLockAddCommand = createCommand({
135868
135870
  status: "stable",
135869
135871
  owner: "Product: R2"
135870
135872
  },
135871
- positionalArgs: ["bucket", "id", "prefix"],
135873
+ positionalArgs: ["bucket", "name", "prefix"],
135872
135874
  args: {
135873
135875
  bucket: {
135874
135876
  describe: "The name of the R2 bucket to add a bucket lock rule to",
135875
135877
  type: "string",
135876
135878
  demandOption: true
135877
135879
  },
135878
- id: {
135879
- describe: "A unique identifier for the bucket lock rule",
135880
+ name: {
135881
+ describe: "A unique name for the bucket lock rule, used to identify and manage it.",
135882
+ alias: "id",
135880
135883
  type: "string",
135881
135884
  requiresArg: true
135882
135885
  },
@@ -135920,21 +135923,21 @@ var r2BucketLockAddCommand = createCommand({
135920
135923
  retentionIndefinite,
135921
135924
  jurisdiction,
135922
135925
  force,
135923
- id,
135926
+ name: name2,
135924
135927
  prefix
135925
135928
  }, { config }) {
135926
135929
  const accountId = await requireAuth(config);
135927
135930
  const rules = await getBucketLockRules(accountId, bucket, jurisdiction);
135928
- if (!id && !isNonInteractiveOrCI() && !force) {
135929
- id = await prompt("Enter a unique identifier for the lock rule");
135931
+ if (!name2 && !isNonInteractiveOrCI() && !force) {
135932
+ name2 = await prompt("Enter a unique name for the lock rule");
135930
135933
  }
135931
- if (!id) {
135932
- throw new UserError("Must specify a rule ID.", {
135934
+ if (!name2) {
135935
+ throw new UserError("Must specify a rule name.", {
135933
135936
  telemetryMessage: true
135934
135937
  });
135935
135938
  }
135936
135939
  const newRule = {
135937
- id,
135940
+ id: name2,
135938
135941
  enabled: true,
135939
135942
  condition: { type: "Indefinite" }
135940
135943
  };
@@ -135945,7 +135948,7 @@ var r2BucketLockAddCommand = createCommand({
135945
135948
  );
135946
135949
  if (prefix === "") {
135947
135950
  const confirmedAdd = await confirm(
135948
- `Are you sure you want to add lock rule '${id}' to bucket '${bucket}' without a prefix? The lock rule will apply to all objects in your bucket.`,
135951
+ `Are you sure you want to add lock rule '${name2}' to bucket '${bucket}' without a prefix? The lock rule will apply to all objects in your bucket.`,
135949
135952
  { defaultValue: false }
135950
135953
  );
135951
135954
  if (!confirmedAdd) {
@@ -135959,7 +135962,7 @@ var r2BucketLockAddCommand = createCommand({
135959
135962
  }
135960
135963
  if (retentionDays === void 0 && retentionDate === void 0 && retentionIndefinite === void 0 && !force) {
135961
135964
  retentionIndefinite = await confirm(
135962
- `Are you sure you want to add lock rule '${id}' to bucket '${bucket}' without retention? The lock rule will apply to all matching objects indefinitely.`,
135965
+ `Are you sure you want to add lock rule '${name2}' to bucket '${bucket}' without retention? The lock rule will apply to all matching objects indefinitely.`,
135963
135966
  { defaultValue: false }
135964
135967
  );
135965
135968
  if (retentionIndefinite !== true) {
@@ -136014,9 +136017,9 @@ var r2BucketLockAddCommand = createCommand({
136014
136017
  });
136015
136018
  }
136016
136019
  rules.push(newRule);
136017
- logger.log(`Adding lock rule '${id}' to bucket '${bucket}'...`);
136020
+ logger.log(`Adding lock rule '${name2}' to bucket '${bucket}'...`);
136018
136021
  await putBucketLockRules(accountId, bucket, rules, jurisdiction);
136019
- logger.log(`\u2728 Added lock rule '${id}' to bucket '${bucket}'.`);
136022
+ logger.log(`\u2728 Added lock rule '${name2}' to bucket '${bucket}'.`);
136020
136023
  }
136021
136024
  });
136022
136025
  var r2BucketLockRemoveCommand = createCommand({
@@ -136032,8 +136035,9 @@ var r2BucketLockRemoveCommand = createCommand({
136032
136035
  type: "string",
136033
136036
  demandOption: true
136034
136037
  },
136035
- id: {
136036
- describe: "The unique identifier of the bucket lock rule to remove",
136038
+ name: {
136039
+ describe: "The unique name of the bucket lock rule to remove",
136040
+ alias: "id",
136037
136041
  type: "string",
136038
136042
  demandOption: true,
136039
136043
  requiresArg: true
@@ -136047,25 +136051,25 @@ var r2BucketLockRemoveCommand = createCommand({
136047
136051
  },
136048
136052
  async handler(args, { config }) {
136049
136053
  const accountId = await requireAuth(config);
136050
- const { bucket, id, jurisdiction } = args;
136054
+ const { bucket, name: name2, jurisdiction } = args;
136051
136055
  const lockPolicies = await getBucketLockRules(
136052
136056
  accountId,
136053
136057
  bucket,
136054
136058
  jurisdiction
136055
136059
  );
136056
- const index = lockPolicies.findIndex((policy) => policy.id === id);
136060
+ const index = lockPolicies.findIndex((policy) => policy.id === name2);
136057
136061
  if (index === -1) {
136058
136062
  throw new UserError(
136059
- `Lock rule with ID '${id}' not found in configuration for '${bucket}'.`,
136063
+ `Lock rule with ID '${name2}' not found in configuration for '${bucket}'.`,
136060
136064
  {
136061
- telemetryMessage: "Lock rule with ID not found in configuration for bucket."
136065
+ telemetryMessage: "Lock rule with name not found in configuration for bucket."
136062
136066
  }
136063
136067
  );
136064
136068
  }
136065
136069
  lockPolicies.splice(index, 1);
136066
- logger.log(`Removing lock rule '${id}' from bucket '${bucket}'...`);
136070
+ logger.log(`Removing lock rule '${name2}' from bucket '${bucket}'...`);
136067
136071
  await putBucketLockRules(accountId, bucket, lockPolicies, jurisdiction);
136068
- logger.log(`Lock rule '${id}' removed from bucket '${bucket}'.`);
136072
+ logger.log(`Lock rule '${name2}' removed from bucket '${bucket}'.`);
136069
136073
  }
136070
136074
  });
136071
136075
  var r2BucketLockSetCommand = createCommand({