mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-27 07:22:50 -05:00
Quick and dirty mass dependency update
This commit is contained in:
@@ -13,7 +13,10 @@ export default class StreamdelayClient extends EventEmitter {
|
||||
}
|
||||
|
||||
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, [], {
|
||||
WebSocket,
|
||||
maxReconnectionDelay: 5000,
|
||||
|
||||
@@ -3,7 +3,7 @@ import path from 'path'
|
||||
import yargs from 'yargs'
|
||||
import TOML from '@iarna/toml'
|
||||
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 { ensureValidURL } from '../util'
|
||||
@@ -210,16 +210,7 @@ function parseArgs() {
|
||||
.help().argv
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const argv = parseArgs()
|
||||
if (argv.help) {
|
||||
return
|
||||
}
|
||||
|
||||
if (argv.telemetry.sentry) {
|
||||
Sentry.init({ dsn: SENTRY_DSN })
|
||||
}
|
||||
|
||||
async function main(argv) {
|
||||
// Reject all permission requests from web content.
|
||||
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('force-device-scale-factor', 1)
|
||||
app.enableSandbox()
|
||||
app
|
||||
.whenReady()
|
||||
.then(main)
|
||||
.then(() => main(argv))
|
||||
.catch((err) => {
|
||||
console.trace(err.toString())
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
init()
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ describe('streamwall server', () => {
|
||||
|
||||
async function recvMsg() {
|
||||
const {
|
||||
value: [data],
|
||||
value: [data, isBinary],
|
||||
} = await msgs.next()
|
||||
if (typeof data === 'string') {
|
||||
return JSON.parse(data)
|
||||
if (isBinary) {
|
||||
return data
|
||||
}
|
||||
return data
|
||||
return JSON.parse(data.toString())
|
||||
}
|
||||
|
||||
function sendMsg(msg) {
|
||||
|
||||
Reference in New Issue
Block a user