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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [9.1.0](https://github.com/appium/node-simctl/compare/v9.0.0...v9.1.0) (2026-07-25)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* Integrate shared oxc and release configs ([#313](https://github.com/appium/node-simctl/issues/313)) ([d3f6f8b](https://github.com/appium/node-simctl/commit/d3f6f8bc4e2c94b7248fd90eec4103284a4d3014))
|
|
6
|
+
|
|
7
|
+
## [9.0.0](https://github.com/appium/node-simctl/compare/v8.2.9...v9.0.0) (2026-07-24)
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* Consumers using require('node-simctl') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point.
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Migrate the package to ESM ([#312](https://github.com/appium/node-simctl/issues/312)) ([6f67beb](https://github.com/appium/node-simctl/commit/6f67beb4fcd0b220aac74e7948c53a2310006df2))
|
|
16
|
+
|
|
1
17
|
## [8.2.9](https://github.com/appium/node-simctl/compare/v8.2.8...v8.2.9) (2026-07-15)
|
|
2
18
|
|
|
3
19
|
### Miscellaneous Chores
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,QAAiB,CAAC;AACnD,eAAO,MAAM,gBAAgB,wCAAwC,CAAC;AAEtE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAkCzE"}
|
package/build/lib/helpers.js
CHANGED
|
@@ -1,47 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
|
|
37
|
-
exports.normalizeVersion = normalizeVersion;
|
|
38
|
-
exports.getXcrunBinary = getXcrunBinary;
|
|
39
|
-
exports.convertPlistToJson = convertPlistToJson;
|
|
40
|
-
const semver = __importStar(require("semver"));
|
|
41
|
-
const node_child_process_1 = require("node:child_process");
|
|
42
|
-
const node_stream_1 = require("node:stream");
|
|
43
|
-
exports.DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000; // ms
|
|
44
|
-
exports.SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { Readable } from 'node:stream';
|
|
3
|
+
import * as semver from 'semver';
|
|
4
|
+
export const DEFAULT_EXEC_TIMEOUT = 10 * 60 * 1000; // ms
|
|
5
|
+
export const SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
45
6
|
/**
|
|
46
7
|
* "Normalize" the version, since iOS uses 'major.minor' but the runtimes can
|
|
47
8
|
* be 'major.minor.patch'
|
|
@@ -50,7 +11,7 @@ exports.SIM_RUNTIME_NAME = 'com.apple.CoreSimulator.SimRuntime.';
|
|
|
50
11
|
* @return The version in 'major.minor' form
|
|
51
12
|
* @throws {Error} If the version not parseable by the `semver` package
|
|
52
13
|
*/
|
|
53
|
-
function normalizeVersion(version) {
|
|
14
|
+
export function normalizeVersion(version) {
|
|
54
15
|
const semverVersion = semver.coerce(version);
|
|
55
16
|
if (!semverVersion) {
|
|
56
17
|
throw new Error(`Unable to parse version '${version}'`);
|
|
@@ -60,7 +21,7 @@ function normalizeVersion(version) {
|
|
|
60
21
|
/**
|
|
61
22
|
* @returns The xcrun binary name
|
|
62
23
|
*/
|
|
63
|
-
function getXcrunBinary() {
|
|
24
|
+
export function getXcrunBinary() {
|
|
64
25
|
return process.env.XCRUN_BINARY || 'xcrun';
|
|
65
26
|
}
|
|
66
27
|
/**
|
|
@@ -70,13 +31,13 @@ function getXcrunBinary() {
|
|
|
70
31
|
* @return Promise resolving to parsed JSON object
|
|
71
32
|
* @throws {Error} If plutil fails to convert the input
|
|
72
33
|
*/
|
|
73
|
-
async function convertPlistToJson(plistInput) {
|
|
74
|
-
const plutilProcess =
|
|
34
|
+
export async function convertPlistToJson(plistInput) {
|
|
35
|
+
const plutilProcess = spawn('plutil', ['-convert', 'json', '-o', '-', '-']);
|
|
75
36
|
let jsonOutput = '';
|
|
76
37
|
plutilProcess.stdout.on('data', (chunk) => {
|
|
77
38
|
jsonOutput += chunk.toString();
|
|
78
39
|
});
|
|
79
|
-
const inputStream =
|
|
40
|
+
const inputStream = Readable.from([plistInput]);
|
|
80
41
|
inputStream.pipe(plutilProcess.stdin);
|
|
81
42
|
try {
|
|
82
43
|
await new Promise((resolve, reject) => {
|
|
@@ -98,7 +59,9 @@ async function convertPlistToJson(plistInput) {
|
|
|
98
59
|
}
|
|
99
60
|
catch (err) {
|
|
100
61
|
plutilProcess.kill(9);
|
|
101
|
-
throw new Error(`Failed to convert plist to JSON: ${err instanceof Error ? err.message : String(err)}`, {
|
|
62
|
+
throw new Error(`Failed to convert plist to JSON: ${err instanceof Error ? err.message : String(err)}`, {
|
|
63
|
+
cause: err,
|
|
64
|
+
});
|
|
102
65
|
}
|
|
103
66
|
finally {
|
|
104
67
|
plutilProcess.removeAllListeners();
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,qCAAqC,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,GAAG,aAAa,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,M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O,GAAG,EAAE,CAAC;QACb,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YACtG,KAAK,EAAE,GAAG;SACX,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,kBAAkB,EAAE,CAAC;QACnC,WAAW,CAAC,kBAAkB,EAAE,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC"}
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Simctl } from './simctl';
|
|
2
|
-
export type { SimctlOpts, DeviceInfo, SimCreationOpts, BootMonitorOptions, CertOptions, XCRun, AppInfo, } from './types';
|
|
1
|
+
import { Simctl } from './simctl.js';
|
|
2
|
+
export type { SimctlOpts, DeviceInfo, SimCreationOpts, BootMonitorOptions, CertOptions, XCRun, AppInfo, } from './types.js';
|
|
3
3
|
export { Simctl };
|
|
4
4
|
export default Simctl;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,YAAY,EACV,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAC,MAAM,EAAC,CAAC;AAChB,eAAe,MAAM,CAAC"}
|
package/build/lib/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const simctl_1 = require("./simctl");
|
|
5
|
-
Object.defineProperty(exports, "Simctl", { enumerable: true, get: function () { return simctl_1.Simctl; } });
|
|
6
|
-
exports.default = simctl_1.Simctl;
|
|
1
|
+
import { Simctl } from './simctl.js';
|
|
2
|
+
export { Simctl };
|
|
3
|
+
export default Simctl;
|
|
7
4
|
//# sourceMappingURL=index.js.map
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAWnC,OAAO,EAAC,MAAM,EAAC,CAAC;AAChB,eAAe,MAAM,CAAC"}
|
package/build/lib/logger.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,eAAO,MAAM,GAAG,+CAAe,CAAC"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.log = exports.LOG_PREFIX = void 0;
|
|
7
|
-
const logger_1 = __importDefault(require("@appium/logger"));
|
|
8
|
-
exports.LOG_PREFIX = 'simctl';
|
|
9
|
-
exports.log = logger_1.default;
|
|
1
|
+
import { log as appiumLogger } from '@appium/logger';
|
|
2
|
+
export const LOG_PREFIX = 'simctl';
|
|
3
|
+
export const log = appiumLogger;
|
|
10
4
|
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAEnC,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC"}
|
package/build/lib/simctl.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import * as addmediaCommands from './subcommands/addmedia';
|
|
2
|
-
import * as appinfoCommands from './subcommands/appinfo';
|
|
3
|
-
import * as bootCommands from './subcommands/boot';
|
|
4
|
-
import * as bootstatusCommands from './subcommands/bootstatus';
|
|
5
|
-
import * as createCommands from './subcommands/create';
|
|
6
|
-
import * as deleteCommands from './subcommands/delete';
|
|
7
|
-
import * as eraseCommands from './subcommands/erase';
|
|
8
|
-
import * as getappcontainerCommands from './subcommands/get_app_container';
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import type { ExecOpts, SimctlOpts, ExecResult } from './types';
|
|
1
|
+
import * as addmediaCommands from './subcommands/addmedia.js';
|
|
2
|
+
import * as appinfoCommands from './subcommands/appinfo.js';
|
|
3
|
+
import * as bootCommands from './subcommands/boot.js';
|
|
4
|
+
import * as bootstatusCommands from './subcommands/bootstatus.js';
|
|
5
|
+
import * as createCommands from './subcommands/create.js';
|
|
6
|
+
import * as deleteCommands from './subcommands/delete.js';
|
|
7
|
+
import * as eraseCommands from './subcommands/erase.js';
|
|
8
|
+
import * as getappcontainerCommands from './subcommands/get_app_container.js';
|
|
9
|
+
import * as envCommands from './subcommands/getenv.js';
|
|
10
|
+
import * as installCommands from './subcommands/install.js';
|
|
11
|
+
import * as ioCommands from './subcommands/io.js';
|
|
12
|
+
import * as keychainCommands from './subcommands/keychain.js';
|
|
13
|
+
import * as launchCommands from './subcommands/launch.js';
|
|
14
|
+
import * as listCommands from './subcommands/list.js';
|
|
15
|
+
import * as locationCommands from './subcommands/location.js';
|
|
16
|
+
import * as openurlCommands from './subcommands/openurl.js';
|
|
17
|
+
import * as pbcopyCommands from './subcommands/pbcopy.js';
|
|
18
|
+
import * as pbpasteCommands from './subcommands/pbpaste.js';
|
|
19
|
+
import * as privacyCommands from './subcommands/privacy.js';
|
|
20
|
+
import * as pushCommands from './subcommands/push.js';
|
|
21
|
+
import * as shutdownCommands from './subcommands/shutdown.js';
|
|
22
|
+
import * as spawnCommands from './subcommands/spawn.js';
|
|
23
|
+
import * as terminateCommands from './subcommands/terminate.js';
|
|
24
|
+
import * as uiCommands from './subcommands/ui.js';
|
|
25
|
+
import * as uninstallCommands from './subcommands/uninstall.js';
|
|
26
|
+
import type { ExecOpts, SimctlOpts, ExecResult } from './types.js';
|
|
27
27
|
export declare class Simctl {
|
|
28
28
|
addMedia: typeof addmediaCommands.addMedia;
|
|
29
29
|
appInfo: typeof appinfoCommands.appInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.ts"],"names":[],"mappings":"
|
|
1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,GAAG,IAAI,CAElC;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE5B;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAEtC;IAED;;;;OAIG;IACH,WAAW,CAAC,WAAW,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM;IAStD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAgBrC;;;;;;;;;OASG;IACG,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAyDrF;AAED,eAAe,MAAM,CAAC"}
|
package/build/lib/simctl.js
CHANGED
|
@@ -1,73 +1,34 @@
|
|
|
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
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Simctl = void 0;
|
|
40
|
-
const which_1 = __importDefault(require("which"));
|
|
41
|
-
const logger_1 = require("./logger");
|
|
42
|
-
const helpers_1 = require("./helpers");
|
|
43
|
-
const teen_process_1 = require("teen_process");
|
|
44
|
-
const addmediaCommands = __importStar(require("./subcommands/addmedia"));
|
|
45
|
-
const appinfoCommands = __importStar(require("./subcommands/appinfo"));
|
|
46
|
-
const bootCommands = __importStar(require("./subcommands/boot"));
|
|
47
|
-
const bootstatusCommands = __importStar(require("./subcommands/bootstatus"));
|
|
48
|
-
const createCommands = __importStar(require("./subcommands/create"));
|
|
49
|
-
const deleteCommands = __importStar(require("./subcommands/delete"));
|
|
50
|
-
const eraseCommands = __importStar(require("./subcommands/erase"));
|
|
51
|
-
const getappcontainerCommands = __importStar(require("./subcommands/get_app_container"));
|
|
52
|
-
const installCommands = __importStar(require("./subcommands/install"));
|
|
53
|
-
const ioCommands = __importStar(require("./subcommands/io"));
|
|
54
|
-
const keychainCommands = __importStar(require("./subcommands/keychain"));
|
|
55
|
-
const launchCommands = __importStar(require("./subcommands/launch"));
|
|
56
|
-
const listCommands = __importStar(require("./subcommands/list"));
|
|
57
|
-
const openurlCommands = __importStar(require("./subcommands/openurl"));
|
|
58
|
-
const pbcopyCommands = __importStar(require("./subcommands/pbcopy"));
|
|
59
|
-
const pbpasteCommands = __importStar(require("./subcommands/pbpaste"));
|
|
60
|
-
const privacyCommands = __importStar(require("./subcommands/privacy"));
|
|
61
|
-
const pushCommands = __importStar(require("./subcommands/push"));
|
|
62
|
-
const envCommands = __importStar(require("./subcommands/getenv"));
|
|
63
|
-
const shutdownCommands = __importStar(require("./subcommands/shutdown"));
|
|
64
|
-
const spawnCommands = __importStar(require("./subcommands/spawn"));
|
|
65
|
-
const terminateCommands = __importStar(require("./subcommands/terminate"));
|
|
66
|
-
const uiCommands = __importStar(require("./subcommands/ui"));
|
|
67
|
-
const uninstallCommands = __importStar(require("./subcommands/uninstall"));
|
|
68
|
-
const locationCommands = __importStar(require("./subcommands/location"));
|
|
1
|
+
import { exec as tpExec, SubProcess } from 'teen_process';
|
|
2
|
+
import which from 'which';
|
|
3
|
+
import { DEFAULT_EXEC_TIMEOUT, getXcrunBinary } from './helpers.js';
|
|
4
|
+
import { log, LOG_PREFIX } from './logger.js';
|
|
5
|
+
import * as addmediaCommands from './subcommands/addmedia.js';
|
|
6
|
+
import * as appinfoCommands from './subcommands/appinfo.js';
|
|
7
|
+
import * as bootCommands from './subcommands/boot.js';
|
|
8
|
+
import * as bootstatusCommands from './subcommands/bootstatus.js';
|
|
9
|
+
import * as createCommands from './subcommands/create.js';
|
|
10
|
+
import * as deleteCommands from './subcommands/delete.js';
|
|
11
|
+
import * as eraseCommands from './subcommands/erase.js';
|
|
12
|
+
import * as getappcontainerCommands from './subcommands/get_app_container.js';
|
|
13
|
+
import * as envCommands from './subcommands/getenv.js';
|
|
14
|
+
import * as installCommands from './subcommands/install.js';
|
|
15
|
+
import * as ioCommands from './subcommands/io.js';
|
|
16
|
+
import * as keychainCommands from './subcommands/keychain.js';
|
|
17
|
+
import * as launchCommands from './subcommands/launch.js';
|
|
18
|
+
import * as listCommands from './subcommands/list.js';
|
|
19
|
+
import * as locationCommands from './subcommands/location.js';
|
|
20
|
+
import * as openurlCommands from './subcommands/openurl.js';
|
|
21
|
+
import * as pbcopyCommands from './subcommands/pbcopy.js';
|
|
22
|
+
import * as pbpasteCommands from './subcommands/pbpaste.js';
|
|
23
|
+
import * as privacyCommands from './subcommands/privacy.js';
|
|
24
|
+
import * as pushCommands from './subcommands/push.js';
|
|
25
|
+
import * as shutdownCommands from './subcommands/shutdown.js';
|
|
26
|
+
import * as spawnCommands from './subcommands/spawn.js';
|
|
27
|
+
import * as terminateCommands from './subcommands/terminate.js';
|
|
28
|
+
import * as uiCommands from './subcommands/ui.js';
|
|
29
|
+
import * as uninstallCommands from './subcommands/uninstall.js';
|
|
69
30
|
const SIMCTL_ENV_PREFIX = 'SIMCTL_CHILD_';
|
|
70
|
-
class Simctl {
|
|
31
|
+
export class Simctl {
|
|
71
32
|
// Extension methods
|
|
72
33
|
addMedia = addmediaCommands.addMedia;
|
|
73
34
|
appInfo = appinfoCommands.appInfo;
|
|
@@ -117,7 +78,7 @@ class Simctl {
|
|
|
117
78
|
_devicesSetPath;
|
|
118
79
|
constructor(opts = {}) {
|
|
119
80
|
this.xcrun = { ...(opts.xcrun ?? { path: null }) };
|
|
120
|
-
this.execTimeout = opts.execTimeout ??
|
|
81
|
+
this.execTimeout = opts.execTimeout ?? DEFAULT_EXEC_TIMEOUT;
|
|
121
82
|
this.logErrors = opts.logErrors ?? true;
|
|
122
83
|
this._udid = opts.udid ?? null;
|
|
123
84
|
this._devicesSetPath = opts.devicesSetPath ?? null;
|
|
@@ -141,8 +102,7 @@ class Simctl {
|
|
|
141
102
|
*/
|
|
142
103
|
requireUdid(commandName = null) {
|
|
143
104
|
if (!this.udid) {
|
|
144
|
-
throw new Error(`udid is required to be set for ` +
|
|
145
|
-
(commandName ? `the '${commandName}' command` : 'this simctl command'));
|
|
105
|
+
throw new Error(`udid is required to be set for ` + (commandName ? `the '${commandName}' command` : 'this simctl command'));
|
|
146
106
|
}
|
|
147
107
|
return this.udid;
|
|
148
108
|
}
|
|
@@ -150,14 +110,13 @@ class Simctl {
|
|
|
150
110
|
* @returns Promise resolving to the xcrun binary path
|
|
151
111
|
*/
|
|
152
112
|
async requireXcrun() {
|
|
153
|
-
const xcrunBinary =
|
|
113
|
+
const xcrunBinary = getXcrunBinary();
|
|
154
114
|
if (!this.xcrun.path) {
|
|
155
115
|
try {
|
|
156
|
-
this.xcrun.path = await (
|
|
116
|
+
this.xcrun.path = await which(xcrunBinary);
|
|
157
117
|
}
|
|
158
118
|
catch {
|
|
159
|
-
throw new Error(`${xcrunBinary} tool has not been found in PATH.
|
|
160
|
-
`Are Xcode developers tools installed?`);
|
|
119
|
+
throw new Error(`${xcrunBinary} tool has not been found in PATH. Are Xcode developers tools installed?`);
|
|
161
120
|
}
|
|
162
121
|
}
|
|
163
122
|
if (!this.xcrun.path) {
|
|
@@ -178,12 +137,7 @@ class Simctl {
|
|
|
178
137
|
async exec(subcommand, opts) {
|
|
179
138
|
const { args: initialArgs = [], env: initialEnv = {}, asynchronous = false, encoding, logErrors = true, architectures, timeout, } = opts ?? {};
|
|
180
139
|
// run a particular simctl command
|
|
181
|
-
const args = [
|
|
182
|
-
'simctl',
|
|
183
|
-
...(this.devicesSetPath ? ['--set', this.devicesSetPath] : []),
|
|
184
|
-
subcommand,
|
|
185
|
-
...initialArgs,
|
|
186
|
-
];
|
|
140
|
+
const args = ['simctl', ...(this.devicesSetPath ? ['--set', this.devicesSetPath] : []), subcommand, ...initialArgs];
|
|
187
141
|
// Prefix all passed in environment variables with 'SIMCTL_CHILD_', simctl
|
|
188
142
|
// will then pass these to the child (spawned) process.
|
|
189
143
|
const envWithPrefixedKeys = Object.fromEntries(Object.entries(initialEnv).map(([key, value]) => [
|
|
@@ -202,14 +156,17 @@ class Simctl {
|
|
|
202
156
|
try {
|
|
203
157
|
let execArgs;
|
|
204
158
|
if (architectures?.length) {
|
|
205
|
-
const archArgs = (Array.isArray(architectures) ? architectures : [architectures]).flatMap((arch) => [
|
|
159
|
+
const archArgs = (Array.isArray(architectures) ? architectures : [architectures]).flatMap((arch) => [
|
|
160
|
+
'-arch',
|
|
161
|
+
arch,
|
|
162
|
+
]);
|
|
206
163
|
execArgs = ['arch', [...archArgs, xcrun, ...args], execOpts];
|
|
207
164
|
}
|
|
208
165
|
else {
|
|
209
166
|
execArgs = [xcrun, args, execOpts];
|
|
210
167
|
}
|
|
211
168
|
// We know what we are doing here - the type system can't handle the dynamic nature
|
|
212
|
-
return (asynchronous ? new
|
|
169
|
+
return (asynchronous ? new SubProcess(...execArgs) : await tpExec(...execArgs));
|
|
213
170
|
}
|
|
214
171
|
catch (e) {
|
|
215
172
|
if (!this.logErrors || !logErrors) {
|
|
@@ -218,16 +175,15 @@ class Simctl {
|
|
|
218
175
|
}
|
|
219
176
|
else if (e.stderr) {
|
|
220
177
|
const msg = `Error running '${subcommand}': ${e.stderr.trim()}`;
|
|
221
|
-
|
|
178
|
+
log.debug(LOG_PREFIX, msg);
|
|
222
179
|
e.message = msg;
|
|
223
180
|
}
|
|
224
181
|
else {
|
|
225
|
-
|
|
182
|
+
log.debug(LOG_PREFIX, e.message);
|
|
226
183
|
}
|
|
227
184
|
throw e;
|
|
228
185
|
}
|
|
229
186
|
}
|
|
230
187
|
}
|
|
231
|
-
|
|
232
|
-
exports.default = Simctl;
|
|
188
|
+
export default Simctl;
|
|
233
189
|
//# sourceMappingURL=simctl.js.map
|
package/build/lib/simctl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simctl.js","sourceRoot":"","sources":["../../lib/simctl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simctl.js","sourceRoot":"","sources":["../../lib/simctl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,IAAI,MAAM,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAClE,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,kBAAkB,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAA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,IAAI,CAAC,SAAS,EAAE,CAAC;gBAClC,uEAAuE;gBACvE,wBAAwB;YAC1B,CAAC;iBAAM,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;gBACpB,MAAM,GAAG,GAAG,kBAAkB,UAAU,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;gBAChE,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;gBAC3B,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC;YAClB,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;CACF;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAIrG"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addMedia = addMedia;
|
|
4
1
|
/**
|
|
5
2
|
* Add the particular media file to Simulator's library.
|
|
6
3
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -12,7 +9,7 @@ exports.addMedia = addMedia;
|
|
|
12
9
|
* returns non-zero return code.
|
|
13
10
|
* @throws {Error} If the `udid` instance property is unset
|
|
14
11
|
*/
|
|
15
|
-
async function addMedia(filePath) {
|
|
12
|
+
export async function addMedia(filePath) {
|
|
16
13
|
return await this.exec('addmedia', {
|
|
17
14
|
args: [this.requireUdid('addmedia'), filePath],
|
|
18
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addmedia.js","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addmedia.js","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAe,QAAgB;IAC3D,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACjC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;KAC/C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEzC;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAuB9E"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appInfo = appInfo;
|
|
4
|
-
const helpers_1 = require("../helpers");
|
|
1
|
+
import { convertPlistToJson } from '../helpers.js';
|
|
5
2
|
/**
|
|
6
3
|
* Get information about an app installed on the simulator
|
|
7
4
|
*
|
|
@@ -12,7 +9,7 @@ const helpers_1 = require("../helpers");
|
|
|
12
9
|
* returns non-zero return code.
|
|
13
10
|
* @throws {Error} If the `udid` instance property is unset
|
|
14
11
|
*/
|
|
15
|
-
async function appInfo(bundleId) {
|
|
12
|
+
export async function appInfo(bundleId) {
|
|
16
13
|
const { stdout } = await this.exec('appinfo', {
|
|
17
14
|
args: [this.requireUdid('appinfo'), bundleId],
|
|
18
15
|
});
|
|
@@ -23,16 +20,15 @@ async function appInfo(bundleId) {
|
|
|
23
20
|
catch {
|
|
24
21
|
// If JSON parsing fails, use plutil to convert plist-style output to JSON
|
|
25
22
|
try {
|
|
26
|
-
result = await
|
|
23
|
+
result = await convertPlistToJson(stdout);
|
|
27
24
|
}
|
|
28
25
|
catch (err) {
|
|
29
|
-
throw new Error(`Cannot retrieve app info for ${bundleId}: ${err instanceof Error ? err.message : String(err)}`, {
|
|
26
|
+
throw new Error(`Cannot retrieve app info for ${bundleId}: ${err instanceof Error ? err.message : String(err)}`, {
|
|
27
|
+
cause: err,
|
|
28
|
+
});
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
if (!result ||
|
|
33
|
-
typeof result !== 'object' ||
|
|
34
|
-
Array.isArray(result) ||
|
|
35
|
-
!('ApplicationType' in result)) {
|
|
31
|
+
if (!result || typeof result !== 'object' || Array.isArray(result) || !('ApplicationType' in result)) {
|
|
36
32
|
throw new Error(`App with bundle identifier "${bundleId}" not found. Is it installed?`);
|
|
37
33
|
}
|
|
38
34
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appinfo.js","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appinfo.js","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAe,QAAgB;IAC1D,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QAC1C,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;KAC9C,CAAC,CAAC;IACH,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,0EAA0E;QAC1E,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;gBAC/G,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,iBAAiB,IAAI,MAAM,CAAC,EAAE,CAAC;QACrG,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,+BAA+B,CAAC,CAAC;IAC1F,CAAC;IAED,OAAO,MAAiB,CAAC;AAC3B,CAAC"}
|