You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Name of the operating system (e.g., Windows, Linux, macOS). */
6
+
name: string;
7
+
8
+
/** Version of the operating system (e.g., 10.0.19042 for Windows 10). */
9
+
version: string;
10
+
11
+
/**
12
+
* Architecture of the operating system (e.g., x64, arm64).
13
+
* This refers to the CPU architecture, which indicates the type of processor and instruction set used by the operating system.
14
+
* For example, x64 is used for 64-bit Intel/AMD processors, while arm64 is used for 64-bit ARM processors.
15
+
*/
16
+
architecture: string;
17
+
18
+
/**
19
+
* Machine type (e.g., x86_64, armv7l).
20
+
* The difference between architecture and machine is that architecture refers to the CPU architecture, while machine refers to the specific hardware platform
21
+
* like x86_64 for 64-bit Intel/AMD processors or armv7l for 32-bit ARM processors.
22
+
*/
23
+
machine: string;
24
+
25
+
/**
26
+
* Platform of the operating system (e.g., win32, linux, darwin).
27
+
* This indicates the underlying platform on which the operating system is running.
28
+
* For example, win32 is used for Windows, linux for Linux distributions, and darwin for macOS.
29
+
*/
30
+
platform: string;
31
+
32
+
/** Number of bits in the operating system (e.g., 32 or 64). */
33
+
bits: number;
34
+
35
+
/** Hostname of the machine. */
36
+
hostname: string;
37
+
38
+
/** Date since when the system has been booted. */
39
+
uptime?: Date;
40
+
};
41
+
42
+
/**
43
+
* Returns information about the operating system.
44
+
*
45
+
* @returns Operating system information.
46
+
*/
47
+
exportasyncfunctiongetOSInfo(): Promise<OSInfo>{
48
+
return{
49
+
name: os.type().replaceAll('_NT',''),// normalize name
0 commit comments