Comparing version 1.1.0 to 1.1.1
import * as fs from 'fs'; | ||
import { v4 as uuidv4 } from 'uuid'; | ||
import * as path from 'path'; | ||
import * as os from 'os'; | ||
@@ -11,6 +12,10 @@ const ID_FILE = path.join(__dirname, '..', 'user-id.txt'); | ||
if (customFs.existsSync(ID_FILE)) { | ||
console.log(`User ID file found at: ${ID_FILE}`); | ||
return customFs.readFileSync(ID_FILE, 'utf-8').trim(); | ||
} else { | ||
const uniqueId = uuidv4(); | ||
const hostname = os.hostname(); | ||
const uniqueId = `${hostname}-${uuidv4()}`; | ||
customFs.writeFileSync(ID_FILE, uniqueId, 'utf-8'); | ||
console.log(`Generated and saved new User ID: ${uniqueId}`); | ||
return uniqueId; | ||
@@ -17,0 +22,0 @@ } |
{ | ||
"name": "pm2wick", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Manage your PM2 processes.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39726
850