node-simctl 8.2.0 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/lib/helpers.d.ts +0 -6
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +0 -10
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/subcommands/io.js +2 -2
- package/build/lib/subcommands/io.js.map +1 -1
- package/build/lib/subcommands/push.js +2 -2
- package/build/lib/subcommands/push.js.map +1 -1
- package/lib/helpers.ts +0 -10
- package/lib/subcommands/io.ts +2 -2
- package/lib/subcommands/push.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [8.2.2](https://github.com/appium/node-simctl/compare/v8.2.1...v8.2.2) (2026-05-06)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* **deps-dev:** bump sinon from 21.1.2 to 22.0.0 ([#296](https://github.com/appium/node-simctl/issues/296)) ([1cbde44](https://github.com/appium/node-simctl/commit/1cbde44a8e4e5a7655ff54255272769556723edf))
|
|
6
|
+
|
|
7
|
+
## [8.2.1](https://github.com/appium/node-simctl/compare/v8.2.0...v8.2.1) (2026-04-28)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Copilot review comments ([#295](https://github.com/appium/node-simctl/issues/295)) ([1055143](https://github.com/appium/node-simctl/commit/10551433cd68d2c8ad298392a9ab354deb5a841d))
|
|
12
|
+
|
|
1
13
|
## [8.2.0](https://github.com/appium/node-simctl/compare/v8.1.7...v8.2.0) (2026-04-25)
|
|
2
14
|
|
|
3
15
|
### Features
|
package/build/lib/helpers.d.ts
CHANGED
|
@@ -13,12 +13,6 @@ export declare function normalizeVersion(version: string): string;
|
|
|
13
13
|
* @returns The xcrun binary name
|
|
14
14
|
*/
|
|
15
15
|
export declare function getXcrunBinary(): string;
|
|
16
|
-
/**
|
|
17
|
-
* Generate a UUID v4
|
|
18
|
-
*
|
|
19
|
-
* @returns Promise resolving to UUID string
|
|
20
|
-
*/
|
|
21
|
-
export declare function uuidV4(): Promise<string>;
|
|
22
16
|
/**
|
|
23
17
|
* Convert plist-style output to JSON using plutil
|
|
24
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AAIA,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
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AAIA,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
|
@@ -36,7 +36,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.SIM_RUNTIME_NAME = exports.DEFAULT_EXEC_TIMEOUT = void 0;
|
|
37
37
|
exports.normalizeVersion = normalizeVersion;
|
|
38
38
|
exports.getXcrunBinary = getXcrunBinary;
|
|
39
|
-
exports.uuidV4 = uuidV4;
|
|
40
39
|
exports.convertPlistToJson = convertPlistToJson;
|
|
41
40
|
const semver = __importStar(require("semver"));
|
|
42
41
|
const node_child_process_1 = require("node:child_process");
|
|
@@ -64,15 +63,6 @@ function normalizeVersion(version) {
|
|
|
64
63
|
function getXcrunBinary() {
|
|
65
64
|
return process.env.XCRUN_BINARY || 'xcrun';
|
|
66
65
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Generate a UUID v4
|
|
69
|
-
*
|
|
70
|
-
* @returns Promise resolving to UUID string
|
|
71
|
-
*/
|
|
72
|
-
async function uuidV4() {
|
|
73
|
-
const uuidLib = await import('uuid');
|
|
74
|
-
return uuidLib.v4();
|
|
75
|
-
}
|
|
76
66
|
/**
|
|
77
67
|
* Convert plist-style output to JSON using plutil
|
|
78
68
|
*
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,4CAMC;AAKD,wCAEC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,4CAMC;AAKD,wCAEC;AASD,gDAkCC;AAvED,+CAAiC;AACjC,2DAAyC;AACzC,6CAAqC;AAExB,QAAA,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK;AAC5C,QAAA,gBAAgB,GAAG,qCAAqC,CAAC;AAEtE;;;;;;;GAOG;AACH,SAAgB,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,a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BAChC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBACxC,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,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,CACvF,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"}
|
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getScreenshot = getScreenshot;
|
|
7
7
|
const rimraf_1 = require("rimraf");
|
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const node_os_1 = __importDefault(require("node:os"));
|
|
10
11
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
11
|
-
const helpers_1 = require("../helpers");
|
|
12
12
|
/**
|
|
13
13
|
* Gets base64 screenshot for device
|
|
14
14
|
* It is required that Simulator is in _booted_ state.
|
|
@@ -21,7 +21,7 @@ const helpers_1 = require("../helpers");
|
|
|
21
21
|
*/
|
|
22
22
|
async function getScreenshot() {
|
|
23
23
|
const udid = this.requireUdid('io screenshot');
|
|
24
|
-
const pathToScreenshotPng = node_path_1.default.resolve(node_os_1.default.tmpdir(), `${
|
|
24
|
+
const pathToScreenshotPng = node_path_1.default.resolve(node_os_1.default.tmpdir(), `${(0, node_crypto_1.randomUUID)()}.png`);
|
|
25
25
|
try {
|
|
26
26
|
await this.exec('io', {
|
|
27
27
|
args: [udid, 'screenshot', pathToScreenshotPng],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io.js","sourceRoot":"","sources":["../../../lib/subcommands/io.ts"],"names":[],"mappings":";;;;;AAiBA,sCAWC;AA5BD,mCAA8B;AAC9B,0DAA6B;AAC7B,sDAAyB;AACzB,gEAAkC;
|
|
1
|
+
{"version":3,"file":"io.js","sourceRoot":"","sources":["../../../lib/subcommands/io.ts"],"names":[],"mappings":";;;;;AAiBA,sCAWC;AA5BD,mCAA8B;AAC9B,6CAAuC;AACvC,0DAA6B;AAC7B,sDAAyB;AACzB,gEAAkC;AAGlC;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAC/C,MAAM,mBAAmB,GAAG,mBAAI,CAAC,OAAO,CAAC,iBAAE,CAAC,MAAM,EAAE,EAAE,GAAG,IAAA,wBAAU,GAAE,MAAM,CAAC,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACpB,IAAI,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,mBAAmB,CAAC;SAChD,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,kBAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrE,CAAC;YAAS,CAAC;QACT,MAAM,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.pushNotification = pushNotification;
|
|
7
7
|
const rimraf_1 = require("rimraf");
|
|
8
|
-
const
|
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const node_os_1 = __importDefault(require("node:os"));
|
|
11
11
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -30,7 +30,7 @@ const promises_1 = __importDefault(require("node:fs/promises"));
|
|
|
30
30
|
* @throws {Error} If the `udid` instance property is unset
|
|
31
31
|
*/
|
|
32
32
|
async function pushNotification(payload) {
|
|
33
|
-
const dstPath = node_path_1.default.resolve(node_os_1.default.tmpdir(), `${
|
|
33
|
+
const dstPath = node_path_1.default.resolve(node_os_1.default.tmpdir(), `${(0, node_crypto_1.randomUUID)()}.json`);
|
|
34
34
|
try {
|
|
35
35
|
await promises_1.default.writeFile(dstPath, JSON.stringify(payload), 'utf8');
|
|
36
36
|
await this.exec('push', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":";;;;;AA2BA,4CAUC;AArCD,mCAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../lib/subcommands/push.ts"],"names":[],"mappings":";;;;;AA2BA,4CAUC;AArCD,mCAA8B;AAC9B,6CAAuC;AACvC,0DAA6B;AAC7B,sDAAyB;AACzB,gEAAkC;AAGlC;;;;;;;;;;;;;;;;;;;GAmBG;AACI,KAAK,UAAU,gBAAgB,CAAe,OAA4B;IAC/E,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,iBAAE,CAAC,MAAM,EAAE,EAAE,GAAG,IAAA,wBAAU,GAAE,OAAO,CAAC,CAAC;IAClE,IAAI,CAAC;QACH,MAAM,kBAAE,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,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
package/lib/helpers.ts
CHANGED
|
@@ -28,16 +28,6 @@ export function getXcrunBinary(): string {
|
|
|
28
28
|
return process.env.XCRUN_BINARY || 'xcrun';
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Generate a UUID v4
|
|
33
|
-
*
|
|
34
|
-
* @returns Promise resolving to UUID string
|
|
35
|
-
*/
|
|
36
|
-
export async function uuidV4(): Promise<string> {
|
|
37
|
-
const uuidLib = await import('uuid');
|
|
38
|
-
return uuidLib.v4();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
31
|
/**
|
|
42
32
|
* Convert plist-style output to JSON using plutil
|
|
43
33
|
*
|
package/lib/subcommands/io.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {rimraf} from 'rimraf';
|
|
2
|
+
import {randomUUID} from 'node:crypto';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import os from 'node:os';
|
|
4
5
|
import fs from 'node:fs/promises';
|
|
5
|
-
import {uuidV4} from '../helpers';
|
|
6
6
|
import type {Simctl} from '../simctl';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -17,7 +17,7 @@ import type {Simctl} from '../simctl';
|
|
|
17
17
|
*/
|
|
18
18
|
export async function getScreenshot(this: Simctl): Promise<string> {
|
|
19
19
|
const udid = this.requireUdid('io screenshot');
|
|
20
|
-
const pathToScreenshotPng = path.resolve(os.tmpdir(), `${
|
|
20
|
+
const pathToScreenshotPng = path.resolve(os.tmpdir(), `${randomUUID()}.png`);
|
|
21
21
|
try {
|
|
22
22
|
await this.exec('io', {
|
|
23
23
|
args: [udid, 'screenshot', pathToScreenshotPng],
|
package/lib/subcommands/push.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {rimraf} from 'rimraf';
|
|
2
|
-
import {
|
|
2
|
+
import {randomUUID} from 'node:crypto';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import fs from 'node:fs/promises';
|
|
@@ -26,7 +26,7 @@ import type {Simctl} from '../simctl';
|
|
|
26
26
|
* @throws {Error} If the `udid` instance property is unset
|
|
27
27
|
*/
|
|
28
28
|
export async function pushNotification(this: Simctl, payload: Record<string, any>): Promise<void> {
|
|
29
|
-
const dstPath = path.resolve(os.tmpdir(), `${
|
|
29
|
+
const dstPath = path.resolve(os.tmpdir(), `${randomUUID()}.json`);
|
|
30
30
|
try {
|
|
31
31
|
await fs.writeFile(dstPath, JSON.stringify(payload), 'utf8');
|
|
32
32
|
await this.exec('push', {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"ios",
|
|
7
7
|
"simctl"
|
|
8
8
|
],
|
|
9
|
-
"version": "8.2.
|
|
9
|
+
"version": "8.2.2",
|
|
10
10
|
"author": "Appium Contributors",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"repository": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"mocha": "^11.0.1",
|
|
72
72
|
"prettier": "^3.0.0",
|
|
73
73
|
"semantic-release": "^25.0.2",
|
|
74
|
-
"sinon": "^
|
|
74
|
+
"sinon": "^22.0.0",
|
|
75
75
|
"ts-node": "^10.9.1",
|
|
76
76
|
"typescript": "^6.0.2"
|
|
77
77
|
},
|