@expo/osascript 0.0.1-canary-20240109-93608d8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/build/index.d.ts +16 -0
- package/build/index.js +185 -0
- package/build/index.js.map +1 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Title -->
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
👋 Welcome to <br><code>@expo/osascript</code>
|
|
4
|
+
</h1>
|
|
5
|
+
|
|
6
|
+
<p align="center">Tools for running osascripts in Node.</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="https://flat.badgen.net/packagephobia/install/@expo/osascript">
|
|
10
|
+
|
|
11
|
+
<a href="https://www.npmjs.com/package/@expo/osascript">
|
|
12
|
+
<img src="https://flat.badgen.net/npm/dw/@expo/osascript" target="_blank" />
|
|
13
|
+
</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<!-- Body -->
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
ccheever@Charless-MacBook-Air:~/projects/osascript$nesh -y
|
|
22
|
+
.Node v4.1.0
|
|
23
|
+
Type .help for more information
|
|
24
|
+
nesh*> .require .
|
|
25
|
+
osascript = require("/Users/ccheever/projects/osascript")
|
|
26
|
+
nesh*> yield osascript.execAsync('tell app "System Events" to count processes whose name is "Simulator"')
|
|
27
|
+
'1\n'
|
|
28
|
+
nesh*> yield osascript.spawnAsync('quit app "Safari"')
|
|
29
|
+
0
|
|
30
|
+
nesh*>
|
|
31
|
+
```
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SpawnOptions, SpawnResult } from '@expo/spawn-async';
|
|
2
|
+
import { ExecAsyncOptions } from 'exec-async';
|
|
3
|
+
declare function osascriptExecAsync(script: string | string[], opts?: ExecAsyncOptions): Promise<string>;
|
|
4
|
+
declare function osascriptSpawnAsync(script: string | string[], opts?: SpawnOptions): Promise<SpawnResult>;
|
|
5
|
+
declare function isAppRunningAsync(appName: string): Promise<boolean>;
|
|
6
|
+
declare function safeIdOfAppAsync(appName: string): Promise<string | null>;
|
|
7
|
+
declare function openFinderToFolderAsync(dir: string, activate?: boolean): Promise<void>;
|
|
8
|
+
declare function openInAppAsync(appName: string, pth: string): Promise<SpawnResult>;
|
|
9
|
+
declare function chooseAppAsync(listOfAppNames: string[]): Promise<string | null>;
|
|
10
|
+
declare function chooseEditorAppAsync(preferredEditor?: string): Promise<string | null>;
|
|
11
|
+
declare function chooseTerminalAppAsync(): Promise<string | null>;
|
|
12
|
+
declare function openInEditorAsync(pth: string, preferredEditor?: string): Promise<SpawnResult>;
|
|
13
|
+
declare function openItermToSpecificFolderAsync(dir: string): Promise<SpawnResult>;
|
|
14
|
+
declare function openTerminalToSpecificFolderAsync(dir: string, inTab?: boolean): Promise<SpawnResult>;
|
|
15
|
+
declare function openFolderInTerminalAppAsync(dir: string, inTab?: boolean): Promise<SpawnResult>;
|
|
16
|
+
export { chooseAppAsync, chooseEditorAppAsync, chooseTerminalAppAsync, osascriptExecAsync as execAsync, isAppRunningAsync, openFinderToFolderAsync, openFolderInTerminalAppAsync, openInAppAsync, openInEditorAsync, openItermToSpecificFolderAsync, openTerminalToSpecificFolderAsync, safeIdOfAppAsync, osascriptSpawnAsync as spawnAsync, };
|
package/build/index.js
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.spawnAsync = exports.safeIdOfAppAsync = exports.openTerminalToSpecificFolderAsync = exports.openItermToSpecificFolderAsync = exports.openInEditorAsync = exports.openInAppAsync = exports.openFolderInTerminalAppAsync = exports.openFinderToFolderAsync = exports.isAppRunningAsync = exports.execAsync = exports.chooseTerminalAppAsync = exports.chooseEditorAppAsync = exports.chooseAppAsync = void 0;
|
|
7
|
+
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
|
8
|
+
const exec_async_1 = __importDefault(require("exec-async"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const util_1 = __importDefault(require("util"));
|
|
11
|
+
function osascriptArgs(script) {
|
|
12
|
+
if (!util_1.default.isArray(script)) {
|
|
13
|
+
script = [script];
|
|
14
|
+
}
|
|
15
|
+
const args = [];
|
|
16
|
+
for (const line of script) {
|
|
17
|
+
args.push('-e');
|
|
18
|
+
args.push(line);
|
|
19
|
+
}
|
|
20
|
+
return args;
|
|
21
|
+
}
|
|
22
|
+
async function osascriptExecAsync(script, opts) {
|
|
23
|
+
const result = await (0, exec_async_1.default)('osascript', osascriptArgs(script), Object.assign({ stdio: 'inherit' }, opts));
|
|
24
|
+
return result?.toString() || '';
|
|
25
|
+
}
|
|
26
|
+
exports.execAsync = osascriptExecAsync;
|
|
27
|
+
async function osascriptSpawnAsync(script, opts) {
|
|
28
|
+
return await (0, spawn_async_1.default)('osascript', osascriptArgs(script), opts);
|
|
29
|
+
}
|
|
30
|
+
exports.spawnAsync = osascriptSpawnAsync;
|
|
31
|
+
async function isAppRunningAsync(appName) {
|
|
32
|
+
const zeroMeansNo = (await osascriptExecAsync('tell app "System Events" to count processes whose name is ' + JSON.stringify(appName))).trim();
|
|
33
|
+
return zeroMeansNo !== '0';
|
|
34
|
+
}
|
|
35
|
+
exports.isAppRunningAsync = isAppRunningAsync;
|
|
36
|
+
async function safeIdOfAppAsync(appName) {
|
|
37
|
+
try {
|
|
38
|
+
return (await osascriptExecAsync('id of app ' + JSON.stringify(appName))).trim();
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.safeIdOfAppAsync = safeIdOfAppAsync;
|
|
45
|
+
async function openFinderToFolderAsync(dir, activate = true) {
|
|
46
|
+
await osascriptSpawnAsync([
|
|
47
|
+
'tell application "Finder"',
|
|
48
|
+
'open POSIX file ' + JSON.stringify(dir),
|
|
49
|
+
(activate && 'activate') || '',
|
|
50
|
+
'end tell',
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
exports.openFinderToFolderAsync = openFinderToFolderAsync;
|
|
54
|
+
async function openInAppAsync(appName, pth) {
|
|
55
|
+
const cmd = 'tell app ' + JSON.stringify(appName) + ' to open ' + JSON.stringify(path_1.default.resolve(pth));
|
|
56
|
+
// console.log("cmd=", cmd);
|
|
57
|
+
return await osascriptSpawnAsync(cmd);
|
|
58
|
+
}
|
|
59
|
+
exports.openInAppAsync = openInAppAsync;
|
|
60
|
+
async function chooseAppAsync(listOfAppNames) {
|
|
61
|
+
const runningAwaitables = [];
|
|
62
|
+
const appIdAwaitables = [];
|
|
63
|
+
for (const appName of listOfAppNames) {
|
|
64
|
+
runningAwaitables.push(isAppRunningAsync(appName));
|
|
65
|
+
appIdAwaitables.push(safeIdOfAppAsync(appName));
|
|
66
|
+
}
|
|
67
|
+
const running = await Promise.all(runningAwaitables);
|
|
68
|
+
const appIds = await Promise.all(appIdAwaitables);
|
|
69
|
+
let i;
|
|
70
|
+
for (i = 0; i < listOfAppNames.length; i++) {
|
|
71
|
+
if (running[i]) {
|
|
72
|
+
return listOfAppNames[i];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
for (i = 0; i < listOfAppNames.length; i++) {
|
|
76
|
+
if (appIds[i]) {
|
|
77
|
+
return listOfAppNames[i];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
exports.chooseAppAsync = chooseAppAsync;
|
|
83
|
+
async function chooseEditorAppAsync(preferredEditor) {
|
|
84
|
+
if (preferredEditor) {
|
|
85
|
+
// Make sure this editor exists
|
|
86
|
+
const appId = await safeIdOfAppAsync(preferredEditor);
|
|
87
|
+
if (appId) {
|
|
88
|
+
return preferredEditor;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
console.warn(`Your preferred editor (${preferredEditor}) isn't installed on this computer.`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const editorsToTry = [
|
|
95
|
+
'Visual Studio Code',
|
|
96
|
+
'Atom',
|
|
97
|
+
'Sublime Text',
|
|
98
|
+
'TextMate',
|
|
99
|
+
'TextWrangler',
|
|
100
|
+
'Visual Studio Code',
|
|
101
|
+
'Brackets',
|
|
102
|
+
'SubEthaEdit',
|
|
103
|
+
'BBEdit',
|
|
104
|
+
'Textastic',
|
|
105
|
+
'UltraEdit',
|
|
106
|
+
'MacVim',
|
|
107
|
+
'CodeRunner 2',
|
|
108
|
+
'CodeRunner',
|
|
109
|
+
'TextEdit',
|
|
110
|
+
];
|
|
111
|
+
return await chooseAppAsync(editorsToTry);
|
|
112
|
+
}
|
|
113
|
+
exports.chooseEditorAppAsync = chooseEditorAppAsync;
|
|
114
|
+
async function chooseTerminalAppAsync() {
|
|
115
|
+
return await chooseAppAsync([
|
|
116
|
+
'iTerm 3',
|
|
117
|
+
'iTerm 2',
|
|
118
|
+
'iTerm',
|
|
119
|
+
'HyperTerm',
|
|
120
|
+
// 'Cathode',
|
|
121
|
+
// 'Terminator',
|
|
122
|
+
// 'MacTerm',
|
|
123
|
+
'Terminal',
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
126
|
+
exports.chooseTerminalAppAsync = chooseTerminalAppAsync;
|
|
127
|
+
async function openInEditorAsync(pth, preferredEditor) {
|
|
128
|
+
const appName = await chooseEditorAppAsync(preferredEditor);
|
|
129
|
+
if (!appName) {
|
|
130
|
+
throw new Error('No editor found.');
|
|
131
|
+
}
|
|
132
|
+
console.log('Will open in ' + appName + ' -- ' + pth);
|
|
133
|
+
return await openInAppAsync(appName, pth);
|
|
134
|
+
}
|
|
135
|
+
exports.openInEditorAsync = openInEditorAsync;
|
|
136
|
+
async function openItermToSpecificFolderAsync(dir) {
|
|
137
|
+
return await osascriptSpawnAsync([
|
|
138
|
+
'tell application "iTerm"',
|
|
139
|
+
'make new terminal',
|
|
140
|
+
'tell the first terminal',
|
|
141
|
+
'activate current session',
|
|
142
|
+
'launch session "Default Session"',
|
|
143
|
+
'tell the last session',
|
|
144
|
+
'write text "cd ' + util_1.default.inspect(dir) + ' && clear"',
|
|
145
|
+
// 'write text "clear"',
|
|
146
|
+
'end tell',
|
|
147
|
+
'end tell',
|
|
148
|
+
'end tell',
|
|
149
|
+
]);
|
|
150
|
+
// exec("osascript -e 'tell application \"iTerm\"' -e 'make new terminal' -e 'tell the first terminal' -e 'activate current session' -e 'launch session \"Default Session\"' -e 'tell the last session' -e 'write text \"cd #{value}\"' -e 'write text \"clear\"' -e 'end tell' -e 'end tell' -e 'end tell' > /dev/null 2>&1")
|
|
151
|
+
}
|
|
152
|
+
exports.openItermToSpecificFolderAsync = openItermToSpecificFolderAsync;
|
|
153
|
+
async function openTerminalToSpecificFolderAsync(dir, inTab = false) {
|
|
154
|
+
if (inTab) {
|
|
155
|
+
return await osascriptSpawnAsync([
|
|
156
|
+
'tell application "terminal"',
|
|
157
|
+
'tell application "System Events" to tell process "terminal" to keystroke "t" using command down',
|
|
158
|
+
'do script with command "cd ' +
|
|
159
|
+
util_1.default.inspect(dir) +
|
|
160
|
+
' && clear" in selected tab of the front window',
|
|
161
|
+
'end tell',
|
|
162
|
+
]);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
return await osascriptSpawnAsync([
|
|
166
|
+
'tell application "terminal"',
|
|
167
|
+
'do script "cd ' + util_1.default.inspect(dir) + ' && clear"',
|
|
168
|
+
'end tell',
|
|
169
|
+
'tell application "terminal" to activate',
|
|
170
|
+
]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.openTerminalToSpecificFolderAsync = openTerminalToSpecificFolderAsync;
|
|
174
|
+
async function openFolderInTerminalAppAsync(dir, inTab = false) {
|
|
175
|
+
const program = await chooseTerminalAppAsync();
|
|
176
|
+
switch (program) {
|
|
177
|
+
case 'iTerm':
|
|
178
|
+
return await openItermToSpecificFolderAsync(dir);
|
|
179
|
+
case 'Terminal':
|
|
180
|
+
default:
|
|
181
|
+
return await openTerminalToSpecificFolderAsync(dir, inTab);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.openFolderInTerminalAppAsync = openFolderInTerminal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A0BC,8EAAiC;AAxBnC,KAAK,UAAU,4BAA4B,CAAC,GAAW,EAAE,KAAK,GAAG,KAAK;IACpE,MAAM,OAAO,GAAG,MAAM,sBAAsB,EAAE,CAAC;IAE/C,QAAQ,OAAO,EAAE;QACf,KAAK,OAAO;YACV,OAAO,MAAM,8BAA8B,CAAC,GAAG,CAAC,CAAC;QAEnD,KAAK,UAAU,CAAC;QAChB;YACE,OAAO,MAAM,iCAAiC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAC9D;AACH,CAAC;AASC,oEAA4B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@expo/osascript",
|
|
3
|
+
"version": "0.0.1-canary-20240109-93608d8",
|
|
4
|
+
"description": "Tools for running an osascripts in Node",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"osascript",
|
|
8
|
+
"mac",
|
|
9
|
+
"osx",
|
|
10
|
+
"spawn",
|
|
11
|
+
"exec"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/expo/expo/tree/main/packages/@expo/osascript#readme",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/expo/expo.git",
|
|
17
|
+
"directory": "packages/@expo/osascript"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/expo/expo/issues"
|
|
21
|
+
},
|
|
22
|
+
"main": "build/index.js",
|
|
23
|
+
"files": [
|
|
24
|
+
"build"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "expo-module tsc",
|
|
28
|
+
"prepare": "yarn run clean && yarn run build",
|
|
29
|
+
"clean": "expo-module clean",
|
|
30
|
+
"lint": "expo-module lint",
|
|
31
|
+
"typecheck": "expo-module typecheck",
|
|
32
|
+
"test": "expo-module test",
|
|
33
|
+
"watch": "yarn run build --watch --preserveWatchOutput",
|
|
34
|
+
"prepublishOnly": "expo-module prepublishOnly"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=12"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@expo/spawn-async": "^1.5.0",
|
|
41
|
+
"exec-async": "^2.2.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"expo-module-scripts": "0.0.1-canary-20240109-93608d8"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"gitHead": "93608d8dcb0268312e0c8ed22036ebfa6efe9830"
|
|
50
|
+
}
|