feat: some sketchy code

This commit is contained in:
TresAbhi committed 2025-04-05 02:07:35 +00:00
1 parent 2a4375c718
commit ad2aaa7bf8
5 files changed
+28 -26

No files matched your search

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