fix: a bunch of stupid things

This commit is contained in:
TrèsAbhi committed 2025-06-05 13:01:50 -05:00
1 parent 55e6599eaa
commit 6d6a634973
4 files changed
+21 -11

No files matched your search

@@ -1,9 +1,20 @@
import { readFile } from 'fs/promises';
import { DATA_COMPRESSED } from '../../buildAssets/constants';
import { readDVPL } from './readDVPL';
export async function readDVPLFile(file: string) {
const path = `${file}${file.endsWith('.dvpl') ? '' : '.dvpl'}`;
let path: string;
if (DATA_COMPRESSED) {
path = file.endsWith('.dvpl') ? file : `${file}.dvpl`;
} else {
path = file.replace('.dvpl', '');
}
const content = await readFile(path);
if (!DATA_COMPRESSED) return content;
const dvpl = readDVPL(content);
return dvpl;