mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
build(Needs bump): update dependencies
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
"@revanced/bot-shared": "workspace:*",
|
||||
"@sapphire/async-queue": "^1.5.5",
|
||||
"chalk": "^5.4.1",
|
||||
"tesseract.js": "^5.1.1",
|
||||
"ws": "^8.18.1"
|
||||
"tesseract.js": "^6.0.1",
|
||||
"ws": "^8.18.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ws": "^8.18.1",
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import {
|
||||
ClientOperation,
|
||||
DisconnectReason,
|
||||
type Packet,
|
||||
ServerOperation,
|
||||
deserializePacket,
|
||||
isClientPacket,
|
||||
type Packet,
|
||||
ServerOperation,
|
||||
serializePacket,
|
||||
uncapitalize,
|
||||
} from '@revanced/bot-shared'
|
||||
|
||||
import { EventEmitter } from 'events'
|
||||
import type TypedEmitter from 'typed-emitter'
|
||||
import type { RawData, WebSocket } from 'ws'
|
||||
|
||||
@@ -100,7 +99,7 @@ export default class Client {
|
||||
// @ts-expect-error TypeScript doesn't know that the above line will negate the type enough
|
||||
packet,
|
||||
)
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
// TODO: add error fields to sent packet so we can log what went wrong
|
||||
this.disconnect(DisconnectReason.InvalidPacket)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { OEM, createWorker as createTesseractWorker } from 'tesseract.js'
|
||||
|
||||
import { join as joinPath } from 'path'
|
||||
import { createLogger } from '@revanced/bot-shared'
|
||||
import { exists as pathExists } from 'fs/promises'
|
||||
import { join as joinPath } from 'path'
|
||||
import { createWorker as createTesseractWorker, OEM } from 'tesseract.js'
|
||||
import { getConfig } from './utils/config'
|
||||
|
||||
export const config = getConfig()
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import type { ClientOperation } from '@revanced/bot-shared'
|
||||
import type { Logger } from '@revanced/bot-shared'
|
||||
import type { ClientOperation, Logger } from '@revanced/bot-shared'
|
||||
import type { Worker as TesseractWorker } from 'tesseract.js'
|
||||
import type { ClientPacketObject } from '../classes/Client'
|
||||
import type { WitMessageResponse } from '../context'
|
||||
import type { Config } from '../utils/config'
|
||||
|
||||
export { default as parseTextEventHandler } from './parseText'
|
||||
export { default as parseImageEventHandler } from './parseImage'
|
||||
export { default as parseTextEventHandler } from './parseText'
|
||||
export { default as trainMessageEventHandler } from './trainMessage'
|
||||
|
||||
export type EventHandler<POp extends ClientOperation> = (
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { type ClientOperation, ServerOperation } from '@revanced/bot-shared'
|
||||
import { AsyncQueue } from '@sapphire/async-queue'
|
||||
|
||||
import type { EventHandler } from '.'
|
||||
|
||||
const queue = new AsyncQueue()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type ClientOperation, ServerOperation } from '@revanced/bot-shared'
|
||||
|
||||
import type { EventHandler } from '.'
|
||||
|
||||
const parseTextEventHandler: EventHandler<ClientOperation.ParseText> = async (packet, { wit, logger }) => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type ClientOperation, ServerOperation } from '@revanced/bot-shared'
|
||||
|
||||
import type { EventHandler } from '.'
|
||||
|
||||
const trainMessageEventHandler: EventHandler<ClientOperation.TrainMessage> = async (packet, { wit, logger }) => {
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import { inspect as inspectObject } from 'util'
|
||||
|
||||
import Client from './classes/Client'
|
||||
|
||||
import { type EventContext, parseImageEventHandler, parseTextEventHandler, trainMessageEventHandler } from './events'
|
||||
|
||||
import { DisconnectReason, HumanizedDisconnectReason } from '@revanced/bot-shared'
|
||||
|
||||
import { createServer } from 'http'
|
||||
import { inspect as inspectObject } from 'util'
|
||||
import { type WebSocket, WebSocketServer } from 'ws'
|
||||
import Client from './classes/Client'
|
||||
import { config, logger, tesseract, wit } from './context'
|
||||
import { type EventContext, parseImageEventHandler, parseTextEventHandler, trainMessageEventHandler } from './events'
|
||||
|
||||
// Load config, init logger, check environment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user