You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

run-applescript

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

run-applescript - npm Package Compare versions

Comparing version
7.0.0
to
7.1.0
+7
-0
index.d.ts

@@ -20,2 +20,9 @@ export type Options = {

readonly humanReadableOutput?: boolean;
/**
An AbortSignal that can be used to cancel the AppleScript execution.
Only supported by the async function.
*/
readonly signal?: AbortSignal;
};

@@ -22,0 +29,0 @@

+7
-2

@@ -7,3 +7,3 @@ import process from 'node:process';

export async function runAppleScript(script, {humanReadableOutput = true} = {}) {
export async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {
if (process.platform !== 'darwin') {

@@ -15,3 +15,8 @@ throw new Error('macOS only');

const {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments]);
const execOptions = {};
if (signal) {
execOptions.signal = signal;
}
const {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);
return stdout.trim();

@@ -18,0 +23,0 @@ }

{
"name": "run-applescript",
"version": "7.0.0",
"version": "7.1.0",
"description": "Run AppleScript and get the result",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -47,2 +47,8 @@ # run-applescript

##### signal
Type: `AbortSignal`
An AbortSignal that can be used to cancel the AppleScript execution.
### runAppleScriptSync(script, options?)

@@ -49,0 +55,0 @@