node-simctl 8.2.8 → 9.0.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.js +10 -49
- 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 +37 -77
- 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 +3 -6
- 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 +5 -8
- 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.js +1 -2
- package/lib/index.ts +2 -2
- package/lib/logger.ts +1 -1
- package/lib/simctl.ts +28 -28
- package/lib/subcommands/addmedia.ts +1 -1
- package/lib/subcommands/appinfo.ts +3 -3
- package/lib/subcommands/boot.ts +2 -2
- package/lib/subcommands/bootstatus.ts +3 -3
- package/lib/subcommands/create.ts +4 -4
- package/lib/subcommands/delete.ts +1 -1
- package/lib/subcommands/erase.ts +1 -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 +1 -1
- package/lib/subcommands/keychain.ts +2 -2
- package/lib/subcommands/launch.ts +1 -1
- package/lib/subcommands/list.ts +4 -4
- package/lib/subcommands/location.ts +1 -1
- package/lib/subcommands/openurl.ts +1 -1
- package/lib/subcommands/pbcopy.ts +1 -1
- package/lib/subcommands/pbpaste.ts +1 -1
- package/lib/subcommands/privacy.ts +1 -1
- package/lib/subcommands/push.ts +1 -1
- package/lib/subcommands/shutdown.ts +2 -2
- package/lib/subcommands/spawn.ts +1 -1
- package/lib/subcommands/terminate.ts +1 -1
- package/lib/subcommands/ui.ts +1 -1
- package/lib/subcommands/uninstall.ts +1 -1
- package/package.json +12 -4
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getDevicesByParsing = getDevicesByParsing;
|
|
4
|
-
exports.getDevices = getDevices;
|
|
5
|
-
exports.getRuntimeForPlatformVersionViaJson = getRuntimeForPlatformVersionViaJson;
|
|
6
|
-
exports.getRuntimeForPlatformVersion = getRuntimeForPlatformVersion;
|
|
7
|
-
exports.getDeviceTypes = getDeviceTypes;
|
|
8
|
-
exports.list = list;
|
|
9
|
-
const helpers_1 = require("../helpers");
|
|
10
|
-
const logger_1 = require("../logger");
|
|
1
|
+
import { SIM_RUNTIME_NAME, normalizeVersion } from '../helpers.js';
|
|
2
|
+
import { log, LOG_PREFIX } from '../logger.js';
|
|
11
3
|
/**
|
|
12
4
|
* Parse the list of existing Simulator devices to represent
|
|
13
5
|
* it as convenient mapping.
|
|
@@ -19,7 +11,7 @@ const logger_1 = require("../logger");
|
|
|
19
11
|
* @throws {Error} If the corresponding simctl subcommand command
|
|
20
12
|
* returns non-zero return code.
|
|
21
13
|
*/
|
|
22
|
-
async function getDevicesByParsing(platform) {
|
|
14
|
+
export async function getDevicesByParsing(platform) {
|
|
23
15
|
const { stdout } = await this.exec('list', {
|
|
24
16
|
args: ['devices'],
|
|
25
17
|
});
|
|
@@ -77,7 +69,7 @@ async function getDevicesByParsing(platform) {
|
|
|
77
69
|
}
|
|
78
70
|
return devices;
|
|
79
71
|
}
|
|
80
|
-
async function getDevices(forSdk, platform) {
|
|
72
|
+
export async function getDevices(forSdk, platform) {
|
|
81
73
|
let devices = {};
|
|
82
74
|
try {
|
|
83
75
|
const { stdout } = await this.exec('list', {
|
|
@@ -104,7 +96,7 @@ async function getDevices(forSdk, platform) {
|
|
|
104
96
|
: new RegExp(`^${escapeRegExp(platform)}[\\s-](\\S+)`, 'i');
|
|
105
97
|
for (const [sdkNameRaw, entries] of Object.entries(JSON.parse(stdout).devices)) {
|
|
106
98
|
// there could be a longer name, so remove it
|
|
107
|
-
const sdkName = sdkNameRaw.replace(
|
|
99
|
+
const sdkName = sdkNameRaw.replace(SIM_RUNTIME_NAME, '');
|
|
108
100
|
const versionMatch = versionMatchRe.exec(sdkName);
|
|
109
101
|
if (!versionMatch) {
|
|
110
102
|
continue;
|
|
@@ -125,8 +117,8 @@ async function getDevices(forSdk, platform) {
|
|
|
125
117
|
}
|
|
126
118
|
}
|
|
127
119
|
catch (err) {
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
log.debug(LOG_PREFIX, `Unable to get JSON device list: ${err.stack}`);
|
|
121
|
+
log.debug(LOG_PREFIX, 'Falling back to manual parsing');
|
|
130
122
|
devices = await this.getDevicesByParsing(platform);
|
|
131
123
|
}
|
|
132
124
|
if (!forSdk) {
|
|
@@ -152,12 +144,12 @@ async function getDevices(forSdk, platform) {
|
|
|
152
144
|
* @return The corresponding runtime name for the given
|
|
153
145
|
* platform version.
|
|
154
146
|
*/
|
|
155
|
-
async function getRuntimeForPlatformVersionViaJson(platformVersion, platform = 'iOS') {
|
|
147
|
+
export async function getRuntimeForPlatformVersionViaJson(platformVersion, platform = 'iOS') {
|
|
156
148
|
const { stdout } = await this.exec('list', {
|
|
157
149
|
args: ['runtimes', '--json'],
|
|
158
150
|
});
|
|
159
151
|
for (const { version, identifier, name } of JSON.parse(stdout).runtimes) {
|
|
160
|
-
if (
|
|
152
|
+
if (normalizeVersion(version) === normalizeVersion(platformVersion) &&
|
|
161
153
|
name.toLowerCase().startsWith(platform.toLowerCase())) {
|
|
162
154
|
return identifier;
|
|
163
155
|
}
|
|
@@ -173,7 +165,7 @@ async function getRuntimeForPlatformVersionViaJson(platformVersion, platform = '
|
|
|
173
165
|
* @return The corresponding runtime name for the given
|
|
174
166
|
* platform version.
|
|
175
167
|
*/
|
|
176
|
-
async function getRuntimeForPlatformVersion(platformVersion, platform = 'iOS') {
|
|
168
|
+
export async function getRuntimeForPlatformVersion(platformVersion, platform = 'iOS') {
|
|
177
169
|
// Try with parsing
|
|
178
170
|
try {
|
|
179
171
|
const { stdout } = await this.exec('list', {
|
|
@@ -198,7 +190,7 @@ async function getRuntimeForPlatformVersion(platformVersion, platform = 'iOS') {
|
|
|
198
190
|
* @return List of the types of devices available
|
|
199
191
|
* @throws {Error} If the corresponding simctl command fails
|
|
200
192
|
*/
|
|
201
|
-
async function getDeviceTypes() {
|
|
193
|
+
export async function getDeviceTypes() {
|
|
202
194
|
const { stdout } = await this.exec('list', {
|
|
203
195
|
args: ['devicetypes', '-j'],
|
|
204
196
|
});
|
|
@@ -255,7 +247,7 @@ async function getDeviceTypes() {
|
|
|
255
247
|
* }
|
|
256
248
|
* @throws {Error} If the corresponding simctl command fails
|
|
257
249
|
*/
|
|
258
|
-
async function list() {
|
|
250
|
+
export async function list() {
|
|
259
251
|
const { stdout } = await this.exec('list', {
|
|
260
252
|
args: ['-j'],
|
|
261
253
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../lib/subcommands/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../lib/subcommands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAEvC,QAAwB;IAExB,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACvC,IAAI,EAAE,CAAC,SAAS,CAAC;KAClB,CAAC,CAAC;IAEH,+BAA+B;IAC/B,gBAAgB;IAChB,kEAAkE;IAClE,UAAU;IACV,gBAAgB;IAChB,kEAAkE;IAClE,UAAU;IACV,yDAAyD;IACzD,iEAAiE;IACjE,MAAM,eAAe,GAAG,CAAC,QAAQ;QAC/B,CAAC,CAAC,IAAI,MAAM,CAAC,oDAAoD,EAAE,KAAK,CAAC;QACzE,CAAC,CAAC,IAAI,MAAM,CAAC,aAAa,YAAY,CAAC,QAAQ,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;IAC/F,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,IAAI,KAA6B,CAAC;IAClC,qCAAqC;IACrC,OAAO,CAAC,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,2CAA2C,CAAC,CAA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M,
|
|
1
|
+
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setLocation = setLocation;
|
|
4
|
-
exports.clearLocation = clearLocation;
|
|
5
1
|
/**
|
|
6
2
|
* Set the Simulator location to a specific latitude and longitude.
|
|
7
3
|
* This functionality is only available since Xcode 14.
|
|
@@ -12,7 +8,7 @@ exports.clearLocation = clearLocation;
|
|
|
12
8
|
* returns non-zero return code.
|
|
13
9
|
* @throws {TypeError} If any of the arguments is not a valid value.
|
|
14
10
|
*/
|
|
15
|
-
async function setLocation(latitude, longitude) {
|
|
11
|
+
export async function setLocation(latitude, longitude) {
|
|
16
12
|
const lat = formatArg('latitude', latitude);
|
|
17
13
|
const lon = formatArg('longitude', longitude);
|
|
18
14
|
await this.exec('location', {
|
|
@@ -24,7 +20,7 @@ async function setLocation(latitude, longitude) {
|
|
|
24
20
|
*
|
|
25
21
|
* @since Xcode 14.
|
|
26
22
|
*/
|
|
27
|
-
async function clearLocation() {
|
|
23
|
+
export async function clearLocation() {
|
|
28
24
|
await this.exec('location', {
|
|
29
25
|
args: [this.requireUdid('location'), 'clear'],
|
|
30
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../lib/subcommands/location.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../lib/subcommands/location.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAE/B,QAAyB,EACzB,SAA0B;IAE1B,MAAM,GAAG,GAAG,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC9C,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;KAC9C,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE,KAAsB;IACrD,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,iCAAiC,KAAK,WAAW,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openurl.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/openurl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"openurl.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/openurl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAI/F"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openUrl = openUrl;
|
|
4
1
|
/**
|
|
5
2
|
* Open URL scheme on Simulator. iOS will automatically try
|
|
6
3
|
* to find a matching application, which supports the given scheme.
|
|
@@ -13,7 +10,7 @@ exports.openUrl = openUrl;
|
|
|
13
10
|
* returns non-zero return code.
|
|
14
11
|
* @throws {Error} If the `udid` instance property is unset
|
|
15
12
|
*/
|
|
16
|
-
async function openUrl(url) {
|
|
13
|
+
export async function openUrl(url) {
|
|
17
14
|
return await this.exec('openurl', {
|
|
18
15
|
args: [this.requireUdid('openurl'), url],
|
|
19
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openurl.js","sourceRoot":"","sources":["../../../lib/subcommands/openurl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openurl.js","sourceRoot":"","sources":["../../../lib/subcommands/openurl.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAe,GAAW;IACrD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QAChC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;KACzC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbcopy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"pbcopy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAGzC;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPasteboard = setPasteboard;
|
|
4
1
|
/**
|
|
5
2
|
* Set the content of Simulator pasteboard.
|
|
6
3
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -13,7 +10,7 @@ exports.setPasteboard = setPasteboard;
|
|
|
13
10
|
* returns non-zero return code.
|
|
14
11
|
* @throws {Error} If the `udid` instance property is unset
|
|
15
12
|
*/
|
|
16
|
-
async function setPasteboard(content, encoding = 'utf8') {
|
|
13
|
+
export async function setPasteboard(content, encoding = 'utf8') {
|
|
17
14
|
const pbCopySubprocess = (await this.exec('pbcopy', {
|
|
18
15
|
args: [this.requireUdid('pbcopy')],
|
|
19
16
|
asynchronous: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbcopy.js","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pbcopy.js","sourceRoot":"","sources":["../../../lib/subcommands/pbcopy.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAEjC,OAAe,EACf,WAA2B,MAAM;IAEjC,MAAM,gBAAgB,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClD,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAClC,YAAY,EAAE,IAAI;KACnB,CAAC,CAAe,CAAC;IAClB,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACjD,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC;IAC3C,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACnC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrB,KAAK,CAAC,GAAG,EAAE,CAAC;IACd,CAAC;IACD,MAAM,gBAAgB,CAAC;AACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbpaste.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"pbpaste.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAMjB"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPasteboard = getPasteboard;
|
|
4
1
|
/**
|
|
5
2
|
* Get the content of Simulator pasteboard.
|
|
6
3
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -13,7 +10,7 @@ exports.getPasteboard = getPasteboard;
|
|
|
13
10
|
* returns non-zero return code.
|
|
14
11
|
* @throws {Error} If the `udid` instance property is unset
|
|
15
12
|
*/
|
|
16
|
-
async function getPasteboard(encoding = 'utf8') {
|
|
13
|
+
export async function getPasteboard(encoding = 'utf8') {
|
|
17
14
|
const { stdout } = await this.exec('pbpaste', {
|
|
18
15
|
args: [this.requireUdid('pbpaste')],
|
|
19
16
|
encoding,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbpaste.js","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pbpaste.js","sourceRoot":"","sources":["../../../lib/subcommands/pbpaste.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAEjC,WAA2B,MAAM;IAEjC,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QAC1C,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACnC,QAAQ;KACT,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/privacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/privacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjG;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjG"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.grantPermission = grantPermission;
|
|
4
|
-
exports.revokePermission = revokePermission;
|
|
5
|
-
exports.resetPermission = resetPermission;
|
|
6
1
|
/**
|
|
7
2
|
* Grants the given permission on the app with the given bundle identifier
|
|
8
3
|
*
|
|
@@ -27,7 +22,7 @@ exports.resetPermission = resetPermission;
|
|
|
27
22
|
* or there was an error while granting the permission
|
|
28
23
|
* @throws {Error} If the `udid` instance property is unset
|
|
29
24
|
*/
|
|
30
|
-
async function grantPermission(bundleId, perm) {
|
|
25
|
+
export async function grantPermission(bundleId, perm) {
|
|
31
26
|
await this.exec('privacy', {
|
|
32
27
|
args: [this.requireUdid('privacy grant'), 'grant', perm, bundleId],
|
|
33
28
|
});
|
|
@@ -44,7 +39,7 @@ async function grantPermission(bundleId, perm) {
|
|
|
44
39
|
* or there was an error while revoking the permission
|
|
45
40
|
* @throws {Error} If the `udid` instance property is unset
|
|
46
41
|
*/
|
|
47
|
-
async function revokePermission(bundleId, perm) {
|
|
42
|
+
export async function revokePermission(bundleId, perm) {
|
|
48
43
|
await this.exec('privacy', {
|
|
49
44
|
args: [this.requireUdid('privacy revoke'), 'revoke', perm, bundleId],
|
|
50
45
|
});
|
|
@@ -61,7 +56,7 @@ async function revokePermission(bundleId, perm) {
|
|
|
61
56
|
* or there was an error while resetting the permission
|
|
62
57
|
* @throws {Error} If the `udid` instance property is unset
|
|
63
58
|
*/
|
|
64
|
-
async function resetPermission(bundleId, perm) {
|
|
59
|
+
export async function resetPermission(bundleId, perm) {
|
|
65
60
|
await this.exec('privacy', {
|
|
66
61
|
args: [this.requireUdid('private reset'), 'reset', perm, bundleId],
|
|
67
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy.js","sourceRoot":"","sources":["../../../lib/subcommands/privacy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"privacy.js","sourceRoot":"","sources":["../../../lib/subcommands/privacy.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAe,QAAgB,EAAE,IAAY;IAChF,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACzB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC;KACnE,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAEpC,QAAgB,EAChB,IAAY;IAEZ,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACzB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC;KACrE,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAe,QAAgB,EAAE,IAAY;IAChF,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACzB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC;KACnE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhG"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.pushNotification = pushNotification;
|
|
7
|
-
const rimraf_1 = require("rimraf");
|
|
8
|
-
const node_crypto_1 = require("node:crypto");
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
-
const node_os_1 = __importDefault(require("node:os"));
|
|
11
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
1
|
+
import { rimraf } from 'rimraf';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import fs from 'node:fs/promises';
|
|
12
6
|
/**
|
|
13
7
|
* Send a simulated push notification
|
|
14
8
|
*
|
|
@@ -29,16 +23,16 @@ const promises_1 = __importDefault(require("node:fs/promises"));
|
|
|
29
23
|
* or there was an error while pushing the notification
|
|
30
24
|
* @throws {Error} If the `udid` instance property is unset
|
|
31
25
|
*/
|
|
32
|
-
async function pushNotification(payload) {
|
|
33
|
-
const dstPath =
|
|
26
|
+
export async function pushNotification(payload) {
|
|
27
|
+
const dstPath = path.resolve(os.tmpdir(), `${randomUUID()}.json`);
|
|
34
28
|
try {
|
|
35
|
-
await
|
|
29
|
+
await fs.writeFile(dstPath, JSON.stringify(payload), 'utf8');
|
|
36
30
|
await this.exec('push', {
|
|
37
31
|
args: [this.requireUdid('push'), dstPath],
|
|
38
32
|
});
|
|
39
33
|
}
|
|
40
34
|
finally {
|
|
41
|
-
await
|
|
35
|
+
await rimraf(dstPath);
|
|
42
36
|
}
|
|
43
37
|
}
|
|
44
38
|
//# sourceMappingURL=push.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAe,OAA4B;IAC/E,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;QAC7D,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;SAC1C,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhE"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shutdownDevice = shutdownDevice;
|
|
4
|
-
const logger_1 = require("../logger");
|
|
1
|
+
import { log, LOG_PREFIX } from '../logger.js';
|
|
5
2
|
/**
|
|
6
3
|
* Shutdown the given Simulator if it is running.
|
|
7
4
|
*
|
|
@@ -9,7 +6,7 @@ const logger_1 = require("../logger");
|
|
|
9
6
|
* returns non-zero return code.
|
|
10
7
|
* @throws {Error} If the `udid` instance property is unset
|
|
11
8
|
*/
|
|
12
|
-
async function shutdownDevice() {
|
|
9
|
+
export async function shutdownDevice() {
|
|
13
10
|
try {
|
|
14
11
|
await this.exec('shutdown', {
|
|
15
12
|
args: [this.requireUdid('shutdown')],
|
|
@@ -19,7 +16,7 @@ async function shutdownDevice() {
|
|
|
19
16
|
if (!e.message?.includes('current state: Shutdown')) {
|
|
20
17
|
throw e;
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
log.debug(LOG_PREFIX, `Simulator already in 'Shutdown' state. Continuing`);
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
//# sourceMappingURL=shutdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/subcommands/shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC;YACpD,MAAM,CAAC,CAAC;QACV,CAAC;QACD,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,mDAAmD,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,qBAAqB,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC5B,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CASxC;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC5B,OAAO,CAAC,UAAU,CAAC,CAUrB"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.spawnProcess = spawnProcess;
|
|
4
|
-
exports.spawnSubProcess = spawnSubProcess;
|
|
5
1
|
/**
|
|
6
2
|
* Spawn the particular process on Simulator.
|
|
7
3
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -13,7 +9,7 @@ exports.spawnSubProcess = spawnSubProcess;
|
|
|
13
9
|
* returns non-zero return code.
|
|
14
10
|
* @throws {Error} If the `udid` instance property is unset
|
|
15
11
|
*/
|
|
16
|
-
async function spawnProcess(args, env = {}) {
|
|
12
|
+
export async function spawnProcess(args, env = {}) {
|
|
17
13
|
if ((Array.isArray(args) && args.length === 0) || args === '') {
|
|
18
14
|
throw new Error('Spawn arguments are required');
|
|
19
15
|
}
|
|
@@ -31,7 +27,7 @@ async function spawnProcess(args, env = {}) {
|
|
|
31
27
|
* @return The instance of the process to be spawned.
|
|
32
28
|
* @throws {Error} If the `udid` instance property is unset
|
|
33
29
|
*/
|
|
34
|
-
async function spawnSubProcess(args, env = {}) {
|
|
30
|
+
export async function spawnSubProcess(args, env = {}) {
|
|
35
31
|
if ((Array.isArray(args) && args.length === 0) || args === '') {
|
|
36
32
|
throw new Error('Spawn arguments are required');
|
|
37
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../lib/subcommands/spawn.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAEhC,I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KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/terminate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhF"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.terminateApp = terminateApp;
|
|
4
1
|
/**
|
|
5
2
|
* Terminate the given running application on Simulator.
|
|
6
3
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -11,7 +8,7 @@ exports.terminateApp = terminateApp;
|
|
|
11
8
|
* returns non-zero return code.
|
|
12
9
|
* @throws {Error} If the `udid` instance property is unset
|
|
13
10
|
*/
|
|
14
|
-
async function terminateApp(bundleId) {
|
|
11
|
+
export async function terminateApp(bundleId) {
|
|
15
12
|
await this.exec('terminate', {
|
|
16
13
|
args: [this.requireUdid('terminate'), bundleId],
|
|
17
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"terminate.js","sourceRoot":"","sources":["../../../lib/subcommands/terminate.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAe,QAAgB;IAC/D,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAC3B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;KAChD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKjE;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAInF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/F;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKlE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3F"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppearance = getAppearance;
|
|
4
|
-
exports.setAppearance = setAppearance;
|
|
5
|
-
exports.getIncreaseContrast = getIncreaseContrast;
|
|
6
|
-
exports.setIncreaseContrast = setIncreaseContrast;
|
|
7
|
-
exports.getContentSize = getContentSize;
|
|
8
|
-
exports.setContentSize = setContentSize;
|
|
9
1
|
/**
|
|
10
2
|
* Retrieves the current UI appearance value from the given simulator
|
|
11
3
|
*
|
|
@@ -15,7 +7,7 @@ exports.setContentSize = setContentSize;
|
|
|
15
7
|
* or there was an error while getting the value
|
|
16
8
|
* @throws {Error} If the `udid` instance property is unset
|
|
17
9
|
*/
|
|
18
|
-
async function getAppearance() {
|
|
10
|
+
export async function getAppearance() {
|
|
19
11
|
const { stdout } = await this.exec('ui', {
|
|
20
12
|
args: [this.requireUdid('ui'), 'appearance'],
|
|
21
13
|
});
|
|
@@ -30,7 +22,7 @@ async function getAppearance() {
|
|
|
30
22
|
* or there was an error while getting the value
|
|
31
23
|
* @throws {Error} If the `udid` instance property is unset
|
|
32
24
|
*/
|
|
33
|
-
async function setAppearance(appearance) {
|
|
25
|
+
export async function setAppearance(appearance) {
|
|
34
26
|
await this.exec('ui', {
|
|
35
27
|
args: [this.requireUdid('ui'), 'appearance', appearance],
|
|
36
28
|
});
|
|
@@ -51,7 +43,7 @@ async function setAppearance(appearance) {
|
|
|
51
43
|
* or there was an error while getting the value.
|
|
52
44
|
* @throws {Error} If the `udid` instance property is unset
|
|
53
45
|
*/
|
|
54
|
-
async function getIncreaseContrast() {
|
|
46
|
+
export async function getIncreaseContrast() {
|
|
55
47
|
const { stdout } = await this.exec('ui', {
|
|
56
48
|
args: [this.requireUdid('ui'), 'increase_contrast'],
|
|
57
49
|
});
|
|
@@ -70,7 +62,7 @@ async function getIncreaseContrast() {
|
|
|
70
62
|
* or the given value was invalid for the command.
|
|
71
63
|
* @throws {Error} If the `udid` instance property is unset
|
|
72
64
|
*/
|
|
73
|
-
async function setIncreaseContrast(increaseContrast) {
|
|
65
|
+
export async function setIncreaseContrast(increaseContrast) {
|
|
74
66
|
await this.exec('ui', {
|
|
75
67
|
args: [this.requireUdid('ui'), 'increase_contrast', increaseContrast],
|
|
76
68
|
});
|
|
@@ -96,7 +88,7 @@ async function setIncreaseContrast(increaseContrast) {
|
|
|
96
88
|
* or there was an error while getting the value.
|
|
97
89
|
* @throws {Error} If the `udid` instance property is unset
|
|
98
90
|
*/
|
|
99
|
-
async function getContentSize() {
|
|
91
|
+
export async function getContentSize() {
|
|
100
92
|
const { stdout } = await this.exec('ui', {
|
|
101
93
|
args: [this.requireUdid('ui'), 'content_size'],
|
|
102
94
|
});
|
|
@@ -124,7 +116,7 @@ async function getContentSize() {
|
|
|
124
116
|
* or the given value was invalid for the command.
|
|
125
117
|
* @throws {Error} If the `udid` instance property is unset
|
|
126
118
|
*/
|
|
127
|
-
async function setContentSize(contentSizeAction) {
|
|
119
|
+
export async function setContentSize(contentSizeAction) {
|
|
128
120
|
await this.exec('ui', {
|
|
129
121
|
args: [this.requireUdid('ui'), 'content_size', contentSizeAction],
|
|
130
122
|
});
|