Compare commits

..

1 Commits

Author SHA1 Message Date
Ulysse Gressé-Lugué
0dcabb8a35
Merge b4052f979e into eb683f89ec 2024-05-08 10:08:13 +00:00
3 changed files with 542 additions and 1372 deletions

View File

@ -839,7 +839,9 @@ class ProcessBuilder {
libs[mdl.getVersionlessMavenIdentifier()] = mdl.getPath()
if(mdl.subModules.length > 0){
const res = this._resolveModuleLibraries(mdl)
libs = {...libs, ...res}
if(res.length > 0){
libs = {...libs, ...res}
}
}
}
}
@ -848,7 +850,9 @@ class ProcessBuilder {
for(let i=0; i<mods.length; i++){
if(mods.sub_modules != null){
const res = this._resolveModuleLibraries(mods[i])
libs = {...libs, ...res}
if(res.length > 0){
libs = {...libs, ...res}
}
}
}
@ -859,25 +863,27 @@ class ProcessBuilder {
* Recursively resolve the path of each library required by this module.
*
* @param {Object} mdl A module object from the server distro index.
* @returns {{[id: string]: string}} An object containing the paths of each library this module requires.
* @returns {Array.<string>} An array containing the paths of each library this module requires.
*/
_resolveModuleLibraries(mdl){
if(!mdl.subModules.length > 0){
return {}
return []
}
let libs = {}
let libs = []
for(let sm of mdl.subModules){
if(sm.rawModule.type === Type.Library){
if(sm.rawModule.classpath ?? true) {
libs[sm.getVersionlessMavenIdentifier()] = sm.getPath()
libs.push(sm.getPath())
}
}
// If this module has submodules, we need to resolve the libraries for those.
// To avoid unnecessary recursive calls, base case is checked here.
if(mdl.subModules.length > 0){
const res = this._resolveModuleLibraries(sm)
libs = {...libs, ...res}
if(res.length > 0){
libs = libs.concat(res)
}
}
}
return libs

1880
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,25 +24,25 @@
},
"dependencies": {
"@electron/remote": "^2.1.2",
"adm-zip": "^0.5.16",
"adm-zip": "^0.5.12",
"discord-rpc-patch": "^4.0.1",
"ejs": "^3.1.10",
"ejs-electron": "^3.0.0",
"electron-updater": "^6.3.9",
"electron-updater": "^6.1.8",
"fs-extra": "^11.1.1",
"github-syntax-dark": "^0.5.0",
"got": "^11.8.5",
"helios-core": "~2.2.3",
"helios-core": "~2.2.1",
"helios-distribution-types": "^1.3.0",
"jquery": "^3.7.1",
"lodash.merge": "^4.6.2",
"semver": "^7.6.3",
"semver": "^7.6.0",
"toml": "^3.0.0"
},
"devDependencies": {
"electron": "^33.2.1",
"electron-builder": "^25.1.8",
"eslint": "^8.57.1"
"electron": "^30.0.1",
"electron-builder": "^24.13.3",
"eslint": "^8.57.0"
},
"repository": {
"type": "git",