Initial commit

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
dinlo
2026-05-31 18:44:04 +08:00
commit 436a9631fc
8616 changed files with 1389957 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { execSync } from 'node:child_process';
/**
* Runs the `uname` command and returns the trimmed output.
*
* Copied from `@electron/get`.
*/
export function uname() {
return execSync('uname -m')
.toString()
.trim();
}
/**
* Generates an architecture name that would be used in an Electron or Node.js
* download file name.
*
* Copied from `@electron/get`.
*/
export function getNodeArch(arch, configVariables) {
if (arch === 'arm') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
switch (configVariables.arm_version) {
case '6':
return uname();
case '7':
default:
return 'armv7l';
}
}
return arch;
}
//# sourceMappingURL=arch.js.map