@discordjs/rest 2.6.0 → 2.6.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/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
4
  // src/index.ts
5
- import { Blob as Blob2 } from "node:buffer";
5
+ import { Blob as Blob2 } from "buffer";
6
6
  import { shouldUseGlobalFetchAndWebSocket } from "@discordjs/util";
7
7
  import { FormData as FormData2 } from "undici";
8
8
 
@@ -18,9 +18,9 @@ function getDefaultStrategy() {
18
18
  __name(getDefaultStrategy, "getDefaultStrategy");
19
19
 
20
20
  // src/strategies/undiciRequest.ts
21
- import { STATUS_CODES } from "node:http";
22
- import { URLSearchParams as URLSearchParams2 } from "node:url";
23
- import { types } from "node:util";
21
+ import { STATUS_CODES } from "http";
22
+ import { URLSearchParams as URLSearchParams2 } from "url";
23
+ import { types } from "util";
24
24
  import { request, Headers } from "undici";
25
25
  async function makeRequest(url, init) {
26
26
  const options = {
@@ -86,7 +86,7 @@ import { CDNRoutes } from "discord-api-types/v10";
86
86
  // src/lib/utils/constants.ts
87
87
  import { getUserAgentAppendix } from "@discordjs/util";
88
88
  import { APIVersion } from "discord-api-types/v10";
89
- var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.6.0)`;
89
+ var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.6.2)`;
90
90
  var DefaultUserAgentAppendix = getUserAgentAppendix();
91
91
  var DefaultRestOptions = {
92
92
  agent: null,
@@ -302,6 +302,8 @@ var CDN = class {
302
302
  this.cdn = cdn;
303
303
  this.mediaProxy = mediaProxy;
304
304
  }
305
+ cdn;
306
+ mediaProxy;
305
307
  static {
306
308
  __name(this, "CDN");
307
309
  }
@@ -582,6 +584,11 @@ var DiscordAPIError = class _DiscordAPIError extends Error {
582
584
  this.url = url;
583
585
  this.requestBody = { files: bodyData.files, json: bodyData.body };
584
586
  }
587
+ rawError;
588
+ code;
589
+ status;
590
+ method;
591
+ url;
585
592
  static {
586
593
  __name(this, "DiscordAPIError");
587
594
  }
@@ -638,6 +645,9 @@ var HTTPError = class _HTTPError extends Error {
638
645
  this.url = url;
639
646
  this.requestBody = { files: bodyData.files, json: bodyData.body };
640
647
  }
648
+ status;
649
+ method;
650
+ url;
641
651
  static {
642
652
  __name(this, "HTTPError");
643
653
  }
@@ -738,6 +748,9 @@ var BurstHandler = class {
738
748
  this.majorParameter = majorParameter;
739
749
  this.id = `${hash}:${majorParameter}`;
740
750
  }
751
+ manager;
752
+ hash;
753
+ majorParameter;
741
754
  static {
742
755
  __name(this, "BurstHandler");
743
756
  }
@@ -845,6 +858,9 @@ var SequentialHandler = class {
845
858
  this.majorParameter = majorParameter;
846
859
  this.id = `${hash}:${majorParameter}`;
847
860
  }
861
+ manager;
862
+ hash;
863
+ majorParameter;
848
864
  static {
849
865
  __name(this, "SequentialHandler");
850
866
  }
@@ -1442,7 +1458,7 @@ var REST = class _REST extends AsyncEventEmitter {
1442
1458
  };
1443
1459
 
1444
1460
  // src/shared.ts
1445
- var version = "2.6.0";
1461
+ var version = "2.6.2";
1446
1462
 
1447
1463
  // src/index.ts
1448
1464
  globalThis.FormData ??= FormData2;