diff --git a/.eslintrc.json b/.eslintrc.json index 006dfc05..a254fe06 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ }, "extends": "eslint:recommended", "parserOptions": { - "ecmaVersion": 2019, + "ecmaVersion": 2021, "sourceType": "module" }, "rules": { diff --git a/app/assets/js/distromanager.js b/app/assets/js/distromanager.js index 90a2ab8d..5e429510 100644 --- a/app/assets/js/distromanager.js +++ b/app/assets/js/distromanager.js @@ -118,7 +118,7 @@ class Module { * @returns {Module} The parsed Module. */ static fromJSON(json, serverid){ - return new Module(json.id, json.name, json.type, json.required, json.artifact, json.subModules, serverid) + return new Module(json.id, json.name, json.type, json.classpath, json.required, json.artifact, json.subModules, serverid) } /** @@ -143,9 +143,10 @@ class Module { } } - constructor(id, name, type, required, artifact, subModules, serverid) { + constructor(id, name, type, classpath, required, artifact, subModules, serverid) { this.identifier = id this.type = type + this.classpath = classpath this._resolveMetaData() this.name = name this.required = Required.fromJSON(required) @@ -306,6 +307,13 @@ class Module { return this.type } + /** + * @returns {boolean} Whether or not this library should be on the classpath. + */ + getClasspath(){ + return this.classpath ?? true + } + } exports.Module diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index 8c28275d..44bec256 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -816,15 +816,9 @@ class ProcessBuilder { for(let sm of mdl.getSubModules()){ if(sm.getType() === DistroManager.Types.Library){ - // TODO Add as file or something. - const x = sm.getIdentifier() - console.log(x) - if(x.includes(':universal') || x.includes(':slim') || x.includes(':extra') || x.includes(':srg') || x.includes(':client')) { - console.log('SKIPPING ' + x) - continue + if(sm.getClasspath()) { + libs.push(sm.getArtifact().getPath()) } - - libs.push(sm.getArtifact().getPath()) } // If this module has submodules, we need to resolve the libraries for those. // To avoid unnecessary recursive calls, base case is checked here.