1.1.4; Fix Discord-load detection. Addresses #14 mic permission request.

This commit is contained in:
khlam 2021-04-04 16:41:09 -07:00
parent cc1ab36109
commit e3953a1686
4 changed files with 229 additions and 385 deletions

14
main.js
View File

@ -52,19 +52,16 @@ function unmuteMic() {
} }
function muteMic() { function muteMic() {
if (selfMute === false) {
console.log("Not Talking") console.log("Not Talking")
mainWindow.webContents.send('micClose', 'mic-closed') mainWindow.webContents.send('micClose', 'mic-closed')
mainWindow.setTitle("MIC CLOSED") mainWindow.setTitle("MIC CLOSED")
} }
}
function createMainWindow () { function createMainWindow () {
// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
width: 1230, width: 1230,
height: 800, height: 800,
icon: './views/assets/icon.ico',
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'src/mainLoad.js'), preload: path.join(__dirname, 'src/mainLoad.js'),
partition: 'persist:discord', partition: 'persist:discord',
@ -95,7 +92,6 @@ function createLogWindow() {
width: 700, width: 700,
height: 400, height: 400,
resizable: false, resizable: false,
icon: './views/assets/icon.ico',
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'src/logLoad.js'), preload: path.join(__dirname, 'src/logLoad.js'),
nodeIntegration: false, // https://electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content nodeIntegration: false, // https://electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content
@ -125,7 +121,6 @@ function createSettingsWindow() {
show: true, show: true,
resizable: false, resizable: false,
alwaysOnTop:true, alwaysOnTop:true,
icon: './views/assets/icon.ico',
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'src/settingsLoad.js'), preload: path.join(__dirname, 'src/settingsLoad.js'),
nodeIntegration: false, nodeIntegration: false,
@ -190,6 +185,7 @@ function setPTTKey() {
}else { }else {
console.log("ERROR: configObj did not set PTT device to mouse or keyboard.") console.log("ERROR: configObj did not set PTT device to mouse or keyboard.")
} }
ioHook.on(pttEnable, event => { ioHook.on(pttEnable, event => {
if (event[pttWatch] == configObj.key && (micPermissionGranted === true) && (isConnected === true) && (isChangingPTTKey === false)) { if (event[pttWatch] == configObj.key && (micPermissionGranted === true) && (isConnected === true) && (isChangingPTTKey === false)) {
clearTimeout(muteTimeout) clearTimeout(muteTimeout)
@ -205,6 +201,7 @@ function setPTTKey() {
} }
} }
}) })
}else { }else {
console.log("Not listening for keypresses. ioHook library error or PTT keys not set.") console.log("Not listening for keypresses. ioHook library error or PTT keys not set.")
} }
@ -258,16 +255,14 @@ app.on('web-contents-created', (event, contents) => { // https://electronjs.org/
}) })
app.on('web-contents-created', (event, contents) => { // https://electronjs.org/docs/tutorial/security#12-disable-or-limit-navigation app.on('web-contents-created', (event, contents) => { // https://electronjs.org/docs/tutorial/security#12-disable-or-limit-navigation
contents.on('will-navigate', (event, navigationUrl) => { contents.on('will-navigate', (event, navigationUrl) => { // https://electronjs.org/docs/tutorial/security#13-disable-or-limit-creation-of-new-windows
const parsedUrl = new URL(navigationUrl) const parsedUrl = new URL(navigationUrl)
console.log(`will-navigate ${navigationUrl}`) console.log(`will-navigate ${navigationUrl}`)
if (parsedUrl.origin !== 'https://discord.com/') { // Limit navigation to discordapp.com; not really relevant if (parsedUrl.origin !== 'https://discord.com/') { // Limit navigation to discordapp.com; not really relevant
event.preventDefault() event.preventDefault()
} }
}) })
})
app.on('web-contents-created', (event, contents) => { // https://electronjs.org/docs/tutorial/security#13-disable-or-limit-creation-of-new-windows
contents.on('new-window', async (event, navigationUrl) => { contents.on('new-window', async (event, navigationUrl) => {
clipboard.writeText(navigationUrl, 'selection') // I really hope this is safe to do. Could also do a little URL cleaning here to remove trackers clipboard.writeText(navigationUrl, 'selection') // I really hope this is safe to do. Could also do a little URL cleaning here to remove trackers
console.log(`URL ${navigationUrl.toString().slice(0, 20)} Copied to Clipboard`) console.log(`URL ${navigationUrl.toString().slice(0, 20)} Copied to Clipboard`)
@ -275,6 +270,7 @@ app.on('web-contents-created', (event, contents) => { // https://electronjs.org/
//event.preventDefault() // Prevents external links from opening //event.preventDefault() // Prevents external links from opening
}) })
}) })
/* ---- */ /* ---- */
@ -498,7 +494,7 @@ app.on('ready', event => {
}) })
.then(configObj => { .then(configObj => {
console.log(configObj) console.log(configObj)
restartioHook().then(v => { restartioHook().then(() => {
setPTTKey() setPTTKey()
}) })
}) })

554
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "discordsandbox", "name": "discordsandbox",
"version": "1.0.0", "version": "1.1.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "discordsandbox", "name": "discordsandbox",
"version": "1.0.0", "version": "1.1.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "GNU GENERAL PUBLIC LICENSE Version 3", "license": "GNU GENERAL PUBLIC LICENSE Version 3",
"dependencies": { "dependencies": {
@ -15,7 +15,7 @@
"iohook": "^0.7.2" "iohook": "^0.7.2"
}, },
"devDependencies": { "devDependencies": {
"electron": "^7.2.4", "electron": "^9.4.0",
"electron-builder": "^21.2.0" "electron-builder": "^21.2.0"
} }
}, },
@ -41,8 +41,6 @@
"debug": "^4.1.1", "debug": "^4.1.1",
"env-paths": "^2.2.0", "env-paths": "^2.2.0",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"global-agent": "^2.0.2",
"global-tunnel-ng": "^2.7.1",
"got": "^9.6.0", "got": "^9.6.0",
"progress": "^2.0.3", "progress": "^2.0.3",
"sanitize-filename": "^1.6.2", "sanitize-filename": "^1.6.2",
@ -84,9 +82,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "12.12.48", "version": "12.20.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.48.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz",
"integrity": "sha512-m3Nmo/YaDUfYzdCQlxjF5pIy7TNyDTAJhIa//xtHcF0dlgYIBKULKnmloCPtByDxtZXrWV8Pge1AKT6/lRvVWg==", "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==",
"dev": true "dev": true
}, },
"node_modules/7zip-bin": { "node_modules/7zip-bin": {
@ -96,14 +94,18 @@
"dev": true "dev": true
}, },
"node_modules/ajv": { "node_modules/ajv": {
"version": "6.10.2", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dependencies": { "dependencies": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1", "json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2" "uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
} }
}, },
"node_modules/ajv-keywords": { "node_modules/ajv-keywords": {
@ -324,9 +326,9 @@
} }
}, },
"node_modules/aws4": { "node_modules/aws4": {
"version": "1.10.0", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
"integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
}, },
"node_modules/balanced-match": { "node_modules/balanced-match": {
"version": "1.0.0", "version": "1.0.0",
@ -367,43 +369,6 @@
"safe-buffer": "^5.1.1" "safe-buffer": "^5.1.1"
} }
}, },
"node_modules/bl/node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"node_modules/bl/node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/bl/node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/bl/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/bl/node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/bluebird": { "node_modules/bluebird": {
"version": "3.7.0", "version": "3.7.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz",
@ -714,7 +679,6 @@
"dependencies": { "dependencies": {
"anymatch": "~3.1.1", "anymatch": "~3.1.1",
"braces": "~3.0.2", "braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
@ -873,42 +837,6 @@
"typedarray": "^0.0.6" "typedarray": "^0.0.6"
} }
}, },
"node_modules/concat-stream/node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"node_modules/concat-stream/node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/concat-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"node_modules/concat-stream/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/config-chain": { "node_modules/config-chain": {
"version": "1.1.12", "version": "1.1.12",
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
@ -1154,9 +1082,9 @@
} }
}, },
"node_modules/electron": { "node_modules/electron": {
"version": "7.2.4", "version": "9.4.4",
"resolved": "https://registry.npmjs.org/electron/-/electron-7.2.4.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-9.4.4.tgz",
"integrity": "sha512-Z+R692uTzXgP8AHrabE+kkrMlQJ6pnAYoINenwj9QSqaD2YbO8IuXU9DMCcUY0+VpA91ee09wFZJNUKYPMnCKg==", "integrity": "sha512-dcPlTrMWQu5xuSm6sYV42KK/BRIqh3erM8v/WtZqaDmG7pkCeJpvw26Dgbqhdt78XmqqGiN96giEe6A3S9vpAQ==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
@ -1374,9 +1302,9 @@
] ]
}, },
"node_modules/fast-deep-equal": { "node_modules/fast-deep-equal": {
"version": "2.0.1", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
}, },
"node_modules/fast-json-stable-stringify": { "node_modules/fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.0.0",
@ -1659,11 +1587,12 @@
} }
}, },
"node_modules/har-validator": { "node_modules/har-validator": {
"version": "5.1.3", "version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"deprecated": "this library is no longer supported",
"dependencies": { "dependencies": {
"ajv": "^6.5.5", "ajv": "^6.12.3",
"har-schema": "^2.0.0" "har-schema": "^2.0.0"
}, },
"engines": { "engines": {
@ -1769,7 +1698,6 @@
"resolved": "https://registry.npmjs.org/iohook/-/iohook-0.7.2.tgz", "resolved": "https://registry.npmjs.org/iohook/-/iohook-0.7.2.tgz",
"integrity": "sha512-PObMWA3Cx+y1s6Xu6EssuzzfW4bP2HgPsss73ELOSLCH1HEW1RnY/pkrqqVwZIu17uKKqtA6IACBtiTHFT/xXw==", "integrity": "sha512-PObMWA3Cx+y1s6Xu6EssuzzfW4bP2HgPsss73ELOSLCH1HEW1RnY/pkrqqVwZIu17uKKqtA6IACBtiTHFT/xXw==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT",
"dependencies": { "dependencies": {
"bindings": "^1.3.0", "bindings": "^1.3.0",
"node-abi": "^2.4.0", "node-abi": "^2.4.0",
@ -1821,6 +1749,9 @@
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/is-fullwidth-code-point": { "node_modules/is-fullwidth-code-point": {
@ -1922,9 +1853,9 @@
"dev": true "dev": true
}, },
"node_modules/isarray": { "node_modules/isarray": {
"version": "0.0.1", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
}, },
"node_modules/isbinaryfile": { "node_modules/isbinaryfile": {
"version": "4.0.2", "version": "4.0.2",
@ -2207,19 +2138,19 @@
} }
}, },
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.44.0", "version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==",
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/mime-types": { "node_modules/mime-types": {
"version": "2.1.27", "version": "2.1.29",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
"dependencies": { "dependencies": {
"mime-db": "1.44.0" "mime-db": "1.46.0"
}, },
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
@ -2269,9 +2200,9 @@
"dev": true "dev": true
}, },
"node_modules/node-abi": { "node_modules/node-abi": {
"version": "2.18.0", "version": "2.21.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz",
"integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", "integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==",
"dependencies": { "dependencies": {
"semver": "^5.4.1" "semver": "^5.4.1"
} }
@ -2742,16 +2673,24 @@
} }
}, },
"node_modules/readable-stream": { "node_modules/readable-stream": {
"version": "1.1.14", "version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": { "dependencies": {
"core-util-is": "~1.0.0", "core-util-is": "~1.0.0",
"inherits": "~2.0.1", "inherits": "~2.0.3",
"isarray": "0.0.1", "isarray": "~1.0.0",
"string_decoder": "~0.10.x" "process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
} }
}, },
"node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/readdirp": { "node_modules/readdirp": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
@ -2815,6 +2754,7 @@
"version": "2.88.2", "version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
"dependencies": { "dependencies": {
"aws-sign2": "~0.7.0", "aws-sign2": "~0.7.0",
"aws4": "^1.8.0", "aws4": "^1.8.0",
@ -3086,6 +3026,11 @@
"safer-buffer": "^2.0.2", "safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0" "tweetnacl": "~0.14.0"
}, },
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -3097,9 +3042,17 @@
"dev": true "dev": true
}, },
"node_modules/string_decoder": { "node_modules/string_decoder": {
"version": "0.10.31", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}, },
"node_modules/string-width": { "node_modules/string-width": {
"version": "1.0.2", "version": "1.0.2",
@ -3219,46 +3172,6 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/tar-stream/node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"node_modules/tar-stream/node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/tar-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/tar-stream/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/tar-stream/node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"engines": {
"node": ">=0.4"
}
},
"node_modules/temp-file": { "node_modules/temp-file": {
"version": "3.3.4", "version": "3.3.4",
"resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.4.tgz", "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.4.tgz",
@ -3309,6 +3222,38 @@
"xtend": "~2.1.1" "xtend": "~2.1.1"
} }
}, },
"node_modules/through2/node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"node_modules/through2/node_modules/readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"node_modules/through2/node_modules/string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"node_modules/through2/node_modules/xtend": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"dependencies": {
"object-keys": "~0.4.0"
},
"engines": {
"node": ">=0.4"
}
},
"node_modules/to-buffer": { "node_modules/to-buffer": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
@ -3666,20 +3611,17 @@
} }
}, },
"node_modules/xtend": { "node_modules/xtend": {
"version": "2.1.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dependencies": {
"object-keys": "~0.4.0"
},
"engines": { "engines": {
"node": ">=0.4" "node": ">=0.4"
} }
}, },
"node_modules/y18n": { "node_modules/y18n": {
"version": "4.0.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
"dev": true "dev": true
}, },
"node_modules/yargs": { "node_modules/yargs": {
@ -3836,9 +3778,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "12.12.48", "version": "12.20.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.48.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz",
"integrity": "sha512-m3Nmo/YaDUfYzdCQlxjF5pIy7TNyDTAJhIa//xtHcF0dlgYIBKULKnmloCPtByDxtZXrWV8Pge1AKT6/lRvVWg==", "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==",
"dev": true "dev": true
}, },
"7zip-bin": { "7zip-bin": {
@ -3848,11 +3790,11 @@
"dev": true "dev": true
}, },
"ajv": { "ajv": {
"version": "6.10.2", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1", "json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2" "uri-js": "^4.2.2"
@ -4038,9 +3980,9 @@
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
}, },
"aws4": { "aws4": {
"version": "1.10.0", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
"integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
}, },
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
@ -4076,49 +4018,6 @@
"requires": { "requires": {
"readable-stream": "^2.3.5", "readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1" "safe-buffer": "^5.1.1"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}
} }
}, },
"bluebird": { "bluebird": {
@ -4520,44 +4419,6 @@
"inherits": "^2.0.3", "inherits": "^2.0.3",
"readable-stream": "^2.2.2", "readable-stream": "^2.2.2",
"typedarray": "^0.0.6" "typedarray": "^0.0.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
}
} }
}, },
"config-chain": { "config-chain": {
@ -4766,9 +4627,9 @@
"dev": true "dev": true
}, },
"electron": { "electron": {
"version": "7.2.4", "version": "9.4.4",
"resolved": "https://registry.npmjs.org/electron/-/electron-7.2.4.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-9.4.4.tgz",
"integrity": "sha512-Z+R692uTzXgP8AHrabE+kkrMlQJ6pnAYoINenwj9QSqaD2YbO8IuXU9DMCcUY0+VpA91ee09wFZJNUKYPMnCKg==", "integrity": "sha512-dcPlTrMWQu5xuSm6sYV42KK/BRIqh3erM8v/WtZqaDmG7pkCeJpvw26Dgbqhdt78XmqqGiN96giEe6A3S9vpAQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@electron/get": "^1.0.1", "@electron/get": "^1.0.1",
@ -4947,9 +4808,9 @@
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
}, },
"fast-deep-equal": { "fast-deep-equal": {
"version": "2.0.1", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
}, },
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.0.0",
@ -5175,11 +5036,11 @@
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
}, },
"har-validator": { "har-validator": {
"version": "5.1.3", "version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"requires": { "requires": {
"ajv": "^6.5.5", "ajv": "^6.12.3",
"har-schema": "^2.0.0" "har-schema": "^2.0.0"
} }
}, },
@ -5375,9 +5236,9 @@
"dev": true "dev": true
}, },
"isarray": { "isarray": {
"version": "0.0.1", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
}, },
"isbinaryfile": { "isbinaryfile": {
"version": "4.0.2", "version": "4.0.2",
@ -5612,16 +5473,16 @@
"dev": true "dev": true
}, },
"mime-db": { "mime-db": {
"version": "1.44.0", "version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ=="
}, },
"mime-types": { "mime-types": {
"version": "2.1.27", "version": "2.1.29",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
"requires": { "requires": {
"mime-db": "1.44.0" "mime-db": "1.46.0"
} }
}, },
"mimic-response": { "mimic-response": {
@ -5659,9 +5520,9 @@
"dev": true "dev": true
}, },
"node-abi": { "node-abi": {
"version": "2.18.0", "version": "2.21.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz",
"integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", "integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==",
"requires": { "requires": {
"semver": "^5.4.1" "semver": "^5.4.1"
} }
@ -6035,14 +5896,24 @@
} }
}, },
"readable-stream": { "readable-stream": {
"version": "1.1.14", "version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": { "requires": {
"core-util-is": "~1.0.0", "core-util-is": "~1.0.0",
"inherits": "~2.0.1", "inherits": "~2.0.3",
"isarray": "0.0.1", "isarray": "~1.0.0",
"string_decoder": "~0.10.x" "process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
} }
}, },
"readdirp": { "readdirp": {
@ -6346,9 +6217,19 @@
"dev": true "dev": true
}, },
"string_decoder": { "string_decoder": {
"version": "0.10.31", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
@ -6436,45 +6317,6 @@
"readable-stream": "^2.3.0", "readable-stream": "^2.3.0",
"to-buffer": "^1.1.1", "to-buffer": "^1.1.1",
"xtend": "^4.0.0" "xtend": "^4.0.0"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
}
} }
}, },
"temp-file": { "temp-file": {
@ -6521,6 +6363,37 @@
"requires": { "requires": {
"readable-stream": "~1.1.9", "readable-stream": "~1.1.9",
"xtend": "~2.1.1" "xtend": "~2.1.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"xtend": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"requires": {
"object-keys": "~0.4.0"
}
}
} }
}, },
"to-buffer": { "to-buffer": {
@ -6809,17 +6682,14 @@
"dev": true "dev": true
}, },
"xtend": { "xtend": {
"version": "2.1.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
"requires": {
"object-keys": "~0.4.0"
}
}, },
"y18n": { "y18n": {
"version": "4.0.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
"dev": true "dev": true
}, },
"yargs": { "yargs": {

View File

@ -1,6 +1,6 @@
{ {
"name": "discordsandbox", "name": "discordsandbox",
"version": "1.0.0", "version": "1.1.4",
"description": "Discord Sandboxed", "description": "Discord Sandboxed",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
@ -18,7 +18,7 @@
"author": "Kin-Ho Lam", "author": "Kin-Ho Lam",
"license": "GNU GENERAL PUBLIC LICENSE Version 3", "license": "GNU GENERAL PUBLIC LICENSE Version 3",
"devDependencies": { "devDependencies": {
"electron": "^7.2.4", "electron": "^9.4.0",
"electron-builder": "^21.2.0" "electron-builder": "^21.2.0"
}, },
"dependencies": { "dependencies": {
@ -28,7 +28,7 @@
}, },
"iohook": { "iohook": {
"targets": [ "targets": [
"electron-75" "electron-80"
], ],
"platforms": [ "platforms": [
"win32", "win32",

View File

@ -40,6 +40,7 @@ function removeBloat(webview) {
'noticeBrand', 'noticeBrand',
'actionButtons-14eAc_', 'actionButtons-14eAc_',
] ]
webview.executeJavaScript(`document.querySelectorAll('[aria-label="Download Apps"]')[document.querySelectorAll('[aria-label="Download Apps"]').length - 1].style.display = 'none';`) // Remove download button
bloatList.forEach(function(tag){ bloatList.forEach(function(tag){
webview.executeJavaScript(` webview.executeJavaScript(`
document.querySelectorAll("div[class^=${tag}]").forEach(e => { document.querySelectorAll("div[class^=${tag}]").forEach(e => {
@ -50,27 +51,6 @@ function removeBloat(webview) {
}) })
} }
// Creates an observer for user list to detect if server is switched
function userListChangeListener(webview) {
webview.executeJavaScript(`
const userList = document.getElementsByClassName("sidebar-2K8pFh")[0]
const userListconfig = { attributes: false, childList: true, subtree: true, characterData: false };
const userListChangeCallback = function(mutationsList, observer) {
console.log('--user list changed');
if (document.querySelectorAll('[aria-label="Disconnect"]').length === 1){
console.log('--user is connected to voice server')
}else {
console.log('--user is not connected to voice server')
}
};
const userListObserver = new MutationObserver(userListChangeCallback);
userListObserver.observe(userList, userListconfig);
`)
}
function userMuteDeafenListener(webview) { function userMuteDeafenListener(webview) {
webview.executeJavaScript(` webview.executeJavaScript(`
const userMuteDeafen = document.getElementsByClassName("container-3baos1")[0] const userMuteDeafen = document.getElementsByClassName("container-3baos1")[0]
@ -106,7 +86,6 @@ onload = () => {
// Insert JS to detect when discord finishes loading // Insert JS to detect when discord finishes loading
webview.addEventListener('did-finish-load', function() { webview.addEventListener('did-finish-load', function() {
// Discord does not do client-side hashing
webview.executeJavaScript(` webview.executeJavaScript(`
(function(open, send) { (function(open, send) {
let whiteList = ${_whiteList} let whiteList = ${_whiteList}
@ -179,14 +158,16 @@ onload = () => {
`) `)
webview.executeJavaScript(` webview.executeJavaScript(`
let dlButton = document.getElementsByClassName("listItem-2P_4kh"); let dlButton = document.querySelectorAll('[aria-label="Download Apps"]')
t = setInterval(function(){ t = setInterval(function(){
let dlButton = document.querySelectorAll('[aria-label="Servers sidebar"]')
if(dlButton.length != 0) { if(dlButton.length != 0) {
console.log("--discord-load-complete") console.log("--discord-load-complete")
clearInterval(t) clearInterval(t)
isMicMuted() isMicMuted()
}else { }else {
console.log("waiting for load") console.log("waiting for load")
console.log(dlButton)
} }
}, 500); }, 500);
`) `)
@ -205,15 +186,14 @@ onload = () => {
// Send commands to preload.js // Send commands to preload.js
webview.addEventListener('console-message', (e) => { webview.addEventListener('console-message', (e) => {
if (e.message.includes("RTC media connection state: CONNECTED")) {
if (e.message === "--user is connected to voice server") {
console.log("Connected to server") console.log("Connected to server")
window.postMessage({ type: "connected"}, "*") window.postMessage({ type: "connected"}, "*")
removeBloat(webview) removeBloat(webview)
isConnectedToVoiceServer = true isConnectedToVoiceServer = true
} }
if (e.message === "--user is not connected to voice server") { if (e.message.includes("RTC media connection state: DISCONNECTED")) {
console.log("Disconnected from server") console.log("Disconnected from server")
window.postMessage({ type: "disconnected"}, "*") window.postMessage({ type: "disconnected"}, "*")
isConnectedToVoiceServer = false isConnectedToVoiceServer = false
@ -231,8 +211,6 @@ onload = () => {
// Execute JS into the webview after login // Execute JS into the webview after login
if (e.message === "--discord-load-complete") { if (e.message === "--discord-load-complete") {
webview.executeJavaScript(`document.getElementsByClassName("listItem-2P_4kh")[document.getElementsByClassName("listItem-2P_4kh").length - 1].style.display = 'none';`) // Remove download button
userListChangeListener(webview)
userMuteDeafenListener(webview) userMuteDeafenListener(webview)
removeBloat(webview) removeBloat(webview)
} }