@espcustomss/oauth
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -33,3 +33,4 @@ import { config } from 'dotenv'; | ||
try { | ||
const key = await auth.getAccess(req.query.code.toString()); | ||
let code = req.query.code as string; | ||
const key = await auth.getAccess(code.toString()); | ||
res | ||
@@ -36,0 +37,0 @@ .cookie('key', key) |
{ | ||
"name": "@espcustomss/oauth", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Simplemente haga solicitudes de Discord OAuth. Construido con TypeScript, utilizado por Esp Customs.", | ||
@@ -26,5 +26,5 @@ "main": "lib/client.js", | ||
"dependencies": { | ||
"@discordjs/collection": "^0.1.6", | ||
"@discordjs/collection": "^0.7.0", | ||
"jsonwebtoken": "^9.0.0", | ||
"phin": "^3.6.1", | ||
"phin": "^3.7.0", | ||
"ts-node": "^10.9.1", | ||
@@ -34,22 +34,22 @@ "uid": "^1.0.0" | ||
"devDependencies": { | ||
"@types/chai": "^4.3.3", | ||
"@types/chai": "^4.3.4", | ||
"@types/cookies": "^0.7.7", | ||
"@types/express": "^4.17.13", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^17.0.8", | ||
"chai": "^4.3.6", | ||
"@types/express": "^4.17.15", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.11.18", | ||
"chai": "^4.3.7", | ||
"cookie-parser": "^1.4.6", | ||
"cookies": "^0.8.0", | ||
"dotenv": "^16.0.1", | ||
"dotenv": "^16.0.3", | ||
"ejs": "^3.1.8", | ||
"express": "^4.18.1", | ||
"mocha": "^10.0.0", | ||
"nodemon": "^2.0.19", | ||
"prettier": "^2.7.1", | ||
"express": "^4.18.2", | ||
"mocha": "^10.2.0", | ||
"nodemon": "^2.0.20", | ||
"prettier": "^2.8.1", | ||
"ts-mocha": "^10.0.0", | ||
"ts-node-dev": "^2.0.0", | ||
"typedoc": "^0.22.18", | ||
"typedoc-theme-hierarchy": "^1.3.8", | ||
"typescript": "^4.3.5" | ||
"typedoc": "^0.23.23", | ||
"typedoc-theme-hierarchy": "^3.0.2", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
@@ -8,5 +8,5 @@ import jwt from 'jsonwebtoken'; | ||
import Connection from './types/connection'; | ||
import Collection from '@discordjs/collection'; | ||
import { Collection } from '@discordjs/collection'; | ||
export type Scope = 'bot'|'connections'|'email'|'identify'|'guilds'|'guilds.join'|'gdm.join'|'messages.read'|'rpc'|'rpc.api'|'rpc.notifications.read'|'webhook.incoming'|'applications.builds.upload'|'applications.builds.read'|'applications.store.update'|'applications.entitlements'|'relationships.read'|'activities.read'|'activities.write'|'applications.commands'|'applications.commands.update'; | ||
export type Scope = 'activities.read' | 'activities.write' | 'applications.builds.upload' | 'applications.builds.read' | 'applications.commands' | 'applications.commands.update' | 'applications.commands.permissions.update' | 'applications.entitlements' | 'applications.store.update' | 'bot' | 'connections' | 'dm_channels.read' | 'email' | 'gdm.join' | 'guilds' | 'guilds.join' | 'guilds.members.read' | 'identify' | 'messages.read' | 'relationships.read' | 'role_connections.write' | 'rpc' | 'rpc.activities.write' | 'rpc.notifications.read' | 'rpc.voice.read' | 'rpc.voice.write' | 'voice' | 'webhook.incoming'; | ||
@@ -17,3 +17,3 @@ export class Client { | ||
/** Cree un nuevo cliente OAuth2. */ | ||
constructor(private options: ClientOptions) {} | ||
constructor(private options: ClientOptions) { } | ||
@@ -78,3 +78,3 @@ /** Genera un enlace de código de autorización según los ámbitos y el conjunto de URI de redirección. */ | ||
throw new APIError(response.statusCode); | ||
let token = response.body; | ||
@@ -109,3 +109,3 @@ token.expireTimestamp = Date.now() + token['expires_in'] * 1000 - 10000; | ||
throw new APIError(response.statusCode); | ||
return new User(response.body); | ||
@@ -122,3 +122,3 @@ } catch (err: any) { | ||
const access = this.getAccessKey(key); | ||
try { | ||
@@ -137,3 +137,3 @@ const response: any = await phin({ | ||
guilds.set(guild.id, new Guild(guild)); | ||
return guilds; | ||
@@ -158,7 +158,7 @@ } catch (err) { | ||
throw new APIError(response.statusCode); | ||
const connections = new Collection<string, Connection>(); | ||
for (const connection of response.body) | ||
connections.set(connection.id, connection); | ||
return connections; | ||
@@ -165,0 +165,0 @@ } catch (err: any) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
526730
3767
0
1
+ Added@discordjs/collection@0.7.0(transitive)
- Removed@discordjs/collection@0.1.6(transitive)
Updated@discordjs/collection@^0.7.0
Updatedphin@^3.7.0