serverless-spy 2.2.4 → 2.2.6
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/.jsii +3 -3
- package/cli/package.json +1 -1
- package/dist/releasetag.txt +1 -1
- package/lib/cli/package.json +1 -1
- package/lib/src/ServerlessSpy.js +1 -1
- package/node_modules/bundle-name/index.js +2 -2
- package/node_modules/bundle-name/package.json +6 -5
- package/node_modules/bundle-name/readme.md +2 -2
- package/node_modules/default-browser/index.d.ts +5 -4
- package/node_modules/default-browser/index.js +13 -11
- package/node_modules/default-browser/package.json +14 -12
- package/node_modules/default-browser/windows.js +11 -5
- package/node_modules/default-browser-id/index.js +8 -32
- package/node_modules/default-browser-id/package.json +5 -8
- package/node_modules/default-browser-id/readme.md +2 -2
- package/node_modules/open/index.js +10 -10
- package/node_modules/{is-wsl → open/node_modules/is-wsl}/index.d.ts +2 -2
- package/node_modules/open/node_modules/is-wsl/index.js +27 -0
- package/node_modules/{is-wsl → open/node_modules/is-wsl}/package.json +21 -9
- package/node_modules/open/node_modules/is-wsl/readme.md +21 -0
- package/node_modules/open/package.json +9 -8
- package/node_modules/open/xdg-open +338 -137
- package/node_modules/run-applescript/index.d.ts +28 -4
- package/node_modules/run-applescript/index.js +20 -7
- package/node_modules/run-applescript/package.json +10 -9
- package/node_modules/run-applescript/readme.md +44 -6
- package/package.json +2 -2
- package/node_modules/big-integer/BigInteger.d.ts +0 -2393
- package/node_modules/big-integer/BigInteger.js +0 -1453
- package/node_modules/big-integer/BigInteger.min.js +0 -1
- package/node_modules/big-integer/LICENSE +0 -24
- package/node_modules/big-integer/README.md +0 -589
- package/node_modules/big-integer/bower.json +0 -29
- package/node_modules/big-integer/package.json +0 -48
- package/node_modules/big-integer/tsconfig.json +0 -24
- package/node_modules/bplist-parser/README.md +0 -48
- package/node_modules/bplist-parser/bplistParser.js +0 -363
- package/node_modules/bplist-parser/package.json +0 -34
- package/node_modules/bplist-parser/test/airplay.bplist +0 -0
- package/node_modules/bplist-parser/test/iTunes-small.bplist +0 -0
- package/node_modules/bplist-parser/test/int64.bplist +0 -0
- package/node_modules/bplist-parser/test/int64.xml +0 -10
- package/node_modules/bplist-parser/test/parseTest.js +0 -104
- package/node_modules/bplist-parser/test/sample1.bplist +0 -0
- package/node_modules/bplist-parser/test/sample2.bplist +0 -0
- package/node_modules/bplist-parser/test/uid.bplist +0 -0
- package/node_modules/bplist-parser/test/utf16.bplist +0 -0
- package/node_modules/bplist-parser/test/utf16_chinese.plist +0 -0
- package/node_modules/cross-spawn/CHANGELOG.md +0 -130
- package/node_modules/cross-spawn/LICENSE +0 -21
- package/node_modules/cross-spawn/README.md +0 -96
- package/node_modules/cross-spawn/index.js +0 -39
- package/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/node_modules/cross-spawn/lib/parse.js +0 -91
- package/node_modules/cross-spawn/lib/util/escape.js +0 -45
- package/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/node_modules/cross-spawn/package.json +0 -73
- package/node_modules/default-browser/node_modules/execa/index.d.ts +0 -937
- package/node_modules/default-browser/node_modules/execa/index.js +0 -309
- package/node_modules/default-browser/node_modules/execa/lib/command.js +0 -120
- package/node_modules/default-browser/node_modules/execa/lib/error.js +0 -87
- package/node_modules/default-browser/node_modules/execa/lib/kill.js +0 -102
- package/node_modules/default-browser/node_modules/execa/lib/pipe.js +0 -42
- package/node_modules/default-browser/node_modules/execa/lib/promise.js +0 -36
- package/node_modules/default-browser/node_modules/execa/lib/stdio.js +0 -49
- package/node_modules/default-browser/node_modules/execa/lib/stream.js +0 -119
- package/node_modules/default-browser/node_modules/execa/lib/verbose.js +0 -19
- package/node_modules/default-browser/node_modules/execa/package.json +0 -87
- package/node_modules/default-browser/node_modules/execa/readme.md +0 -824
- package/node_modules/default-browser/node_modules/human-signals/LICENSE +0 -201
- package/node_modules/default-browser/node_modules/human-signals/README.md +0 -178
- package/node_modules/default-browser/node_modules/human-signals/build/src/core.js +0 -273
- package/node_modules/default-browser/node_modules/human-signals/build/src/main.d.ts +0 -73
- package/node_modules/default-browser/node_modules/human-signals/build/src/main.js +0 -70
- package/node_modules/default-browser/node_modules/human-signals/build/src/realtime.js +0 -16
- package/node_modules/default-browser/node_modules/human-signals/build/src/signals.js +0 -34
- package/node_modules/default-browser/node_modules/human-signals/package.json +0 -61
- package/node_modules/default-browser/node_modules/is-stream/index.d.ts +0 -81
- package/node_modules/default-browser/node_modules/is-stream/index.js +0 -29
- package/node_modules/default-browser/node_modules/is-stream/license +0 -9
- package/node_modules/default-browser/node_modules/is-stream/package.json +0 -44
- package/node_modules/default-browser/node_modules/is-stream/readme.md +0 -60
- package/node_modules/default-browser/node_modules/mimic-fn/index.d.ts +0 -52
- package/node_modules/default-browser/node_modules/mimic-fn/index.js +0 -71
- package/node_modules/default-browser/node_modules/mimic-fn/license +0 -9
- package/node_modules/default-browser/node_modules/mimic-fn/package.json +0 -45
- package/node_modules/default-browser/node_modules/mimic-fn/readme.md +0 -90
- package/node_modules/default-browser/node_modules/npm-run-path/index.d.ts +0 -90
- package/node_modules/default-browser/node_modules/npm-run-path/index.js +0 -52
- package/node_modules/default-browser/node_modules/npm-run-path/license +0 -9
- package/node_modules/default-browser/node_modules/npm-run-path/package.json +0 -49
- package/node_modules/default-browser/node_modules/npm-run-path/readme.md +0 -104
- package/node_modules/default-browser/node_modules/onetime/index.d.ts +0 -59
- package/node_modules/default-browser/node_modules/onetime/index.js +0 -41
- package/node_modules/default-browser/node_modules/onetime/license +0 -9
- package/node_modules/default-browser/node_modules/onetime/package.json +0 -45
- package/node_modules/default-browser/node_modules/onetime/readme.md +0 -94
- package/node_modules/default-browser/node_modules/path-key/index.d.ts +0 -31
- package/node_modules/default-browser/node_modules/path-key/index.js +0 -12
- package/node_modules/default-browser/node_modules/path-key/license +0 -9
- package/node_modules/default-browser/node_modules/path-key/package.json +0 -41
- package/node_modules/default-browser/node_modules/path-key/readme.md +0 -57
- package/node_modules/default-browser/node_modules/strip-final-newline/index.js +0 -14
- package/node_modules/default-browser/node_modules/strip-final-newline/license +0 -9
- package/node_modules/default-browser/node_modules/strip-final-newline/package.json +0 -43
- package/node_modules/default-browser/node_modules/strip-final-newline/readme.md +0 -35
- package/node_modules/execa/index.d.ts +0 -564
- package/node_modules/execa/index.js +0 -268
- package/node_modules/execa/lib/command.js +0 -52
- package/node_modules/execa/lib/error.js +0 -88
- package/node_modules/execa/lib/kill.js +0 -115
- package/node_modules/execa/lib/promise.js +0 -46
- package/node_modules/execa/lib/stdio.js +0 -52
- package/node_modules/execa/lib/stream.js +0 -97
- package/node_modules/execa/license +0 -9
- package/node_modules/execa/package.json +0 -74
- package/node_modules/execa/readme.md +0 -663
- package/node_modules/get-stream/buffer-stream.js +0 -52
- package/node_modules/get-stream/index.d.ts +0 -105
- package/node_modules/get-stream/index.js +0 -61
- package/node_modules/get-stream/license +0 -9
- package/node_modules/get-stream/package.json +0 -47
- package/node_modules/get-stream/readme.md +0 -124
- package/node_modules/human-signals/CHANGELOG.md +0 -11
- package/node_modules/human-signals/LICENSE +0 -201
- package/node_modules/human-signals/README.md +0 -165
- package/node_modules/human-signals/build/src/core.js +0 -273
- package/node_modules/human-signals/build/src/core.js.map +0 -1
- package/node_modules/human-signals/build/src/main.d.ts +0 -52
- package/node_modules/human-signals/build/src/main.js +0 -71
- package/node_modules/human-signals/build/src/main.js.map +0 -1
- package/node_modules/human-signals/build/src/realtime.js +0 -19
- package/node_modules/human-signals/build/src/realtime.js.map +0 -1
- package/node_modules/human-signals/build/src/signals.js +0 -35
- package/node_modules/human-signals/build/src/signals.js.map +0 -1
- package/node_modules/human-signals/package.json +0 -64
- package/node_modules/is-stream/index.d.ts +0 -79
- package/node_modules/is-stream/index.js +0 -28
- package/node_modules/is-stream/license +0 -9
- package/node_modules/is-stream/package.json +0 -42
- package/node_modules/is-stream/readme.md +0 -60
- package/node_modules/is-wsl/index.js +0 -31
- package/node_modules/is-wsl/license +0 -9
- package/node_modules/is-wsl/node_modules/is-docker/cli.js +0 -5
- package/node_modules/is-wsl/node_modules/is-docker/index.d.ts +0 -15
- package/node_modules/is-wsl/node_modules/is-docker/index.js +0 -29
- package/node_modules/is-wsl/node_modules/is-docker/license +0 -9
- package/node_modules/is-wsl/node_modules/is-docker/package.json +0 -42
- package/node_modules/is-wsl/node_modules/is-docker/readme.md +0 -27
- package/node_modules/is-wsl/readme.md +0 -36
- package/node_modules/isexe/.npmignore +0 -2
- package/node_modules/isexe/LICENSE +0 -15
- package/node_modules/isexe/README.md +0 -51
- package/node_modules/isexe/index.js +0 -57
- package/node_modules/isexe/mode.js +0 -41
- package/node_modules/isexe/package.json +0 -31
- package/node_modules/isexe/test/basic.js +0 -221
- package/node_modules/isexe/windows.js +0 -42
- package/node_modules/merge-stream/LICENSE +0 -21
- package/node_modules/merge-stream/README.md +0 -78
- package/node_modules/merge-stream/index.js +0 -41
- package/node_modules/merge-stream/package.json +0 -19
- package/node_modules/mimic-fn/index.d.ts +0 -54
- package/node_modules/mimic-fn/index.js +0 -13
- package/node_modules/mimic-fn/license +0 -9
- package/node_modules/mimic-fn/package.json +0 -42
- package/node_modules/mimic-fn/readme.md +0 -69
- package/node_modules/npm-run-path/index.d.ts +0 -89
- package/node_modules/npm-run-path/index.js +0 -47
- package/node_modules/npm-run-path/license +0 -9
- package/node_modules/npm-run-path/package.json +0 -44
- package/node_modules/npm-run-path/readme.md +0 -115
- package/node_modules/onetime/index.d.ts +0 -64
- package/node_modules/onetime/index.js +0 -44
- package/node_modules/onetime/license +0 -9
- package/node_modules/onetime/package.json +0 -43
- package/node_modules/onetime/readme.md +0 -94
- package/node_modules/path-key/index.d.ts +0 -40
- package/node_modules/path-key/index.js +0 -16
- package/node_modules/path-key/license +0 -9
- package/node_modules/path-key/package.json +0 -39
- package/node_modules/path-key/readme.md +0 -61
- package/node_modules/shebang-command/index.js +0 -19
- package/node_modules/shebang-command/license +0 -9
- package/node_modules/shebang-command/package.json +0 -34
- package/node_modules/shebang-command/readme.md +0 -34
- package/node_modules/shebang-regex/index.d.ts +0 -22
- package/node_modules/shebang-regex/index.js +0 -2
- package/node_modules/shebang-regex/license +0 -9
- package/node_modules/shebang-regex/package.json +0 -35
- package/node_modules/shebang-regex/readme.md +0 -33
- package/node_modules/signal-exit/LICENSE.txt +0 -16
- package/node_modules/signal-exit/README.md +0 -39
- package/node_modules/signal-exit/index.js +0 -202
- package/node_modules/signal-exit/package.json +0 -38
- package/node_modules/signal-exit/signals.js +0 -53
- package/node_modules/strip-final-newline/index.js +0 -16
- package/node_modules/strip-final-newline/license +0 -9
- package/node_modules/strip-final-newline/package.json +0 -40
- package/node_modules/strip-final-newline/readme.md +0 -30
- package/node_modules/titleize/index.d.ts +0 -17
- package/node_modules/titleize/index.js +0 -7
- package/node_modules/titleize/license +0 -9
- package/node_modules/titleize/package.json +0 -42
- package/node_modules/titleize/readme.md +0 -25
- package/node_modules/untildify/index.d.ts +0 -14
- package/node_modules/untildify/index.js +0 -12
- package/node_modules/untildify/license +0 -9
- package/node_modules/untildify/package.json +0 -43
- package/node_modules/untildify/readme.md +0 -30
- package/node_modules/which/CHANGELOG.md +0 -166
- package/node_modules/which/LICENSE +0 -15
- package/node_modules/which/README.md +0 -54
- package/node_modules/which/bin/node-which +0 -52
- package/node_modules/which/package.json +0 -43
- package/node_modules/which/which.js +0 -125
- /package/node_modules/{default-browser/node_modules/execa → open/node_modules/is-wsl}/license +0 -0
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
export type Options = {
|
|
2
|
+
/**
|
|
3
|
+
Change the output style.
|
|
4
|
+
|
|
5
|
+
When `false`, returns the value in a [recompilable source form](https://ss64.com/osx/osascript.html).
|
|
6
|
+
|
|
7
|
+
@default true
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
```
|
|
11
|
+
import {runAppleScript} from 'run-applescript';
|
|
12
|
+
|
|
13
|
+
const result = await runAppleScript('return "unicorn"', {humanReadableOutput: false});
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
16
|
+
//=> '"unicorn"'
|
|
17
|
+
```
|
|
18
|
+
*/
|
|
19
|
+
readonly humanReadableOutput?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
1
22
|
/**
|
|
2
23
|
Run AppleScript asynchronously.
|
|
3
24
|
|
|
@@ -6,15 +27,18 @@ Run AppleScript asynchronously.
|
|
|
6
27
|
|
|
7
28
|
@example
|
|
8
29
|
```
|
|
9
|
-
import {
|
|
30
|
+
import {runAppleScript} from 'run-applescript';
|
|
10
31
|
|
|
11
|
-
const result = await
|
|
32
|
+
const result = await runAppleScript('return "unicorn"');
|
|
12
33
|
|
|
13
34
|
console.log(result);
|
|
14
35
|
//=> 'unicorn'
|
|
15
36
|
```
|
|
16
37
|
*/
|
|
17
|
-
export function
|
|
38
|
+
export function runAppleScript(
|
|
39
|
+
script: string,
|
|
40
|
+
options?: Options
|
|
41
|
+
): Promise<string>;
|
|
18
42
|
|
|
19
43
|
/**
|
|
20
44
|
Run AppleScript synchronously.
|
|
@@ -32,4 +56,4 @@ console.log(result);
|
|
|
32
56
|
//=> 'unicorn'
|
|
33
57
|
```
|
|
34
58
|
*/
|
|
35
|
-
export function runAppleScriptSync(script: string): string;
|
|
59
|
+
export function runAppleScriptSync(script: string, options?: Options): string;
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import {promisify} from 'node:util';
|
|
3
|
+
import {execFile, execFileSync} from 'node:child_process';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
const execFileAsync = promisify(execFile);
|
|
6
|
+
|
|
7
|
+
export async function runAppleScript(script, {humanReadableOutput = true} = {}) {
|
|
4
8
|
if (process.platform !== 'darwin') {
|
|
5
9
|
throw new Error('macOS only');
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
const
|
|
9
|
-
|
|
12
|
+
const outputArguments = humanReadableOutput ? [] : ['-ss'];
|
|
13
|
+
|
|
14
|
+
const {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments]);
|
|
15
|
+
return stdout.trim();
|
|
10
16
|
}
|
|
11
17
|
|
|
12
|
-
export function runAppleScriptSync(script) {
|
|
18
|
+
export function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {
|
|
13
19
|
if (process.platform !== 'darwin') {
|
|
14
20
|
throw new Error('macOS only');
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
const
|
|
18
|
-
|
|
23
|
+
const outputArguments = humanReadableOutput ? [] : ['-ss'];
|
|
24
|
+
|
|
25
|
+
const stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {
|
|
26
|
+
encoding: 'utf8',
|
|
27
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
28
|
+
timeout: 500,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return stdout.trim();
|
|
19
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run-applescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Run AppleScript and get the result",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/run-applescript",
|
|
@@ -11,9 +11,13 @@
|
|
|
11
11
|
"url": "https://sindresorhus.com"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
|
-
"exports":
|
|
14
|
+
"exports": {
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"default": "./index.js"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
15
19
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
20
|
+
"node": ">=18"
|
|
17
21
|
},
|
|
18
22
|
"scripts": {
|
|
19
23
|
"test": "xo && ava && tsd"
|
|
@@ -30,12 +34,9 @@
|
|
|
30
34
|
"run",
|
|
31
35
|
"execute"
|
|
32
36
|
],
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"execa": "^5.0.0"
|
|
35
|
-
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"ava": "^
|
|
38
|
-
"tsd": "^0.
|
|
39
|
-
"xo": "^0.
|
|
38
|
+
"ava": "^6.0.1",
|
|
39
|
+
"tsd": "^0.30.0",
|
|
40
|
+
"xo": "^0.56.0"
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
7
|
+
```sh
|
|
8
|
+
npm install run-applescript
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
import {
|
|
14
|
+
import {runAppleScript} from 'run-applescript';
|
|
15
15
|
|
|
16
|
-
const result = await
|
|
16
|
+
const result = await runAppleScript('return "unicorn"');
|
|
17
17
|
|
|
18
18
|
console.log(result);
|
|
19
19
|
//=> 'unicorn'
|
|
@@ -21,14 +21,52 @@ console.log(result);
|
|
|
21
21
|
|
|
22
22
|
## API
|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### runAppleScript(script, options?)
|
|
25
25
|
|
|
26
26
|
Returns a `Promise<string>` with the script result.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
#### script
|
|
29
|
+
|
|
30
|
+
Type: `string`
|
|
31
|
+
|
|
32
|
+
The script to run.
|
|
33
|
+
|
|
34
|
+
#### options
|
|
35
|
+
|
|
36
|
+
Type: `object`
|
|
37
|
+
|
|
38
|
+
##### humanReadableOutput
|
|
39
|
+
|
|
40
|
+
Type: `boolean`\
|
|
41
|
+
Default: `true`
|
|
42
|
+
|
|
43
|
+
Change the output style.
|
|
44
|
+
|
|
45
|
+
When `false`, returns the value in a [recompilable source form](https://ss64.com/osx/osascript.html).
|
|
46
|
+
|
|
47
|
+
### runAppleScriptSync(script, options?)
|
|
29
48
|
|
|
30
49
|
Returns a `string` with the script result.
|
|
31
50
|
|
|
51
|
+
#### script
|
|
52
|
+
|
|
53
|
+
Type: `string`
|
|
54
|
+
|
|
55
|
+
The script to run.
|
|
56
|
+
|
|
57
|
+
#### options
|
|
58
|
+
|
|
59
|
+
Type: `object`
|
|
60
|
+
|
|
61
|
+
##### humanReadableOutput
|
|
62
|
+
|
|
63
|
+
Type: `boolean`\
|
|
64
|
+
Default: `true`
|
|
65
|
+
|
|
66
|
+
Change the output style.
|
|
67
|
+
|
|
68
|
+
When `false`, returns the value in a [recompilable source form](https://ss64.com/osx/osascript.html).
|
|
69
|
+
|
|
32
70
|
## Related
|
|
33
71
|
|
|
34
72
|
- [run-jxa](https://github.com/sindresorhus/run-jxa) - Run JXA code and get the result
|
package/package.json
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"caporal": "^1.4.0",
|
|
110
110
|
"constructs": "^10",
|
|
111
111
|
"json-format-highlight": "^1.0.4",
|
|
112
|
-
"open": "
|
|
112
|
+
"open": "10.1.0",
|
|
113
113
|
"serialize-error": "^11.0.3",
|
|
114
114
|
"ws": "^8.17.1"
|
|
115
115
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"require": "./lib/index.js"
|
|
137
137
|
},
|
|
138
138
|
"license": "MPL-2.0",
|
|
139
|
-
"version": "2.2.
|
|
139
|
+
"version": "2.2.6",
|
|
140
140
|
"types": "lib/index.d.ts",
|
|
141
141
|
"stability": "stable",
|
|
142
142
|
"jsii": {
|