@mcesystems/apple-kit 1.0.94 → 1.0.96
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/README.md +258 -258
- package/dist/index.js +62 -55
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +62 -55
- package/dist/index.mjs.map +3 -3
- package/dist/resources/plist/certificate-trust.xml +43 -43
- package/dist/resources/plist/wifi-enterprise.xml +59 -59
- package/dist/resources/plist/wifi-standard.xml +50 -50
- package/dist/types/index.d.ts +15 -2
- package/package.json +3 -3
- package/resources/ios.exe +0 -0
- package/resources/wintun-LICENSE.txt +84 -0
- package/resources/wintun.dll +0 -0
- package/scripts/README.md +209 -209
- package/scripts/build-windows.sh.template +222 -222
- package/dist/resources/bin/darwin/idevice_id +0 -0
- package/dist/resources/bin/darwin/idevicedebug +0 -0
- package/dist/resources/bin/darwin/idevicediagnostics +0 -0
- package/dist/resources/bin/darwin/ideviceinfo +0 -0
- package/dist/resources/bin/darwin/ideviceinstaller +0 -0
- package/dist/resources/bin/darwin/idevicename +0 -0
- package/dist/resources/bin/darwin/idevicepair +0 -0
- package/dist/resources/bin/darwin/idevicescreenshot +0 -0
- package/dist/resources/bin/darwin/idevicesyslog +0 -0
- package/dist/resources/bin/darwin/iproxy +0 -0
- package/dist/resources/bin/darwin/libcrypto.3.dylib +0 -0
- package/dist/resources/bin/darwin/libimobiledevice-1.0.6.dylib +0 -0
- package/dist/resources/bin/darwin/libimobiledevice-glue-1.0.0.dylib +0 -0
- package/dist/resources/bin/darwin/liblzma.5.dylib +0 -0
- package/dist/resources/bin/darwin/libplist-2.0.4.dylib +0 -0
- package/dist/resources/bin/darwin/libssl.3.dylib +0 -0
- package/dist/resources/bin/darwin/libusbmuxd-2.0.7.dylib +0 -0
- package/dist/resources/bin/darwin/libzip.5.dylib +0 -0
- package/dist/resources/bin/darwin/libzstd.1.dylib +0 -0
- package/dist/resources/licenses/LGPL-2.1.txt +0 -33
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/logic/actions/activation.d.ts +0 -12
- package/dist/types/logic/actions/activation.d.ts.map +0 -1
- package/dist/types/logic/actions/device.d.ts +0 -15
- package/dist/types/logic/actions/device.d.ts.map +0 -1
- package/dist/types/logic/actions/install.d.ts +0 -10
- package/dist/types/logic/actions/install.d.ts.map +0 -1
- package/dist/types/logic/actions/pair.d.ts +0 -6
- package/dist/types/logic/actions/pair.d.ts.map +0 -1
- package/dist/types/logic/actions/proxy.d.ts +0 -23
- package/dist/types/logic/actions/proxy.d.ts.map +0 -1
- package/dist/types/logic/actions/restore.d.ts +0 -36
- package/dist/types/logic/actions/restore.d.ts.map +0 -1
- package/dist/types/logic/actions/tool.d.ts +0 -8
- package/dist/types/logic/actions/tool.d.ts.map +0 -1
- package/dist/types/logic/activationFlow.d.ts +0 -15
- package/dist/types/logic/activationFlow.d.ts.map +0 -1
- package/dist/types/logic/appleDeviceKit.d.ts +0 -164
- package/dist/types/logic/appleDeviceKit.d.ts.map +0 -1
- package/dist/types/logic/dataParser.d.ts +0 -23
- package/dist/types/logic/dataParser.d.ts.map +0 -1
- package/dist/types/logic/iosCli.d.ts +0 -6
- package/dist/types/logic/iosCli.d.ts.map +0 -1
- package/dist/types/logic/utils/resolvePath.d.ts +0 -13
- package/dist/types/logic/utils/resolvePath.d.ts.map +0 -1
- package/dist/types/types/activation.d.ts +0 -28
- package/dist/types/types/activation.d.ts.map +0 -1
- package/dist/types/types/ios.d.ts +0 -152
- package/dist/types/types/ios.d.ts.map +0 -1
- package/dist/types/types/trust.d.ts +0 -10
- package/dist/types/types/trust.d.ts.map +0 -1
- package/dist/types/types/types.d.ts +0 -47
- package/dist/types/types/types.d.ts.map +0 -1
- package/dist/types/types/wifi.d.ts +0 -19
- package/dist/types/types/wifi.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -140
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/utils/debug.d.ts +0 -17
- package/dist/types/utils/debug.d.ts.map +0 -1
- package/dist/types/utils/templateLoader.d.ts +0 -8
- package/dist/types/utils/templateLoader.d.ts.map +0 -1
- package/dist/types/utils/wifiProfile.d.ts +0 -14
- package/dist/types/utils/wifiProfile.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -376,8 +376,7 @@ var require_retry_promise = __commonJS({
|
|
|
376
376
|
|
|
377
377
|
// src/logic/appleDeviceKit.ts
|
|
378
378
|
import { readFileSync, unlinkSync } from "node:fs";
|
|
379
|
-
import { mkdir, stat } from "node:fs/promises";
|
|
380
|
-
import { writeFile as writeFile2 } from "node:fs/promises";
|
|
379
|
+
import { mkdir, stat, writeFile as writeFile2 } from "node:fs/promises";
|
|
381
380
|
import { join as join5 } from "node:path";
|
|
382
381
|
|
|
383
382
|
// ../tool-debug/dist/index.mjs
|
|
@@ -1213,14 +1212,14 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1213
1212
|
const logInfo8 = (0, import_debug.default)(`${namespace}:info`);
|
|
1214
1213
|
const logTask5 = (0, import_debug.default)(`${namespace}:task`);
|
|
1215
1214
|
const logError4 = (0, import_debug.default)(`${namespace}:error`);
|
|
1216
|
-
const
|
|
1215
|
+
const logDetail3 = (0, import_debug.default)(`${namespace}:detail`);
|
|
1217
1216
|
const logDebug = (0, import_debug.default)(`${namespace}:debug`);
|
|
1218
1217
|
const logWarning2 = (0, import_debug.default)(`${namespace}:warning`);
|
|
1219
1218
|
const logColor = (0, import_debug.default)(`${namespace}:color`);
|
|
1220
1219
|
logInfo8.color = "19";
|
|
1221
1220
|
logTask5.color = "25";
|
|
1222
1221
|
logError4.color = "1";
|
|
1223
|
-
|
|
1222
|
+
logDetail3.color = "199";
|
|
1224
1223
|
logWarning2.color = "186";
|
|
1225
1224
|
logDebug.color = "211";
|
|
1226
1225
|
logColor.enabled = true;
|
|
@@ -1228,7 +1227,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1228
1227
|
logInfo8.namespace = `${namespace2}:info`;
|
|
1229
1228
|
logTask5.namespace = `${namespace2}:task`;
|
|
1230
1229
|
logError4.namespace = `${namespace2}:error`;
|
|
1231
|
-
|
|
1230
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
1232
1231
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
1233
1232
|
logDebug.namespace = `${namespace2}:debug`;
|
|
1234
1233
|
}
|
|
@@ -1239,7 +1238,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1239
1238
|
logTask5.enabled = true;
|
|
1240
1239
|
logError4.enabled = true;
|
|
1241
1240
|
logWarning2.enabled = true;
|
|
1242
|
-
|
|
1241
|
+
logDetail3.enabled = false;
|
|
1243
1242
|
logDebug.enabled = false;
|
|
1244
1243
|
break;
|
|
1245
1244
|
case "debug":
|
|
@@ -1247,7 +1246,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1247
1246
|
logTask5.enabled = true;
|
|
1248
1247
|
logError4.enabled = true;
|
|
1249
1248
|
logWarning2.enabled = true;
|
|
1250
|
-
|
|
1249
|
+
logDetail3.enabled = true;
|
|
1251
1250
|
logDebug.enabled = true;
|
|
1252
1251
|
break;
|
|
1253
1252
|
case "none":
|
|
@@ -1255,7 +1254,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1255
1254
|
logTask5.enabled = false;
|
|
1256
1255
|
logError4.enabled = false;
|
|
1257
1256
|
logWarning2.enabled = false;
|
|
1258
|
-
|
|
1257
|
+
logDetail3.enabled = false;
|
|
1259
1258
|
logDebug.enabled = false;
|
|
1260
1259
|
break;
|
|
1261
1260
|
}
|
|
@@ -1273,7 +1272,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1273
1272
|
logError4.color = color;
|
|
1274
1273
|
break;
|
|
1275
1274
|
case "detail":
|
|
1276
|
-
|
|
1275
|
+
logDetail3.color = color;
|
|
1277
1276
|
break;
|
|
1278
1277
|
case "warning":
|
|
1279
1278
|
logWarning2.color = color;
|
|
@@ -1331,7 +1330,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
1331
1330
|
function logHeader(title) {
|
|
1332
1331
|
logInfo8(`${header(title, 2)}`);
|
|
1333
1332
|
}
|
|
1334
|
-
function
|
|
1333
|
+
function logDataObject3(title, ...args) {
|
|
1335
1334
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
1336
1335
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
1337
1336
|
let callerDetails = "";
|
|
@@ -1340,7 +1339,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
1340
1339
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
1341
1340
|
callerDetails = `${functionName}`;
|
|
1342
1341
|
}
|
|
1343
|
-
|
|
1342
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
1344
1343
|
${args.reduce((acc, arg) => `${acc}
|
|
1345
1344
|
${logDataDetail(arg)}`, "")}
|
|
1346
1345
|
|
|
@@ -1363,14 +1362,14 @@ ${"=".repeat(80)}`);
|
|
|
1363
1362
|
logInfo: logInfo8,
|
|
1364
1363
|
logTask: logTask5,
|
|
1365
1364
|
logError: logError4,
|
|
1366
|
-
logDetail:
|
|
1365
|
+
logDetail: logDetail3,
|
|
1367
1366
|
logDebug,
|
|
1368
1367
|
logWarning: logWarning2,
|
|
1369
1368
|
logColor,
|
|
1370
1369
|
setColors,
|
|
1371
1370
|
printColors,
|
|
1372
1371
|
logHeader,
|
|
1373
|
-
logDataObject:
|
|
1372
|
+
logDataObject: logDataObject3,
|
|
1374
1373
|
logErrorObject,
|
|
1375
1374
|
setLogLevel,
|
|
1376
1375
|
setNamespace: setNamespace7
|
|
@@ -1686,6 +1685,9 @@ ${out.stderr}`;
|
|
|
1686
1685
|
rmSync(lockdownFile, { force: true });
|
|
1687
1686
|
return true;
|
|
1688
1687
|
}
|
|
1688
|
+
getLockdownPath() {
|
|
1689
|
+
return getLockdownPath();
|
|
1690
|
+
}
|
|
1689
1691
|
};
|
|
1690
1692
|
|
|
1691
1693
|
// ../mdm-client/dist/index.mjs
|
|
@@ -37006,14 +37008,14 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37006
37008
|
const logInfo222 = (0, import_debug2.default)(`${namespace}:info`);
|
|
37007
37009
|
const logTask5 = (0, import_debug2.default)(`${namespace}:task`);
|
|
37008
37010
|
const logError22 = (0, import_debug2.default)(`${namespace}:error`);
|
|
37009
|
-
const
|
|
37011
|
+
const logDetail3 = (0, import_debug2.default)(`${namespace}:detail`);
|
|
37010
37012
|
const logDebug = (0, import_debug2.default)(`${namespace}:debug`);
|
|
37011
37013
|
const logWarning2 = (0, import_debug2.default)(`${namespace}:warning`);
|
|
37012
37014
|
const logColor = (0, import_debug2.default)(`${namespace}:color`);
|
|
37013
37015
|
logInfo222.color = "19";
|
|
37014
37016
|
logTask5.color = "25";
|
|
37015
37017
|
logError22.color = "1";
|
|
37016
|
-
|
|
37018
|
+
logDetail3.color = "199";
|
|
37017
37019
|
logWarning2.color = "186";
|
|
37018
37020
|
logDebug.color = "211";
|
|
37019
37021
|
logColor.enabled = true;
|
|
@@ -37021,7 +37023,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37021
37023
|
logInfo222.namespace = `${namespace2}:info`;
|
|
37022
37024
|
logTask5.namespace = `${namespace2}:task`;
|
|
37023
37025
|
logError22.namespace = `${namespace2}:error`;
|
|
37024
|
-
|
|
37026
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
37025
37027
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
37026
37028
|
logDebug.namespace = `${namespace2}:debug`;
|
|
37027
37029
|
}
|
|
@@ -37032,7 +37034,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37032
37034
|
logTask5.enabled = true;
|
|
37033
37035
|
logError22.enabled = true;
|
|
37034
37036
|
logWarning2.enabled = true;
|
|
37035
|
-
|
|
37037
|
+
logDetail3.enabled = false;
|
|
37036
37038
|
logDebug.enabled = false;
|
|
37037
37039
|
break;
|
|
37038
37040
|
case "debug":
|
|
@@ -37040,7 +37042,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37040
37042
|
logTask5.enabled = true;
|
|
37041
37043
|
logError22.enabled = true;
|
|
37042
37044
|
logWarning2.enabled = true;
|
|
37043
|
-
|
|
37045
|
+
logDetail3.enabled = true;
|
|
37044
37046
|
logDebug.enabled = true;
|
|
37045
37047
|
break;
|
|
37046
37048
|
case "none":
|
|
@@ -37048,7 +37050,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37048
37050
|
logTask5.enabled = false;
|
|
37049
37051
|
logError22.enabled = false;
|
|
37050
37052
|
logWarning2.enabled = false;
|
|
37051
|
-
|
|
37053
|
+
logDetail3.enabled = false;
|
|
37052
37054
|
logDebug.enabled = false;
|
|
37053
37055
|
break;
|
|
37054
37056
|
}
|
|
@@ -37066,7 +37068,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37066
37068
|
logError22.color = color;
|
|
37067
37069
|
break;
|
|
37068
37070
|
case "detail":
|
|
37069
|
-
|
|
37071
|
+
logDetail3.color = color;
|
|
37070
37072
|
break;
|
|
37071
37073
|
case "warning":
|
|
37072
37074
|
logWarning2.color = color;
|
|
@@ -37124,7 +37126,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
37124
37126
|
function logHeader(title) {
|
|
37125
37127
|
logInfo222(`${header(title, 2)}`);
|
|
37126
37128
|
}
|
|
37127
|
-
function
|
|
37129
|
+
function logDataObject22(title, ...args) {
|
|
37128
37130
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
37129
37131
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
37130
37132
|
let callerDetails = "";
|
|
@@ -37133,7 +37135,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
37133
37135
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
37134
37136
|
callerDetails = `${functionName}`;
|
|
37135
37137
|
}
|
|
37136
|
-
|
|
37138
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
37137
37139
|
${args.reduce((acc, arg) => `${acc}
|
|
37138
37140
|
${logDataDetail(arg)}`, "")}
|
|
37139
37141
|
|
|
@@ -37156,14 +37158,14 @@ ${"=".repeat(80)}`);
|
|
|
37156
37158
|
logInfo: logInfo222,
|
|
37157
37159
|
logTask: logTask5,
|
|
37158
37160
|
logError: logError22,
|
|
37159
|
-
logDetail:
|
|
37161
|
+
logDetail: logDetail3,
|
|
37160
37162
|
logDebug,
|
|
37161
37163
|
logWarning: logWarning2,
|
|
37162
37164
|
logColor,
|
|
37163
37165
|
setColors,
|
|
37164
37166
|
printColors,
|
|
37165
37167
|
logHeader,
|
|
37166
|
-
logDataObject:
|
|
37168
|
+
logDataObject: logDataObject22,
|
|
37167
37169
|
logErrorObject,
|
|
37168
37170
|
setLogLevel,
|
|
37169
37171
|
setNamespace: setNamespace7
|
|
@@ -38103,14 +38105,14 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38103
38105
|
const logInfo32 = (0, import_debug22.default)(`${namespace}:info`);
|
|
38104
38106
|
const logTask5 = (0, import_debug22.default)(`${namespace}:task`);
|
|
38105
38107
|
const logError22 = (0, import_debug22.default)(`${namespace}:error`);
|
|
38106
|
-
const
|
|
38108
|
+
const logDetail3 = (0, import_debug22.default)(`${namespace}:detail`);
|
|
38107
38109
|
const logDebug = (0, import_debug22.default)(`${namespace}:debug`);
|
|
38108
38110
|
const logWarning2 = (0, import_debug22.default)(`${namespace}:warning`);
|
|
38109
38111
|
const logColor = (0, import_debug22.default)(`${namespace}:color`);
|
|
38110
38112
|
logInfo32.color = "19";
|
|
38111
38113
|
logTask5.color = "25";
|
|
38112
38114
|
logError22.color = "1";
|
|
38113
|
-
|
|
38115
|
+
logDetail3.color = "199";
|
|
38114
38116
|
logWarning2.color = "186";
|
|
38115
38117
|
logDebug.color = "211";
|
|
38116
38118
|
logColor.enabled = true;
|
|
@@ -38118,7 +38120,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38118
38120
|
logInfo32.namespace = `${namespace2}:info`;
|
|
38119
38121
|
logTask5.namespace = `${namespace2}:task`;
|
|
38120
38122
|
logError22.namespace = `${namespace2}:error`;
|
|
38121
|
-
|
|
38123
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
38122
38124
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
38123
38125
|
logDebug.namespace = `${namespace2}:debug`;
|
|
38124
38126
|
}
|
|
@@ -38129,7 +38131,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38129
38131
|
logTask5.enabled = true;
|
|
38130
38132
|
logError22.enabled = true;
|
|
38131
38133
|
logWarning2.enabled = true;
|
|
38132
|
-
|
|
38134
|
+
logDetail3.enabled = false;
|
|
38133
38135
|
logDebug.enabled = false;
|
|
38134
38136
|
break;
|
|
38135
38137
|
case "debug":
|
|
@@ -38137,7 +38139,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38137
38139
|
logTask5.enabled = true;
|
|
38138
38140
|
logError22.enabled = true;
|
|
38139
38141
|
logWarning2.enabled = true;
|
|
38140
|
-
|
|
38142
|
+
logDetail3.enabled = true;
|
|
38141
38143
|
logDebug.enabled = true;
|
|
38142
38144
|
break;
|
|
38143
38145
|
case "none":
|
|
@@ -38145,7 +38147,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38145
38147
|
logTask5.enabled = false;
|
|
38146
38148
|
logError22.enabled = false;
|
|
38147
38149
|
logWarning2.enabled = false;
|
|
38148
|
-
|
|
38150
|
+
logDetail3.enabled = false;
|
|
38149
38151
|
logDebug.enabled = false;
|
|
38150
38152
|
break;
|
|
38151
38153
|
}
|
|
@@ -38163,7 +38165,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38163
38165
|
logError22.color = color;
|
|
38164
38166
|
break;
|
|
38165
38167
|
case "detail":
|
|
38166
|
-
|
|
38168
|
+
logDetail3.color = color;
|
|
38167
38169
|
break;
|
|
38168
38170
|
case "warning":
|
|
38169
38171
|
logWarning2.color = color;
|
|
@@ -38221,7 +38223,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
38221
38223
|
function logHeader(title) {
|
|
38222
38224
|
logInfo32(`${header(title, 2)}`);
|
|
38223
38225
|
}
|
|
38224
|
-
function
|
|
38226
|
+
function logDataObject22(title, ...args) {
|
|
38225
38227
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
38226
38228
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
38227
38229
|
let callerDetails = "";
|
|
@@ -38230,7 +38232,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
38230
38232
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
38231
38233
|
callerDetails = `${functionName}`;
|
|
38232
38234
|
}
|
|
38233
|
-
|
|
38235
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
38234
38236
|
${args.reduce((acc, arg) => `${acc}
|
|
38235
38237
|
${logDataDetail(arg)}`, "")}
|
|
38236
38238
|
|
|
@@ -38253,14 +38255,14 @@ ${"=".repeat(80)}`);
|
|
|
38253
38255
|
logInfo: logInfo32,
|
|
38254
38256
|
logTask: logTask5,
|
|
38255
38257
|
logError: logError22,
|
|
38256
|
-
logDetail:
|
|
38258
|
+
logDetail: logDetail3,
|
|
38257
38259
|
logDebug,
|
|
38258
38260
|
logWarning: logWarning2,
|
|
38259
38261
|
logColor,
|
|
38260
38262
|
setColors,
|
|
38261
38263
|
printColors,
|
|
38262
38264
|
logHeader,
|
|
38263
|
-
logDataObject:
|
|
38265
|
+
logDataObject: logDataObject22,
|
|
38264
38266
|
logErrorObject,
|
|
38265
38267
|
setLogLevel,
|
|
38266
38268
|
setNamespace: setNamespace7
|
|
@@ -38351,7 +38353,7 @@ async function createMDMClient(options) {
|
|
|
38351
38353
|
}
|
|
38352
38354
|
|
|
38353
38355
|
// src/logic/actions/install.ts
|
|
38354
|
-
var { logInfo: logInfo3, setNamespace: setNamespace2 } = createLoggers("apple-kit:install");
|
|
38356
|
+
var { logInfo: logInfo3, setNamespace: setNamespace2, logDataObject: logDataObject2 } = createLoggers("apple-kit:install");
|
|
38355
38357
|
var InstallActions = class {
|
|
38356
38358
|
constructor(udid, iosClient) {
|
|
38357
38359
|
this.udid = udid;
|
|
@@ -38364,12 +38366,16 @@ var InstallActions = class {
|
|
|
38364
38366
|
}
|
|
38365
38367
|
async installManagedApp(ipaPath, options) {
|
|
38366
38368
|
const result = await this.iosClient.installApp(ipaPath);
|
|
38369
|
+
logDataObject2("Installing app result", { result });
|
|
38370
|
+
return await this.installManagedAppFromMDM(options);
|
|
38371
|
+
}
|
|
38372
|
+
async installManagedAppFromMDM(options) {
|
|
38367
38373
|
logInfo3("Installing app via MDM for management takeover");
|
|
38368
38374
|
const mdmClient = await createMDMClient(options.clientConfig);
|
|
38369
38375
|
if (!mdmClient) {
|
|
38370
38376
|
throw new Error("Failed to create MDM client");
|
|
38371
38377
|
}
|
|
38372
|
-
await mdmClient.installApp(this.udid, options);
|
|
38378
|
+
const result = await mdmClient.installApp(this.udid, options);
|
|
38373
38379
|
return result;
|
|
38374
38380
|
}
|
|
38375
38381
|
async uninstallApp(bundleId) {
|
|
@@ -38396,7 +38402,7 @@ var InstallActions = class {
|
|
|
38396
38402
|
};
|
|
38397
38403
|
|
|
38398
38404
|
// src/logic/actions/proxy.ts
|
|
38399
|
-
var { logTask: logTask2, logInfo: logInfo4, setNamespace: setNamespace3
|
|
38405
|
+
var { logTask: logTask2, logInfo: logInfo4, setNamespace: setNamespace3 } = createLoggers("");
|
|
38400
38406
|
var ProxyActions = class {
|
|
38401
38407
|
constructor(udid, iosClient) {
|
|
38402
38408
|
this.udid = udid;
|
|
@@ -38413,7 +38419,6 @@ var ProxyActions = class {
|
|
|
38413
38419
|
reject(new Error("Port forwarding timed out"));
|
|
38414
38420
|
}, timeoutMs);
|
|
38415
38421
|
result.stderr?.on("data", (data) => {
|
|
38416
|
-
logDetail("port forward stderr", data.toString());
|
|
38417
38422
|
if (data.toString().includes("Started")) {
|
|
38418
38423
|
clearTimeout(timeout2);
|
|
38419
38424
|
resolve2({
|
|
@@ -39016,7 +39021,7 @@ var ProfileParser = class {
|
|
|
39016
39021
|
};
|
|
39017
39022
|
|
|
39018
39023
|
// src/logic/iosClient.ts
|
|
39019
|
-
var { logDetail
|
|
39024
|
+
var { logDetail, setNamespace: setNamespace5, logTask: logTask4 } = createLoggers("");
|
|
39020
39025
|
var IosClient = class {
|
|
39021
39026
|
constructor(iosPath, udid, _usbmuxdAddress) {
|
|
39022
39027
|
this.iosPath = iosPath;
|
|
@@ -39169,9 +39174,9 @@ var IosClient = class {
|
|
|
39169
39174
|
async devMode() {
|
|
39170
39175
|
return this.runIosCommand(["devmode", "enable", "--udid", this.udid]);
|
|
39171
39176
|
}
|
|
39172
|
-
async tunnelStart(userspace = false) {
|
|
39173
|
-
const args = ["tunnel", "start", "--udid", this.udid, ...userspace ? ["--userspace"] : []];
|
|
39174
|
-
|
|
39177
|
+
async tunnelStart(userspace = false, pairRecordPath) {
|
|
39178
|
+
const args = ["tunnel", "start", `--pair-record-path=${pairRecordPath ?? "default"}`, "--udid", this.udid, ...userspace ? ["--userspace"] : []];
|
|
39179
|
+
logDetail(`Spawning tunnel: ${this.iosPath} ${args.join(" ")}`);
|
|
39175
39180
|
const child = spawn(this.iosPath, args, {
|
|
39176
39181
|
windowsHide: true,
|
|
39177
39182
|
env: {
|
|
@@ -39314,7 +39319,7 @@ var IosClient = class {
|
|
|
39314
39319
|
};
|
|
39315
39320
|
|
|
39316
39321
|
// src/logic/appleDeviceKit.ts
|
|
39317
|
-
var { logInfo: logInfo7, setNamespace: setNamespace6, logError: logError3, logDetail:
|
|
39322
|
+
var { logInfo: logInfo7, setNamespace: setNamespace6, logError: logError3, logDetail: logDetail2 } = createLoggers("apple-kit");
|
|
39318
39323
|
var AppleDeviceKit = class _AppleDeviceKit {
|
|
39319
39324
|
constructor(udid, logicalPort, usbmuxdAddress) {
|
|
39320
39325
|
this.logicalPort = logicalPort;
|
|
@@ -39332,11 +39337,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39332
39337
|
this.installActions = new InstallActions(this.deviceId, this.iosClient);
|
|
39333
39338
|
this.activationFlow = new ActivationFlow(this.deviceId, this.iosClient, this.deviceActions);
|
|
39334
39339
|
this.proxyActions = new ProxyActions(this.deviceId, this.iosClient);
|
|
39335
|
-
this.
|
|
39336
|
-
this.tunnelProcess = process3;
|
|
39337
|
-
}).catch((error) => {
|
|
39338
|
-
logError3(`Failed to start tunnel: ${error.message}`);
|
|
39339
|
-
});
|
|
39340
|
+
this.ensureTunnel();
|
|
39340
39341
|
}
|
|
39341
39342
|
deviceId;
|
|
39342
39343
|
proxyProcess = null;
|
|
@@ -39371,17 +39372,19 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39371
39372
|
async ensureTunnel() {
|
|
39372
39373
|
const requiresTunnel = await this.requiresTunneling();
|
|
39373
39374
|
if (!requiresTunnel) {
|
|
39374
|
-
|
|
39375
|
+
logDetail2(`Device ${this.deviceId} does not require tunneling (iOS < 17)`);
|
|
39375
39376
|
return;
|
|
39376
39377
|
}
|
|
39377
39378
|
const existingTunnel = this.tunnelProcess;
|
|
39378
39379
|
if (existingTunnel && !existingTunnel.killed) {
|
|
39379
|
-
|
|
39380
|
+
logDetail2(`Tunnel already running for device ${this.deviceId}`);
|
|
39380
39381
|
return;
|
|
39381
39382
|
}
|
|
39382
39383
|
logInfo7(`Starting tunnel for device ${this.deviceId} (iOS 17+)`);
|
|
39383
39384
|
try {
|
|
39384
|
-
const
|
|
39385
|
+
const pairRecordPath = join5(this.deviceActions.getLockdownPath() ?? "", "RemotePairing", `${this.deviceId}`);
|
|
39386
|
+
await mkdir(pairRecordPath, { recursive: true });
|
|
39387
|
+
const tunnelProcess = await this.iosClient.tunnelStart(true, pairRecordPath);
|
|
39385
39388
|
this.tunnelProcess = tunnelProcess;
|
|
39386
39389
|
tunnelProcess.on("exit", (code) => {
|
|
39387
39390
|
logError3(`Tunnel process for device ${this.deviceId} exited with code ${code}`);
|
|
@@ -39485,6 +39488,10 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39485
39488
|
this.ensureNotDisposed();
|
|
39486
39489
|
return this.installActions.installManagedApp(ipaPath, options);
|
|
39487
39490
|
}
|
|
39491
|
+
async installAppFromMDM(options) {
|
|
39492
|
+
this.ensureNotDisposed();
|
|
39493
|
+
return this.installActions.installManagedAppFromMDM(options);
|
|
39494
|
+
}
|
|
39488
39495
|
/**
|
|
39489
39496
|
* Uninstall an app by bundle ID (uninstall agent)
|
|
39490
39497
|
*
|
|
@@ -39605,7 +39612,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39605
39612
|
await mkdir(tmpDir, { recursive: true });
|
|
39606
39613
|
await writeFile2(tmpFilePath, fileData);
|
|
39607
39614
|
const stats = await stat(tmpFilePath);
|
|
39608
|
-
|
|
39615
|
+
logDetail2(`Temp file written: ${tmpFilePath}, size: ${stats.size} bytes`);
|
|
39609
39616
|
if (stats.size !== fileData.length) {
|
|
39610
39617
|
throw new Error(
|
|
39611
39618
|
`File size mismatch: expected ${fileData.length} bytes, got ${stats.size} bytes`
|
|
@@ -39617,7 +39624,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39617
39624
|
srcPath: tmpFilePath,
|
|
39618
39625
|
dstPath: devicePath
|
|
39619
39626
|
});
|
|
39620
|
-
|
|
39627
|
+
logDetail2(`Push: ${JSON.stringify(pushResult)}`);
|
|
39621
39628
|
if (pushResult.exitCode !== 0) {
|
|
39622
39629
|
const errorMessages = pushResult.logMessages.filter((msg) => msg.level === "error").map((msg) => msg.msg).join("; ");
|
|
39623
39630
|
const allMessages = pushResult.logMessages.map((msg) => `${msg.level}: ${msg.msg}`).join("; ");
|
|
@@ -39654,7 +39661,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39654
39661
|
srcPath: devicePath,
|
|
39655
39662
|
dstPath: tmpDir
|
|
39656
39663
|
});
|
|
39657
|
-
|
|
39664
|
+
logDetail2(`Pull: ${JSON.stringify(pullResult)}`);
|
|
39658
39665
|
if (pullResult.exitCode !== 0) {
|
|
39659
39666
|
const errorMessages = pullResult.logMessages.filter((msg) => msg.level === "error").map((msg) => msg.msg).join("; ");
|
|
39660
39667
|
const allMessages = pullResult.logMessages.map((msg) => `${msg.level}: ${msg.msg}`).join("; ");
|