()
| 1755 | } |
| 1756 | |
| 1757 | export function getOrCreateUserID(): string { |
| 1758 | const config = getGlobalConfig() |
| 1759 | if (config.userID) { |
| 1760 | return config.userID |
| 1761 | } |
| 1762 | |
| 1763 | const userID = randomBytes(32).toString('hex') |
| 1764 | saveGlobalConfig(current => ({ ...current, userID })) |
| 1765 | return userID |
| 1766 | } |
| 1767 | |
| 1768 | export function recordFirstStartTime(): void { |
| 1769 | const config = getGlobalConfig() |
no test coverage detected