UNPKG

@remote.it/core

Version:

Core remote.it JavasScript/TypeScript library

116 lines (115 loc) 3.13 kB
/// <reference types="node" /> import os from 'os' declare type SystemArchitecture = | 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' declare type SystemPlatform = | 'aix' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'android' /** * A lightweight wrapper around the "os" package to provide * some remote.it specific details and so OS specific information * can more easily and consistently be accessed. */ export declare class Environment { static readonly platform: SystemPlatform static readonly isWindows: boolean static readonly isMac: boolean static readonly isLinux: boolean static readonly isAndroid: boolean static readonly isRoot: boolean static readonly arch: SystemArchitecture static readonly release: string static readonly homedir: string static readonly hostname: string static readonly tmpdir: string static readonly totalmem: number static readonly freemem: number static readonly cpus: os.CpuInfo[] static readonly networkInterfaces: { [index: string]: os.NetworkInterfaceInfo[] } static readonly uptime: number static readonly execPath: string static readonly userInfo: os.UserInfo<string> static readonly username: string static readonly remoteitDirectory: string static readonly binaryDirectory: string static readonly remoteitPath: string static readonly connectdPath: string static readonly muxerPath: string static readonly demuxerPath: string static readonly launchctlPlistPath: string static readonly systemdUnitFilePath: string /** * The path to winsw.exe which is a helper to register system * services on Windows. Only supported on Windows. */ static readonly winswPath: string /** * Path to the WinSW XML configuration file used to define a * Windows service. Only supported on Windows. */ static readonly winswXMLPath: string static readonly logDirectory: string /** * The full path to the remote.it config file used * to define the target device/services/initiators. */ static readonly configPath: string /** * Return all getters/properties for this class so we can * easily dump out all the values for debugging, etc. */ static toObject(): { arch: SystemArchitecture binaryDirectory: string configPath: string connectdPath: string cpus: os.CpuInfo[] demuxerPath: string execPath: string freemem: number homedir: string hostname: string isAndroid: boolean isLinux: boolean isMac: boolean isRoot: boolean isWindows: boolean launchctlPlistPath: string logDirectory: string muxerPath: string networkInterfaces: { [index: string]: os.NetworkInterfaceInfo[] } release: string remoteitDirectory: string remoteitPath: string systemdUnitFilePath: string tmpdir: string totalmem: number uptime: number userInfo: os.UserInfo<string> winswPath: string winswXMLPath: string } static toJSON(): string } export {} //# sourceMappingURL=Environment.d.ts.map