node-simctl 8.2.9 → 9.1.0
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/CHANGELOG.md +16 -0
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +13 -50
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/index.d.ts +2 -2
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +3 -6
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +3 -9
- package/build/lib/logger.js.map +1 -1
- package/build/lib/simctl.d.ts +26 -26
- package/build/lib/simctl.d.ts.map +1 -1
- package/build/lib/simctl.js +44 -88
- package/build/lib/simctl.js.map +1 -1
- package/build/lib/subcommands/addmedia.d.ts +1 -1
- package/build/lib/subcommands/addmedia.d.ts.map +1 -1
- package/build/lib/subcommands/addmedia.js +1 -4
- package/build/lib/subcommands/addmedia.js.map +1 -1
- package/build/lib/subcommands/appinfo.d.ts +2 -2
- package/build/lib/subcommands/appinfo.d.ts.map +1 -1
- package/build/lib/subcommands/appinfo.js +7 -11
- package/build/lib/subcommands/appinfo.js.map +1 -1
- package/build/lib/subcommands/boot.d.ts +1 -1
- package/build/lib/subcommands/boot.d.ts.map +1 -1
- package/build/lib/subcommands/boot.js +3 -6
- package/build/lib/subcommands/boot.js.map +1 -1
- package/build/lib/subcommands/bootstatus.d.ts +2 -2
- package/build/lib/subcommands/bootstatus.d.ts.map +1 -1
- package/build/lib/subcommands/bootstatus.js +6 -9
- package/build/lib/subcommands/bootstatus.js.map +1 -1
- package/build/lib/subcommands/create.d.ts +2 -2
- package/build/lib/subcommands/create.d.ts.map +1 -1
- package/build/lib/subcommands/create.js +9 -12
- package/build/lib/subcommands/create.js.map +1 -1
- package/build/lib/subcommands/delete.d.ts +1 -1
- package/build/lib/subcommands/delete.d.ts.map +1 -1
- package/build/lib/subcommands/delete.js +1 -4
- package/build/lib/subcommands/delete.js.map +1 -1
- package/build/lib/subcommands/erase.d.ts +1 -1
- package/build/lib/subcommands/erase.d.ts.map +1 -1
- package/build/lib/subcommands/erase.js +3 -6
- package/build/lib/subcommands/erase.js.map +1 -1
- package/build/lib/subcommands/get_app_container.d.ts +1 -1
- package/build/lib/subcommands/get_app_container.d.ts.map +1 -1
- package/build/lib/subcommands/get_app_container.js +1 -4
- package/build/lib/subcommands/get_app_container.js.map +1 -1
- package/build/lib/subcommands/getenv.d.ts +1 -1
- package/build/lib/subcommands/getenv.d.ts.map +1 -1
- package/build/lib/subcommands/getenv.js +1 -4
- package/build/lib/subcommands/getenv.js.map +1 -1
- package/build/lib/subcommands/install.d.ts +1 -1
- package/build/lib/subcommands/install.d.ts.map +1 -1
- package/build/lib/subcommands/install.js +1 -4
- package/build/lib/subcommands/install.js.map +1 -1
- package/build/lib/subcommands/io.d.ts +1 -1
- package/build/lib/subcommands/io.d.ts.map +1 -1
- package/build/lib/subcommands/io.js +9 -15
- package/build/lib/subcommands/io.js.map +1 -1
- package/build/lib/subcommands/keychain.d.ts +2 -2
- package/build/lib/subcommands/keychain.d.ts.map +1 -1
- package/build/lib/subcommands/keychain.js +12 -20
- package/build/lib/subcommands/keychain.js.map +1 -1
- package/build/lib/subcommands/launch.d.ts +1 -1
- package/build/lib/subcommands/launch.d.ts.map +1 -1
- package/build/lib/subcommands/launch.js +3 -6
- package/build/lib/subcommands/launch.js.map +1 -1
- package/build/lib/subcommands/list.d.ts +2 -2
- package/build/lib/subcommands/list.d.ts.map +1 -1
- package/build/lib/subcommands/list.js +12 -20
- package/build/lib/subcommands/list.js.map +1 -1
- package/build/lib/subcommands/location.d.ts +1 -1
- package/build/lib/subcommands/location.d.ts.map +1 -1
- package/build/lib/subcommands/location.js +2 -6
- package/build/lib/subcommands/location.js.map +1 -1
- package/build/lib/subcommands/openurl.d.ts +1 -1
- package/build/lib/subcommands/openurl.d.ts.map +1 -1
- package/build/lib/subcommands/openurl.js +1 -4
- package/build/lib/subcommands/openurl.js.map +1 -1
- package/build/lib/subcommands/pbcopy.d.ts +1 -1
- package/build/lib/subcommands/pbcopy.d.ts.map +1 -1
- package/build/lib/subcommands/pbcopy.js +1 -4
- package/build/lib/subcommands/pbcopy.js.map +1 -1
- package/build/lib/subcommands/pbpaste.d.ts +1 -1
- package/build/lib/subcommands/pbpaste.d.ts.map +1 -1
- package/build/lib/subcommands/pbpaste.js +1 -4
- package/build/lib/subcommands/pbpaste.js.map +1 -1
- package/build/lib/subcommands/privacy.d.ts +1 -1
- package/build/lib/subcommands/privacy.d.ts.map +1 -1
- package/build/lib/subcommands/privacy.js +3 -8
- package/build/lib/subcommands/privacy.js.map +1 -1
- package/build/lib/subcommands/push.d.ts +1 -1
- package/build/lib/subcommands/push.d.ts.map +1 -1
- package/build/lib/subcommands/push.js +9 -15
- package/build/lib/subcommands/push.js.map +1 -1
- package/build/lib/subcommands/shutdown.d.ts +1 -1
- package/build/lib/subcommands/shutdown.d.ts.map +1 -1
- package/build/lib/subcommands/shutdown.js +3 -6
- package/build/lib/subcommands/shutdown.js.map +1 -1
- package/build/lib/subcommands/spawn.d.ts +1 -1
- package/build/lib/subcommands/spawn.d.ts.map +1 -1
- package/build/lib/subcommands/spawn.js +2 -6
- package/build/lib/subcommands/spawn.js.map +1 -1
- package/build/lib/subcommands/terminate.d.ts +1 -1
- package/build/lib/subcommands/terminate.d.ts.map +1 -1
- package/build/lib/subcommands/terminate.js +1 -4
- package/build/lib/subcommands/terminate.js.map +1 -1
- package/build/lib/subcommands/ui.d.ts +1 -1
- package/build/lib/subcommands/ui.d.ts.map +1 -1
- package/build/lib/subcommands/ui.js +6 -14
- package/build/lib/subcommands/ui.js.map +1 -1
- package/build/lib/subcommands/uninstall.d.ts +1 -1
- package/build/lib/subcommands/uninstall.d.ts.map +1 -1
- package/build/lib/subcommands/uninstall.js +1 -4
- package/build/lib/subcommands/uninstall.js.map +1 -1
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/types.js +1 -2
- package/lib/helpers.ts +5 -5
- package/lib/index.ts +2 -2
- package/lib/logger.ts +1 -1
- package/lib/simctl.ts +38 -47
- package/lib/subcommands/addmedia.ts +3 -5
- package/lib/subcommands/appinfo.ts +7 -13
- package/lib/subcommands/boot.ts +2 -2
- package/lib/subcommands/bootstatus.ts +6 -15
- package/lib/subcommands/create.ts +6 -7
- package/lib/subcommands/delete.ts +1 -1
- package/lib/subcommands/erase.ts +2 -1
- package/lib/subcommands/get_app_container.ts +1 -1
- package/lib/subcommands/getenv.ts +1 -1
- package/lib/subcommands/install.ts +1 -1
- package/lib/subcommands/io.ts +6 -4
- package/lib/subcommands/keychain.ts +8 -14
- package/lib/subcommands/launch.ts +3 -6
- package/lib/subcommands/list.ts +6 -13
- package/lib/subcommands/location.ts +2 -6
- package/lib/subcommands/openurl.ts +2 -1
- package/lib/subcommands/pbcopy.ts +3 -6
- package/lib/subcommands/pbpaste.ts +2 -5
- package/lib/subcommands/privacy.ts +2 -6
- package/lib/subcommands/push.ts +6 -4
- package/lib/subcommands/shutdown.ts +2 -2
- package/lib/subcommands/spawn.ts +2 -1
- package/lib/subcommands/terminate.ts +1 -1
- package/lib/subcommands/ui.ts +1 -1
- package/lib/subcommands/uninstall.ts +1 -1
- package/lib/types.ts +1 -3
- package/package.json +37 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Simctl} from '../simctl';
|
|
1
|
+
import type {Simctl} from '../simctl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Get the content of Simulator pasteboard.
|
|
@@ -12,10 +12,7 @@ import type {Simctl} from '../simctl';
|
|
|
12
12
|
* returns non-zero return code.
|
|
13
13
|
* @throws {Error} If the `udid` instance property is unset
|
|
14
14
|
*/
|
|
15
|
-
export async function getPasteboard(
|
|
16
|
-
this: Simctl,
|
|
17
|
-
encoding: BufferEncoding = 'utf8',
|
|
18
|
-
): Promise<string> {
|
|
15
|
+
export async function getPasteboard(this: Simctl, encoding: BufferEncoding = 'utf8'): Promise<string> {
|
|
19
16
|
const {stdout} = await this.exec('pbpaste', {
|
|
20
17
|
args: [this.requireUdid('pbpaste')],
|
|
21
18
|
encoding,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Simctl} from '../simctl';
|
|
1
|
+
import type {Simctl} from '../simctl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Grants the given permission on the app with the given bundle identifier
|
|
@@ -42,11 +42,7 @@ export async function grantPermission(this: Simctl, bundleId: string, perm: stri
|
|
|
42
42
|
* or there was an error while revoking the permission
|
|
43
43
|
* @throws {Error} If the `udid` instance property is unset
|
|
44
44
|
*/
|
|
45
|
-
export async function revokePermission(
|
|
46
|
-
this: Simctl,
|
|
47
|
-
bundleId: string,
|
|
48
|
-
perm: string,
|
|
49
|
-
): Promise<void> {
|
|
45
|
+
export async function revokePermission(this: Simctl, bundleId: string, perm: string): Promise<void> {
|
|
50
46
|
await this.exec('privacy', {
|
|
51
47
|
args: [this.requireUdid('privacy revoke'), 'revoke', perm, bundleId],
|
|
52
48
|
});
|
package/lib/subcommands/push.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {rimraf} from 'rimraf';
|
|
2
1
|
import {randomUUID} from 'node:crypto';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import os from 'node:os';
|
|
5
2
|
import fs from 'node:fs/promises';
|
|
6
|
-
import
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
|
|
6
|
+
import {rimraf} from 'rimraf';
|
|
7
|
+
|
|
8
|
+
import type {Simctl} from '../simctl.js';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Send a simulated push notification
|
package/lib/subcommands/spawn.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {Simctl} from '../simctl';
|
|
2
1
|
import type {TeenProcessExecResult, SubProcess} from 'teen_process';
|
|
3
2
|
|
|
3
|
+
import type {Simctl} from '../simctl.js';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Spawn the particular process on Simulator.
|
|
6
7
|
* It is required that Simulator is in _booted_ state.
|
package/lib/subcommands/ui.ts
CHANGED
package/lib/types.ts
CHANGED
|
@@ -139,9 +139,7 @@ export interface SimCreationOpts {
|
|
|
139
139
|
/**
|
|
140
140
|
* Result type for exec method - either SubProcess for async or TeenProcessExecResult for sync
|
|
141
141
|
*/
|
|
142
|
-
export type ExecResult<T extends ExecOpts> = T extends AsyncExecOpts
|
|
143
|
-
? SubProcess
|
|
144
|
-
: TeenProcessExecResult<string>;
|
|
142
|
+
export type ExecResult<T extends ExecOpts> = T extends AsyncExecOpts ? SubProcess : TeenProcessExecResult<string>;
|
|
145
143
|
|
|
146
144
|
/**
|
|
147
145
|
* Boot monitor options
|
package/package.json
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-simctl",
|
|
3
|
+
"version": "9.1.0",
|
|
3
4
|
"description": "Wrapper around Apple's simctl binary",
|
|
4
|
-
"
|
|
5
|
+
"keywords": [
|
|
5
6
|
"apple",
|
|
6
7
|
"ios",
|
|
7
8
|
"simctl"
|
|
8
9
|
],
|
|
9
|
-
"
|
|
10
|
-
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/appium/node-simctl/issues"
|
|
12
|
+
},
|
|
11
13
|
"license": "Apache-2.0",
|
|
14
|
+
"author": "Appium Contributors",
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
|
14
17
|
"url": "https://github.com/appium/node-simctl.git"
|
|
15
18
|
},
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/appium/node-simctl/issues"
|
|
18
|
-
},
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
21
|
-
"npm": ">=10"
|
|
22
|
-
},
|
|
23
|
-
"main": "./build/lib/index.js",
|
|
24
19
|
"bin": {},
|
|
25
20
|
"directories": {
|
|
26
21
|
"lib": "./lib"
|
|
@@ -30,52 +25,55 @@
|
|
|
30
25
|
"build/lib",
|
|
31
26
|
"CHANGELOG.md"
|
|
32
27
|
],
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "./build/lib/index.js",
|
|
30
|
+
"types": "./build/lib/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./build/lib/index.d.ts",
|
|
34
|
+
"import": "./build/lib/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
40
37
|
},
|
|
41
38
|
"scripts": {
|
|
42
39
|
"build": "tsc -b",
|
|
43
40
|
"clean": "npm run build -- --clean",
|
|
44
41
|
"rebuild": "npm run clean; npm run build",
|
|
45
42
|
"dev": "npm run build -- --watch",
|
|
46
|
-
"lint": "
|
|
47
|
-
"lint:fix": "
|
|
48
|
-
"format": "
|
|
49
|
-
"format:check": "
|
|
43
|
+
"lint": "oxlint -c oxlint.config.mjs .",
|
|
44
|
+
"lint:fix": "oxlint -c oxlint.config.mjs --fix .",
|
|
45
|
+
"format": "oxfmt -c oxfmt.config.mjs .",
|
|
46
|
+
"format:check": "oxfmt -c oxfmt.config.mjs --check .",
|
|
50
47
|
"prepare": "npm run build",
|
|
51
|
-
"test": "node --test --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
|
|
52
|
-
"e2e-test": "node --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/e2e/**/*.spec.js\""
|
|
48
|
+
"test": "node --enable-source-maps --test --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
|
|
49
|
+
"e2e-test": "node --enable-source-maps --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/e2e/**/*.spec.js\""
|
|
53
50
|
},
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@appium/logger": "^2.0.0-rc.1",
|
|
53
|
+
"asyncbox": "^6.0.1",
|
|
54
|
+
"rimraf": "^6.0.1",
|
|
55
|
+
"semver": "^7.0.0",
|
|
56
|
+
"teen_process": "^4.0.4",
|
|
57
|
+
"which": "^6.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@appium/
|
|
61
|
-
"@appium/
|
|
60
|
+
"@appium/oxc-config": "^1.1.0",
|
|
61
|
+
"@appium/semantic-release-config": "^1.1.0",
|
|
62
|
+
"@appium/tsconfig": "^1.2.0",
|
|
62
63
|
"@appium/types": "^1.0.0-rc.1",
|
|
63
|
-
"@semantic-release/changelog": "^6.0.1",
|
|
64
|
-
"@semantic-release/git": "^10.0.1",
|
|
65
64
|
"@types/chai": "^5.2.3",
|
|
66
65
|
"@types/chai-as-promised": "^8.0.2",
|
|
67
66
|
"@types/node": "^26.0.0",
|
|
68
67
|
"@types/semver": "^7.7.1",
|
|
69
68
|
"@types/sinon": "^22.0.0",
|
|
70
69
|
"@types/which": "^3.0.4",
|
|
71
|
-
"appium-xcode": "^
|
|
70
|
+
"appium-xcode": "^7.0.0",
|
|
72
71
|
"chai": "^6.0.0",
|
|
73
72
|
"chai-as-promised": "^8.0.0",
|
|
74
|
-
"
|
|
75
|
-
"prettier": "^3.0.0",
|
|
76
|
-
"semantic-release": "^25.0.2",
|
|
77
|
-
"sinon": "^22.0.0",
|
|
78
|
-
"typescript": "^6.0.2"
|
|
73
|
+
"sinon": "^22.0.0"
|
|
79
74
|
},
|
|
80
|
-
"
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
77
|
+
"npm": ">=10"
|
|
78
|
+
}
|
|
81
79
|
}
|