cli: add universal-apple-darwin platform

This commit is contained in:
Tadas Dailyda 2022-12-13 14:56:41 +02:00 committed by LongYinan
parent 328b84eb8f
commit cc9c650949
3 changed files with 6 additions and 1 deletions

View file

@ -47,7 +47,10 @@ export class CreateNpmDirCommand extends Command {
name: `${packageName}-${platformDetail.platformArchABI}`,
version,
os: [platformDetail.platform],
cpu: [platformDetail.arch],
cpu:
platformDetail.arch !== 'universal'
? [platformDetail.arch]
: undefined,
main: binaryFileName,
files: [binaryFileName],
...pick(

View file

@ -45,6 +45,7 @@ const SupportedPlatforms: string[] = [
'x86_64-unknown-freebsd',
'i686-pc-windows-msvc',
'armv7-linux-androideabi',
'universal-apple-darwin',
]
export class NewProjectCommand extends Command {

View file

@ -13,6 +13,7 @@ type NodeJSArch =
| 's390x'
| 'x32'
| 'x64'
| 'universal'
const CpuToNodeArch: { [index: string]: NodeJSArch } = {
x86_64: 'x64',