🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pm2wick

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pm2wick - npm Package Compare versions

Comparing version

to
1.1.1

7

lib/generateId.ts
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 @@ }

2

package.json
{
"name": "pm2wick",
"version": "1.1.0",
"version": "1.1.1",
"description": "Manage your PM2 processes.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",