refactor and reorganize

This commit is contained in:
Milo Schwartz 2025-01-01 21:41:31 -05:00
parent f03f1570a5
commit 6c9dfc674a
216 changed files with 519 additions and 2128 deletions

View file

@ -0,0 +1,16 @@
import path from "path";
import { __DIRNAME } from "@server/lib/consts";
import fs from "fs";
export function loadAppVersion() {
const packageJsonPath = path.join("package.json");
let packageJson: any;
if (fs.existsSync && fs.existsSync(packageJsonPath)) {
const packageJsonContent = fs.readFileSync(packageJsonPath, "utf8");
packageJson = JSON.parse(packageJsonContent);
if (packageJson.version) {
return packageJson.version;
}
}
}