New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-open-apps

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-open-apps - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

23

index.js

@@ -33,3 +33,3 @@ module.exports = async function(opt) {

let appsOpen = [];
let processes = await ps({
let appCmds = await ps({
command: '',

@@ -39,5 +39,6 @@ arguments: ''

if (opt.v) {
log(processes);
log(appCmds);
}
let regex;
let elims;
if (mac) {

@@ -47,8 +48,18 @@ regex = /(?:\/Applications)(?:\/[^\/\.]*\/|\/)*(?:([^\.]+)\.app)/;

regex = /(?:(?:\/(?:snap|usr\/bin)\/)([^\/]+)|(?:\/[^\/\.]*\/)*([^\/\.]+)\.AppImage)/;
elims = /(dbus|gnome|pulseaudio|seahorse|ssh)/;
}
for (let i = 0; i < processes.length; i++) {
let process = processes[i].command;
let app = process.match(regex);
for (let i = 0; i < appCmds.length; i++) {
let appCmd = appCmds[i].command;
let app = appCmd.match(regex);
if (app && !appsOpen[app[1]]) {
appsOpen[app[1]] = process;
if (elims && elims.test(appCmd)) {
continue;
}
if (linux && (/\/snap\//).test(appCmd)) {
appCmd = appCmd.split('/');
appCmd = [appCmd[1], 'run', appCmd[2]];
} else {
appCmd = [appCmd];
}
appsOpen[app[1]] = appCmd;
}

@@ -55,0 +66,0 @@ }

@@ -29,3 +29,3 @@ {

},
"version": "1.0.7"
"version": "1.0.8"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc