Skip to content

Commit d0b2133

Browse files
committed
Add MarkEdit.runService for running system services
1 parent 0aa0387 commit d0b2133

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1919
```json
2020
{
2121
"devDependencies": {
22-
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.14.0"
22+
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.15.0"
2323
}
2424
}
2525
```
@@ -72,6 +72,8 @@ interface MarkEdit {
7272
showTextBox(textBox?: TextBox): Promise<string | undefined>;
7373
// Present a save panel for saving the file.
7474
showSavePanel(options: SavePanelOptions): Promise<number>;
75+
// Run a system service with input.
76+
runService(name: string, input?: string): Promise<boolean>;
7577
}
7678
```
7779

index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ export interface MarkEdit {
195195
* @returns True if the file was successfully saved.
196196
*/
197197
showSavePanel(options: SavePanelOptions): Promise<boolean>;
198+
199+
/**
200+
* Run a [system service](https://support.apple.com/guide/mac-help/mchlp1012/mac) with input.
201+
* @param name The name of the system service.
202+
* @param input The input to pass to the service.
203+
* @returns True if the service performed successfully.
204+
*/
205+
runService(name: string, input?: string): Promise<boolean>;
198206
}
199207

200208
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markedit-api",
3-
"version": "0.14.0",
3+
"version": "0.15.0",
44
"description": "Type definitions for the latest MakrEdit API.",
55
"main": "./index.cjs",
66
"module": "./index.js",

0 commit comments

Comments
 (0)