chore: deps

This commit is contained in:
iCrawl
2022-04-17 11:27:36 +02:00
parent a58556adc0
commit bcf7f1cfad
54 changed files with 669 additions and 526 deletions

View File

@@ -1,8 +1,8 @@
import nock from 'nock';
import { DiscordSnowflake } from '@sapphire/snowflake';
import { REST, DefaultRestOptions, APIRequest } from '../src';
import { Routes, Snowflake } from 'discord-api-types/v10';
import nock from 'nock';
import { Response } from 'node-fetch';
import { REST, DefaultRestOptions, APIRequest } from '../src';
const newSnowflake: Snowflake = DiscordSnowflake.generate().toString();

View File

@@ -51,35 +51,35 @@
"homepage": "https://discord.js.org",
"dependencies": {
"@discordjs/collection": "workspace:^",
"@sapphire/async-queue": "^1.2.0",
"@sapphire/snowflake": "^3.1.0",
"@types/node-fetch": "^2.5.12",
"@sapphire/async-queue": "^1.3.1",
"@sapphire/snowflake": "^3.2.1",
"@types/node-fetch": "^2.6.1",
"discord-api-types": "^0.29.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.7",
"tslib": "^2.3.1"
},
"devDependencies": {
"@babel/core": "^7.17.2",
"@babel/plugin-proposal-decorators": "^7.17.2",
"@babel/core": "^7.17.9",
"@babel/plugin-proposal-decorators": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@discordjs/ts-docgen": "^0.3.4",
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"babel-plugin-const-enum": "^1.2.0",
"babel-plugin-transform-typescript-metadata": "^0.3.2",
"eslint": "^8.9.0",
"eslint-config-marine": "^9.3.2",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint": "^8.13.0",
"eslint-config-marine": "^9.4.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"jest": "^27.5.1",
"nock": "^13.2.4",
"prettier": "^2.5.1",
"prettier": "^2.6.2",
"tsup": "^5.11.13",
"typedoc": "^0.22.11",
"typescript": "^4.5.5"
"typedoc": "^0.22.15",
"typescript": "^4.6.3"
},
"engines": {
"node": ">=16.9.0"

View File

@@ -1,4 +1,7 @@
import { EventEmitter } from 'node:events';
import type { AgentOptions } from 'node:https';
import type Collection from '@discordjs/collection';
import type { RequestInit, Response } from 'node-fetch';
import { CDN } from './CDN';
import {
HandlerRequestData,
@@ -8,12 +11,9 @@ import {
RequestMethod,
RouteLike,
} from './RequestManager';
import { DefaultRestOptions, RESTEvents } from './utils/constants';
import type { AgentOptions } from 'node:https';
import type { RequestInit, Response } from 'node-fetch';
import type { HashData } from './RequestManager';
import type Collection from '@discordjs/collection';
import type { IHandler } from './handlers/IHandler';
import { DefaultRestOptions, RESTEvents } from './utils/constants';
/**
* Options to be passed when creating the REST instance

View File

@@ -1,13 +1,13 @@
import Collection from '@discordjs/collection';
import FormData from 'form-data';
import { DiscordSnowflake } from '@sapphire/snowflake';
import { EventEmitter } from 'node:events';
import { Agent as httpsAgent } from 'node:https';
import { Agent as httpAgent } from 'node:http';
import { Agent as httpsAgent } from 'node:https';
import Collection from '@discordjs/collection';
import { DiscordSnowflake } from '@sapphire/snowflake';
import FormData from 'form-data';
import type { RequestInit, BodyInit } from 'node-fetch';
import type { RESTOptions, RestEvents } from './REST';
import type { IHandler } from './handlers/IHandler';
import { SequentialHandler } from './handlers/SequentialHandler';
import type { RESTOptions, RestEvents } from './REST';
import { DefaultRestOptions, DefaultUserAgent, RESTEvents } from './utils/constants';
/**

View File

@@ -1,5 +1,5 @@
import type { InternalRequest } from '../RequestManager';
import type { RequestBody } from './DiscordAPIError';
import type { InternalRequest } from '../RequestManager';
/**
* Represents a HTTP error

View File

@@ -1,14 +1,14 @@
import { setTimeout as sleep } from 'node:timers/promises';
import { AsyncQueue } from '@sapphire/async-queue';
import fetch, { RequestInit, Response } from 'node-fetch';
import type { IHandler } from './IHandler';
import type { RateLimitData } from '../REST';
import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager';
import { DiscordAPIError, DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError';
import { HTTPError } from '../errors/HTTPError';
import { RateLimitError } from '../errors/RateLimitError';
import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager';
import { RESTEvents } from '../utils/constants';
import { hasSublimit, parseResponse } from '../utils/utils';
import type { RateLimitData } from '../REST';
import type { IHandler } from './IHandler';
/* Invalid request limiting is done on a per-IP basis, not a per-token basis.
* The best we can do is track invalid counts process-wide (on the theory that