MCPcopy
hub / github.com/electron/forge / parseArchs

Function parseArchs

packages/api/core/src/util/parse-archs.ts:7–22  ·  view source on GitHub ↗
(
  platform: ForgePlatform | string,
  declaredArch: ForgeArch | 'all' | string,
  electronVersion: string,
)

Source from the content-addressed store, hash-verified

5import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
6
7export default function parseArchs(
8 platform: ForgePlatform | string,
9 declaredArch: ForgeArch | 'all' | string,
10 electronVersion: string,
11): ForgeArch[] {
12 if (declaredArch === 'all') {
13 return (
14 allOfficialArchsForPlatformAndVersion(
15 platform as SupportedPlatform,
16 electronVersion,
17 ) || ['x64']
18 );
19 }
20
21 return declaredArch.split(',') as ForgeArch[];
22}

Callers 2

listrMakeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected