Remove tsc-multi, re-install gts, apply autoformatting and linting

This commit is contained in:
Jon Staab
2024-12-17 10:59:27 -08:00
parent 0b86613161
commit f33e03740e
122 changed files with 2243 additions and 2178 deletions
+2 -2
View File
@@ -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() {
+5 -5
View File
@@ -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)
}
}
+4 -4
View File
@@ -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))
})
}
+4 -4
View File
@@ -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) {
+5 -5
View File
@@ -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)
})
}
}