()
| 1775 | } |
| 1776 | |
| 1777 | export function getOrCreateUserID(): string { |
| 1778 | const config = getGlobalConfig() |
| 1779 | if (config.userID) { |
| 1780 | return config.userID |
| 1781 | } |
| 1782 | |
| 1783 | const userID = randomBytes(32).toString('hex') |
| 1784 | saveGlobalConfig(current => ({ ...current, userID })) |
| 1785 | return userID |
| 1786 | } |
| 1787 | |
| 1788 | export function recordFirstStartTime(): void { |
| 1789 | const config = getGlobalConfig() |
no test coverage detected