You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

revolt-api

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revolt-api - npm Package Compare versions

Comparing version

to
0.8.4-rc.4

6

lib/index.js

@@ -114,3 +114,7 @@ export * from "./types.js";

: JSON.stringify(body);
const fetchdata = await fetch(new URL(`${path}?${query.toString()}`, config?.baseURL || this.baseURL).toString(), {
let fetchpath = `${path}?${query.toString()}`;
if (fetchpath.startsWith("/")) {
fetchpath = (config?.baseURL || this.baseURL) + fetchpath;
}
const fetchdata = await fetch(new URL(fetchpath).toString(), {
method,

@@ -117,0 +121,0 @@ headers: {

4

package.json
{
"name": "revolt-api",
"version": "0.8.4-rc.3",
"version": "0.8.4-rc.4",
"description": "Revolt API Library",

@@ -13,3 +13,3 @@ "type": "module",

"devDependencies": {
"@insertish/oapi": "0.2.0",
"@insertish/oapi": "0.2.1",
"in-publish": "^2.0.1",

@@ -16,0 +16,0 @@ "openapi-typescript": "^5.4.2",

@@ -194,16 +194,16 @@ // This file was auto-generated by @insertish/oapi!

: JSON.stringify(body);
const fetchdata = await fetch(
new URL(
`${path}?${query.toString()}`,
config?.baseURL || this.baseURL
).toString(),
{
method,
headers: {
...(config?.headers || {}),
...(this.config.headers || {}),
} as HeadersInit,
body: passbody,
}
);
let fetchpath = `${path}?${query.toString()}`;
if (fetchpath.startsWith("/")) {
fetchpath = (config?.baseURL || this.baseURL) + fetchpath;
}
const fetchdata = await fetch(new URL(fetchpath).toString(), {
method,
headers: {
...(config?.headers || {}),
...(this.config.headers || {}),
} as HeadersInit,
body: passbody,
});
return await fetchdata[config?.responseType || "json"]();

@@ -210,0 +210,0 @@ }