diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index 3e065ff..4bf72a4 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -166,6 +166,31 @@ class Util { return true } + static isForgeGradle3(mcVersion, forgeVersion) { + + if(Util.mcVersionAtLeast('1.13', mcVersion)) { + return true + } + + let forgeVer = null + try { + forgeVer = forgeVersion.split('-')[1] + } catch(err) { + throw new Error('Forge version is complex (changed).. launcher requires a patch.') + } + + const maxFG2 = [14, 23, 5, 2847] + const verSplit = forgeVer.split('.').map(v => Number(v)) + + for(let i=0; i maxFG2[i]) { + return true + } + } + + return false + } + } @@ -1446,7 +1471,7 @@ class AssetGuard extends EventEmitter { for(let ob of modules){ const type = ob.getType() if(type === DistroManager.Types.ForgeHosted || type === DistroManager.Types.Forge){ - if(Util.mcVersionAtLeast('1.13', server.getMinecraftVersion())){ + if(Util.isForgeGradle3(server.getMinecraftVersion(), ob.getVersion())){ // Read Manifest for(let sub of ob.getSubModules()){ if(sub.getType() === DistroManager.Types.VersionManifest){ diff --git a/package-lock.json b/package-lock.json index c48b42b..2128977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -171,9 +171,9 @@ "dev": true }, "@types/fs-extra": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", - "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-B42Sxuaz09MhC3DDeW5kubRcQ5by4iuVQ0cRRWM2lggLzAa/KVom0Aft/208NgMvNQQZ86s5rVcqDdn/SH0/mg==", "dev": true, "requires": { "@types/node": "*" @@ -303,26 +303,26 @@ "dev": true }, "app-builder-lib": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-22.6.1.tgz", - "integrity": "sha512-ENL7r+H7IBfDb4faeLASgndsXrAT7AV7m7yJjcpbFDXYma6an7ZWGFIvR0HJrsfiC5TIB8kdLJ/aMSImrrSi/Q==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-22.7.0.tgz", + "integrity": "sha512-blRKwV8h0ztualXS50ciCTo39tbuDGNS+ldcy8+KLvKXuT6OpYnSJ7M6MSfPT+xWatshMHJV1rJx3Tl+k/Sn/g==", "dev": true, "requires": { "7zip-bin": "~5.0.3", "@develar/schema-utils": "~2.6.5", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", + "builder-util": "22.7.0", + "builder-util-runtime": "8.7.1", "chromium-pickle-js": "^0.2.0", - "debug": "^4.1.1", - "ejs": "^3.1.2", - "electron-publish": "22.6.1", + "debug": "^4.2.0", + "ejs": "^3.1.3", + "electron-publish": "22.7.0", "fs-extra": "^9.0.0", "hosted-git-info": "^3.0.4", "is-ci": "^2.0.0", "isbinaryfile": "^4.0.6", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "lazy-val": "^1.0.4", "minimatch": "^3.0.4", "normalize-package-data": "^2.5.0", @@ -330,6 +330,37 @@ "sanitize-filename": "^1.6.3", "semver": "^7.3.2", "temp-file": "^3.3.7" + }, + "dependencies": { + "builder-util-runtime": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.1.tgz", + "integrity": "sha512-uEBH1nAnTvzjcsrh2XI3qOzJ39h0+9kuIuwj+kCc3a07TZNGShfJcai8fFzL3mNgGjEFxoq+XMssR11r+FOFSg==", + "dev": true, + "requires": { + "debug": "^4.2.0", + "sax": "^1.2.4" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } } }, "argparse": { @@ -504,27 +535,37 @@ "dev": true }, "builder-util": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-22.6.1.tgz", - "integrity": "sha512-A9cF+bSHqRTSKIUHEyE92Tl0Uh12N7yZRH9bccIL3gRUwtp6ulF28LsjNIWTSQ1clZo2M895cT5PCrKzjPQFVg==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-22.7.0.tgz", + "integrity": "sha512-UV3MKL0mwjMq2y9JlBf28Cegpj0CrIXcjGkO0TXn+QZ6Yy9rY6lHOuUvpQ19ct2Qh1o+QSwH3Q1nKUf5viJBBg==", "dev": true, "requires": { "7zip-bin": "~5.0.3", "@types/debug": "^4.1.5", - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^9.0.1", "app-builder-bin": "3.5.9", "bluebird-lst": "^1.0.9", - "builder-util-runtime": "8.7.0", + "builder-util-runtime": "8.7.1", "chalk": "^4.0.0", - "debug": "^4.1.1", + "debug": "^4.2.0", "fs-extra": "^9.0.0", "is-ci": "^2.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "source-map-support": "^0.5.19", "stat-mode": "^1.0.0", "temp-file": "^3.3.7" }, "dependencies": { + "builder-util-runtime": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.1.tgz", + "integrity": "sha512-uEBH1nAnTvzjcsrh2XI3qOzJ39h0+9kuIuwj+kCc3a07TZNGShfJcai8fFzL3mNgGjEFxoq+XMssR11r+FOFSg==", + "dev": true, + "requires": { + "debug": "^4.2.0", + "sax": "^1.2.4" + } + }, "chalk": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", @@ -534,6 +575,25 @@ "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } } } }, @@ -870,17 +930,29 @@ } }, "dmg-builder": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-22.6.1.tgz", - "integrity": "sha512-jUTN0acP15puzevtQASj7QEPgUGpedWSuSnOwR/++JbeYRTwU2oro09h/KZnaeMcxgxjdmT3tYLJeY1XUfPbRg==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-22.7.0.tgz", + "integrity": "sha512-5Ea2YEz6zSNbyGzZD+O9/MzmaXb6oa15cSKWo4JQ1xP4rorOpte7IOj2jcwYjtc+Los2gu1lvT314OC1OZIWgg==", "dev": true, "requires": { - "app-builder-lib": "22.6.1", - "builder-util": "22.6.1", + "app-builder-lib": "22.7.0", + "builder-util": "22.7.0", "fs-extra": "^9.0.0", "iconv-lite": "^0.5.1", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "sanitize-filename": "^1.6.3" + }, + "dependencies": { + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } } }, "doctrine": { @@ -953,9 +1025,9 @@ } }, "electron": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0.tgz", - "integrity": "sha512-JsaSQNPh+XDYkLj8APtVKTtvpb86KIG57W5OOss4TNrn8L3isC9LsCITwfnVmGIXHhvX6oY/weCtN5hAAytjVg==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.2.tgz", + "integrity": "sha512-+a3KegLvQXVjC3b6yBWwZmtWp3tHf9ut27yORAWHO9JRFtKfNf88fi1UvTPJSW8R0sUH7ZEdzN6A95T22KGtlA==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -964,18 +1036,18 @@ } }, "electron-builder": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-22.6.1.tgz", - "integrity": "sha512-3/VNg9GfXKHM53TilFtfF1+bsAR8THK1XHgeqCpsiequa02J9jTPc/DhpCUKQPkrs6/EIGxP7uboop7XYoew0Q==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-22.7.0.tgz", + "integrity": "sha512-t6E3oMutpST64YWbZCg7HodEwJOsnjUF1vnDIHm2MW6CFZPX8tlCK6efqaV66LU0E0Nkp/JH6TE5bCqQ1+VdPQ==", "dev": true, "requires": { "@types/yargs": "^15.0.5", - "app-builder-lib": "22.6.1", + "app-builder-lib": "22.7.0", "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", + "builder-util": "22.7.0", + "builder-util-runtime": "8.7.1", "chalk": "^4.0.0", - "dmg-builder": "22.6.1", + "dmg-builder": "22.7.0", "fs-extra": "^9.0.0", "is-ci": "^2.0.0", "lazy-val": "^1.0.4", @@ -985,34 +1057,16 @@ "yargs": "^15.3.1" }, "dependencies": { - "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "builder-util-runtime": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.1.tgz", + "integrity": "sha512-uEBH1nAnTvzjcsrh2XI3qOzJ39h0+9kuIuwj+kCc3a07TZNGShfJcai8fFzL3mNgGjEFxoq+XMssR11r+FOFSg==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "debug": "^4.2.0", + "sax": "^1.2.4" } - } - } - }, - "electron-publish": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.6.1.tgz", - "integrity": "sha512-/MkS47ospdSfAFW5Jp52OzYou14HhGJpZ51uAc3GJ5rCfACeqpimC/n1ajRLE3hcXxTWfd3t9MCuClq5jrUO5w==", - "dev": true, - "requires": { - "@types/fs-extra": "^8.1.0", - "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", - "chalk": "^4.0.0", - "fs-extra": "^9.0.0", - "lazy-val": "^1.0.4", - "mime": "^2.4.5" - }, - "dependencies": { + }, "chalk": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", @@ -1023,10 +1077,66 @@ "supports-color": "^7.1.0" } }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "electron-publish": { + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.7.0.tgz", + "integrity": "sha512-hmU69xlb6vvAV3QfpHYDlkdZMFdBAgDbptoxbLFrnTq5bOkcL8AaDbvxeoZ4+lvqgs29NwqGpkHo2oN+p/hCfg==", + "dev": true, + "requires": { + "@types/fs-extra": "^9.0.1", + "bluebird-lst": "^1.0.9", + "builder-util": "22.7.0", + "builder-util-runtime": "8.7.1", + "chalk": "^4.0.0", + "fs-extra": "^9.0.0", + "lazy-val": "^1.0.4", + "mime": "^2.4.5" + }, + "dependencies": { + "builder-util-runtime": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.1.tgz", + "integrity": "sha512-uEBH1nAnTvzjcsrh2XI3qOzJ39h0+9kuIuwj+kCc3a07TZNGShfJcai8fFzL3mNgGjEFxoq+XMssR11r+FOFSg==", + "dev": true, + "requires": { + "debug": "^4.2.0", + "sax": "^1.2.4" + } + }, + "chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "mime": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", - "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==", "dev": true } } @@ -1518,19 +1628,19 @@ } }, "global-agent": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.8.tgz", - "integrity": "sha512-VpBe/rhY6Rw2VDOTszAMNambg+4Qv8j0yiTNDYEXXXxkUNGWLHp8A3ztK4YDBbFNcWF4rgsec6/5gPyryya/+A==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.12.tgz", + "integrity": "sha512-caAljRMS/qcDo69X9BfkgrihGUgGx44Fb4QQToNQjsiWh+YlQ66uqYVAdA8Olqit+5Ng0nkz09je3ZzANMZcjg==", "dev": true, "optional": true, "requires": { - "boolean": "^3.0.0", - "core-js": "^3.6.4", + "boolean": "^3.0.1", + "core-js": "^3.6.5", "es6-error": "^4.1.1", - "matcher": "^2.1.0", - "roarr": "^2.15.2", - "semver": "^7.1.2", - "serialize-error": "^5.0.0" + "matcher": "^3.0.0", + "roarr": "^2.15.3", + "semver": "^7.3.2", + "serialize-error": "^7.0.1" } }, "global-dirs": { @@ -2071,19 +2181,19 @@ } }, "matcher": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.1.0.tgz", - "integrity": "sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", + "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", "dev": true, "optional": true, "requires": { - "escape-string-regexp": "^2.0.0" + "escape-string-regexp": "^4.0.0" }, "dependencies": { "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "optional": true } @@ -2673,13 +2783,22 @@ } }, "serialize-error": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-5.0.0.tgz", - "integrity": "sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", "dev": true, "optional": true, "requires": { - "type-fest": "^0.8.0" + "type-fest": "^0.13.1" + }, + "dependencies": { + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true, + "optional": true + } } }, "set-blocking": { @@ -2763,9 +2882,9 @@ } }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", diff --git a/package.json b/package.json index 093e1c6..030ee10 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ }, "devDependencies": { "cross-env": "^7.0.2", - "electron": "^9.0.0", - "electron-builder": "^22.6.1", + "electron": "^9.0.2", + "electron-builder": "^22.7.0", "eslint": "^7.1.0" }, "repository": {