reexpose system, implement getKnownPlatforms
This commit is contained in:
parent
3b6e89d715
commit
75f2a237a9
@ -8,6 +8,7 @@ import { log } from './log.js';
|
||||
import patchesJson from '../patches/patches.json';
|
||||
import path from 'path';
|
||||
import semver from 'semver';
|
||||
import * as system from './system.js'; // eslint-disable-line no-duplicate-imports
|
||||
import { version } from '../package.json';
|
||||
|
||||
export async function need ({
|
||||
@ -44,3 +45,5 @@ export async function need ({
|
||||
await build(nodeVersion, arch, local);
|
||||
return local;
|
||||
}
|
||||
|
||||
export { system };
|
||||
|
||||
@ -23,6 +23,10 @@ function getHostPlatform () {
|
||||
return toFancyPlatform(platform);
|
||||
}
|
||||
|
||||
function getKnownPlatforms () {
|
||||
return [ 'linux', 'osx', 'win' ];
|
||||
}
|
||||
|
||||
export function toFancyArch (arch) {
|
||||
if (arch === 'ia32') return 'x86';
|
||||
if (arch === 'x86_64') return 'x64';
|
||||
@ -58,6 +62,7 @@ function getKnownArchs () {
|
||||
|
||||
export const hostAbi = getHostAbi();
|
||||
export const hostPlatform = getHostPlatform();
|
||||
export const knownPlatforms = getKnownPlatforms();
|
||||
export const hostArch = getHostArch();
|
||||
export const targetArchs = getTargetArchs();
|
||||
export const knownArchs = getKnownArchs();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user