()
| 147 | } |
| 148 | |
| 149 | function deviceModel(): string { |
| 150 | const os = type(); |
| 151 | const version = release(); |
| 152 | const osArch = arch(); |
| 153 | if (os === 'Darwin') return `macOS ${macOsProductVersion() ?? version} ${osArch}`; |
| 154 | if (os === 'Windows_NT') return `Windows ${version} ${osArch}`; |
| 155 | return `${os} ${version} ${osArch}`.trim(); |
| 156 | } |
| 157 | |
| 158 | function macOsProductVersion(): string | undefined { |
| 159 | try { |
no test coverage detected