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.6 to 1.0.7

.npmignore

38

index.js
module.exports = async function(opt) {
opt = opt || {};
const err = console.error;

@@ -7,9 +8,21 @@ const log = console.log;

const path = require('path');
log(os.type());
if (os.type() == 'Windows_NT') {
log('get-open-apps says hi to windows PC');
return {
Atom: path.join(os.homedir().replace(/\\/g, '/'), '/AppData/Local/atom')
};
let osType = os.type();
const linux = (osType == 'Linux');
const mac = (osType == 'Darwin');
const win = (osType == 'Windows_NT');
if (win) {
osType = 'win';
} else if (mac) {
osType = 'mac';
} else if (linux) {
osType = 'linux';
}
if (opt.v) {
log(osType);
}
if (win) {
log('not compatible with Windows currently!');
return {};
}
const {

@@ -25,9 +38,16 @@ promisify

});
log(processes);
if (opt.v) {
log(processes);
}
let regex;
if (mac) {
regex = /(?:\/Applications)(?:\/[^\/\.]*\/|\/)*(?:([^\.]+)\.app)/;
} else if (linux) {
regex = /(?:(?:\/(?:snap|usr\/bin)\/)([^\/]+)|(?:\/[^\/\.]*\/)*([^\/\.]+)\.AppImage)/;
}
for (let i = 0; i < processes.length; i++) {
let process = processes[i].command;
let regex = /(?:\/Applications)(?:\/[^\/\.]*\/|\/)*(?:([^\.]+)\.app)/;
let app = process.match(regex);
if (app && !appsOpen[app[1]]) {
appsOpen[app[1]] = app[0];
appsOpen[app[1]] = process;
}

@@ -34,0 +54,0 @@ }

@@ -27,5 +27,5 @@ {

"version": "git add -A",
"postversion": "git remote | xargs -L1 git push --all && git push --tags && npm publish"
"postversion": "git push --tags && npm publish"
},
"version": "1.0.6"
"version": "1.0.7"
}
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