Upload via GUI (7543 Dateien)

This commit is contained in:
2026-10-22 06:56:30 +00:00
parent 8830aac76c
commit d7658c873f
50 changed files with 1300 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
let cached;
/**
* Detects the libc family on the current Linux host via `process.report`.
*
* Used to resolve the `{libc}` token in prebuilt binary path templates.
*
* @returns `'glibc'` | `'musl'` | `null` (non-Linux or unable to detect)
*/
export function detectLibcFamily() {
if (cached !== undefined)
return cached;
if (process.platform !== 'linux')
return (cached = null);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const report = process.report?.getReport();
if (report?.header?.glibcVersionRuntime)
return (cached = 'glibc');
if (Array.isArray(report?.sharedObjects) &&
report.sharedObjects.some((s) => s.includes('libc.musl') || s.includes('ld-musl'))) {
return (cached = 'musl');
}
return (cached = null);
}
//# sourceMappingURL=detect-libc.js.map