()
| 60 | } |
| 61 | |
| 62 | export function getMachineId() { |
| 63 | if (!(platform in guid)) { |
| 64 | return randomUUID(); |
| 65 | } |
| 66 | try { |
| 67 | const value = execSync(guid[platform as keyof typeof guid]); |
| 68 | const id = expose(value.toString()); |
| 69 | if (!id) { |
| 70 | return randomUUID(); |
| 71 | } |
| 72 | return hash(id); |
| 73 | } catch { |
| 74 | return randomUUID(); |
| 75 | } |
| 76 | } |