node-simctl 8.0.8 → 8.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 +12 -0
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/lib/helpers.d.ts +17 -9
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +50 -4
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/logger.d.ts +2 -3
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +3 -5
- package/build/lib/logger.js.map +1 -1
- package/build/lib/simctl.d.ts +82 -188
- package/build/lib/simctl.d.ts.map +1 -1
- package/build/lib/simctl.js +98 -150
- package/build/lib/simctl.js.map +1 -1
- package/build/lib/subcommands/addmedia.d.ts +14 -16
- package/build/lib/subcommands/addmedia.d.ts.map +1 -1
- package/build/lib/subcommands/addmedia.js +5 -7
- package/build/lib/subcommands/addmedia.js.map +1 -1
- package/build/lib/subcommands/appinfo.d.ts +13 -45
- package/build/lib/subcommands/appinfo.d.ts.map +1 -1
- package/build/lib/subcommands/appinfo.js +31 -42
- package/build/lib/subcommands/appinfo.js.map +1 -1
- package/build/lib/subcommands/boot.d.ts +9 -12
- package/build/lib/subcommands/boot.d.ts.map +1 -1
- package/build/lib/subcommands/boot.js +5 -40
- package/build/lib/subcommands/boot.js.map +1 -1
- package/build/lib/subcommands/bootstatus.d.ts +16 -56
- package/build/lib/subcommands/bootstatus.d.ts.map +1 -1
- package/build/lib/subcommands/bootstatus.js +8 -22
- package/build/lib/subcommands/bootstatus.js.map +1 -1
- package/build/lib/subcommands/create.d.ts +15 -34
- package/build/lib/subcommands/create.d.ts.map +1 -1
- package/build/lib/subcommands/create.js +23 -66
- package/build/lib/subcommands/create.js.map +1 -1
- package/build/lib/subcommands/delete.d.ts +9 -12
- package/build/lib/subcommands/delete.d.ts.map +1 -1
- package/build/lib/subcommands/delete.js +3 -5
- package/build/lib/subcommands/delete.js.map +1 -1
- package/build/lib/subcommands/erase.d.ts +12 -15
- package/build/lib/subcommands/erase.d.ts.map +1 -1
- package/build/lib/subcommands/erase.js +4 -6
- package/build/lib/subcommands/erase.js.map +1 -1
- package/build/lib/subcommands/get_app_container.d.ts +19 -22
- package/build/lib/subcommands/get_app_container.d.ts.map +1 -1
- package/build/lib/subcommands/get_app_container.js +6 -8
- package/build/lib/subcommands/get_app_container.js.map +1 -1
- package/build/lib/subcommands/getenv.d.ts +11 -14
- package/build/lib/subcommands/getenv.d.ts.map +1 -1
- package/build/lib/subcommands/getenv.js +5 -7
- package/build/lib/subcommands/getenv.js.map +1 -1
- package/build/lib/subcommands/install.d.ts +12 -15
- package/build/lib/subcommands/install.d.ts.map +1 -1
- package/build/lib/subcommands/install.js +4 -6
- package/build/lib/subcommands/install.js.map +1 -1
- package/build/lib/subcommands/io.d.ts +12 -15
- package/build/lib/subcommands/io.d.ts.map +1 -1
- package/build/lib/subcommands/io.js +4 -6
- package/build/lib/subcommands/io.js.map +1 -1
- package/build/lib/subcommands/keychain.d.ts +37 -55
- package/build/lib/subcommands/keychain.d.ts.map +1 -1
- package/build/lib/subcommands/keychain.js +16 -25
- package/build/lib/subcommands/keychain.js.map +1 -1
- package/build/lib/subcommands/launch.d.ts +16 -19
- package/build/lib/subcommands/launch.d.ts.map +1 -1
- package/build/lib/subcommands/launch.js +9 -11
- package/build/lib/subcommands/launch.js.map +1 -1
- package/build/lib/subcommands/list.d.ts +94 -125
- package/build/lib/subcommands/list.d.ts.map +1 -1
- package/build/lib/subcommands/list.js +34 -92
- package/build/lib/subcommands/list.js.map +1 -1
- package/build/lib/subcommands/location.d.ts +18 -22
- package/build/lib/subcommands/location.d.ts.map +1 -1
- package/build/lib/subcommands/location.js +11 -13
- package/build/lib/subcommands/location.js.map +1 -1
- package/build/lib/subcommands/openurl.d.ts +15 -17
- package/build/lib/subcommands/openurl.d.ts.map +1 -1
- package/build/lib/subcommands/openurl.js +5 -7
- package/build/lib/subcommands/openurl.js.map +1 -1
- package/build/lib/subcommands/pbcopy.d.ts +14 -17
- package/build/lib/subcommands/pbcopy.d.ts.map +1 -1
- package/build/lib/subcommands/pbcopy.js +5 -7
- package/build/lib/subcommands/pbcopy.js.map +1 -1
- package/build/lib/subcommands/pbpaste.d.ts +14 -17
- package/build/lib/subcommands/pbpaste.d.ts.map +1 -1
- package/build/lib/subcommands/pbpaste.js +5 -7
- package/build/lib/subcommands/pbpaste.js.map +1 -1
- package/build/lib/subcommands/privacy.d.ts +52 -57
- package/build/lib/subcommands/privacy.d.ts.map +1 -1
- package/build/lib/subcommands/privacy.js +15 -17
- package/build/lib/subcommands/privacy.js.map +1 -1
- package/build/lib/subcommands/push.d.ts +22 -25
- package/build/lib/subcommands/push.d.ts.map +1 -1
- package/build/lib/subcommands/push.js +5 -7
- package/build/lib/subcommands/push.js.map +1 -1
- package/build/lib/subcommands/shutdown.d.ts +9 -12
- package/build/lib/subcommands/shutdown.d.ts.map +1 -1
- package/build/lib/subcommands/shutdown.js +5 -40
- package/build/lib/subcommands/shutdown.js.map +1 -1
- package/build/lib/subcommands/spawn.d.ts +24 -27
- package/build/lib/subcommands/spawn.d.ts.map +1 -1
- package/build/lib/subcommands/spawn.js +12 -14
- package/build/lib/subcommands/spawn.js.map +1 -1
- package/build/lib/subcommands/terminate.d.ts +12 -15
- package/build/lib/subcommands/terminate.d.ts.map +1 -1
- package/build/lib/subcommands/terminate.js +4 -6
- package/build/lib/subcommands/terminate.js.map +1 -1
- package/build/lib/subcommands/ui.d.ts +97 -105
- package/build/lib/subcommands/ui.d.ts.map +1 -1
- package/build/lib/subcommands/ui.js +24 -26
- package/build/lib/subcommands/ui.js.map +1 -1
- package/build/lib/subcommands/uninstall.d.ts +13 -16
- package/build/lib/subcommands/uninstall.d.ts.map +1 -1
- package/build/lib/subcommands/uninstall.js +4 -6
- package/build/lib/subcommands/uninstall.js.map +1 -1
- package/build/lib/types.d.ts +231 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/index.ts +13 -0
- package/lib/helpers.ts +81 -0
- package/lib/{logger.js → logger.ts} +2 -5
- package/lib/simctl.ts +221 -0
- package/lib/subcommands/{addmedia.js → addmedia.ts} +6 -8
- package/lib/subcommands/appinfo.ts +39 -0
- package/lib/subcommands/{boot.js → boot.ts} +5 -10
- package/lib/subcommands/bootstatus.ts +108 -0
- package/lib/subcommands/{create.js → create.ts} +29 -35
- package/lib/subcommands/{delete.js → delete.ts} +3 -5
- package/lib/subcommands/{erase.js → erase.ts} +4 -7
- package/lib/subcommands/{get_app_container.js → get_app_container.ts} +10 -8
- package/lib/subcommands/{getenv.js → getenv.ts} +5 -7
- package/lib/subcommands/{install.js → install.ts} +4 -6
- package/lib/subcommands/{io.js → io.ts} +4 -7
- package/lib/subcommands/{keychain.js → keychain.ts} +30 -32
- package/lib/subcommands/{launch.js → launch.ts} +9 -12
- package/lib/subcommands/{list.js → list.ts} +67 -60
- package/lib/subcommands/{location.js → location.ts} +15 -14
- package/lib/subcommands/{openurl.js → openurl.ts} +6 -7
- package/lib/subcommands/{pbcopy.js → pbcopy.ts} +11 -8
- package/lib/subcommands/{pbpaste.js → pbpaste.ts} +5 -7
- package/lib/subcommands/{privacy.js → privacy.ts} +13 -17
- package/lib/subcommands/{push.js → push.ts} +5 -8
- package/lib/subcommands/{shutdown.js → shutdown.ts} +5 -8
- package/lib/subcommands/{spawn.js → spawn.ts} +21 -17
- package/lib/subcommands/{terminate.js → terminate.ts} +4 -6
- package/lib/subcommands/{ui.js → ui.ts} +19 -28
- package/lib/subcommands/{uninstall.js → uninstall.ts} +4 -6
- package/lib/types.ts +243 -0
- package/package.json +3 -3
- package/index.js +0 -4
- package/lib/helpers.js +0 -37
- package/lib/simctl.js +0 -299
- package/lib/subcommands/appinfo.js +0 -51
- package/lib/subcommands/bootstatus.js +0 -119
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
function getAppContainer(this: import("../simctl").default, bundleId: string, containerType?: string | null): Promise<string>;
|
|
22
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
/**
|
|
3
|
+
* Get the full path to the particular application container
|
|
4
|
+
* on the local file system. Note, that this subcommand throws
|
|
5
|
+
* an error if bundle id of a system application is provided,
|
|
6
|
+
* like 'com.apple.springboard'.
|
|
7
|
+
* It is required that Simulator is in _booted_ state.
|
|
8
|
+
*
|
|
9
|
+
* @param bundleId - Bundle identifier of an application.
|
|
10
|
+
* @param containerType - Which container type to return. Possible values
|
|
11
|
+
* are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
12
|
+
* The default value is 'app'.
|
|
13
|
+
* @return Full path to the given application container on the local
|
|
14
|
+
* file system.
|
|
15
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
16
|
+
* returns non-zero return code.
|
|
17
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
18
|
+
*/
|
|
19
|
+
export declare function getAppContainer(this: Simctl, bundleId: string, containerType?: string | null): Promise<string>;
|
|
23
20
|
//# sourceMappingURL=get_app_container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.
|
|
1
|
+
{"version":3,"file":"get_app_container.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAM,GAAG,IAAW,GAClC,OAAO,CAAC,MAAM,CAAC,CAOjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.getAppContainer = getAppContainer;
|
|
4
4
|
/**
|
|
5
5
|
* Get the full path to the particular application container
|
|
6
6
|
* on the local file system. Note, that this subcommand throws
|
|
@@ -8,24 +8,22 @@ const commands = {};
|
|
|
8
8
|
* like 'com.apple.springboard'.
|
|
9
9
|
* It is required that Simulator is in _booted_ state.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
12
|
-
* @param
|
|
13
|
-
* @param {string?} [containerType=null] - Which container type to return. Possible values
|
|
11
|
+
* @param bundleId - Bundle identifier of an application.
|
|
12
|
+
* @param containerType - Which container type to return. Possible values
|
|
14
13
|
* are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
15
14
|
* The default value is 'app'.
|
|
16
|
-
* @return
|
|
15
|
+
* @return Full path to the given application container on the local
|
|
17
16
|
* file system.
|
|
18
17
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
19
18
|
* returns non-zero return code.
|
|
20
19
|
* @throws {Error} If the `udid` instance property is unset
|
|
21
20
|
*/
|
|
22
|
-
|
|
21
|
+
async function getAppContainer(bundleId, containerType = null) {
|
|
23
22
|
const args = [this.requireUdid('get_app_container'), bundleId];
|
|
24
23
|
if (containerType) {
|
|
25
24
|
args.push(containerType);
|
|
26
25
|
}
|
|
27
26
|
const { stdout } = await this.exec('get_app_container', { args });
|
|
28
27
|
return (stdout || '').trim();
|
|
29
|
-
}
|
|
30
|
-
exports.default = commands;
|
|
28
|
+
}
|
|
31
29
|
//# sourceMappingURL=get_app_container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_app_container.js","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.
|
|
1
|
+
{"version":3,"file":"get_app_container.js","sourceRoot":"","sources":["../../../lib/subcommands/get_app_container.ts"],"names":[],"mappings":";;AAmBA,0CAWC;AA5BD;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,UAAU,eAAe,CAEnC,QAAgB,EAChB,gBAA+B,IAAI;IAEnC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC/D,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAC,IAAI,EAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
function getEnv(this: import("../simctl").default, varName: string): Promise<string | null>;
|
|
14
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the value of a Simulator environment variable
|
|
4
|
+
*
|
|
5
|
+
* @param varName - The name of the variable to be retrieved
|
|
6
|
+
* @returns The value of the variable or null if the given variable
|
|
7
|
+
* is not present in the Simulator environment
|
|
8
|
+
* @throws {Error} If there was an error while running the command
|
|
9
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
10
|
+
*/
|
|
11
|
+
export declare function getEnv(this: Simctl, varName: string): Promise<string | null>;
|
|
15
12
|
//# sourceMappingURL=getenv.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getenv.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/getenv.
|
|
1
|
+
{"version":3,"file":"getenv.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/getenv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMnF"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.getEnv = getEnv;
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves the value of a Simulator environment variable
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
9
|
-
* @returns {Promise<string|null>} The value of the variable or null if the given variable
|
|
7
|
+
* @param varName - The name of the variable to be retrieved
|
|
8
|
+
* @returns The value of the variable or null if the given variable
|
|
10
9
|
* is not present in the Simulator environment
|
|
11
10
|
* @throws {Error} If there was an error while running the command
|
|
12
11
|
* @throws {Error} If the `udid` instance property is unset
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
async function getEnv(varName) {
|
|
15
14
|
const { stdout, stderr } = await this.exec('getenv', {
|
|
16
15
|
args: [this.requireUdid('getenv'), varName],
|
|
17
16
|
logErrors: false,
|
|
18
17
|
});
|
|
19
18
|
return stderr ? null : stdout;
|
|
20
|
-
}
|
|
21
|
-
exports.default = commands;
|
|
19
|
+
}
|
|
22
20
|
//# sourceMappingURL=getenv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getenv.js","sourceRoot":"","sources":["../../../lib/subcommands/getenv.
|
|
1
|
+
{"version":3,"file":"getenv.js","sourceRoot":"","sources":["../../../lib/subcommands/getenv.ts"],"names":[],"mappings":";;AAWA,wBAMC;AAfD;;;;;;;;GAQG;AACI,KAAK,UAAU,MAAM,CAAgB,OAAe;IACzD,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QACjD,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAC3C,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AAChC,CAAC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
function installApp(this: import("../simctl").default, appPath: string): Promise<void>;
|
|
15
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
/**
|
|
3
|
+
* Install the particular application package on Simulator.
|
|
4
|
+
* It is required that Simulator is in _booted_ state.
|
|
5
|
+
*
|
|
6
|
+
* @param appPath - Full path to .app package, which is
|
|
7
|
+
* going to be installed.
|
|
8
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
9
|
+
* returns non-zero return code.
|
|
10
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
11
|
+
*/
|
|
12
|
+
export declare function installApp(this: Simctl, appPath: string): Promise<void>;
|
|
16
13
|
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/install.
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9E"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.installApp = installApp;
|
|
4
4
|
/**
|
|
5
5
|
* Install the particular application package on Simulator.
|
|
6
6
|
* It is required that Simulator is in _booted_ state.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
9
|
-
* @param {string} appPath - Full path to .app package, which is
|
|
8
|
+
* @param appPath - Full path to .app package, which is
|
|
10
9
|
* going to be installed.
|
|
11
10
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
12
11
|
* returns non-zero return code.
|
|
13
12
|
* @throws {Error} If the `udid` instance property is unset
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
async function installApp(appPath) {
|
|
16
15
|
await this.exec('install', {
|
|
17
16
|
args: [this.requireUdid('install'), appPath],
|
|
18
17
|
});
|
|
19
|
-
}
|
|
20
|
-
exports.default = commands;
|
|
18
|
+
}
|
|
21
19
|
//# sourceMappingURL=install.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../lib/subcommands/install.
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../lib/subcommands/install.ts"],"names":[],"mappings":";;AAYA,gCAIC;AAdD;;;;;;;;;GASG;AACI,KAAK,UAAU,UAAU,CAAgB,OAAe;IAC7D,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACzB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
function getScreenshot(this: import("../simctl").default): Promise<string>;
|
|
15
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
/**
|
|
3
|
+
* Gets base64 screenshot for device
|
|
4
|
+
* It is required that Simulator is in _booted_ state.
|
|
5
|
+
*
|
|
6
|
+
* @since Xcode SDK 8.1
|
|
7
|
+
* @return Base64-encoded Simulator screenshot.
|
|
8
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
9
|
+
* returns non-zero return code.
|
|
10
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
11
|
+
*/
|
|
12
|
+
export declare function getScreenshot(this: Simctl): Promise<string>;
|
|
16
13
|
//# sourceMappingURL=io.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/io.
|
|
1
|
+
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/io.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAWlE"}
|
|
@@ -3,24 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getScreenshot = getScreenshot;
|
|
6
7
|
const rimraf_1 = require("rimraf");
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const os_1 = __importDefault(require("os"));
|
|
9
10
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
10
11
|
const helpers_1 = require("../helpers");
|
|
11
|
-
const commands = {};
|
|
12
12
|
/**
|
|
13
13
|
* Gets base64 screenshot for device
|
|
14
14
|
* It is required that Simulator is in _booted_ state.
|
|
15
15
|
*
|
|
16
|
-
* @this {import('../simctl').Simctl}
|
|
17
16
|
* @since Xcode SDK 8.1
|
|
18
|
-
* @return
|
|
17
|
+
* @return Base64-encoded Simulator screenshot.
|
|
19
18
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
20
19
|
* returns non-zero return code.
|
|
21
20
|
* @throws {Error} If the `udid` instance property is unset
|
|
22
21
|
*/
|
|
23
|
-
|
|
22
|
+
async function getScreenshot() {
|
|
24
23
|
const udid = this.requireUdid('io screenshot');
|
|
25
24
|
const pathToScreenshotPng = path_1.default.resolve(os_1.default.tmpdir(), `${await (0, helpers_1.uuidV4)()}.png`);
|
|
26
25
|
try {
|
|
@@ -32,6 +31,5 @@ commands.getScreenshot = async function getScreenshot() {
|
|
|
32
31
|
finally {
|
|
33
32
|
await (0, rimraf_1.rimraf)(pathToScreenshotPng);
|
|
34
33
|
}
|
|
35
|
-
}
|
|
36
|
-
exports.default = commands;
|
|
34
|
+
}
|
|
37
35
|
//# sourceMappingURL=io.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io.js","sourceRoot":"","sources":["../../../lib/subcommands/io.
|
|
1
|
+
{"version":3,"file":"io.js","sourceRoot":"","sources":["../../../lib/subcommands/io.ts"],"names":[],"mappings":";;;;;AAiBA,sCAWC;AA5BD,mCAAgC;AAChC,gDAAwB;AACxB,4CAAoB;AACpB,2DAA6B;AAC7B,wCAAoC;AAGpC;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAC/C,MAAM,mBAAmB,GAAG,cAAI,CAAC,OAAO,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,IAAA,gBAAM,GAAE,MAAM,CAAC,CAAC;IAC/E,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACpB,IAAI,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,mBAAmB,CAAC;SAChD,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,kBAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrE,CAAC;YAAS,CAAC;QACT,MAAM,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -1,56 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* options
|
|
39
|
-
* @param {CertOptions} [opts={}]
|
|
40
|
-
* @throws {Error} if the current SDK version does not support the command
|
|
41
|
-
* or there was an error while adding the certificate
|
|
42
|
-
* @throws {Error} If the `udid` instance property is unset
|
|
43
|
-
*/
|
|
44
|
-
function addCertificate(this: import("../simctl").default, cert: string, opts?: CertOptions): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Resets the simulator keychain
|
|
47
|
-
*
|
|
48
|
-
* @since Xcode 11.4 SDK
|
|
49
|
-
* @this {import('../simctl').Simctl}
|
|
50
|
-
* @throws {Error} if the current SDK version does not support the command
|
|
51
|
-
* or there was an error while resetting the keychain
|
|
52
|
-
* @throws {Error} If the `udid` instance property is unset
|
|
53
|
-
*/
|
|
54
|
-
function resetKeychain(this: import("../simctl").default): Promise<void>;
|
|
55
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
import type { CertOptions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Adds the given certificate to the Trusted Root Store on the simulator
|
|
5
|
+
*
|
|
6
|
+
* @since Xcode 11.4 SDK
|
|
7
|
+
* @param cert the full path to a valid .cert file containing
|
|
8
|
+
* the certificate content or the certificate content itself, depending on
|
|
9
|
+
* options
|
|
10
|
+
* @param opts - Certificate options
|
|
11
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
12
|
+
* or there was an error while adding the certificate
|
|
13
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
14
|
+
*/
|
|
15
|
+
export declare function addRootCertificate(this: Simctl, cert: string | Buffer, opts?: CertOptions): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Adds the given certificate to the Keychain Store on the simulator
|
|
18
|
+
*
|
|
19
|
+
* @since Xcode 11.4 SDK
|
|
20
|
+
* @param cert the full path to a valid .cert file containing
|
|
21
|
+
* the certificate content or the certificate content itself, depending on
|
|
22
|
+
* options
|
|
23
|
+
* @param opts - Certificate options
|
|
24
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
25
|
+
* or there was an error while adding the certificate
|
|
26
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
27
|
+
*/
|
|
28
|
+
export declare function addCertificate(this: Simctl, cert: string | Buffer, opts?: CertOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Resets the simulator keychain
|
|
31
|
+
*
|
|
32
|
+
* @since Xcode 11.4 SDK
|
|
33
|
+
* @throws {Error} if the current SDK version does not support the command
|
|
34
|
+
* or there was an error while resetting the keychain
|
|
35
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
36
|
+
*/
|
|
37
|
+
export declare function resetKeychain(this: Simctl): Promise<void>;
|
|
56
38
|
//# sourceMappingURL=keychain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/keychain.
|
|
1
|
+
{"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/keychain.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAuB5C;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhE"}
|
|
@@ -3,17 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.addRootCertificate = addRootCertificate;
|
|
7
|
+
exports.addCertificate = addCertificate;
|
|
8
|
+
exports.resetKeychain = resetKeychain;
|
|
6
9
|
const os_1 = __importDefault(require("os"));
|
|
7
10
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
11
|
const helpers_1 = require("../helpers");
|
|
9
12
|
const path_1 = __importDefault(require("path"));
|
|
10
13
|
const lodash_1 = __importDefault(require("lodash"));
|
|
11
14
|
const rimraf_1 = require("rimraf");
|
|
12
|
-
const commands = {};
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param {(filePath: string) => Promise<any>} onPayloadStored
|
|
16
|
+
* @param payload - Certificate payload (string or Buffer)
|
|
17
|
+
* @param onPayloadStored - Callback function to execute with the file path
|
|
17
18
|
*/
|
|
18
19
|
async function handleRawPayload(payload, onPayloadStored) {
|
|
19
20
|
const filePath = path_1.default.resolve(os_1.default.tmpdir(), `${await (0, helpers_1.uuidV4)()}.pem`);
|
|
@@ -30,28 +31,21 @@ async function handleRawPayload(payload, onPayloadStored) {
|
|
|
30
31
|
await (0, rimraf_1.rimraf)(filePath);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
/**
|
|
34
|
-
* @typedef {Object} CertOptions
|
|
35
|
-
* @property {boolean} [raw=false] - whether the `cert` argument
|
|
36
|
-
* is the path to the certificate on the local file system or
|
|
37
|
-
* a raw certificate content
|
|
38
|
-
*/
|
|
39
34
|
/**
|
|
40
35
|
* Adds the given certificate to the Trusted Root Store on the simulator
|
|
41
36
|
*
|
|
42
37
|
* @since Xcode 11.4 SDK
|
|
43
|
-
* @
|
|
44
|
-
* @param {string} cert the full path to a valid .cert file containing
|
|
38
|
+
* @param cert the full path to a valid .cert file containing
|
|
45
39
|
* the certificate content or the certificate content itself, depending on
|
|
46
40
|
* options
|
|
47
|
-
* @param
|
|
41
|
+
* @param opts - Certificate options
|
|
48
42
|
* @throws {Error} if the current SDK version does not support the command
|
|
49
43
|
* or there was an error while adding the certificate
|
|
50
44
|
* @throws {Error} If the `udid` instance property is unset
|
|
51
45
|
*/
|
|
52
|
-
|
|
46
|
+
async function addRootCertificate(cert, opts = {}) {
|
|
53
47
|
const { raw = false, } = opts;
|
|
54
|
-
const execMethod = async (
|
|
48
|
+
const execMethod = async (certPath) => await this.exec('keychain', {
|
|
55
49
|
args: [this.requireUdid('keychain add-root-cert'), 'add-root-cert', certPath],
|
|
56
50
|
});
|
|
57
51
|
if (raw) {
|
|
@@ -60,21 +54,20 @@ commands.addRootCertificate = async function addRootCertificate(cert, opts = {})
|
|
|
60
54
|
else {
|
|
61
55
|
await execMethod(cert);
|
|
62
56
|
}
|
|
63
|
-
}
|
|
57
|
+
}
|
|
64
58
|
/**
|
|
65
59
|
* Adds the given certificate to the Keychain Store on the simulator
|
|
66
60
|
*
|
|
67
61
|
* @since Xcode 11.4 SDK
|
|
68
|
-
* @
|
|
69
|
-
* @param {string} cert the full path to a valid .cert file containing
|
|
62
|
+
* @param cert the full path to a valid .cert file containing
|
|
70
63
|
* the certificate content or the certificate content itself, depending on
|
|
71
64
|
* options
|
|
72
|
-
* @param
|
|
65
|
+
* @param opts - Certificate options
|
|
73
66
|
* @throws {Error} if the current SDK version does not support the command
|
|
74
67
|
* or there was an error while adding the certificate
|
|
75
68
|
* @throws {Error} If the `udid` instance property is unset
|
|
76
69
|
*/
|
|
77
|
-
|
|
70
|
+
async function addCertificate(cert, opts = {}) {
|
|
78
71
|
const { raw = false, } = opts;
|
|
79
72
|
const execMethod = async (certPath) => await this.exec('keychain', {
|
|
80
73
|
args: [this.requireUdid('keychain add-cert'), 'add-cert', certPath],
|
|
@@ -85,20 +78,18 @@ commands.addCertificate = async function addCertificate(cert, opts = {}) {
|
|
|
85
78
|
else {
|
|
86
79
|
await execMethod(cert);
|
|
87
80
|
}
|
|
88
|
-
}
|
|
81
|
+
}
|
|
89
82
|
/**
|
|
90
83
|
* Resets the simulator keychain
|
|
91
84
|
*
|
|
92
85
|
* @since Xcode 11.4 SDK
|
|
93
|
-
* @this {import('../simctl').Simctl}
|
|
94
86
|
* @throws {Error} if the current SDK version does not support the command
|
|
95
87
|
* or there was an error while resetting the keychain
|
|
96
88
|
* @throws {Error} If the `udid` instance property is unset
|
|
97
89
|
*/
|
|
98
|
-
|
|
90
|
+
async function resetKeychain() {
|
|
99
91
|
await this.exec('keychain', {
|
|
100
92
|
args: [this.requireUdid('keychain reset'), 'reset'],
|
|
101
93
|
});
|
|
102
|
-
}
|
|
103
|
-
exports.default = commands;
|
|
94
|
+
}
|
|
104
95
|
//# sourceMappingURL=keychain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keychain.js","sourceRoot":"","sources":["../../../lib/subcommands/keychain.
|
|
1
|
+
{"version":3,"file":"keychain.js","sourceRoot":"","sources":["../../../lib/subcommands/keychain.ts"],"names":[],"mappings":";;;;;AA0CA,gDAgBC;AAcD,wCAgBC;AAUD,sCAIC;AAtGD,4CAAoB;AACpB,2DAA6B;AAC7B,wCAAoC;AACpC,gDAAwB;AACxB,oDAAuB;AACvB,mCAAgC;AAIhC;;;GAGG;AACH,KAAK,UAAU,gBAAgB,CAC7B,OAAwB,EACxB,eAAmD;IAEnD,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,IAAA,gBAAM,GAAE,MAAM,CAAC,CAAC;IACpE,IAAI,CAAC;QACH,IAAI,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;YAAS,CAAC;QACT,MAAM,IAAA,eAAM,EAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,kBAAkB,CAEtC,IAAqB,EACrB,OAAoB,EAAE;IAEtB,MAAM,EACJ,GAAG,GAAG,KAAK,GACZ,GAAG,IAAI,CAAC;IACT,MAAM,UAAU,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACzE,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC;KAC9E,CAAC,CAAC;IACH,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,CAAC,IAAc,CAAC,CAAC;IACnC,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,cAAc,CAElC,IAAqB,EACrB,OAAoB,EAAE;IAEtB,MAAM,EACJ,GAAG,GAAG,KAAK,GACZ,GAAG,IAAI,CAAC;IACT,MAAM,UAAU,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACzE,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC;KACpE,CAAC,CAAC;IACH,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,CAAC,IAAc,CAAC,CAAC;IACnC,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;KACpD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
function launchApp(this: import("../simctl").default, bundleId: string, tries?: number): Promise<string>;
|
|
19
|
-
}
|
|
1
|
+
import type { Simctl } from '../simctl';
|
|
2
|
+
/**
|
|
3
|
+
* Execute the particular application package on Simulator.
|
|
4
|
+
* It is required that Simulator is in _booted_ state and
|
|
5
|
+
* the application with given bundle identifier is already installed.
|
|
6
|
+
*
|
|
7
|
+
* @param bundleId - Bundle identifier of the application,
|
|
8
|
+
* which is going to be removed.
|
|
9
|
+
* @param tries - The maximum number of retries before
|
|
10
|
+
* throwing an exception.
|
|
11
|
+
* @return the actual command output
|
|
12
|
+
* @throws {Error} If the corresponding simctl subcommand command
|
|
13
|
+
* returns non-zero return code.
|
|
14
|
+
* @throws {Error} If the `udid` instance property is unset
|
|
15
|
+
*/
|
|
16
|
+
export declare function launchApp(this: Simctl, bundleId: string, tries?: number): Promise<string>;
|
|
20
17
|
//# sourceMappingURL=launch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/launch.
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/launch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAQnG"}
|