Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@foundryapp/accessibility-node

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foundryapp/accessibility-node - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

package.json
{
"name": "@foundryapp/accessibility-node",
"descriptiop": "Node.js wrapper for the macOS accessibility API",
"version": "1.0.12",
"version": "1.0.13",
"license": "MIT",

@@ -6,0 +6,0 @@ "gypfile": true,

@@ -14,3 +14,3 @@ ## Installation & usage

### `isProcessTrusted()`
### `isProcessTrusted() => boolean`
```javascript

@@ -20,4 +20,12 @@ const isTrusted = ax.isProcessTrusted();

### `isAppRunning(bundleID: boolean) => boolean`
```javascript
const isRunning = ax.isAppRunning('com.app.Terminal');
```
### `launchApp(bundleID: string, (err) => void)`
```javascript
// The exact behavior of the launch depends on a target app but usually it means
// that also a new window of that app is launched. So there's no need to call
// createNewWindow().
ax.launchApp('com.apple.Terminal', (err) => {

@@ -29,7 +37,22 @@ if (!err) {

}
})
});
```
### `createNewWindow(bundleID: string, (err) => void)`
```javascript
// App must be running, otherwise error is passed to a callback.
// This might take a few seconds to complete.
ax.createNewWindow('com.apple.Terminal', (err) => {
if (!err) {
console.log('Window created');
} else {
console.error(err);
}
});
```
## TODO
- Add Typescript typings

@@ -17,2 +17,3 @@ const ax = require('../build/Release/accessibility_node.node');

const delay = promisify(setTimeout);
const newWindow = promisify(ax.createNewWindow);

@@ -22,3 +23,2 @@ (async function() {

console.log(process.pid)
console.log("Node.js AFTER RUN");
// const cw = promisify(ax.createNewWindow);

@@ -32,8 +32,18 @@ // await cw('com.apple.Terminal');

*/
console.log('After launch');
if (ax.isAppRunning('com.apple.Terminal')) {
console.log('APP IS RUNNING');
await newWindow('com.apple.Terminal');
} else {
console.log('APP IS NOT RUNNING');
await launch();
}
})()
/*
ax.createNewWindow('com.apple.Terminal', (err) => {
console.error(err);
});
*/
// console.log(ax)

@@ -40,0 +50,0 @@ // ax.run('com.apple.Terminal', () => console.log('App finished running'));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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