Quick and dirty mass dependency update

This commit is contained in:
Max Goodhart
2023-04-14 22:19:59 -07:00
parent 5c10e7fc82
commit a581ba2c6f
5 changed files with 10829 additions and 11289 deletions

21318
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,63 +5,64 @@
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"build": "webpack", "build": "webpack",
"start": "npm run build -- --display=errors-only && electron dist", "start": "npm run build -- --stats=errors-only && electron dist",
"start-local": "npm run build -- --display=errors-only && electron dist --control.address=http://localhost:4444 --control.username=streamwall --control.password=local-dev", "start-local": "npm run build -- --stats=errors-only && electron dist --control.address=http://localhost:4444 --control.username=streamwall --control.password=local-dev",
"test": "jest" "test": "jest"
}, },
"author": "Max Goodhart <c@chromakode.com>", "author": "Max Goodhart <c@chromakode.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",
"@repeaterjs/repeater": "^3.0.1", "@repeaterjs/repeater": "^3.0.4",
"@sentry/electron": "^2.5.4", "@sentry/electron": "^4.4.0",
"base-x": "^3.0.8", "base-x": "^4.0.0",
"chokidar": "^3.4.0", "chokidar": "^3.5.3",
"color": "^3.1.2", "color": "^4.2.3",
"dank-twitch-irc": "^3.3.0", "dank-twitch-irc": "^3.3.0",
"ejs": "^3.1.3", "ejs": "^3.1.9",
"electron": "^12.2.3", "electron": "^24.1.2",
"hls.js": "^1.1.5", "hls.js": "^1.4.0",
"jsondiffpatch": "^0.4.1", "jsondiffpatch": "^0.4.1",
"koa": "^2.12.1", "koa": "^2.14.2",
"koa-basic-auth": "^4.0.0", "koa-basic-auth": "^4.0.0",
"koa-easy-ws": "^1.1.3", "koa-easy-ws": "^2.1.0",
"koa-route": "^3.2.0", "koa-route": "^3.2.0",
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"koa-views": "^6.3.0", "koa-views": "^8.0.0",
"lodash": "^4.17.19", "lodash": "^4.17.21",
"luxon": "^1.26.0", "luxon": "^3.3.0",
"node-fetch": "^2.6.0", "node-fetch": "^3.3.1",
"node-simple-cert": "0.0.1", "node-simple-cert": "0.0.1",
"preact": "^10.4.4", "preact": "^10.13.2",
"react-hotkeys-hook": "^2.1.3", "react-hotkeys-hook": "^4.4.0",
"reconnecting-websocket": "^4.4.0", "reconnecting-websocket": "^4.4.0",
"styled-components": "^5.1.1", "styled-components": "^5.3.9",
"svg-loaders-react": "^2.2.1", "svg-loaders-react": "^2.2.1",
"ws": "^7.3.0", "webpack-dev-server": "^4.13.2",
"xstate": "^4.10.0", "ws": "^8.13.0",
"yargs": "^15.3.1", "xstate": "^4.37.1",
"yjs": "^13.2.0" "yargs": "^17.7.1",
"yjs": "^13.5.52"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.10.2", "@babel/core": "^7.21.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.10.1", "@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/plugin-transform-react-jsx": "^7.10.1", "@babel/plugin-transform-react-jsx": "^7.21.0",
"@babel/preset-env": "^7.10.2", "@babel/preset-env": "^7.21.4",
"@svgr/webpack": "^5.4.0", "@svgr/webpack": "^7.0.0",
"babel-jest": "^26.0.1", "babel-jest": "^29.5.0",
"babel-loader": "^8.1.0", "babel-loader": "^9.1.2",
"babel-plugin-styled-components": "^1.10.7", "babel-plugin-styled-components": "^2.1.1",
"copy-webpack-plugin": "^6.0.2", "copy-webpack-plugin": "^11.0.0",
"css-loader": "^3.6.0", "css-loader": "^6.7.3",
"file-loader": "^6.0.0", "file-loader": "^6.2.0",
"jest": "^26.0.1", "jest": "^29.5.0",
"prettier": "2.0.5", "prettier": "2.8.7",
"style-loader": "^1.2.1", "style-loader": "^3.3.2",
"supertest": "^4.0.2", "supertest": "^6.3.3",
"webpack": "^4.43.0", "webpack": "^5.79.0",
"webpack-cli": "^3.3.11" "webpack-cli": "^5.0.1"
}, },
"browserslist": [ "browserslist": [
"electron 9.0" "electron 9.0"

View File

@@ -13,7 +13,10 @@ export default class StreamdelayClient extends EventEmitter {
} }
connect() { connect() {
const wsURL = url.resolve(this.endpoint, `ws?key=${this.key}`) const wsURL = url.resolve(
this.endpoint.replace(/^http/, 'ws'),
`ws?key=${this.key}`,
)
const ws = (this.ws = new ReconnectingWebSocket(wsURL, [], { const ws = (this.ws = new ReconnectingWebSocket(wsURL, [], {
WebSocket, WebSocket,
maxReconnectionDelay: 5000, maxReconnectionDelay: 5000,

View File

@@ -3,7 +3,7 @@ import path from 'path'
import yargs from 'yargs' import yargs from 'yargs'
import TOML from '@iarna/toml' import TOML from '@iarna/toml'
import * as Y from 'yjs' import * as Y from 'yjs'
import * as Sentry from '@sentry/electron' import * as Sentry from '@sentry/electron/main'
import { app, shell, session, BrowserWindow } from 'electron' import { app, shell, session, BrowserWindow } from 'electron'
import { ensureValidURL } from '../util' import { ensureValidURL } from '../util'
@@ -210,16 +210,7 @@ function parseArgs() {
.help().argv .help().argv
} }
async function main() { async function main(argv) {
const argv = parseArgs()
if (argv.help) {
return
}
if (argv.telemetry.sentry) {
Sentry.init({ dsn: SENTRY_DSN })
}
// Reject all permission requests from web content. // Reject all permission requests from web content.
session session
.fromPartition('persist:session') .fromPartition('persist:session')
@@ -435,15 +426,28 @@ async function main() {
} }
} }
if (require.main === module) { function init() {
const argv = parseArgs()
if (argv.help) {
return
}
if (argv.telemetry.sentry) {
Sentry.init({ dsn: SENTRY_DSN })
}
app.commandLine.appendSwitch('high-dpi-support', 1) app.commandLine.appendSwitch('high-dpi-support', 1)
app.commandLine.appendSwitch('force-device-scale-factor', 1) app.commandLine.appendSwitch('force-device-scale-factor', 1)
app.enableSandbox() app.enableSandbox()
app app
.whenReady() .whenReady()
.then(main) .then(() => main(argv))
.catch((err) => { .catch((err) => {
console.trace(err.toString()) console.trace(err.toString())
process.exit(1) process.exit(1)
}) })
} }
if (require.main === module) {
init()
}

View File

@@ -86,13 +86,13 @@ describe('streamwall server', () => {
async function recvMsg() { async function recvMsg() {
const { const {
value: [data], value: [data, isBinary],
} = await msgs.next() } = await msgs.next()
if (typeof data === 'string') { if (isBinary) {
return JSON.parse(data)
}
return data return data
} }
return JSON.parse(data.toString())
}
function sendMsg(msg) { function sendMsg(msg) {
ws.send(JSON.stringify(msg)) ws.send(JSON.stringify(msg))