fix: add config.ts with config variable (BASE_DIR...)

This commit is contained in:
MasutaYunikon committed 2026-03-20 16:55:03 +01:00
1 parent d1ccc902da
commit 2efed9dcfc
8 files changed
+26 -32

No files matched your search

+1 -5
View File
@@ -1,11 +1,7 @@
import fs from 'fs'
import path from 'path'
import { BASE_DIR, _isBunBinary } from './config.js'
const _isBunBinary = typeof (globalThis as any).Bun !== 'undefined'
&& path.dirname((process as any).execPath) !== process.cwd()
const BASE_DIR = _isBunBinary
? path.dirname((process as any).execPath)
: process.cwd()
const DATA_PATH = path.join(BASE_DIR, 'config', 'settings.json')
export interface Settings {