altv-pkg
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -33,3 +33,3 @@ #!/usr/bin/env node | ||
resolve(code); | ||
} catch(e) { | ||
} catch (e) { | ||
reject(e); | ||
@@ -43,3 +43,3 @@ return; | ||
await client.login({ clientId: DISCORD_ID }); | ||
} catch(e) { | ||
} catch (e) { | ||
reject(e); | ||
@@ -53,5 +53,5 @@ } | ||
try { | ||
const res = await axios.get('https://qa-auth.alt-mp.com/auth', { responseType: 'json', headers: { Authorization: code }}); | ||
const res = await axios.get('https://qa-auth.alt-mp.com/auth', { responseType: 'json', headers: { Authorization: code } }); | ||
return res.data.token; | ||
} catch(e) { | ||
} catch (e) { | ||
if (e?.response?.status != 403) throw e; | ||
@@ -110,2 +110,3 @@ throw new Error("You do not have permissions to access this branch"); | ||
'data/rpfdata.bin': `https://${CDN_ADDRESS}/data/${branch}/data/rpfdata.bin`, | ||
'data/weaponmodels.bin': `https://${CDN_ADDRESS}/data/${branch}/data/weaponmodels.bin`, | ||
}; | ||
@@ -188,3 +189,3 @@ | ||
headers = { 'X-Auth': token } | ||
} catch(e) { | ||
} catch (e) { | ||
console.error(chalk.redBright(`Failed to authorize: ${e}`)); | ||
@@ -191,0 +192,0 @@ return; |
{ | ||
"name": "altv-pkg", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Install alt:V Binaries Quickly", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
49109
253