@discordjs/rest 3.0.0-dev.1765324923-548d75258 → 3.0.0-dev.1765454516-df0c28afc
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.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/strategies/undiciRequest.js +4 -4
- package/dist/strategies/undiciRequest.js.map +1 -1
- package/dist/strategies/undiciRequest.mjs +3 -3
- package/dist/strategies/undiciRequest.mjs.map +1 -1
- package/dist/web.js +2 -2
- package/dist/web.js.map +1 -1
- package/dist/web.mjs +2 -2
- package/dist/web.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -57,8 +57,8 @@ function getDefaultStrategy() {
|
|
|
57
57
|
__name(getDefaultStrategy, "getDefaultStrategy");
|
|
58
58
|
|
|
59
59
|
// src/strategies/undiciRequest.ts
|
|
60
|
+
var import_node_buffer = require("buffer");
|
|
60
61
|
var import_node_http = require("http");
|
|
61
|
-
var import_node_url = require("url");
|
|
62
62
|
var import_node_util = require("util");
|
|
63
63
|
var import_undici = require("undici");
|
|
64
64
|
var localAgent = null;
|
|
@@ -102,7 +102,7 @@ async function resolveBody(body) {
|
|
|
102
102
|
return body;
|
|
103
103
|
} else if (import_node_util.types.isArrayBuffer(body)) {
|
|
104
104
|
return new Uint8Array(body);
|
|
105
|
-
} else if (body instanceof
|
|
105
|
+
} else if (body instanceof URLSearchParams) {
|
|
106
106
|
return body.toString();
|
|
107
107
|
} else if (body instanceof DataView) {
|
|
108
108
|
return new Uint8Array(body.buffer);
|
|
@@ -114,13 +114,13 @@ async function resolveBody(body) {
|
|
|
114
114
|
return globalToUndiciFormData(body);
|
|
115
115
|
} else if (body[Symbol.iterator]) {
|
|
116
116
|
const chunks = [...body];
|
|
117
|
-
return Buffer.concat(chunks);
|
|
117
|
+
return import_node_buffer.Buffer.concat(chunks);
|
|
118
118
|
} else if (body[Symbol.asyncIterator]) {
|
|
119
119
|
const chunks = [];
|
|
120
120
|
for await (const chunk of body) {
|
|
121
121
|
chunks.push(chunk);
|
|
122
122
|
}
|
|
123
|
-
return Buffer.concat(chunks);
|
|
123
|
+
return import_node_buffer.Buffer.concat(chunks);
|
|
124
124
|
}
|
|
125
125
|
throw new TypeError(`Unable to resolve body.`);
|
|
126
126
|
}
|
|
@@ -144,7 +144,7 @@ var import_v102 = require("discord-api-types/v10");
|
|
|
144
144
|
// src/lib/utils/constants.ts
|
|
145
145
|
var import_util = require("@discordjs/util");
|
|
146
146
|
var import_v10 = require("discord-api-types/v10");
|
|
147
|
-
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.
|
|
147
|
+
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1765454516-df0c28afc)`;
|
|
148
148
|
var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
|
|
149
149
|
var DefaultRestOptions = {
|
|
150
150
|
agent: null,
|
|
@@ -1545,7 +1545,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
|
|
|
1545
1545
|
};
|
|
1546
1546
|
|
|
1547
1547
|
// src/shared.ts
|
|
1548
|
-
var version = "3.0.0-dev.
|
|
1548
|
+
var version = "3.0.0-dev.1765454516-df0c28afc";
|
|
1549
1549
|
|
|
1550
1550
|
// src/index.ts
|
|
1551
1551
|
setDefaultStrategy((0, import_util2.shouldUseGlobalFetchAndWebSocket)() ? fetch : makeRequest);
|