node-simctl 8.2.9 → 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 +10 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [9.0.0](https://github.com/appium/node-simctl/compare/v8.2.9...v9.0.0) (2026-07-24)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* Consumers using require('node-simctl') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point.
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Migrate the package to ESM ([#312](https://github.com/appium/node-simctl/issues/312)) ([6f67beb](https://github.com/appium/node-simctl/commit/6f67beb4fcd0b220aac74e7948c53a2310006df2))
|
|
10
|
+
|
|
1
11
|
## [8.2.9](https://github.com/appium/node-simctl/compare/v8.2.8...v8.2.9) (2026-07-15)
|
|
2
12
|
|
|
3
13
|
### Miscellaneous Chores
|
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 * as semver from 'semver';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { Readable } from 'node:stream';
|
|
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) => {
|
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,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAErC,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,C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L,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,oCAAoC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EACtF,EAAC,KAAK,EAAE,GAAG,EAAC,CACb,CAAC;IACJ,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 installCommands from './subcommands/install';
|
|
10
|
-
import * as ioCommands from './subcommands/io';
|
|
11
|
-
import * as keychainCommands from './subcommands/keychain';
|
|
12
|
-
import * as launchCommands from './subcommands/launch';
|
|
13
|
-
import * as listCommands from './subcommands/list';
|
|
14
|
-
import * as openurlCommands from './subcommands/openurl';
|
|
15
|
-
import * as pbcopyCommands from './subcommands/pbcopy';
|
|
16
|
-
import * as pbpasteCommands from './subcommands/pbpaste';
|
|
17
|
-
import * as privacyCommands from './subcommands/privacy';
|
|
18
|
-
import * as pushCommands from './subcommands/push';
|
|
19
|
-
import * as envCommands from './subcommands/getenv';
|
|
20
|
-
import * as shutdownCommands from './subcommands/shutdown';
|
|
21
|
-
import * as spawnCommands from './subcommands/spawn';
|
|
22
|
-
import * as terminateCommands from './subcommands/terminate';
|
|
23
|
-
import * as uiCommands from './subcommands/ui';
|
|
24
|
-
import * as uninstallCommands from './subcommands/uninstall';
|
|
25
|
-
import * as locationCommands from './subcommands/location';
|
|
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 installCommands from './subcommands/install.js';
|
|
10
|
+
import * as ioCommands from './subcommands/io.js';
|
|
11
|
+
import * as keychainCommands from './subcommands/keychain.js';
|
|
12
|
+
import * as launchCommands from './subcommands/launch.js';
|
|
13
|
+
import * as listCommands from './subcommands/list.js';
|
|
14
|
+
import * as openurlCommands from './subcommands/openurl.js';
|
|
15
|
+
import * as pbcopyCommands from './subcommands/pbcopy.js';
|
|
16
|
+
import * as pbpasteCommands from './subcommands/pbpaste.js';
|
|
17
|
+
import * as privacyCommands from './subcommands/privacy.js';
|
|
18
|
+
import * as pushCommands from './subcommands/push.js';
|
|
19
|
+
import * as envCommands from './subcommands/getenv.js';
|
|
20
|
+
import * as shutdownCommands from './subcommands/shutdown.js';
|
|
21
|
+
import * as spawnCommands from './subcommands/spawn.js';
|
|
22
|
+
import * as terminateCommands from './subcommands/terminate.js';
|
|
23
|
+
import * as uiCommands from './subcommands/ui.js';
|
|
24
|
+
import * as uninstallCommands from './subcommands/uninstall.js';
|
|
25
|
+
import * as locationCommands from './subcommands/location.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":"AAIA,OAAO,KAAK,gBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"simctl.d.ts","sourceRoot":"","sources":["../../lib/simctl.ts"],"names":[],"mappings":"AAIA,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,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAA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
|
|
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 which from 'which';
|
|
2
|
+
import { log, LOG_PREFIX } from './logger.js';
|
|
3
|
+
import { DEFAULT_EXEC_TIMEOUT, getXcrunBinary } from './helpers.js';
|
|
4
|
+
import { exec as tpExec, SubProcess } from 'teen_process';
|
|
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 installCommands from './subcommands/install.js';
|
|
14
|
+
import * as ioCommands from './subcommands/io.js';
|
|
15
|
+
import * as keychainCommands from './subcommands/keychain.js';
|
|
16
|
+
import * as launchCommands from './subcommands/launch.js';
|
|
17
|
+
import * as listCommands from './subcommands/list.js';
|
|
18
|
+
import * as openurlCommands from './subcommands/openurl.js';
|
|
19
|
+
import * as pbcopyCommands from './subcommands/pbcopy.js';
|
|
20
|
+
import * as pbpasteCommands from './subcommands/pbpaste.js';
|
|
21
|
+
import * as privacyCommands from './subcommands/privacy.js';
|
|
22
|
+
import * as pushCommands from './subcommands/push.js';
|
|
23
|
+
import * as envCommands from './subcommands/getenv.js';
|
|
24
|
+
import * as shutdownCommands from './subcommands/shutdown.js';
|
|
25
|
+
import * as spawnCommands from './subcommands/spawn.js';
|
|
26
|
+
import * as terminateCommands from './subcommands/terminate.js';
|
|
27
|
+
import * as uiCommands from './subcommands/ui.js';
|
|
28
|
+
import * as uninstallCommands from './subcommands/uninstall.js';
|
|
29
|
+
import * as locationCommands from './subcommands/location.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;
|
|
@@ -150,10 +111,10 @@ class Simctl {
|
|
|
150
111
|
* @returns Promise resolving to the xcrun binary path
|
|
151
112
|
*/
|
|
152
113
|
async requireXcrun() {
|
|
153
|
-
const xcrunBinary =
|
|
114
|
+
const xcrunBinary = getXcrunBinary();
|
|
154
115
|
if (!this.xcrun.path) {
|
|
155
116
|
try {
|
|
156
|
-
this.xcrun.path = await (
|
|
117
|
+
this.xcrun.path = await which(xcrunBinary);
|
|
157
118
|
}
|
|
158
119
|
catch {
|
|
159
120
|
throw new Error(`${xcrunBinary} tool has not been found in PATH. ` +
|
|
@@ -209,7 +170,7 @@ class Simctl {
|
|
|
209
170
|
execArgs = [xcrun, args, execOpts];
|
|
210
171
|
}
|
|
211
172
|
// We know what we are doing here - the type system can't handle the dynamic nature
|
|
212
|
-
return (asynchronous ? new
|
|
173
|
+
return (asynchronous ? new SubProcess(...execArgs) : await tpExec(...execArgs));
|
|
213
174
|
}
|
|
214
175
|
catch (e) {
|
|
215
176
|
if (!this.logErrors || !logErrors) {
|
|
@@ -218,16 +179,15 @@ class Simctl {
|
|
|
218
179
|
}
|
|
219
180
|
else if (e.stderr) {
|
|
220
181
|
const msg = `Error running '${subcommand}': ${e.stderr.trim()}`;
|
|
221
|
-
|
|
182
|
+
log.debug(LOG_PREFIX, msg);
|
|
222
183
|
e.message = msg;
|
|
223
184
|
}
|
|
224
185
|
else {
|
|
225
|
-
|
|
186
|
+
log.debug(LOG_PREFIX, e.message);
|
|
226
187
|
}
|
|
227
188
|
throw e;
|
|
228
189
|
}
|
|
229
190
|
}
|
|
230
191
|
}
|
|
231
|
-
|
|
232
|
-
exports.default = Simctl;
|
|
192
|
+
export default Simctl;
|
|
233
193
|
//# 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,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAClE,OAAO,EAAC,IAAI,IAAI,MAAM,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,O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,CAAC;iBAAM,CAAC;gBACN,QAAQ,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YACrC,CAAC;YACD,mFAAmF;YACnF,OAAO,CACL,YAAY,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,QAAQ,CAAC,CACtD,CAAC;QACrB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,SAAS,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,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAExD;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAIxC"}
|
|
@@ -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":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAE5B,QAAgB;IAEhB,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":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGzC;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA6B9E"}
|
|
@@ -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,7 +20,7 @@ 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
26
|
throw new Error(`Cannot retrieve app info for ${bundleId}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
@@ -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"],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":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/boot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW5D"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bootDevice = bootDevice;
|
|
4
|
-
const logger_1 = require("../logger");
|
|
1
|
+
import { log, LOG_PREFIX } from '../logger.js';
|
|
5
2
|
/**
|
|
6
3
|
* Boot the particular Simulator if it is not 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 bootDevice() {
|
|
9
|
+
export async function bootDevice() {
|
|
13
10
|
try {
|
|
14
11
|
await this.exec('boot', {
|
|
15
12
|
args: [this.requireUdid('boot')],
|
|
@@ -19,7 +16,7 @@ async function bootDevice() {
|
|
|
19
16
|
if (e.message?.includes('Unable to boot device in current state: Booted')) {
|
|
20
17
|
throw e;
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
log.debug(LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
//# sourceMappingURL=boot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../../../lib/subcommands/boot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../../../lib/subcommands/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,gDAAgD,CAAC,EAAE,CAAC;YAC1E,MAAM,CAAC,CAAC;QACV,CAAC;QACD,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,iDAAiD,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Simctl } from '../simctl';
|
|
2
|
-
import type { BootMonitorOptions } from '../types';
|
|
1
|
+
import type { Simctl } from '../simctl.js';
|
|
2
|
+
import type { BootMonitorOptions } from '../types.js';
|
|
3
3
|
import type { SubProcess } from 'teen_process';
|
|
4
4
|
/**
|
|
5
5
|
* Start monitoring for boot status of the particular Simulator.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAwFrB"}
|