Comparing version 2.4.0 to 2.5.0
@@ -19,3 +19,3 @@ #!/usr/bin/env node | ||
const { loadBytecodeModule, loadCSharpModule, loadJSV2Module } = loadRuntimeConfig(); | ||
const { loadBytecodeModule, loadCSharpModule, loadJSV2Module, loadVoiceServer } = loadRuntimeConfig(); | ||
@@ -216,4 +216,17 @@ function authorizeDiscord() { | ||
} | ||
} | ||
if (loadVoiceServer) { | ||
res = await axios.get(`https://${CDN_ADDRESS}/voice-server/${branch}/x64_linux/update.json`, { responseType: 'json', headers }); | ||
for ([file, hash] of Object.entries(res.data.hashList)) { | ||
linuxFiles[file] = `https://${CDN_ADDRESS}/voice-server/${branch}/x64_linux/${file}`; | ||
} | ||
res = await axios.get(`https://${CDN_ADDRESS}/voice-server/${branch}/x64_win32/update.json`, { responseType: 'json', headers }); | ||
for ([file, hash] of Object.entries(res.data.hashList)) { | ||
windowsFiles[file] = `https://${CDN_ADDRESS}/voice-server/${branch}/x64_win32/${file}`; | ||
} | ||
linuxUpdates.push(`https://${CDN_ADDRESS}/voice-server/${branch}/x64_linux/update.json`); | ||
windowsUpdates.push(`https://${CDN_ADDRESS}/voice-server/${branch}/x64_win32/update.json`); | ||
} | ||
@@ -339,2 +352,3 @@ | ||
let loadJSV2Module = false; | ||
let loadVoiceServer = false; | ||
@@ -348,2 +362,3 @@ try { | ||
loadJSV2Module = !!parsedData.loadJSV2Module; | ||
loadVoiceServer = !!parsedData.loadVoiceServer; | ||
} catch (e) { | ||
@@ -353,5 +368,5 @@ console.log(chalk.gray(`Configuration file '${RC_FILE_NAME}' could not be read. Continuing without...`)); | ||
return { loadBytecodeModule, loadCSharpModule, loadJSV2Module }; | ||
return { loadBytecodeModule, loadCSharpModule, loadJSV2Module, loadVoiceServer }; | ||
} | ||
start(); |
{ | ||
"name": "altv-pkg", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Install alt:V Binaries Quickly", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
@@ -31,2 +31,4 @@ # altv-pkg | ||
**Note** The `loadVoiceServer` configuration allows you to include [external voice server](https://docs.altv.mp/articles/external_voice_server.html) when downloading binaries. | ||
``` | ||
@@ -36,4 +38,5 @@ { | ||
"loadCSharpModule": true, | ||
"loadJSV2Module": true | ||
"loadJSV2Module": true, | ||
"loadVoiceServer": true | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51558
301
41