@mcesystems/apple-kit 1.0.98 → 1.0.100
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/dist/index.js +34 -13
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +28 -7
- package/dist/index.mjs.map +2 -2
- package/dist/types/index.d.ts +5 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1514,6 +1514,7 @@ function portNumbers(from, to) {
|
|
|
1514
1514
|
// src/logic/actions/device.ts
|
|
1515
1515
|
import { existsSync } from "node:fs";
|
|
1516
1516
|
import { rmSync } from "node:fs";
|
|
1517
|
+
import { homedir } from "node:os";
|
|
1517
1518
|
import { join } from "node:path";
|
|
1518
1519
|
|
|
1519
1520
|
// src/logic/wifiSsidParser.ts
|
|
@@ -1556,10 +1557,10 @@ function getLockdownPath() {
|
|
|
1556
1557
|
return process.env.LOCKDOWN_WINDOWS_PATH || join(process.env.ProgramData ?? "C:\\ProgramData", "Apple", "Lockdown");
|
|
1557
1558
|
}
|
|
1558
1559
|
if (process.platform === "darwin") {
|
|
1559
|
-
return "
|
|
1560
|
+
return join(homedir(), "Library", "Caches", "Apple", "Lockdown", "RemotePairing");
|
|
1560
1561
|
}
|
|
1561
1562
|
if (process.platform === "linux") {
|
|
1562
|
-
return "
|
|
1563
|
+
return join(homedir(), ".cache", "apple-kit", "lockdown", "RemotePairing");
|
|
1563
1564
|
}
|
|
1564
1565
|
return null;
|
|
1565
1566
|
}
|
|
@@ -1604,10 +1605,7 @@ var DeviceActions = class {
|
|
|
1604
1605
|
async regularModelNumber() {
|
|
1605
1606
|
logInfo(`Getting device info for ${this.udid}`);
|
|
1606
1607
|
const result = await this.iosClient.regularModelNumber();
|
|
1607
|
-
|
|
1608
|
-
throw new Error("Failed to get regular model number");
|
|
1609
|
-
}
|
|
1610
|
-
return result.output[0];
|
|
1608
|
+
return result;
|
|
1611
1609
|
}
|
|
1612
1610
|
async listDevices() {
|
|
1613
1611
|
logInfo("Listing devices");
|
|
@@ -39191,7 +39189,14 @@ var IosClient = class {
|
|
|
39191
39189
|
return this.runIosCommand(["prepare", "cloudconfig", "--udid", this.udid]);
|
|
39192
39190
|
}
|
|
39193
39191
|
async regularModelNumber() {
|
|
39194
|
-
|
|
39192
|
+
const result = await this.runIosCommand([
|
|
39193
|
+
"lockdown",
|
|
39194
|
+
"get",
|
|
39195
|
+
"RegulatoryModelNumber",
|
|
39196
|
+
"--udid",
|
|
39197
|
+
this.udid
|
|
39198
|
+
]);
|
|
39199
|
+
return result.raw.stdout.trim().replace(/^"|"$/g, "");
|
|
39195
39200
|
}
|
|
39196
39201
|
async installApp(ipaPath) {
|
|
39197
39202
|
return this.runIosCommand(["install", `--path=${ipaPath}`, "--udid", this.udid]);
|
|
@@ -39511,6 +39516,22 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39511
39516
|
this.ensureNotDisposed();
|
|
39512
39517
|
return this.deviceActions.info();
|
|
39513
39518
|
}
|
|
39519
|
+
async batteryInfo() {
|
|
39520
|
+
this.ensureNotDisposed();
|
|
39521
|
+
return this.deviceActions.batteryInfo();
|
|
39522
|
+
}
|
|
39523
|
+
async capacityInfo() {
|
|
39524
|
+
this.ensureNotDisposed();
|
|
39525
|
+
return this.deviceActions.capacityInfo();
|
|
39526
|
+
}
|
|
39527
|
+
async cloudConfigInfo() {
|
|
39528
|
+
this.ensureNotDisposed();
|
|
39529
|
+
return this.deviceActions.cloudConfigInfo();
|
|
39530
|
+
}
|
|
39531
|
+
async regularModelNumber() {
|
|
39532
|
+
this.ensureNotDisposed();
|
|
39533
|
+
return this.deviceActions.regularModelNumber();
|
|
39534
|
+
}
|
|
39514
39535
|
async listDevices() {
|
|
39515
39536
|
this.ensureNotDisposed();
|
|
39516
39537
|
return this.deviceActions.listDevices();
|