@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.js
CHANGED
|
@@ -1527,6 +1527,7 @@ function portNumbers(from, to) {
|
|
|
1527
1527
|
// src/logic/actions/device.ts
|
|
1528
1528
|
var import_node_fs = require("node:fs");
|
|
1529
1529
|
var import_node_fs2 = require("node:fs");
|
|
1530
|
+
var import_node_os3 = require("node:os");
|
|
1530
1531
|
var import_node_path = require("node:path");
|
|
1531
1532
|
|
|
1532
1533
|
// src/logic/wifiSsidParser.ts
|
|
@@ -1569,10 +1570,10 @@ function getLockdownPath() {
|
|
|
1569
1570
|
return process.env.LOCKDOWN_WINDOWS_PATH || (0, import_node_path.join)(process.env.ProgramData ?? "C:\\ProgramData", "Apple", "Lockdown");
|
|
1570
1571
|
}
|
|
1571
1572
|
if (process.platform === "darwin") {
|
|
1572
|
-
return "
|
|
1573
|
+
return (0, import_node_path.join)((0, import_node_os3.homedir)(), "Library", "Caches", "Apple", "Lockdown", "RemotePairing");
|
|
1573
1574
|
}
|
|
1574
1575
|
if (process.platform === "linux") {
|
|
1575
|
-
return "
|
|
1576
|
+
return (0, import_node_path.join)((0, import_node_os3.homedir)(), ".cache", "apple-kit", "lockdown", "RemotePairing");
|
|
1576
1577
|
}
|
|
1577
1578
|
return null;
|
|
1578
1579
|
}
|
|
@@ -1617,10 +1618,7 @@ var DeviceActions = class {
|
|
|
1617
1618
|
async regularModelNumber() {
|
|
1618
1619
|
logInfo(`Getting device info for ${this.udid}`);
|
|
1619
1620
|
const result = await this.iosClient.regularModelNumber();
|
|
1620
|
-
|
|
1621
|
-
throw new Error("Failed to get regular model number");
|
|
1622
|
-
}
|
|
1623
|
-
return result.output[0];
|
|
1621
|
+
return result;
|
|
1624
1622
|
}
|
|
1625
1623
|
async listDevices() {
|
|
1626
1624
|
logInfo("Listing devices");
|
|
@@ -1739,10 +1737,10 @@ ${out.stderr}`;
|
|
|
1739
1737
|
var import_node_crypto = require("node:crypto");
|
|
1740
1738
|
var import_node_util = require("node:util");
|
|
1741
1739
|
var import_node_process2 = __toESM(require("node:process"), 1);
|
|
1742
|
-
var
|
|
1740
|
+
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
1743
1741
|
var import_node_tty2 = __toESM(require("node:tty"), 1);
|
|
1744
1742
|
var import_node_process3 = __toESM(require("node:process"), 1);
|
|
1745
|
-
var
|
|
1743
|
+
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
1746
1744
|
var import_node_tty3 = __toESM(require("node:tty"), 1);
|
|
1747
1745
|
var __create3 = Object.create;
|
|
1748
1746
|
var __defProp3 = Object.defineProperty;
|
|
@@ -36789,7 +36787,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
36789
36787
|
return min;
|
|
36790
36788
|
}
|
|
36791
36789
|
if (import_node_process2.default.platform === "win32") {
|
|
36792
|
-
const osRelease =
|
|
36790
|
+
const osRelease = import_node_os4.default.release().split(".");
|
|
36793
36791
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
36794
36792
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
36795
36793
|
}
|
|
@@ -37886,7 +37884,7 @@ function _supportsColor22(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
37886
37884
|
return min;
|
|
37887
37885
|
}
|
|
37888
37886
|
if (import_node_process3.default.platform === "win32") {
|
|
37889
|
-
const osRelease =
|
|
37887
|
+
const osRelease = import_node_os5.default.release().split(".");
|
|
37890
37888
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
37891
37889
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
37892
37890
|
}
|
|
@@ -38491,7 +38489,7 @@ var ProxyActions = class {
|
|
|
38491
38489
|
// src/logic/activationFlow.ts
|
|
38492
38490
|
var import_node_events = require("node:events");
|
|
38493
38491
|
var import_promises2 = require("node:fs/promises");
|
|
38494
|
-
var
|
|
38492
|
+
var import_node_os6 = require("node:os");
|
|
38495
38493
|
var import_node_path4 = require("node:path");
|
|
38496
38494
|
|
|
38497
38495
|
// src/types/activation.ts
|
|
@@ -38917,7 +38915,7 @@ var ActivationFlow = class {
|
|
|
38917
38915
|
}
|
|
38918
38916
|
};
|
|
38919
38917
|
async function saveProfileToTemp(profile, prefix) {
|
|
38920
|
-
const tempFilePath = (0, import_node_path4.join)((0,
|
|
38918
|
+
const tempFilePath = (0, import_node_path4.join)((0, import_node_os6.tmpdir)(), `mce_${prefix}_${Date.now()}.mobileconfig`);
|
|
38921
38919
|
await (0, import_promises2.writeFile)(tempFilePath, profile, "utf-8");
|
|
38922
38920
|
logInfo6(`Profile saved to: ${tempFilePath}`);
|
|
38923
38921
|
return tempFilePath;
|
|
@@ -39205,7 +39203,14 @@ var IosClient = class {
|
|
|
39205
39203
|
return this.runIosCommand(["prepare", "cloudconfig", "--udid", this.udid]);
|
|
39206
39204
|
}
|
|
39207
39205
|
async regularModelNumber() {
|
|
39208
|
-
|
|
39206
|
+
const result = await this.runIosCommand([
|
|
39207
|
+
"lockdown",
|
|
39208
|
+
"get",
|
|
39209
|
+
"RegulatoryModelNumber",
|
|
39210
|
+
"--udid",
|
|
39211
|
+
this.udid
|
|
39212
|
+
]);
|
|
39213
|
+
return result.raw.stdout.trim().replace(/^"|"$/g, "");
|
|
39209
39214
|
}
|
|
39210
39215
|
async installApp(ipaPath) {
|
|
39211
39216
|
return this.runIosCommand(["install", `--path=${ipaPath}`, "--udid", this.udid]);
|
|
@@ -39525,6 +39530,22 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39525
39530
|
this.ensureNotDisposed();
|
|
39526
39531
|
return this.deviceActions.info();
|
|
39527
39532
|
}
|
|
39533
|
+
async batteryInfo() {
|
|
39534
|
+
this.ensureNotDisposed();
|
|
39535
|
+
return this.deviceActions.batteryInfo();
|
|
39536
|
+
}
|
|
39537
|
+
async capacityInfo() {
|
|
39538
|
+
this.ensureNotDisposed();
|
|
39539
|
+
return this.deviceActions.capacityInfo();
|
|
39540
|
+
}
|
|
39541
|
+
async cloudConfigInfo() {
|
|
39542
|
+
this.ensureNotDisposed();
|
|
39543
|
+
return this.deviceActions.cloudConfigInfo();
|
|
39544
|
+
}
|
|
39545
|
+
async regularModelNumber() {
|
|
39546
|
+
this.ensureNotDisposed();
|
|
39547
|
+
return this.deviceActions.regularModelNumber();
|
|
39548
|
+
}
|
|
39528
39549
|
async listDevices() {
|
|
39529
39550
|
this.ensureNotDisposed();
|
|
39530
39551
|
return this.deviceActions.listDevices();
|