()
| 1767 | } |
| 1768 | |
| 1769 | export function getOrCreateUserID(): string { |
| 1770 | const config = getGlobalConfig() |
| 1771 | if (config.userID) { |
| 1772 | return config.userID |
| 1773 | } |
| 1774 | |
| 1775 | const userID = randomBytes(32).toString('hex') |
| 1776 | saveGlobalConfig(current => ({ ...current, userID })) |
| 1777 | return userID |
| 1778 | } |
| 1779 | |
| 1780 | export function recordFirstStartTime(): void { |
| 1781 | const config = getGlobalConfig() |
no test coverage detected