From 52fa2f7f251687e50f86a5901d4e91d3c40f2ed6 Mon Sep 17 00:00:00 2001 From: damp11113 Date: Tue, 1 Oct 2024 18:33:13 +0700 Subject: [PATCH] update something for new add DPCloudev account and more... --- README.md | 174 +------------------------- app/app.ejs | 25 +++- app/assets/css/launcher.css | 2 +- app/assets/js/authmanager.js | 79 ++++++++++++ app/assets/js/configmanager.js | 12 ++ app/assets/js/scripts/landing.js | 102 ++++++++++++++- app/assets/js/scripts/login.js | 2 +- app/assets/js/scripts/loginOptions.js | 2 +- app/assets/js/scripts/settings.js | 2 +- app/assets/lang/_custom.toml | 14 +-- app/assets/lang/en_US.toml | 16 +-- app/frame.ejs | 2 +- app/landing.ejs | 11 ++ app/login.ejs | 1 - app/loginOptions.ejs | 74 +++++++++-- app/settings.ejs | 73 +++++++++-- app/waiting.ejs | 2 +- index.js | 4 +- package-lock.json | 46 +++++-- package.json | 1 + 20 files changed, 423 insertions(+), 221 deletions(-) diff --git a/README.md b/README.md index ce117b3..0716f05 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,6 @@ -

aventium softworks

- -

Helios Launcher

- -
(formerly Electron Launcher)
- -[

gh actions](https://github.com/dscalzi/HeliosLauncher/actions) [downloads](https://github.com/dscalzi/HeliosLauncher/releases) winter-is-coming

- -

Join modded servers without worrying about installing Java, Forge, or other mods. We'll handle that for you.

- -![Screenshot 1](https://i.imgur.com/6o7SmH6.png) -![Screenshot 2](https://i.imgur.com/x3B34n1.png) - -## Features - -* πŸ”’ Full account management. - * Add multiple accounts and easily switch between them. - * Microsoft (OAuth 2.0) + Mojang (Yggdrasil) authentication fully supported. - * Credentials are never stored and transmitted directly to Mojang. -* πŸ“‚ Efficient asset management. - * Receive client updates as soon as we release them. - * Files are validated before launch. Corrupt or incorrect files will be redownloaded. -* β˜• **Automatic Java validation.** - * If you have an incompatible version of Java installed, we'll install the right one *for you*. - * You do not need to have Java installed to run the launcher. -* πŸ“° News feed natively built into the launcher. -* βš™οΈ Intuitive settings management, including a Java control panel. -* Supports all of our servers. - * Switch between server configurations with ease. - * View the player count of the selected server. -* Automatic updates. That's right, the launcher updates itself. -* View the status of Mojang's services. - -This is not an exhaustive list. Download and install the launcher to gauge all it can do! - -#### Need Help? [Check the wiki.][wiki] - -#### Like the project? Leave a ⭐ star on the repository! - -## Downloads - -You can download from [GitHub Releases](https://github.com/dscalzi/HeliosLauncher/releases) - -#### Latest Release - -[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases/latest) - -#### Latest Pre-Release -[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher/all.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases) - -**Supported Platforms** - -If you download from the [Releases](https://github.com/dscalzi/HeliosLauncher/releases) tab, select the installer for your system. - -| Platform | File | -| -------- | ---- | -| Windows x64 | `Helios-Launcher-setup-VERSION.exe` | -| macOS x64 | `Helios-Launcher-setup-VERSION-x64.dmg` | -| macOS arm64 | `Helios-Launcher-setup-VERSION-arm64.dmg` | -| Linux x64 | `Helios-Launcher-setup-VERSION.AppImage` | - -## Console - -To open the console, use the following keybind. - -```console -ctrl + shift + i -``` - -Ensure that you have the console tab selected. Do not paste anything into the console unless you are 100% sure of what it will do. Pasting the wrong thing can expose sensitive information. - -#### Export Output to a File - -If you want to export the console output, simply right click anywhere on the console and click **Save as..** - -![console example](https://i.imgur.com/T5e73jP.png) +# Unknow-DMB Project Launcher +Based on Helios Launcher ## Development @@ -84,28 +10,20 @@ This section details the setup of a basic developmentment environment. **System Requirements** -* [Node.js][nodejs] v20 - ---- +- nodejs v20 **Clone and Install Dependencies** - ```console > git clone https://github.com/dscalzi/HeliosLauncher.git > cd HeliosLauncher > npm install ``` ---- - **Launch Application** - ```console > npm start ``` ---- - **Build Installers** To build for your current platform. @@ -123,89 +41,3 @@ Build for a specific platform. | Linux x64 | `npm run dist:linux` | Builds for macOS may not work on Windows/Linux and vice-versa. - ---- - -### Visual Studio Code - -All development of the launcher should be done using [Visual Studio Code][vscode]. - -Paste the following into `.vscode/launch.json` - -```JSON -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Debug Main Process", - "type": "node", - "request": "launch", - "cwd": "${workspaceFolder}", - "program": "${workspaceFolder}/node_modules/electron/cli.js", - "args" : ["."], - "outputCapture": "std" - }, - { - "name": "Debug Renderer Process", - "type": "chrome", - "request": "launch", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "windows": { - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" - }, - "runtimeArgs": [ - "${workspaceFolder}/.", - "--remote-debugging-port=9222" - ], - "webRoot": "${workspaceFolder}" - } - ] -} -``` - -This adds two debug configurations. - -#### Debug Main Process - -This allows you to debug Electron's [main process][mainprocess]. You can debug scripts in the [renderer process][rendererprocess] by opening the DevTools Window. - -#### Debug Renderer Process - -This allows you to debug Electron's [renderer process][rendererprocess]. This requires you to install the [Debugger for Chrome][chromedebugger] extension. - -Note that you **cannot** open the DevTools window while using this debug configuration. Chromium only allows one debugger, opening another will crash the program. - ---- - -### Note on Third-Party Usage - -Please give credit to the original author and provide a link to the original source. This is free software, please do at least this much. - -For instructions on setting up Microsoft Authentication, see https://github.com/dscalzi/HeliosLauncher/blob/master/docs/MicrosoftAuth.md. - ---- - -## Resources - -* [Wiki][wiki] -* [Nebula (Create Distribution.json)][nebula] -* [v2 Rewrite Branch (Inactive)][v2branch] - -The best way to contact the developers is on Discord. - -[![discord](https://discordapp.com/api/guilds/211524927831015424/embed.png?style=banner3)][discord] - ---- - -### See you ingame. - - -[nodejs]: https://nodejs.org/en/ 'Node.js' -[vscode]: https://code.visualstudio.com/ 'Visual Studio Code' -[mainprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Main Process' -[rendererprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Renderer Process' -[chromedebugger]: https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome 'Debugger for Chrome' -[discord]: https://discord.gg/zNWUXdt 'Discord' -[wiki]: https://github.com/dscalzi/HeliosLauncher/wiki 'wiki' -[nebula]: https://github.com/dscalzi/Nebula 'dscalzi/Nebula' -[v2branch]: https://github.com/dscalzi/HeliosLauncher/tree/ts-refactor 'v2 branch' diff --git a/app/app.ejs b/app/app.ejs index 75b5ea2..cf48014 100644 --- a/app/app.ejs +++ b/app/app.ejs @@ -39,10 +39,27 @@ <%- include('overlay') %>
-
- - -
+
+

Please wait...

+
diff --git a/app/assets/css/launcher.css b/app/assets/css/launcher.css index 8b23931..58618a4 100644 --- a/app/assets/css/launcher.css +++ b/app/assets/css/launcher.css @@ -3223,7 +3223,7 @@ input:checked + .toggleSwitchSlider:before { } /* Icon which displays the status of the mojang services. */ -#mojang_status_icon { +#mojang_status_icon, #DPCloudev_status_icon { font-size: 30px; color: #848484; margin-left: 15px; diff --git a/app/assets/js/authmanager.js b/app/assets/js/authmanager.js index 5a24f30..dda4d28 100644 --- a/app/assets/js/authmanager.js +++ b/app/assets/js/authmanager.js @@ -167,6 +167,57 @@ exports.addMojangAccount = async function(username, password) { } } +const axios = require('axios'); + +exports.addDPCloudevAccount = async function(username, password) { + try { + const response = await axios.post('https://api.damp11113.xyz/account/v3/login', { + username: username, + password: password + }, { + headers: { + 'Content-Type': 'application/json' + } + }); + + console.log(response.data); + + if (response.data && response.data.session) { + const responseinfo = await axios.post('https://api.damp11113.xyz/account/v3/info', { + clientToken: response.data.clientToken, + }, { + headers: { + 'Content-Type': 'application/json' + } + }); + + console.log(responseinfo.data); + + const ret = ConfigManager.addDPCloudevAuthAccount( + responseinfo.data.uuid, + response.data.session, + username, + responseinfo.data.username + ); + + if (ConfigManager.getClientToken() == null) { + ConfigManager.setClientToken(response.data.clientToken); + } + ConfigManager.save(); + return ret; + + } else { + return Promise.reject(mojangErrorDisplayable(response.data.error || MojangErrorCode.UNKNOWN)); + } + + } catch (err) { + console.error(err); + return Promise.reject(mojangErrorDisplayable(MojangErrorCode.UNKNOWN)); + } +}; + + + const AUTH_MODE = { FULL: 0, MS_REFRESH: 1, MC_REFRESH: 2 } /** @@ -291,6 +342,34 @@ exports.removeMojangAccount = async function(uuid){ } } +exports.removeDPCloudevAccount = async function(uuid){ + try { + const authAcc = ConfigManager.getAuthAccount(uuid) + console.log(authAcc.accessToken) + console.log(ConfigManager.getClientToken()) + const response = await axios.post('https://api.damp11113.xyz/account/v3/logout', { + session: authAcc.accessToken, + clientToken: ConfigManager.getClientToken() + }, { + headers: { + 'Content-Type': 'application/json' + } + }); + + if (response.status === 200) { + ConfigManager.removeAuthAccount(uuid) + ConfigManager.save() + return Promise.resolve() + } else { + log.error('Error while removing account', response.error) + return Promise.reject(response.error) + } + } catch (err){ + log.error('Error while removing account', err) + return Promise.reject(err) + } +} + /** * Remove a Microsoft account. It is expected that the caller will invoke the OAuth logout * through the ipc renderer. diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 38f864f..8f3e7b1 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -349,6 +349,18 @@ exports.addMojangAuthAccount = function(uuid, accessToken, username, displayName return config.authenticationDatabase[uuid] } +exports.addDPCloudevAuthAccount = function(uuid, accessToken, username, displayName){ + config.selectedAccount = uuid + config.authenticationDatabase[uuid] = { + type: 'dpcloudev', + accessToken, + username: username.trim(), + uuid: uuid.trim(), + displayName: displayName.trim() + } + return config.authenticationDatabase[uuid] +} + /** * Update the tokens of an authenticated microsoft account. * diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 1a1c176..24c6fb0 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -2,6 +2,8 @@ * Script for landing.ejs */ // Requirements +const axios = require('axios'); + const { URL } = require('url') const { MojangRestAPI, @@ -195,7 +197,7 @@ const refreshMojangStatuses = async function(){ greenCount = 0 greyCount = 0 - + console.log(statuses) for(let i=0; i { + switch (status) { + case 200: + return 'green'; + case 500: + return 'red'; + case 429: // Example for too many requests + case 503: // Example for service unavailable + return 'yellow'; + default: + return 'grey'; // Default for unexpected status codes + } +}; + +const refreshDPCloudevStatuses = async function(){ + loggerLanding.info('Refreshing DPCloudev Statuses..') + + let status = 'grey' + let tooltipNonEssentialHTML = '' + const servicesToInclude = ['API', 'CDN', 'Dashboard']; + + const response = await axios.get("https://status.damp11113.xyz/") + console.log(response) + let statuses + if (response.status === 200) { + // Convert the data into the desired array format, filtering for specific services + statuses = servicesToInclude.map(serviceName => ({ + service: serviceName, + status: DPCloudevgetColorFromStatus(response.data.Service[serviceName.toLowerCase()]), + name: serviceName // Assuming 'name' is the same as the 'service' + })); + } else { + loggerLanding.warn('Unable to refresh DPCloudev service status.') + statuses = [ + { "service": "api", "status": "red", "name": "API" }, + { "service": "cdn", "status": "red", "name": "CDN" }, + { "service": "dashboard", "status": "red", "name": "Dashboard" } + ] + } + + greenCount = 0 + greyCount = 0 + + + for (let i=0; i + + ${service.name} + ` + tooltipNonEssentialHTML += tooltipHTML + + if(service.status === 'yellow' && status !== 'red'){ + status = 'yellow' + } else if(service.status === 'red'){ + status = 'red' + } else { + if(service.status === 'grey'){ + ++greyCount + } + ++greenCount + } + } + + if(greenCount === statuses.length){ + if(greyCount === statuses.length){ + status = 'grey' + } else { + status = 'green' + } + } + + document.getElementById('dpcloudevStatusContainer').innerHTML = tooltipNonEssentialHTML + document.getElementById('DPCloudev_status_icon').style.color = MojangRestAPI.statusToHex(status) +} + + const refreshServerStatus = async (fade = false) => { loggerLanding.info('Refreshing Server Status') const serv = (await DistroAPI.getDistribution()).getServerById(ConfigManager.getSelectedServer()) @@ -267,10 +363,12 @@ const refreshServerStatus = async (fade = false) => { } refreshMojangStatuses() +refreshDPCloudevStatuses() // Server Status is refreshed in uibinder.js on distributionIndexDone. // Refresh statuses every hour. The status page itself refreshes every day so... let mojangStatusListener = setInterval(() => refreshMojangStatuses(true), 60*60*1000) +let DPCloudevStatusListener = setInterval(() => refreshDPCloudevStatuses(true), 60*60*1000) // Set refresh rate to once every 5 minutes. let serverStatusListener = setInterval(() => refreshServerStatus(true), 300000) @@ -615,6 +713,7 @@ async function dlAsync(login = true) { setLaunchDetails(Lang.queryJS('landing.dlAsync.doneEnjoyServer')) // Init Discord Hook + /* if(distro.rawDistribution.discord != null && serv.rawServer.discord != null){ DiscordWrapper.initRPC(distro.rawDistribution.discord, serv.rawServer.discord) hasRPC = true @@ -625,6 +724,7 @@ async function dlAsync(login = true) { proc = null }) } + */ } catch(err) { diff --git a/app/assets/js/scripts/login.js b/app/assets/js/scripts/login.js index 30ff893..e38d036 100644 --- a/app/assets/js/scripts/login.js +++ b/app/assets/js/scripts/login.js @@ -187,7 +187,7 @@ loginButton.addEventListener('click', () => { // Show loading stuff. loginLoading(true) - AuthManager.addMojangAccount(loginUsername.value, loginPassword.value).then((value) => { + AuthManager.addDPCloudevAccount(loginUsername.value, loginPassword.value).then((value) => { updateSelectedAccount(value) loginButton.innerHTML = loginButton.innerHTML.replace(Lang.queryJS('login.loggingIn'), Lang.queryJS('login.success')) $('.circle-loader').toggleClass('load-complete') diff --git a/app/assets/js/scripts/loginOptions.js b/app/assets/js/scripts/loginOptions.js index cdb1bc8..29b5478 100644 --- a/app/assets/js/scripts/loginOptions.js +++ b/app/assets/js/scripts/loginOptions.js @@ -28,7 +28,7 @@ loginOptionMicrosoft.onclick = (e) => { }) } -loginOptionMojang.onclick = (e) => { +loginOptionDPCloudev.onclick = (e) => { switchView(getCurrentView(), VIEWS.login, 500, 500, () => { loginViewOnSuccess = loginOptionsViewOnLoginSuccess loginViewOnCancel = loginOptionsViewOnLoginCancel diff --git a/app/assets/js/scripts/settings.js b/app/assets/js/scripts/settings.js index 81a65a7..6b76a1a 100644 --- a/app/assets/js/scripts/settings.js +++ b/app/assets/js/scripts/settings.js @@ -519,7 +519,7 @@ function processLogOut(val, isLastAccount){ ipcRenderer.send(MSFT_OPCODE.OPEN_LOGOUT, uuid, isLastAccount) }) } else { - AuthManager.removeMojangAccount(uuid).then(() => { + AuthManager.removeDPCloudevAccount(uuid).then(() => { if(!isLastAccount && uuid === prevSelAcc.uuid){ const selAcc = ConfigManager.getSelectedAccount() refreshAuthAccountSelected(selAcc.uuid) diff --git a/app/assets/lang/_custom.toml b/app/assets/lang/_custom.toml index da17faf..53eda4a 100644 --- a/app/assets/lang/_custom.toml +++ b/app/assets/lang/_custom.toml @@ -1,20 +1,20 @@ # Custom Language File for Launcher Customizer [ejs.app] -title = "Helios Launcher" +title = "Unknow DMB" [ejs.landing] -mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher" +mediaGitHubURL = "https://git.damp11113.xyz/Mirror/unknow-dmb" mediaTwitterURL = "#" mediaInstagramURL = "#" mediaYouTubeURL = "#" mediaDiscordURL = "https://discord.gg/zNWUXdt" [ejs.settings] -sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher" -supportLink = "https://github.com/dscalZi/HeliosLauncher/issues" +sourceGithubLink = "https://git.damp11113.xyz/Mirror/unknow-dmb" +supportLink = "https://damp11113.xyz/donate" [ejs.welcome] -welcomeHeader = "WELCOME TO WESTEROSCRAFT" -welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming." -welcomeDescCTA = "You are just a few clicks away from Westeros." +welcomeHeader = "Welcome to Unknow-DMB Project" +welcomeDescription = "Hello world!" +welcomeDescCTA = "Hello world!" diff --git a/app/assets/lang/en_US.toml b/app/assets/lang/en_US.toml index b9f64cf..06d556f 100644 --- a/app/assets/lang/en_US.toml +++ b/app/assets/lang/en_US.toml @@ -20,24 +20,24 @@ newsErrorNoneSpan = "No News" [ejs.login] loginCancelText = "Cancel" -loginSubheader = "MINECRAFT LOGIN" +loginSubheader = "DPCloudev LOGIN" loginEmailError = "* Invalid Value" -loginEmailPlaceholder = "EMAIL OR USERNAME" +loginEmailPlaceholder = "USERNAME" loginPasswordError = "* Required" loginPasswordPlaceholder = "PASSWORD" -loginForgotPasswordLink = "https://minecraft.net/password/forgot/" +loginForgotPasswordLink = "https://dashboard.damp11113.xyz/forgotpw" loginForgotPasswordText = "forgot password?" loginRememberMeText = "remember me?" loginButtonText = "LOGIN" -loginNeedAccountLink = "https://minecraft.net/store/minecraft-java-edition/" +loginNeedAccountLink = "https://dashboard.damp11113.xyz/register" loginNeedAccountText = "Need an Account?" -loginPasswordDisclaimer1 = "Your password is sent directly to mojang and never stored." +loginPasswordDisclaimer1 = "Your password is sent directly to DPCloudev and never stored." loginPasswordDisclaimer2 = "{appName} is not affiliated with Mojang AB." [ejs.loginOptions] loginOptionsTitle = "Login Options" loginWithMicrosoft = "Login with Microsoft" -loginWithMojang = "Login with Mojang" +loginWithDPCloudev = "Login with DPCloudev (Free user)" cancelButton = "Cancel" [ejs.overlay] @@ -62,8 +62,8 @@ tabAccountHeaderText = "Account Settings" tabAccountHeaderDesc = "Add new accounts or manage existing ones." microsoftAccount = "Microsoft" addMicrosoftAccount = "+ Add Microsoft Account" -mojangAccount = "Mojang" -addMojangAccount = "+ Add Mojang Account" +DPCloudevAccount = "DPCloudev" +addDPCloudevAccount = "+ Add DPCloudev Account" minecraftTabHeaderText = "Minecraft Settings" minecraftTabHeaderDesc = "Options related to game launch." gameResolutionTitle = "Game Resolution" diff --git a/app/frame.ejs b/app/frame.ejs index 1151f91..d4d991a 100644 --- a/app/frame.ejs +++ b/app/frame.ejs @@ -13,7 +13,7 @@ <% } else{ %>
- <%= lang('app.title') %> + <%= lang('app.title') %> | Powered by DPCloudev
+
+
+ DPClOUDEV STATUS + +
+
<%- lang('landing.mojangStatusTooltipTitle') %>
+
+ +
+
+
diff --git a/app/login.ejs b/app/login.ejs index 2da8072..a6b1791 100644 --- a/app/login.ejs +++ b/app/login.ejs @@ -7,7 +7,6 @@
- <%- lang('login.loginSubheader') %>
diff --git a/app/loginOptions.ejs b/app/loginOptions.ejs index 20aa67c..aece220 100644 --- a/app/loginOptions.ejs +++ b/app/loginOptions.ejs @@ -15,13 +15,73 @@
-
diff --git a/app/settings.ejs b/app/settings.ejs index 3fda82a..62d2566 100644 --- a/app/settings.ejs +++ b/app/settings.ejs @@ -52,15 +52,74 @@
- - - - - - <%- lang('settings.mojangAccount') %> + + <%- lang('settings.DPCloudevAccount') %>
- +
diff --git a/app/waiting.ejs b/app/waiting.ejs index c64726f..45b8e55 100644 --- a/app/waiting.ejs +++ b/app/waiting.ejs @@ -2,7 +2,7 @@
-

<%- lang('waiting.waitingText') %>

+

Please wait...

\ No newline at end of file diff --git a/index.js b/index.js index 7060c3c..3620fc7 100644 --- a/index.js +++ b/index.js @@ -227,8 +227,8 @@ let win function createWindow() { win = new BrowserWindow({ - width: 980, - height: 552, + width: 1280, + height: 720, icon: getPlatformIcon('SealCircle'), frame: false, webPreferences: { diff --git a/package-lock.json b/package-lock.json index 06eee52..709dbc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@electron/remote": "^2.1.2", "adm-zip": "^0.5.12", + "axios": "^1.7.7", "discord-rpc-patch": "^4.0.1", "ejs": "^3.1.10", "ejs-electron": "^3.0.0", @@ -1084,8 +1085,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/at-least-node": { "version": "1.0.0", @@ -1096,6 +1096,17 @@ "node": ">= 4.0.0" } }, + "node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/b4a": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", @@ -1502,7 +1513,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1743,7 +1753,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -2459,6 +2468,26 @@ "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -2479,7 +2508,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -3398,7 +3426,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -3407,7 +3434,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -3759,6 +3785,12 @@ "node": ">=10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", diff --git a/package.json b/package.json index f38d9f6..40af98e 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dependencies": { "@electron/remote": "^2.1.2", "adm-zip": "^0.5.12", + "axios": "^1.7.7", "discord-rpc-patch": "^4.0.1", "ejs": "^3.1.10", "ejs-electron": "^3.0.0",