mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 21:56:17 +00:00
fix(apis/websocket): builds not working due to dynamic import requirement
This commit is contained in:
3
apis/websocket/after_build.ts
Normal file
3
apis/websocket/after_build.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import * as fs from 'fs'
|
||||||
|
|
||||||
|
fs.cpSync('../../node_modules/tesseract.js', './dist/tesseract.js', { recursive: true })
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"description": "🧦 WebSocket API server for bots assisting ReVanced",
|
"description": "🧦 WebSocket API server for bots assisting ReVanced",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bundle": "bun build src/index.ts --outdir=dist --target=bun",
|
"bundle": "bun build src/index.ts --outdir=dist --target=bun && bun run after_build.ts",
|
||||||
"dev": "bun run src/index.ts --watch",
|
"dev": "bun run src/index.ts --watch",
|
||||||
"build": "bun bundle",
|
"build": "bun bundle",
|
||||||
"watch": "bun dev"
|
"watch": "bun dev"
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ type BaseTypeOf<T> = T extends (infer U)[]
|
|||||||
: T extends (...args: unknown[]) => infer U
|
: T extends (...args: unknown[]) => infer U
|
||||||
? (...args: unknown[]) => U
|
? (...args: unknown[]) => U
|
||||||
: T extends object
|
: T extends object
|
||||||
? { [K in keyof T]: T[K] }
|
? { [K in keyof T]: T[K] }
|
||||||
: T
|
: T
|
||||||
|
|
||||||
export type Config = Omit<BaseTypeOf<typeof import('../../config.json')>, '$schema'>
|
export type Config = Omit<BaseTypeOf<typeof import('../../config.json')>, '$schema'>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user