Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import type { FC } from 'react';
import Button from '#site/components/Common/Button';
import { ReleaseContext } from '#site/providers/releaseProvider';
import {
OperatingSystemLabel,
OS_NOT_SUPPORTING_INSTALLERS,
OperatingSystemLabel,
} from '#site/util/downloadUtils';
import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl';

Expand Down
23 changes: 11 additions & 12 deletions apps/site/types/userOS.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
export type UserOS = 'MAC' | 'WIN' | 'LINUX' | 'AIX' | 'OTHER';
import type constants from '../util/downloadUtils/constants.json';

export type UserBitness = '64' | '32';
// Extract OS key type from the systems object
export type UserOS = keyof typeof constants.systems;

export type UserArchitecture = 'arm' | 'x86';
// Derive the union type of UserPlatform from the userOptions
export type UserPlatform = (typeof constants.userOptions.platforms)[number];

export type UserPlatform =
| 'arm64'
| 'armv7l'
| 'ppc64le'
| 'ppc64'
| 's390x'
| 'ppc64'
| 'x64'
| 'x86';
// Derive the union type of UserBitness from the userOptions
export type UserBitness = (typeof constants.userOptions.bitness)[number];

// Derive the union type of UserArchitecture from the userOptions
export type UserArchitecture =
(typeof constants.userOptions.architecture)[number];
323 changes: 0 additions & 323 deletions apps/site/util/downloadUtils.tsx

This file was deleted.

Loading
Loading