Added drag/drop functionality to the add mods button.

You can now drag one or more files onto the add mods button in order to add them to the mods directory. Only jar, litemod, and zip files will be moved.
Changed eslint to use a single configuration file, with overrides for the UI scripts.
Now using fs-extra, replace usages of rimraf and mkdirp with fs-extra functions.
This commit is contained in:
Daniel Scalzi 2018-12-01 08:20:42 -05:00
parent d9c9b32446
commit d779eacf61
No known key found for this signature in database
GPG Key ID: 5CA2F145B63535F9
11 changed files with 170 additions and 143 deletions

View File

@ -46,5 +46,18 @@
"argsIgnorePattern": "reject" "argsIgnorePattern": "reject"
} }
] ]
} },
"overrides": [
{
"files": [ "app/assets/js/scripts/*.js" ],
"rules": {
"no-unused-vars": [
0
],
"no-undef": [
0
]
}
}
]
} }

View File

@ -1,47 +0,0 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"windows"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"no-var": [
"error"
],
"no-console": [
0
],
"no-control-regex": [
0
],
"no-unused-vars": [
0
],
"no-undef": [
0
]
}
}

View File

@ -1545,13 +1545,15 @@ input:checked + .toggleSwitchSlider:before {
margin-bottom: 10px; margin-bottom: 10px;
} }
#settingsDropinFileSystemButton:hover, #settingsDropinFileSystemButton:hover,
#settingsDropinFileSystemButton:focus { #settingsDropinFileSystemButton:focus,
#settingsDropinFileSystemButton[drag] {
background: rgba(54, 54, 54, 0.25); background: rgba(54, 54, 54, 0.25);
text-shadow: 0px 0px 20px white; text-shadow: 0px 0px 20px white;
} }
/* Refresh instructions on the file system button. */ /* Refresh instructions on the file system button. */
#settingsDropinRefreshNote { #settingsDropinRefreshNote {
font-size: 10px; font-size: 10px;
pointer-events: none;
} }
/* Button to remove drop-in mods. */ /* Button to remove drop-in mods. */
@ -2663,7 +2665,6 @@ input:checked + .toggleSwitchSlider:before {
box-shadow: 0px 0px 10px 0px rgb(0, 0, 0); box-shadow: 0px 0px 10px 0px rgb(0, 0, 0);
overflow: hidden; overflow: hidden;
position: relative; position: relative;
/*background-image: url('https://cdn.discordapp.com/avatars/169197209630277642/6650b5a50e1cb3d00a79b9b88b9a0cd4.png');*/
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;

View File

@ -4,8 +4,7 @@ const async = require('async')
const child_process = require('child_process') const child_process = require('child_process')
const crypto = require('crypto') const crypto = require('crypto')
const EventEmitter = require('events') const EventEmitter = require('events')
const fs = require('fs') const fs = require('fs-extra')
const mkpath = require('mkdirp')
const path = require('path') const path = require('path')
const Registry = require('winreg') const Registry = require('winreg')
const request = require('request') const request = require('request')
@ -360,7 +359,7 @@ class AssetGuard extends EventEmitter {
const versionPath = path.join(commonPath, 'versions', forgeVersion.id) const versionPath = path.join(commonPath, 'versions', forgeVersion.id)
const versionFile = path.join(versionPath, forgeVersion.id + '.json') const versionFile = path.join(versionPath, forgeVersion.id + '.json')
if(!fs.existsSync(versionFile)){ if(!fs.existsSync(versionFile)){
mkpath.sync(versionPath) fs.ensureDirSync(versionPath)
fs.writeFileSync(path.join(versionPath, forgeVersion.id + '.json'), zipEntries[i].getData()) fs.writeFileSync(path.join(versionPath, forgeVersion.id + '.json'), zipEntries[i].getData())
resolve(forgeVersion) resolve(forgeVersion)
} else { } else {
@ -996,7 +995,7 @@ class AssetGuard extends EventEmitter {
const url = await self._getVersionDataUrl(version) const url = await self._getVersionDataUrl(version)
//This download will never be tracked as it's essential and trivial. //This download will never be tracked as it's essential and trivial.
console.log('Preparing download of ' + version + ' assets.') console.log('Preparing download of ' + version + ' assets.')
mkpath.sync(versionPath) fs.ensureDirSync(versionPath)
const stream = request(url).pipe(fs.createWriteStream(versionFile)) const stream = request(url).pipe(fs.createWriteStream(versionFile))
stream.on('finish', () => { stream.on('finish', () => {
resolve(JSON.parse(fs.readFileSync(versionFile))) resolve(JSON.parse(fs.readFileSync(versionFile)))
@ -1078,7 +1077,7 @@ class AssetGuard extends EventEmitter {
let data = null let data = null
if(!fs.existsSync(assetIndexLoc) || force){ if(!fs.existsSync(assetIndexLoc) || force){
console.log('Downloading ' + versionData.id + ' asset index.') console.log('Downloading ' + versionData.id + ' asset index.')
mkpath.sync(indexPath) fs.ensureDirSync(indexPath)
const stream = request(assetIndex.url).pipe(fs.createWriteStream(assetIndexLoc)) const stream = request(assetIndex.url).pipe(fs.createWriteStream(assetIndexLoc))
stream.on('finish', () => { stream.on('finish', () => {
data = JSON.parse(fs.readFileSync(assetIndexLoc, 'utf-8')) data = JSON.parse(fs.readFileSync(assetIndexLoc, 'utf-8'))
@ -1457,7 +1456,7 @@ class AssetGuard extends EventEmitter {
async.eachLimit(dlQueue, limit, (asset, cb) => { async.eachLimit(dlQueue, limit, (asset, cb) => {
mkpath.sync(path.join(asset.to, '..')) fs.ensureDirSync(path.join(asset.to, '..'))
let req = request(asset.from) let req = request(asset.from)
req.pause() req.pause()

View File

@ -1,5 +1,4 @@
const fs = require('fs') const fs = require('fs-extra')
const mkpath = require('mkdirp')
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
@ -98,7 +97,7 @@ exports.load = function(){
if(!fs.existsSync(filePath)){ if(!fs.existsSync(filePath)){
// Create all parent directories. // Create all parent directories.
mkpath.sync(path.join(filePath, '..')) fs.ensureDirSync(path.join(filePath, '..'))
config = DEFAULT_CONFIG config = DEFAULT_CONFIG
exports.save() exports.save()
} else { } else {
@ -110,7 +109,7 @@ exports.load = function(){
logger.error(err) logger.error(err)
logger.log('Configuration file contains malformed JSON or is corrupt.') logger.log('Configuration file contains malformed JSON or is corrupt.')
logger.log('Generating a new configuration file.') logger.log('Generating a new configuration file.')
mkpath.sync(path.join(filePath, '..')) fs.ensureDirSync(path.join(filePath, '..'))
config = DEFAULT_CONFIG config = DEFAULT_CONFIG
exports.save() exports.save()
} }

View File

@ -1,5 +1,4 @@
const fs = require('fs') const fs = require('fs-extra')
const mkpath = require('mkdirp')
const path = require('path') const path = require('path')
const { shell } = require('electron') const { shell } = require('electron')
@ -16,9 +15,7 @@ const DISABLED_EXT = '.disabled'
* @param {string} modsDir The path to the mods directory. * @param {string} modsDir The path to the mods directory.
*/ */
exports.validateModsDir = function(modsDir) { exports.validateModsDir = function(modsDir) {
if(!fs.existsSync(modsDir)) { fs.ensureDirSync(modsDir)
mkpath.sync(modsDir)
}
} }
/** /**
@ -66,6 +63,22 @@ exports.scanForDropinMods = function(modsDir, version) {
return modsDiscovered return modsDiscovered
} }
/**
* Add dropin mods.
*
* @param {FileList} files The files to add.
* @param {string} modsDir The path to the mods directory.
*/
exports.addDropinMods = function(files, modsdir) {
for(let f of files) {
if(MOD_REGEX.exec(f.name) != null) {
fs.moveSync(f.path, path.join(modsdir, f.name))
}
}
}
/** /**
* Delete a drop-in mod from the file system. * Delete a drop-in mod from the file system.
* *

View File

@ -1,7 +1,7 @@
const {ipcRenderer} = require('electron') const {ipcRenderer} = require('electron')
const fs = require('fs-extra')
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
const rimraf = require('rimraf')
const ConfigManager = require('./configmanager') const ConfigManager = require('./configmanager')
const DistroManager = require('./distromanager') const DistroManager = require('./distromanager')
@ -56,7 +56,7 @@ DistroManager.pullRemote().then((data) => {
}) })
// Clean up temp dir incase previous launches ended unexpectedly. // Clean up temp dir incase previous launches ended unexpectedly.
rimraf(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => { fs.remove(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => {
if(err){ if(err){
logger.warn('Error while cleaning natives directory', err) logger.warn('Error while cleaning natives directory', err)
} else { } else {

View File

@ -1,11 +1,9 @@
const AdmZip = require('adm-zip') const AdmZip = require('adm-zip')
const child_process = require('child_process') const child_process = require('child_process')
const crypto = require('crypto') const crypto = require('crypto')
const fs = require('fs') const fs = require('fs-extra')
const mkpath = require('mkdirp')
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
const rimraf = require('rimraf')
const {URL} = require('url') const {URL} = require('url')
const { Library } = require('./assetguard') const { Library } = require('./assetguard')
@ -36,7 +34,7 @@ class ProcessBuilder {
* Convienence method to run the functions typically used to build a process. * Convienence method to run the functions typically used to build a process.
*/ */
build(){ build(){
mkpath.sync(this.gameDir) fs.ensureDirSync(this.gameDir)
const tempNativePath = path.join(os.tmpdir(), ConfigManager.getTempNativeFolder(), crypto.pseudoRandomBytes(16).toString('hex')) const tempNativePath = path.join(os.tmpdir(), ConfigManager.getTempNativeFolder(), crypto.pseudoRandomBytes(16).toString('hex'))
process.throwDeprecation = true process.throwDeprecation = true
this.setupLiteLoader() this.setupLiteLoader()
@ -74,7 +72,7 @@ class ProcessBuilder {
}) })
child.on('close', (code, signal) => { child.on('close', (code, signal) => {
logger.log('Exited with code', code) logger.log('Exited with code', code)
rimraf(tempNativePath, (err) => { fs.remove(tempNativePath, (err) => {
if(err){ if(err){
logger.warn('Error while deleting temp dir', err) logger.warn('Error while deleting temp dir', err)
} else { } else {
@ -364,7 +362,7 @@ class ProcessBuilder {
const libs = [] const libs = []
const libArr = this.versionData.libraries const libArr = this.versionData.libraries
mkpath.sync(tempNativePath) fs.ensureDirSync(tempNativePath)
for(let i=0; i<libArr.length; i++){ for(let i=0; i<libArr.length; i++){
const lib = libArr[i] const lib = libArr[i]
if(Library.validateRules(lib.rules)){ if(Library.validateRules(lib.rules)){

View File

@ -643,6 +643,25 @@ function bindDropinModFileSystemButton(){
DropinModUtil.validateModsDir(CACHE_SETTINGS_MODS_DIR) DropinModUtil.validateModsDir(CACHE_SETTINGS_MODS_DIR)
shell.openItem(CACHE_SETTINGS_MODS_DIR) shell.openItem(CACHE_SETTINGS_MODS_DIR)
} }
fsBtn.ondragenter = e => {
e.dataTransfer.dropEffect = 'move'
fsBtn.setAttribute('drag', '')
e.preventDefault()
}
fsBtn.ondragover = e => {
e.preventDefault()
}
fsBtn.ondragleave = e => {
fsBtn.removeAttribute('drag')
}
fsBtn.ondrop = e => {
fsBtn.removeAttribute('drag')
e.preventDefault()
DropinModUtil.addDropinMods(e.dataTransfer.files, CACHE_SETTINGS_MODS_DIR)
reloadDropinMods()
}
} }
/** /**
@ -676,14 +695,18 @@ function saveDropinModConfiguration(){
document.addEventListener('keydown', (e) => { document.addEventListener('keydown', (e) => {
if(getCurrentView() === VIEWS.settings && selectedSettingsTab === 'settingsTabMods'){ if(getCurrentView() === VIEWS.settings && selectedSettingsTab === 'settingsTabMods'){
if(e.key === 'F5'){ if(e.key === 'F5'){
resolveDropinModsForUI() reloadDropinMods()
bindDropinModsRemoveButton()
bindDropinModFileSystemButton()
bindModsToggleSwitch()
} }
} }
}) })
function reloadDropinMods(){
resolveDropinModsForUI()
bindDropinModsRemoveButton()
bindDropinModFileSystemButton()
bindModsToggleSwitch()
}
// Server status bar functions. // Server status bar functions.
/** /**

151
package-lock.json generated
View File

@ -134,28 +134,28 @@
} }
}, },
"app-builder-bin": { "app-builder-bin": {
"version": "2.5.1", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.5.1.tgz", "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.6.0.tgz",
"integrity": "sha512-Hm+eyyfQCs5N5avLAw3w9Cf1S5TX/t6ecAfHusbzCDh/rLKLKYso2vwDWH4OQZ8uWLnuJwaAUDf3PstRcn0H+A==", "integrity": "sha512-7HphDMS2U9MwAA6R7lSU6MASFR/D+VJDb5hQ4Fn2coOMyaRn71QDWPdG0TPnDr88F2I7bsTuHYud28S/yN2lZw==",
"dev": true "dev": true
}, },
"app-builder-lib": { "app-builder-lib": {
"version": "20.36.2", "version": "20.38.2",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.36.2.tgz", "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.38.2.tgz",
"integrity": "sha512-5FxLnWI13t0LLmh2QjmPx3KW/xhj67su7UxdCzQgULsUmYurdPx8yAOb9YxoX+RpR08inqt+H3GBOJlqSSrVgg==", "integrity": "sha512-jwysFwaU4ohvHqv5jNCeoZSO0N/8x7W/c0S6TiTb6QUC3U0YVcsN7DPMj7QApHzTvMTO9kxzjUzwA8dbQZVovg==",
"dev": true, "dev": true,
"requires": { "requires": {
"7zip-bin": "~4.1.0", "7zip-bin": "~4.1.0",
"app-builder-bin": "2.5.1", "app-builder-bin": "2.6.0",
"async-exit-hook": "^2.0.1", "async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util": "9.3.0", "builder-util": "9.6.0",
"builder-util-runtime": "8.0.2", "builder-util-runtime": "8.0.2",
"chromium-pickle-js": "^0.2.0", "chromium-pickle-js": "^0.2.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"ejs": "^2.6.1", "ejs": "^2.6.1",
"electron-osx-sign": "0.4.11", "electron-osx-sign": "0.4.11",
"electron-publish": "20.36.0", "electron-publish": "20.38.2",
"fs-extra-p": "^7.0.0", "fs-extra-p": "^7.0.0",
"hosted-git-info": "^2.7.1", "hosted-git-info": "^2.7.1",
"is-ci": "^1.2.1", "is-ci": "^1.2.1",
@ -168,7 +168,7 @@
"read-config-file": "3.2.0", "read-config-file": "3.2.0",
"sanitize-filename": "^1.6.1", "sanitize-filename": "^1.6.1",
"semver": "^5.6.0", "semver": "^5.6.0",
"temp-file": "^3.2.0" "temp-file": "^3.3.2"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
@ -261,7 +261,8 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
}, },
"base64-js": { "base64-js": {
"version": "1.3.0", "version": "1.3.0",
@ -387,6 +388,7 @@
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -417,15 +419,15 @@
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
}, },
"builder-util": { "builder-util": {
"version": "9.3.0", "version": "9.6.0",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-9.3.0.tgz", "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-9.6.0.tgz",
"integrity": "sha512-K+kj5vWj4Mk3jOm6kVT9ZwNcECLHe449vdMxYuZpCnn7CSxRm+TeZm9P9ZFCQUID5Hww/Sy4NMFo+VVJh6+Ptw==", "integrity": "sha512-6T4E3aNVndTZ2oCt+22S0wxt47d094MxrADi6S012QumXlDNfSsyu1ffbGN9w0HG+4aubpLzf9apKgMP1yl4Kw==",
"dev": true, "dev": true,
"requires": { "requires": {
"7zip-bin": "~4.1.0", "7zip-bin": "~4.1.0",
"app-builder-bin": "2.5.1", "app-builder-bin": "2.6.0",
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util-runtime": "^8.0.1", "builder-util-runtime": "^8.0.2",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"debug": "^4.1.0", "debug": "^4.1.0",
"fs-extra-p": "^7.0.0", "fs-extra-p": "^7.0.0",
@ -433,7 +435,7 @@
"js-yaml": "^3.12.0", "js-yaml": "^3.12.0",
"source-map-support": "^0.5.9", "source-map-support": "^0.5.9",
"stat-mode": "^0.2.2", "stat-mode": "^0.2.2",
"temp-file": "^3.2.0" "temp-file": "^3.3.2"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
@ -664,7 +666,8 @@
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
}, },
"concat-stream": { "concat-stream": {
"version": "1.6.2", "version": "1.6.2",
@ -860,14 +863,14 @@
} }
}, },
"dmg-builder": { "dmg-builder": {
"version": "6.4.0", "version": "6.5.2",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-6.4.0.tgz", "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-6.5.2.tgz",
"integrity": "sha512-q84fMrMm9mXh2qH0Sb3+o0gCvfeJRBI+46y+CpQystqgRyB+3bZB11WqCf5d8+qsENhzpi786jR82xbHG1Vvag==", "integrity": "sha512-eT3qc8IrwfDyq5ddGO807Wya2ltVlIlE0FVf6Aa+HWdlp9JnYayPNGWrQA9xIHpKKlq206JdNZ6LYIn93EAzdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"app-builder-lib": "~20.36.0", "app-builder-lib": "~20.38.2",
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util": "~9.3.0", "builder-util": "~9.6.0",
"fs-extra-p": "^7.0.0", "fs-extra-p": "^7.0.0",
"iconv-lite": "^0.4.24", "iconv-lite": "^0.4.24",
"js-yaml": "^3.12.0", "js-yaml": "^3.12.0",
@ -947,24 +950,24 @@
} }
}, },
"electron-builder": { "electron-builder": {
"version": "20.36.2", "version": "20.38.2",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.36.2.tgz", "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.38.2.tgz",
"integrity": "sha512-xPJNt3ZBn5IYlp3pCP0Rvi00JYAKdTeOSLWFrkST1xqWfRZxXrI4uisVD9HQjzRN8hBHhTgTfXtb9uhWPha9eA==", "integrity": "sha512-uUEzfc/e8J7nAowvFQw4SyHIe4d6VSHO1LmcLy53he4aGXlVklHluhbwa0rxATPdYVNgHmJz7zoVgYYOd/YS+A==",
"dev": true, "dev": true,
"requires": { "requires": {
"app-builder-lib": "20.36.2", "app-builder-lib": "20.38.2",
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util": "9.3.0", "builder-util": "9.6.0",
"builder-util-runtime": "8.0.2", "builder-util-runtime": "8.0.2",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"dmg-builder": "6.4.0", "dmg-builder": "6.5.2",
"fs-extra-p": "^7.0.0", "fs-extra-p": "^7.0.0",
"is-ci": "^1.2.1", "is-ci": "^1.2.1",
"lazy-val": "^1.0.3", "lazy-val": "^1.0.3",
"read-config-file": "3.2.0", "read-config-file": "3.2.0",
"sanitize-filename": "^1.6.1", "sanitize-filename": "^1.6.1",
"update-notifier": "^2.5.0", "update-notifier": "^2.5.0",
"yargs": "^12.0.2" "yargs": "^12.0.5"
} }
}, },
"electron-download": { "electron-download": {
@ -982,6 +985,19 @@
"rc": "^1.2.1", "rc": "^1.2.1",
"semver": "^5.4.1", "semver": "^5.4.1",
"sumchecker": "^2.0.2" "sumchecker": "^2.0.2"
},
"dependencies": {
"fs-extra": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
}
} }
}, },
"electron-osx-sign": { "electron-osx-sign": {
@ -1016,24 +1032,32 @@
} }
}, },
"electron-publish": { "electron-publish": {
"version": "20.36.0", "version": "20.38.2",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.36.0.tgz", "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.38.2.tgz",
"integrity": "sha512-LjJ4KoApSLtKyGWotv0B+PoTzpLEdHHXzDF9HLxatPlfoZCmrOexqm7Qiv1ODuYWPac7Zpf2OHitJp8WIOcZRQ==", "integrity": "sha512-GXwnZm9I9l4RjlDwuALpR57aIH38qRzDEYbhLysmrC5T2xlCgyBIfxS5EUNESqKT+9KeJJZcj+eTKMjbz+Qafw==",
"dev": true, "dev": true,
"requires": { "requires": {
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util": "~9.3.0", "builder-util": "~9.6.0",
"builder-util-runtime": "^8.0.1", "builder-util-runtime": "^8.0.2",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"fs-extra-p": "^7.0.0", "fs-extra-p": "^7.0.0",
"lazy-val": "^1.0.3", "lazy-val": "^1.0.3",
"mime": "^2.3.1" "mime": "^2.4.0"
},
"dependencies": {
"mime": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
"integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==",
"dev": true
}
} }
}, },
"electron-updater": { "electron-updater": {
"version": "4.0.4", "version": "4.0.5",
"resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.0.4.tgz", "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.0.5.tgz",
"integrity": "sha512-y3wddJQyC5h1UTJhNAWoX4McJ5Z1r1ZDqyifpYWniVS286YCXe1xSLkbe9C6ZzxzPurt1jg2ZubPuBNt/811Dw==", "integrity": "sha512-2w93987YlPNMbhYQe6+EsSpkhtgYtLyYuAMttqQckwFdBJJat4Jo8ja/gmBk2Aa760g2Jt7aIBPQvlJDiXGPgg==",
"requires": { "requires": {
"bluebird-lst": "^1.0.6", "bluebird-lst": "^1.0.6",
"builder-util-runtime": "~8.0.2", "builder-util-runtime": "~8.0.2",
@ -1415,10 +1439,9 @@
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
}, },
"fs-extra": { "fs-extra": {
"version": "4.0.3", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
"dev": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0", "jsonfile": "^4.0.0",
@ -1449,7 +1472,8 @@
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
}, },
"functional-red-black-tree": { "functional-red-black-tree": {
"version": "1.0.1", "version": "1.0.1",
@ -1492,6 +1516,7 @@
"version": "7.1.2", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": { "requires": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
"inflight": "^1.0.4", "inflight": "^1.0.4",
@ -1629,6 +1654,7 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": { "requires": {
"once": "^1.3.0", "once": "^1.3.0",
"wrappy": "1" "wrappy": "1"
@ -2024,9 +2050,9 @@
"dev": true "dev": true
}, },
"lru-cache": { "lru-cache": {
"version": "4.1.3", "version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"dev": true, "dev": true,
"requires": { "requires": {
"pseudomap": "^1.0.2", "pseudomap": "^1.0.2",
@ -2122,6 +2148,7 @@
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -2390,9 +2417,9 @@
} }
}, },
"pako": { "pako": {
"version": "1.0.6", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz",
"integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ=="
}, },
"parse-color": { "parse-color": {
"version": "1.0.0", "version": "1.0.0",
@ -2429,7 +2456,8 @@
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
}, },
"path-is-inside": { "path-is-inside": {
"version": "1.0.2", "version": "1.0.2",
@ -2606,9 +2634,9 @@
}, },
"dependencies": { "dependencies": {
"ajv": { "ajv": {
"version": "6.5.5", "version": "6.6.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz",
"integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==",
"dev": true, "dev": true,
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^2.0.1",
@ -2784,6 +2812,7 @@
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"dev": true,
"requires": { "requires": {
"glob": "^7.0.5" "glob": "^7.0.5"
} }
@ -3573,9 +3602,9 @@
"dev": true "dev": true
}, },
"yargs": { "yargs": {
"version": "12.0.4", "version": "12.0.5",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.4.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
"integrity": "sha512-f5esswlPO351AnejaO2A1ZZr0zesz19RehQKwiRDqWtrraWrJy16tsUIKgDXFMVytvNOHPVmTiaTh3wO67I0fQ==", "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
"dev": true, "dev": true,
"requires": { "requires": {
"cliui": "^4.0.0", "cliui": "^4.0.0",
@ -3589,7 +3618,7 @@
"string-width": "^2.0.0", "string-width": "^2.0.0",
"which-module": "^2.0.0", "which-module": "^2.0.0",
"y18n": "^3.2.1 || ^4.0.0", "y18n": "^3.2.1 || ^4.0.0",
"yargs-parser": "^11.1.0" "yargs-parser": "^11.1.1"
}, },
"dependencies": { "dependencies": {
"ansi-regex": { "ansi-regex": {
@ -3635,9 +3664,9 @@
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "11.1.0", "version": "11.1.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.0.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
"integrity": "sha512-lGA5HsbjkpCfekDBHAhgE5OE8xEoqiUDylowr+BvhRCwG1xVYTsd8hx2CYC0NY4k9RIgJeybFTG2EZW4P2aN1w==", "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",

View File

@ -19,7 +19,7 @@
"dist:win": "npm run dist -- --win --x64", "dist:win": "npm run dist -- --win --x64",
"dist:mac": "npm run dist -- --mac", "dist:mac": "npm run dist -- --mac",
"dist:linux": "npm run dist -- --linux --x64", "dist:linux": "npm run dist -- --linux --x64",
"lint": "eslint --config .eslintrc.json --ignore-pattern app/assets/js/scripts/*.js . && eslint --config .eslintrc.scripts.json app/assets/js/scripts" "lint": "eslint --config .eslintrc.json ."
}, },
"engines": { "engines": {
"node": "10.x.x" "node": "10.x.x"
@ -30,12 +30,11 @@
"discord-rpc": "discordjs/RPC", "discord-rpc": "discordjs/RPC",
"ejs": "^2.6.1", "ejs": "^2.6.1",
"ejs-electron": "^2.0.3", "ejs-electron": "^2.0.3",
"electron-updater": "^4.0.4", "electron-updater": "^4.0.5",
"fs-extra": "^7.0.1",
"github-syntax-dark": "^0.5.0", "github-syntax-dark": "^0.5.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"mkdirp": "^0.5.1",
"request": "^2.88.0", "request": "^2.88.0",
"rimraf": "^2.6.2",
"semver": "^5.6.0", "semver": "^5.6.0",
"tar-fs": "^1.16.3", "tar-fs": "^1.16.3",
"winreg": "^1.2.4" "winreg": "^1.2.4"
@ -43,7 +42,7 @@
"devDependencies": { "devDependencies": {
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"electron": "^3.0.10", "electron": "^3.0.10",
"electron-builder": "^20.36.2", "electron-builder": "^20.38.2",
"eslint": "^5.9.0" "eslint": "^5.9.0"
}, },
"repository": { "repository": {