From 2c5799504ed461b5219f27ce5fbd9db0c77af7f9 Mon Sep 17 00:00:00 2001 From: sdasda7777 <17746796+sdasda7777@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:09:58 +0200 Subject: [PATCH] Removed unused dependencies from package.json, updated --- package-lock.json | 205 +++++++++++++++++++++---------------------- package.json | 24 +---- src/helpers/lager.js | 6 +- start.bat | 2 +- 4 files changed, 106 insertions(+), 131 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2644baf..ed7a041 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,31 +9,11 @@ "version": "1.3.0", "license": "MIT", "dependencies": { - "asynckit": "^0.4.0", "axios": "^1.6.0", - "bindings": "^1.5.0", - "combined-stream": "^1.0.8", - "delayed-stream": "^1.0.0", - "discord-rpc": "^3.2.0", - "encoding": "^0.1.13", - "file-uri-to-path": "^1.0.0", - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "iconv-lite": "^0.6.3", + "discord-rpc": "^4.0.0", "js-levenshtein": "^1.1.6", - "mime-db": "^1.52.0", - "mime-types": "^2.1.35", - "miniget": "^4.2.2", - "node-addon-api": "^1.7.2", - "node-fetch": "^2.6.7", - "proxy-from-env": "^1.1.0", "register-scheme": "^0.0.2", - "safer-buffer": "^2.1.2", - "tr46": "^0.0.3", "vlc.js": "^3.2.7", - "webidl-conversions": "^3.0.1", - "whatwg-url": "^5.0.0", - "ws": "^7.5.9", "ytsr": "^3.8.0" }, "devDependencies": { @@ -41,10 +21,13 @@ } }, "node_modules/@types/node": { - "version": "18.17.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.1.tgz", - "integrity": "sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==", - "dev": true + "version": "18.19.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", + "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/asynckit": { "version": "0.4.0", @@ -52,11 +35,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -69,6 +52,11 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bindings/node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -89,30 +77,85 @@ } }, "node_modules/discord-rpc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/discord-rpc/-/discord-rpc-3.2.0.tgz", - "integrity": "sha512-KJv0EVbGMlr04HoG6f5b3wD7X9kSHzQ2Ed2qfHSDvYJ1MkE8RbCQmMcQQrSvAxpfsqZgUjB/bsfi/mjyicCH+A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/discord-rpc/-/discord-rpc-4.0.1.tgz", + "integrity": "sha512-HOvHpbq5STRZJjQIBzwoKnQ0jHplbEWFWlPDwXXKm/bILh4nzjcg7mNqll0UY7RsjFoaXA7e/oYb/4lvpda2zA==", "dependencies": { "node-fetch": "^2.6.1", "ws": "^7.3.1" }, - "peerDependencies": { + "optionalDependencies": { "register-scheme": "github:devsnek/node-register-scheme" } }, + "node_modules/discord-rpc/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/discord-rpc/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/discord-rpc/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/discord-rpc/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/discord-rpc/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "peer": true, "dependencies": { "iconv-lite": "^0.6.2" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -149,6 +192,8 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -191,30 +236,6 @@ "node": ">=12" } }, - "node_modules/node-addon-api": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -224,65 +245,39 @@ "version": "0.0.2", "resolved": "git+ssh://git@github.com/devsnek/node-register-scheme.git#e7cc9a63a1f512565da44cb57316d9fb10750e17", "hasInstallScript": true, - "license": "MIT", "dependencies": { "bindings": "^1.3.0", "node-addon-api": "^1.3.0" } }, + "node_modules/register-scheme/node_modules/node-addon-api": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true, + "peer": true }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/vlc.js": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/vlc.js/-/vlc.js-3.2.7.tgz", "integrity": "sha512-pBDvWiBBieWEtPK+GzHxBjgpNwkDARFUF6boYANPNKK3H92gbBrdHQqKckUho8pL5kxHW3zLmHaKpYpgk+T1gQ==" }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/ytsr": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-3.8.2.tgz", - "integrity": "sha512-J+t+a1Ic6jL0Hd0zGX8eFn3uEKtXTf6naa96KO0q7H00GKBfCG8aXW55NAMnaBeUi9Hni6u1xKnf8xZF2F0E/A==", + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-3.8.4.tgz", + "integrity": "sha512-rrJo59vDDf98mz/Cuw7Y2YiuTwSm3cs4XsXrP6yjYDXYup/aE0lRxY6XMKR3mGOHKwgLouZqFq8QRllVVVN88w==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dependencies": { "miniget": "^4.2.2" }, diff --git a/package.json b/package.json index 0ab3f22..0d8986f 100644 --- a/package.json +++ b/package.json @@ -4,38 +4,18 @@ "description": "Discord rich presence for VLC media player.", "main": "index.js", "dependencies": { - "asynckit": "^0.4.0", "axios": "^1.6.0", - "bindings": "^1.5.0", - "combined-stream": "^1.0.8", - "delayed-stream": "^1.0.0", - "discord-rpc": "^3.2.0", - "encoding": "^0.1.13", - "file-uri-to-path": "^1.0.0", - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "iconv-lite": "^0.6.3", + "discord-rpc": "^4.0.0", "js-levenshtein": "^1.1.6", - "mime-db": "^1.52.0", - "mime-types": "^2.1.35", - "miniget": "^4.2.2", - "node-addon-api": "^1.7.2", - "node-fetch": "^2.6.7", - "proxy-from-env": "^1.1.0", "register-scheme": "^0.0.2", - "safer-buffer": "^2.1.2", - "tr46": "^0.0.3", "vlc.js": "^3.2.7", - "webidl-conversions": "^3.0.1", - "whatwg-url": "^5.0.0", - "ws": "^7.5.9", "ytsr": "^3.8.0" }, "devDependencies": { "@types/node": "^18.11.3" }, "scripts": { - "start": "node ./src/app.js", + "start": "node --trace-deprecation ./src/app.js", "test": "node ./src/test.js", "run": "npm start" }, diff --git a/src/helpers/lager.js b/src/helpers/lager.js index dfafa11..43c3531 100755 --- a/src/helpers/lager.js +++ b/src/helpers/lager.js @@ -2,10 +2,10 @@ const fs = require('fs'); const os = require('os'); const path = require('path'); -const VLC = require('vlc.js'); -const { vlc } = require('./configLoader.js').getOrInit('config.js'); +const vlcjs = require('vlc.js'); +const { config } = require('./configLoader.js').getOrInit('config.js'); -const client = new VLC.VLCClient(vlc); +const client = new vlcjs.VLCClient(config); const destination = path.join(__dirname, '/../../logs/'); const logs = [{ details: { diff --git a/start.bat b/start.bat index 6babb82..8aeaf5e 100755 --- a/start.bat +++ b/start.bat @@ -11,7 +11,7 @@ if NOT EXIST node_modules ( if exist node.exe ( ECHO Detected local Node.js executable, attempting to use it... - CALL node.exe src/app.js + CALL node.exe --trace-deprecation src/app.js ) else ( ECHO Did not detect local Node.js executable, attempting to use `npm`... CALL npm start