Remove tsc-multi, re-install gts, apply autoformatting and linting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Emitter} from '@welshman/lib'
|
||||
import type {Message} from '../Socket'
|
||||
import {Emitter} from "@welshman/lib"
|
||||
import type {Message} from "../Socket.js"
|
||||
|
||||
export class Echo extends Emitter {
|
||||
get connections() {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {Emitter} from '@welshman/lib'
|
||||
import {Relay, LOCAL_RELAY_URL} from '@welshman/util'
|
||||
import type {Message} from '../Socket'
|
||||
import {Emitter} from "@welshman/lib"
|
||||
import {Relay, LOCAL_RELAY_URL} from "@welshman/util"
|
||||
import type {Message} from "../Socket.js"
|
||||
|
||||
export class Local extends Emitter {
|
||||
constructor(readonly relay: Relay) {
|
||||
super()
|
||||
|
||||
relay.on('*', this.onMessage)
|
||||
relay.on("*", this.onMessage)
|
||||
}
|
||||
|
||||
get connections() {
|
||||
@@ -25,6 +25,6 @@ export class Local extends Emitter {
|
||||
|
||||
cleanup = () => {
|
||||
this.removeAllListeners()
|
||||
this.relay.off('*', this.onMessage)
|
||||
this.relay.off("*", this.onMessage)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import {Emitter} from '@welshman/lib'
|
||||
import type {Message} from '../Socket'
|
||||
import type {Target} from '../Executor'
|
||||
import {Emitter} from "@welshman/lib"
|
||||
import type {Message} from "../Socket.js"
|
||||
import type {Target} from "../Executor.js"
|
||||
|
||||
export class Multi extends Emitter {
|
||||
constructor(readonly targets: Target[]) {
|
||||
super()
|
||||
|
||||
targets.forEach(t => {
|
||||
t.on('*', (verb, ...args) => this.emit(verb, ...args))
|
||||
t.on("*", (verb, ...args) => this.emit(verb, ...args))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {Emitter} from '@welshman/lib'
|
||||
import {ConnectionEvent} from '../ConnectionEvent'
|
||||
import type {Message} from '../Socket'
|
||||
import type {Connection} from '../Connection'
|
||||
import {Emitter} from "@welshman/lib"
|
||||
import {ConnectionEvent} from "../ConnectionEvent.js"
|
||||
import type {Message} from "../Socket.js"
|
||||
import type {Connection} from "../Connection.js"
|
||||
|
||||
export class Relay extends Emitter {
|
||||
constructor(readonly connection: Connection) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {Emitter} from '@welshman/lib'
|
||||
import type {Message} from '../Socket'
|
||||
import type {Connection} from '../Connection'
|
||||
import {ConnectionEvent} from '../ConnectionEvent'
|
||||
import {Emitter} from "@welshman/lib"
|
||||
import type {Message} from "../Socket.js"
|
||||
import type {Connection} from "../Connection.js"
|
||||
import {ConnectionEvent} from "../ConnectionEvent.js"
|
||||
|
||||
export class Relays extends Emitter {
|
||||
constructor(readonly connections: Connection[]) {
|
||||
@@ -23,7 +23,7 @@ export class Relays extends Emitter {
|
||||
cleanup = () => {
|
||||
this.removeAllListeners()
|
||||
this.connections.forEach(connection => {
|
||||
connection.off('receive', this.onMessage)
|
||||
connection.off("receive", this.onMessage)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user