Upload via GUI (7543 Dateien)

This commit is contained in:
2026-10-22 06:56:47 +00:00
parent d7658c873f
commit bac355eabb
50 changed files with 2263 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import fs from 'node:fs/promises';
import path from 'node:path';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export async function readPackageJson(dir, safe = false) {
try {
return JSON.parse(await fs.readFile(path.resolve(dir, 'package.json'), {
encoding: 'utf-8',
}));
}
catch (err) {
if (safe) {
return {};
}
else {
throw err;
}
}
}
//# sourceMappingURL=read-package-json.js.map