Bump dependencies

This commit is contained in:
Max Isom 2020-08-24 14:53:18 -05:00
parent e927334db6
commit cd4b42a8f6
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
5 changed files with 852 additions and 811 deletions

View file

@ -29,21 +29,21 @@
"@types/debug": "^4.1.5", "@types/debug": "^4.1.5",
"@types/fluent-ffmpeg": "^2.1.14", "@types/fluent-ffmpeg": "^2.1.14",
"@types/fs-capacitor": "^2.0.0", "@types/fs-capacitor": "^2.0.0",
"@types/node": "^14.0.6", "@types/node": "^14.6.0",
"@types/node-emoji": "^1.8.1", "@types/node-emoji": "^1.8.1",
"@types/spotify-web-api-node": "^4.0.1", "@types/spotify-web-api-node": "^4.0.1",
"@types/validator": "^13.0.0", "@types/validator": "^13.1.0",
"@types/ws": "^7.2.4", "@types/ws": "^7.2.6",
"@typescript-eslint/eslint-plugin": "^3.0.2", "@typescript-eslint/eslint-plugin": "^3.10.0",
"@typescript-eslint/parser": "^3.0.2", "@typescript-eslint/parser": "^3.10.0",
"eslint": "^7.1.0", "eslint": "^7.7.0",
"eslint-config-xo": "^0.29.1", "eslint-config-xo": "^0.32.1",
"eslint-config-xo-typescript": "^0.29.0", "eslint-config-xo-typescript": "^0.32.0",
"husky": "^4.2.5", "husky": "^4.2.5",
"nodemon": "^2.0.4", "nodemon": "^2.0.4",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"ts-node": "^8.10.2", "ts-node": "^9.0.0",
"typescript": "^3.9.3" "typescript": "^4.0.2"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
@ -70,27 +70,27 @@
"@discordjs/opus": "^0.3.2", "@discordjs/opus": "^0.3.2",
"array-shuffle": "^1.0.1", "array-shuffle": "^1.0.1",
"debug": "^4.1.1", "debug": "^4.1.1",
"delay": "^4.3.0", "delay": "^4.4.0",
"discord.js": "^12.2.0", "discord.js": "^12.3.1",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"fluent-ffmpeg": "^2.1.2", "fluent-ffmpeg": "^2.1.2",
"fs-capacitor": "^6.2.0", "fs-capacitor": "^6.2.0",
"get-youtube-id": "^1.0.1", "get-youtube-id": "^1.0.1",
"got": "^11.1.4", "got": "^11.5.2",
"hasha": "^5.2.0", "hasha": "^5.2.0",
"inversify": "^5.0.1", "inversify": "^5.0.1",
"iso8601-duration": "^1.2.0", "iso8601-duration": "^1.2.0",
"make-dir": "^3.1.0", "make-dir": "^3.1.0",
"node-emoji": "^1.10.0", "node-emoji": "^1.10.0",
"p-limit": "^2.3.0", "p-limit": "^3.0.2",
"sequelize": "^5.21.11", "sequelize": "^5.21.11",
"sequelize-typescript": "^1.1.0", "sequelize-typescript": "^1.1.0",
"spotify-uri": "^2.0.0", "spotify-uri": "^2.1.0",
"spotify-web-api-node": "^4.0.0", "spotify-web-api-node": "^4.0.0",
"sqlite3": "^4.2.0", "sqlite3": "^5.0.0",
"unique-random-array": "^2.0.0", "unique-random-array": "^2.0.0",
"youtube.ts": "^0.1.3", "youtube.ts": "^0.1.6",
"ytdl-core": "^2.1.5", "ytdl-core": "^3.2.2",
"ytsr": "^0.1.14" "ytsr": "^0.1.21"
} }
} }

16
src/packages.d.ts vendored
View file

@ -1,19 +1,3 @@
declare module 'ytsr' {
interface VideoResult {
title: string;
duration: string;
link: string;
live: boolean;
type: string;
}
interface SearchResult {
items: VideoResult[];
}
export default function (search: string, options: Record<string, unknown>): Promise<SearchResult>;
}
declare module 'array-shuffle' { declare module 'array-shuffle' {
export default function <T>(arr: T[]): T[]; export default function <T>(arr: T[]): T[];
} }

View file

@ -188,14 +188,14 @@ export default class {
const {items} = await ytsr(`"${track.name}" "${track.artists[0].name}" offical`, {limit: 5}); const {items} = await ytsr(`"${track.name}" "${track.artists[0].name}" offical`, {limit: 5});
const video = items.find(item => item.type === 'video'); const video = items.find(item => item.type === 'video');
if (!video) { if (!video || video.type !== 'video') {
throw new Error('No video found for query.'); throw new Error('No video found for query.');
} }
return { return {
title: video.title, title: video.title,
artist: track.artists[0].name, artist: track.artists[0].name,
length: parseTime(video.duration), length: video.duration ? parseTime(video.duration) : 0,
url: video.link, url: video.link,
playlist, playlist,
isLive: video.live isLive: video.live

View file

@ -338,7 +338,7 @@ export default class {
// Don't cache livestreams or long videos // Don't cache livestreams or long videos
const MAX_CACHE_LENGTH_SECONDS = 30 * 60; // 30 minutes const MAX_CACHE_LENGTH_SECONDS = 30 * 60; // 30 minutes
shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.length_seconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek; shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.videoDetails.lengthSeconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek;
ffmpegInputOptions.push(...[ ffmpegInputOptions.push(...[
'-reconnect', '-reconnect',

1603
yarn.lock

File diff suppressed because it is too large Load diff