fix(apis/websocket): builds not working due to dynamic import requirement

This commit is contained in:
PalmDevs
2024-06-22 22:09:19 +07:00
parent c2a81c6258
commit fc7be22c6c
3 changed files with 6 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
import * as fs from 'fs'
fs.cpSync('../../node_modules/tesseract.js', './dist/tesseract.js', { recursive: true })

View File

@@ -6,7 +6,7 @@
"description": "🧦 WebSocket API server for bots assisting ReVanced",
"main": "dist/index.js",
"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",
"build": "bun bundle",
"watch": "bun dev"

View File

@@ -19,8 +19,8 @@ type BaseTypeOf<T> = T extends (infer U)[]
: T extends (...args: unknown[]) => infer U
? (...args: unknown[]) => U
: T extends object
? { [K in keyof T]: T[K] }
: T
? { [K in keyof T]: T[K] }
: T
export type Config = Omit<BaseTypeOf<typeof import('../../config.json')>, '$schema'>