1d2a594f0a
* chore: upgrade TS 5.2 -> 5.7.3 * vite dts fix * lint fix * resolutions fix * ui comp build fix * precommit fix? * latest eslint version * autoloader fix * undo unnecessary viewer change * eslint fixes fe2 + trying disabled type linting * lint fixes
15 lines
268 B
TypeScript
15 lines
268 B
TypeScript
'use strict'
|
|
|
|
import { machineIdSync } from 'node-machine-id'
|
|
import { v4 as uuidv4 } from 'uuid'
|
|
|
|
export const getMachineId = () => {
|
|
try {
|
|
const deviceId = machineIdSync()
|
|
return deviceId
|
|
} catch {
|
|
const deviceId = uuidv4()
|
|
return deviceId
|
|
}
|
|
}
|