mirror of
https://github.com/AltarikMC/Launcher
synced 2024-11-22 06:19:50 +01:00
Merge pull request #244 from AltarikMC/dependabot/npm_and_yarn/msmc-4.0.5
Bump msmc from 3.1.4 to 4.0.5
This commit is contained in:
commit
a25e81017f
@ -44,7 +44,7 @@
|
|||||||
"hasha": "^5.2.2",
|
"hasha": "^5.2.2",
|
||||||
"izitoast": "^1.4.0",
|
"izitoast": "^1.4.0",
|
||||||
"minecraft-launcher-core": "^3.16.18",
|
"minecraft-launcher-core": "^3.16.18",
|
||||||
"msmc": "^3.1.4",
|
"msmc": "^4.0.5",
|
||||||
"node-fetch": "^2.6.9",
|
"node-fetch": "^2.6.9",
|
||||||
"vue": "^3.2.47"
|
"vue": "^3.2.47"
|
||||||
},
|
},
|
||||||
|
@ -7,7 +7,7 @@ const { join } = require('path')
|
|||||||
const constants = require("constants")
|
const constants = require("constants")
|
||||||
const zip = require('extract-zip')
|
const zip = require('extract-zip')
|
||||||
const logger = require('electron-log')
|
const logger = require('electron-log')
|
||||||
const msmc = require('msmc')
|
const { auth, lst } = require('msmc')
|
||||||
const decompress = require('decompress')
|
const decompress = require('decompress')
|
||||||
const decompressTar = require('decompress-targz')
|
const decompressTar = require('decompress-targz')
|
||||||
|
|
||||||
@ -49,34 +49,28 @@ class Minecraft {
|
|||||||
* Used to login through a Microsoft account
|
* Used to login through a Microsoft account
|
||||||
*/
|
*/
|
||||||
microsoftLogin(event, win) {
|
microsoftLogin(event, win) {
|
||||||
msmc.fastLaunch("electron",
|
const authManager = new auth("select_account")
|
||||||
(update) => {
|
authManager.launch("electron").then(async xboxManager => {
|
||||||
switch (update.type) {
|
xboxManager.getMinecraft().then(async token => {
|
||||||
case "Error":
|
if(!token.isDemo()) {
|
||||||
event.sender.send("loginError")
|
this.auth = token.mclc()
|
||||||
this.showNotification("Une erreur est survenue", update.data, "error")
|
|
||||||
logger.error("MC-Account error:", update.data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}).then(result => {
|
|
||||||
if(msmc.errorCheck(result)) {
|
|
||||||
event.sender.send("loginError")
|
|
||||||
logger.error(result.reason)
|
|
||||||
this.showNotification("Erreur de connexion", result.reason, "error")
|
|
||||||
} else {
|
|
||||||
if(!msmc.isDemoUser(result)) {
|
|
||||||
this.auth = msmc.getMCLC().getAuth(result)
|
|
||||||
win.loadFile('src/client/index.html')
|
win.loadFile('src/client/index.html')
|
||||||
} else {
|
} else {
|
||||||
event.sender.send("loginError")
|
event.sender.send("loginError")
|
||||||
logger.error("[MS login] User haven't purchase the game")
|
logger.error("[MS login] User haven't purchase the game")
|
||||||
this.showNotification("Erreur de connexion", "Vous ne possèdez pas de licence Minecraft sur ce compte", "error")
|
this.showNotification("Erreur de connexion", "Vous ne possèdez pas de licence Minecraft sur ce compte", "error")
|
||||||
}
|
}
|
||||||
}
|
}).catch(err => {
|
||||||
}).catch(reason => {
|
event.sender.send("loginError")
|
||||||
|
logger.error("[MS login] " + lst(err))
|
||||||
|
this.showNotification("Erreur de connexion à Mojang", lst(err), "error")
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
event.sender.send("loginError")
|
event.sender.send("loginError")
|
||||||
logger.error(reason)
|
if(err != "error.gui.closed") {
|
||||||
this.showNotification("Erreur de connexion", "Erreur inconnue", "error")
|
logger.error("[MS login] " + lst(err))
|
||||||
|
this.showNotification("Une erreur de connexion à Xbox est survenue", lst(err), "error")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
17
yarn.lock
17
yarn.lock
@ -2481,12 +2481,13 @@ ms@^2.0.0, ms@^2.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||||
|
|
||||||
msmc@^3.1.4:
|
msmc@^4.0.5:
|
||||||
version "3.1.4"
|
version "4.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/msmc/-/msmc-3.1.4.tgz#2a60cc22445f5ff44115fbe295aff7938b4088a9"
|
resolved "https://registry.yarnpkg.com/msmc/-/msmc-4.0.5.tgz#8451ff18929394cb28dfe680d69b70eebd09b074"
|
||||||
integrity sha512-3UHLlZXtFKRdJ3g6lb0vevC9RpObOE2+oiIS0SWLR2l75I60eXp6mF2XnFoZ7MgSeOmlwcU+lEGuIm3fT9UErg==
|
integrity sha512-HT3OY8IAphEQqlDV1mS4ccoffIpE6nCWChmIL7Uxuc2iL3HQinb8ULq8q8jfDRrIUobtI5dqVlG3PlrQa/4s7g==
|
||||||
dependencies:
|
dependencies:
|
||||||
node-fetch "2.x"
|
node-fetch "2.x"
|
||||||
|
tslib "^2.4.0"
|
||||||
|
|
||||||
nanoid@^3.3.3:
|
nanoid@^3.3.3:
|
||||||
version "3.3.4"
|
version "3.3.4"
|
||||||
@ -3493,10 +3494,10 @@ trim-repeated@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
escape-string-regexp "^1.0.2"
|
escape-string-regexp "^1.0.2"
|
||||||
|
|
||||||
tslib@^2.1.0:
|
tslib@^2.1.0, tslib@^2.4.0:
|
||||||
version "2.4.0"
|
version "2.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
||||||
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
|
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
||||||
|
|
||||||
tunnel-agent@^0.6.0:
|
tunnel-agent@^0.6.0:
|
||||||
version "0.6.0"
|
version "0.6.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user