@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.js
CHANGED
|
@@ -390,7 +390,6 @@ module.exports = __toCommonJS(index_exports);
|
|
|
390
390
|
// src/logic/appleDeviceKit.ts
|
|
391
391
|
var import_node_fs5 = require("node:fs");
|
|
392
392
|
var import_promises3 = require("node:fs/promises");
|
|
393
|
-
var import_promises4 = require("node:fs/promises");
|
|
394
393
|
var import_node_path5 = require("node:path");
|
|
395
394
|
|
|
396
395
|
// ../tool-debug/dist/index.mjs
|
|
@@ -1226,14 +1225,14 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1226
1225
|
const logInfo8 = (0, import_debug.default)(`${namespace}:info`);
|
|
1227
1226
|
const logTask5 = (0, import_debug.default)(`${namespace}:task`);
|
|
1228
1227
|
const logError4 = (0, import_debug.default)(`${namespace}:error`);
|
|
1229
|
-
const
|
|
1228
|
+
const logDetail3 = (0, import_debug.default)(`${namespace}:detail`);
|
|
1230
1229
|
const logDebug = (0, import_debug.default)(`${namespace}:debug`);
|
|
1231
1230
|
const logWarning2 = (0, import_debug.default)(`${namespace}:warning`);
|
|
1232
1231
|
const logColor = (0, import_debug.default)(`${namespace}:color`);
|
|
1233
1232
|
logInfo8.color = "19";
|
|
1234
1233
|
logTask5.color = "25";
|
|
1235
1234
|
logError4.color = "1";
|
|
1236
|
-
|
|
1235
|
+
logDetail3.color = "199";
|
|
1237
1236
|
logWarning2.color = "186";
|
|
1238
1237
|
logDebug.color = "211";
|
|
1239
1238
|
logColor.enabled = true;
|
|
@@ -1241,7 +1240,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1241
1240
|
logInfo8.namespace = `${namespace2}:info`;
|
|
1242
1241
|
logTask5.namespace = `${namespace2}:task`;
|
|
1243
1242
|
logError4.namespace = `${namespace2}:error`;
|
|
1244
|
-
|
|
1243
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
1245
1244
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
1246
1245
|
logDebug.namespace = `${namespace2}:debug`;
|
|
1247
1246
|
}
|
|
@@ -1252,7 +1251,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1252
1251
|
logTask5.enabled = true;
|
|
1253
1252
|
logError4.enabled = true;
|
|
1254
1253
|
logWarning2.enabled = true;
|
|
1255
|
-
|
|
1254
|
+
logDetail3.enabled = false;
|
|
1256
1255
|
logDebug.enabled = false;
|
|
1257
1256
|
break;
|
|
1258
1257
|
case "debug":
|
|
@@ -1260,7 +1259,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1260
1259
|
logTask5.enabled = true;
|
|
1261
1260
|
logError4.enabled = true;
|
|
1262
1261
|
logWarning2.enabled = true;
|
|
1263
|
-
|
|
1262
|
+
logDetail3.enabled = true;
|
|
1264
1263
|
logDebug.enabled = true;
|
|
1265
1264
|
break;
|
|
1266
1265
|
case "none":
|
|
@@ -1268,7 +1267,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1268
1267
|
logTask5.enabled = false;
|
|
1269
1268
|
logError4.enabled = false;
|
|
1270
1269
|
logWarning2.enabled = false;
|
|
1271
|
-
|
|
1270
|
+
logDetail3.enabled = false;
|
|
1272
1271
|
logDebug.enabled = false;
|
|
1273
1272
|
break;
|
|
1274
1273
|
}
|
|
@@ -1286,7 +1285,7 @@ function createLoggers(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
1286
1285
|
logError4.color = color;
|
|
1287
1286
|
break;
|
|
1288
1287
|
case "detail":
|
|
1289
|
-
|
|
1288
|
+
logDetail3.color = color;
|
|
1290
1289
|
break;
|
|
1291
1290
|
case "warning":
|
|
1292
1291
|
logWarning2.color = color;
|
|
@@ -1344,7 +1343,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
1344
1343
|
function logHeader(title) {
|
|
1345
1344
|
logInfo8(`${header(title, 2)}`);
|
|
1346
1345
|
}
|
|
1347
|
-
function
|
|
1346
|
+
function logDataObject3(title, ...args) {
|
|
1348
1347
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
1349
1348
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
1350
1349
|
let callerDetails = "";
|
|
@@ -1353,7 +1352,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
1353
1352
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
1354
1353
|
callerDetails = `${functionName}`;
|
|
1355
1354
|
}
|
|
1356
|
-
|
|
1355
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
1357
1356
|
${args.reduce((acc, arg) => `${acc}
|
|
1358
1357
|
${logDataDetail(arg)}`, "")}
|
|
1359
1358
|
|
|
@@ -1376,14 +1375,14 @@ ${"=".repeat(80)}`);
|
|
|
1376
1375
|
logInfo: logInfo8,
|
|
1377
1376
|
logTask: logTask5,
|
|
1378
1377
|
logError: logError4,
|
|
1379
|
-
logDetail:
|
|
1378
|
+
logDetail: logDetail3,
|
|
1380
1379
|
logDebug,
|
|
1381
1380
|
logWarning: logWarning2,
|
|
1382
1381
|
logColor,
|
|
1383
1382
|
setColors,
|
|
1384
1383
|
printColors,
|
|
1385
1384
|
logHeader,
|
|
1386
|
-
logDataObject:
|
|
1385
|
+
logDataObject: logDataObject3,
|
|
1387
1386
|
logErrorObject,
|
|
1388
1387
|
setLogLevel,
|
|
1389
1388
|
setNamespace: setNamespace7
|
|
@@ -1699,6 +1698,9 @@ ${out.stderr}`;
|
|
|
1699
1698
|
(0, import_node_fs2.rmSync)(lockdownFile, { force: true });
|
|
1700
1699
|
return true;
|
|
1701
1700
|
}
|
|
1701
|
+
getLockdownPath() {
|
|
1702
|
+
return getLockdownPath();
|
|
1703
|
+
}
|
|
1702
1704
|
};
|
|
1703
1705
|
|
|
1704
1706
|
// ../mdm-client/dist/index.mjs
|
|
@@ -37019,14 +37021,14 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37019
37021
|
const logInfo222 = (0, import_debug2.default)(`${namespace}:info`);
|
|
37020
37022
|
const logTask5 = (0, import_debug2.default)(`${namespace}:task`);
|
|
37021
37023
|
const logError22 = (0, import_debug2.default)(`${namespace}:error`);
|
|
37022
|
-
const
|
|
37024
|
+
const logDetail3 = (0, import_debug2.default)(`${namespace}:detail`);
|
|
37023
37025
|
const logDebug = (0, import_debug2.default)(`${namespace}:debug`);
|
|
37024
37026
|
const logWarning2 = (0, import_debug2.default)(`${namespace}:warning`);
|
|
37025
37027
|
const logColor = (0, import_debug2.default)(`${namespace}:color`);
|
|
37026
37028
|
logInfo222.color = "19";
|
|
37027
37029
|
logTask5.color = "25";
|
|
37028
37030
|
logError22.color = "1";
|
|
37029
|
-
|
|
37031
|
+
logDetail3.color = "199";
|
|
37030
37032
|
logWarning2.color = "186";
|
|
37031
37033
|
logDebug.color = "211";
|
|
37032
37034
|
logColor.enabled = true;
|
|
@@ -37034,7 +37036,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37034
37036
|
logInfo222.namespace = `${namespace2}:info`;
|
|
37035
37037
|
logTask5.namespace = `${namespace2}:task`;
|
|
37036
37038
|
logError22.namespace = `${namespace2}:error`;
|
|
37037
|
-
|
|
37039
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
37038
37040
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
37039
37041
|
logDebug.namespace = `${namespace2}:debug`;
|
|
37040
37042
|
}
|
|
@@ -37045,7 +37047,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37045
37047
|
logTask5.enabled = true;
|
|
37046
37048
|
logError22.enabled = true;
|
|
37047
37049
|
logWarning2.enabled = true;
|
|
37048
|
-
|
|
37050
|
+
logDetail3.enabled = false;
|
|
37049
37051
|
logDebug.enabled = false;
|
|
37050
37052
|
break;
|
|
37051
37053
|
case "debug":
|
|
@@ -37053,7 +37055,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37053
37055
|
logTask5.enabled = true;
|
|
37054
37056
|
logError22.enabled = true;
|
|
37055
37057
|
logWarning2.enabled = true;
|
|
37056
|
-
|
|
37058
|
+
logDetail3.enabled = true;
|
|
37057
37059
|
logDebug.enabled = true;
|
|
37058
37060
|
break;
|
|
37059
37061
|
case "none":
|
|
@@ -37061,7 +37063,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37061
37063
|
logTask5.enabled = false;
|
|
37062
37064
|
logError22.enabled = false;
|
|
37063
37065
|
logWarning2.enabled = false;
|
|
37064
|
-
|
|
37066
|
+
logDetail3.enabled = false;
|
|
37065
37067
|
logDebug.enabled = false;
|
|
37066
37068
|
break;
|
|
37067
37069
|
}
|
|
@@ -37079,7 +37081,7 @@ function createLoggers2(namespace, logLevel = process.env.LOG_LEVEL ?? "none") {
|
|
|
37079
37081
|
logError22.color = color;
|
|
37080
37082
|
break;
|
|
37081
37083
|
case "detail":
|
|
37082
|
-
|
|
37084
|
+
logDetail3.color = color;
|
|
37083
37085
|
break;
|
|
37084
37086
|
case "warning":
|
|
37085
37087
|
logWarning2.color = color;
|
|
@@ -37137,7 +37139,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
37137
37139
|
function logHeader(title) {
|
|
37138
37140
|
logInfo222(`${header(title, 2)}`);
|
|
37139
37141
|
}
|
|
37140
|
-
function
|
|
37142
|
+
function logDataObject22(title, ...args) {
|
|
37141
37143
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
37142
37144
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
37143
37145
|
let callerDetails = "";
|
|
@@ -37146,7 +37148,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
37146
37148
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
37147
37149
|
callerDetails = `${functionName}`;
|
|
37148
37150
|
}
|
|
37149
|
-
|
|
37151
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
37150
37152
|
${args.reduce((acc, arg) => `${acc}
|
|
37151
37153
|
${logDataDetail(arg)}`, "")}
|
|
37152
37154
|
|
|
@@ -37169,14 +37171,14 @@ ${"=".repeat(80)}`);
|
|
|
37169
37171
|
logInfo: logInfo222,
|
|
37170
37172
|
logTask: logTask5,
|
|
37171
37173
|
logError: logError22,
|
|
37172
|
-
logDetail:
|
|
37174
|
+
logDetail: logDetail3,
|
|
37173
37175
|
logDebug,
|
|
37174
37176
|
logWarning: logWarning2,
|
|
37175
37177
|
logColor,
|
|
37176
37178
|
setColors,
|
|
37177
37179
|
printColors,
|
|
37178
37180
|
logHeader,
|
|
37179
|
-
logDataObject:
|
|
37181
|
+
logDataObject: logDataObject22,
|
|
37180
37182
|
logErrorObject,
|
|
37181
37183
|
setLogLevel,
|
|
37182
37184
|
setNamespace: setNamespace7
|
|
@@ -38116,14 +38118,14 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38116
38118
|
const logInfo32 = (0, import_debug22.default)(`${namespace}:info`);
|
|
38117
38119
|
const logTask5 = (0, import_debug22.default)(`${namespace}:task`);
|
|
38118
38120
|
const logError22 = (0, import_debug22.default)(`${namespace}:error`);
|
|
38119
|
-
const
|
|
38121
|
+
const logDetail3 = (0, import_debug22.default)(`${namespace}:detail`);
|
|
38120
38122
|
const logDebug = (0, import_debug22.default)(`${namespace}:debug`);
|
|
38121
38123
|
const logWarning2 = (0, import_debug22.default)(`${namespace}:warning`);
|
|
38122
38124
|
const logColor = (0, import_debug22.default)(`${namespace}:color`);
|
|
38123
38125
|
logInfo32.color = "19";
|
|
38124
38126
|
logTask5.color = "25";
|
|
38125
38127
|
logError22.color = "1";
|
|
38126
|
-
|
|
38128
|
+
logDetail3.color = "199";
|
|
38127
38129
|
logWarning2.color = "186";
|
|
38128
38130
|
logDebug.color = "211";
|
|
38129
38131
|
logColor.enabled = true;
|
|
@@ -38131,7 +38133,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38131
38133
|
logInfo32.namespace = `${namespace2}:info`;
|
|
38132
38134
|
logTask5.namespace = `${namespace2}:task`;
|
|
38133
38135
|
logError22.namespace = `${namespace2}:error`;
|
|
38134
|
-
|
|
38136
|
+
logDetail3.namespace = `${namespace2}:detail`;
|
|
38135
38137
|
logWarning2.namespace = `${namespace2}:warning`;
|
|
38136
38138
|
logDebug.namespace = `${namespace2}:debug`;
|
|
38137
38139
|
}
|
|
@@ -38142,7 +38144,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38142
38144
|
logTask5.enabled = true;
|
|
38143
38145
|
logError22.enabled = true;
|
|
38144
38146
|
logWarning2.enabled = true;
|
|
38145
|
-
|
|
38147
|
+
logDetail3.enabled = false;
|
|
38146
38148
|
logDebug.enabled = false;
|
|
38147
38149
|
break;
|
|
38148
38150
|
case "debug":
|
|
@@ -38150,7 +38152,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38150
38152
|
logTask5.enabled = true;
|
|
38151
38153
|
logError22.enabled = true;
|
|
38152
38154
|
logWarning2.enabled = true;
|
|
38153
|
-
|
|
38155
|
+
logDetail3.enabled = true;
|
|
38154
38156
|
logDebug.enabled = true;
|
|
38155
38157
|
break;
|
|
38156
38158
|
case "none":
|
|
@@ -38158,7 +38160,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38158
38160
|
logTask5.enabled = false;
|
|
38159
38161
|
logError22.enabled = false;
|
|
38160
38162
|
logWarning2.enabled = false;
|
|
38161
|
-
|
|
38163
|
+
logDetail3.enabled = false;
|
|
38162
38164
|
logDebug.enabled = false;
|
|
38163
38165
|
break;
|
|
38164
38166
|
}
|
|
@@ -38176,7 +38178,7 @@ function createLoggers22(namespace, logLevel = process.env.LOG_LEVEL ?? "none")
|
|
|
38176
38178
|
logError22.color = color;
|
|
38177
38179
|
break;
|
|
38178
38180
|
case "detail":
|
|
38179
|
-
|
|
38181
|
+
logDetail3.color = color;
|
|
38180
38182
|
break;
|
|
38181
38183
|
case "warning":
|
|
38182
38184
|
logWarning2.color = color;
|
|
@@ -38234,7 +38236,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
38234
38236
|
function logHeader(title) {
|
|
38235
38237
|
logInfo32(`${header(title, 2)}`);
|
|
38236
38238
|
}
|
|
38237
|
-
function
|
|
38239
|
+
function logDataObject22(title, ...args) {
|
|
38238
38240
|
const stack = new Error().stack?.split("\n")[2] || "";
|
|
38239
38241
|
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
38240
38242
|
let callerDetails = "";
|
|
@@ -38243,7 +38245,7 @@ ${" ".repeat(padding)}${"=".repeat(80)}`;
|
|
|
38243
38245
|
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
38244
38246
|
callerDetails = `${functionName}`;
|
|
38245
38247
|
}
|
|
38246
|
-
|
|
38248
|
+
logDetail3(`${header(`*${title}* ${callerDetails}`)}
|
|
38247
38249
|
${args.reduce((acc, arg) => `${acc}
|
|
38248
38250
|
${logDataDetail(arg)}`, "")}
|
|
38249
38251
|
|
|
@@ -38266,14 +38268,14 @@ ${"=".repeat(80)}`);
|
|
|
38266
38268
|
logInfo: logInfo32,
|
|
38267
38269
|
logTask: logTask5,
|
|
38268
38270
|
logError: logError22,
|
|
38269
|
-
logDetail:
|
|
38271
|
+
logDetail: logDetail3,
|
|
38270
38272
|
logDebug,
|
|
38271
38273
|
logWarning: logWarning2,
|
|
38272
38274
|
logColor,
|
|
38273
38275
|
setColors,
|
|
38274
38276
|
printColors,
|
|
38275
38277
|
logHeader,
|
|
38276
|
-
logDataObject:
|
|
38278
|
+
logDataObject: logDataObject22,
|
|
38277
38279
|
logErrorObject,
|
|
38278
38280
|
setLogLevel,
|
|
38279
38281
|
setNamespace: setNamespace7
|
|
@@ -38364,7 +38366,7 @@ async function createMDMClient(options) {
|
|
|
38364
38366
|
}
|
|
38365
38367
|
|
|
38366
38368
|
// src/logic/actions/install.ts
|
|
38367
|
-
var { logInfo: logInfo3, setNamespace: setNamespace2 } = createLoggers("apple-kit:install");
|
|
38369
|
+
var { logInfo: logInfo3, setNamespace: setNamespace2, logDataObject: logDataObject2 } = createLoggers("apple-kit:install");
|
|
38368
38370
|
var InstallActions = class {
|
|
38369
38371
|
constructor(udid, iosClient) {
|
|
38370
38372
|
this.udid = udid;
|
|
@@ -38377,12 +38379,16 @@ var InstallActions = class {
|
|
|
38377
38379
|
}
|
|
38378
38380
|
async installManagedApp(ipaPath, options) {
|
|
38379
38381
|
const result = await this.iosClient.installApp(ipaPath);
|
|
38382
|
+
logDataObject2("Installing app result", { result });
|
|
38383
|
+
return await this.installManagedAppFromMDM(options);
|
|
38384
|
+
}
|
|
38385
|
+
async installManagedAppFromMDM(options) {
|
|
38380
38386
|
logInfo3("Installing app via MDM for management takeover");
|
|
38381
38387
|
const mdmClient = await createMDMClient(options.clientConfig);
|
|
38382
38388
|
if (!mdmClient) {
|
|
38383
38389
|
throw new Error("Failed to create MDM client");
|
|
38384
38390
|
}
|
|
38385
|
-
await mdmClient.installApp(this.udid, options);
|
|
38391
|
+
const result = await mdmClient.installApp(this.udid, options);
|
|
38386
38392
|
return result;
|
|
38387
38393
|
}
|
|
38388
38394
|
async uninstallApp(bundleId) {
|
|
@@ -38409,7 +38415,7 @@ var InstallActions = class {
|
|
|
38409
38415
|
};
|
|
38410
38416
|
|
|
38411
38417
|
// src/logic/actions/proxy.ts
|
|
38412
|
-
var { logTask: logTask2, logInfo: logInfo4, setNamespace: setNamespace3
|
|
38418
|
+
var { logTask: logTask2, logInfo: logInfo4, setNamespace: setNamespace3 } = createLoggers("");
|
|
38413
38419
|
var ProxyActions = class {
|
|
38414
38420
|
constructor(udid, iosClient) {
|
|
38415
38421
|
this.udid = udid;
|
|
@@ -38426,7 +38432,6 @@ var ProxyActions = class {
|
|
|
38426
38432
|
reject(new Error("Port forwarding timed out"));
|
|
38427
38433
|
}, timeoutMs);
|
|
38428
38434
|
result.stderr?.on("data", (data) => {
|
|
38429
|
-
logDetail("port forward stderr", data.toString());
|
|
38430
38435
|
if (data.toString().includes("Started")) {
|
|
38431
38436
|
clearTimeout(timeout2);
|
|
38432
38437
|
resolve2({
|
|
@@ -39030,7 +39035,7 @@ var ProfileParser = class {
|
|
|
39030
39035
|
};
|
|
39031
39036
|
|
|
39032
39037
|
// src/logic/iosClient.ts
|
|
39033
|
-
var { logDetail
|
|
39038
|
+
var { logDetail, setNamespace: setNamespace5, logTask: logTask4 } = createLoggers("");
|
|
39034
39039
|
var IosClient = class {
|
|
39035
39040
|
constructor(iosPath, udid, _usbmuxdAddress) {
|
|
39036
39041
|
this.iosPath = iosPath;
|
|
@@ -39183,9 +39188,9 @@ var IosClient = class {
|
|
|
39183
39188
|
async devMode() {
|
|
39184
39189
|
return this.runIosCommand(["devmode", "enable", "--udid", this.udid]);
|
|
39185
39190
|
}
|
|
39186
|
-
async tunnelStart(userspace = false) {
|
|
39187
|
-
const args = ["tunnel", "start", "--udid", this.udid, ...userspace ? ["--userspace"] : []];
|
|
39188
|
-
|
|
39191
|
+
async tunnelStart(userspace = false, pairRecordPath) {
|
|
39192
|
+
const args = ["tunnel", "start", `--pair-record-path=${pairRecordPath ?? "default"}`, "--udid", this.udid, ...userspace ? ["--userspace"] : []];
|
|
39193
|
+
logDetail(`Spawning tunnel: ${this.iosPath} ${args.join(" ")}`);
|
|
39189
39194
|
const child = (0, import_node_child_process.spawn)(this.iosPath, args, {
|
|
39190
39195
|
windowsHide: true,
|
|
39191
39196
|
env: {
|
|
@@ -39328,7 +39333,7 @@ var IosClient = class {
|
|
|
39328
39333
|
};
|
|
39329
39334
|
|
|
39330
39335
|
// src/logic/appleDeviceKit.ts
|
|
39331
|
-
var { logInfo: logInfo7, setNamespace: setNamespace6, logError: logError3, logDetail:
|
|
39336
|
+
var { logInfo: logInfo7, setNamespace: setNamespace6, logError: logError3, logDetail: logDetail2 } = createLoggers("apple-kit");
|
|
39332
39337
|
var AppleDeviceKit = class _AppleDeviceKit {
|
|
39333
39338
|
constructor(udid, logicalPort, usbmuxdAddress) {
|
|
39334
39339
|
this.logicalPort = logicalPort;
|
|
@@ -39346,11 +39351,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39346
39351
|
this.installActions = new InstallActions(this.deviceId, this.iosClient);
|
|
39347
39352
|
this.activationFlow = new ActivationFlow(this.deviceId, this.iosClient, this.deviceActions);
|
|
39348
39353
|
this.proxyActions = new ProxyActions(this.deviceId, this.iosClient);
|
|
39349
|
-
this.
|
|
39350
|
-
this.tunnelProcess = process3;
|
|
39351
|
-
}).catch((error) => {
|
|
39352
|
-
logError3(`Failed to start tunnel: ${error.message}`);
|
|
39353
|
-
});
|
|
39354
|
+
this.ensureTunnel();
|
|
39354
39355
|
}
|
|
39355
39356
|
deviceId;
|
|
39356
39357
|
proxyProcess = null;
|
|
@@ -39385,17 +39386,19 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39385
39386
|
async ensureTunnel() {
|
|
39386
39387
|
const requiresTunnel = await this.requiresTunneling();
|
|
39387
39388
|
if (!requiresTunnel) {
|
|
39388
|
-
|
|
39389
|
+
logDetail2(`Device ${this.deviceId} does not require tunneling (iOS < 17)`);
|
|
39389
39390
|
return;
|
|
39390
39391
|
}
|
|
39391
39392
|
const existingTunnel = this.tunnelProcess;
|
|
39392
39393
|
if (existingTunnel && !existingTunnel.killed) {
|
|
39393
|
-
|
|
39394
|
+
logDetail2(`Tunnel already running for device ${this.deviceId}`);
|
|
39394
39395
|
return;
|
|
39395
39396
|
}
|
|
39396
39397
|
logInfo7(`Starting tunnel for device ${this.deviceId} (iOS 17+)`);
|
|
39397
39398
|
try {
|
|
39398
|
-
const
|
|
39399
|
+
const pairRecordPath = (0, import_node_path5.join)(this.deviceActions.getLockdownPath() ?? "", "RemotePairing", `${this.deviceId}`);
|
|
39400
|
+
await (0, import_promises3.mkdir)(pairRecordPath, { recursive: true });
|
|
39401
|
+
const tunnelProcess = await this.iosClient.tunnelStart(true, pairRecordPath);
|
|
39399
39402
|
this.tunnelProcess = tunnelProcess;
|
|
39400
39403
|
tunnelProcess.on("exit", (code) => {
|
|
39401
39404
|
logError3(`Tunnel process for device ${this.deviceId} exited with code ${code}`);
|
|
@@ -39499,6 +39502,10 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39499
39502
|
this.ensureNotDisposed();
|
|
39500
39503
|
return this.installActions.installManagedApp(ipaPath, options);
|
|
39501
39504
|
}
|
|
39505
|
+
async installAppFromMDM(options) {
|
|
39506
|
+
this.ensureNotDisposed();
|
|
39507
|
+
return this.installActions.installManagedAppFromMDM(options);
|
|
39508
|
+
}
|
|
39502
39509
|
/**
|
|
39503
39510
|
* Uninstall an app by bundle ID (uninstall agent)
|
|
39504
39511
|
*
|
|
@@ -39617,9 +39624,9 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39617
39624
|
const tmpFilePath = (0, import_node_path5.join)(tmpDir, fileName);
|
|
39618
39625
|
try {
|
|
39619
39626
|
await (0, import_promises3.mkdir)(tmpDir, { recursive: true });
|
|
39620
|
-
await (0,
|
|
39627
|
+
await (0, import_promises3.writeFile)(tmpFilePath, fileData);
|
|
39621
39628
|
const stats = await (0, import_promises3.stat)(tmpFilePath);
|
|
39622
|
-
|
|
39629
|
+
logDetail2(`Temp file written: ${tmpFilePath}, size: ${stats.size} bytes`);
|
|
39623
39630
|
if (stats.size !== fileData.length) {
|
|
39624
39631
|
throw new Error(
|
|
39625
39632
|
`File size mismatch: expected ${fileData.length} bytes, got ${stats.size} bytes`
|
|
@@ -39631,7 +39638,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39631
39638
|
srcPath: tmpFilePath,
|
|
39632
39639
|
dstPath: devicePath
|
|
39633
39640
|
});
|
|
39634
|
-
|
|
39641
|
+
logDetail2(`Push: ${JSON.stringify(pushResult)}`);
|
|
39635
39642
|
if (pushResult.exitCode !== 0) {
|
|
39636
39643
|
const errorMessages = pushResult.logMessages.filter((msg) => msg.level === "error").map((msg) => msg.msg).join("; ");
|
|
39637
39644
|
const allMessages = pushResult.logMessages.map((msg) => `${msg.level}: ${msg.msg}`).join("; ");
|
|
@@ -39668,7 +39675,7 @@ var AppleDeviceKit = class _AppleDeviceKit {
|
|
|
39668
39675
|
srcPath: devicePath,
|
|
39669
39676
|
dstPath: tmpDir
|
|
39670
39677
|
});
|
|
39671
|
-
|
|
39678
|
+
logDetail2(`Pull: ${JSON.stringify(pullResult)}`);
|
|
39672
39679
|
if (pullResult.exitCode !== 0) {
|
|
39673
39680
|
const errorMessages = pullResult.logMessages.filter((msg) => msg.level === "error").map((msg) => msg.msg).join("; ");
|
|
39674
39681
|
const allMessages = pullResult.logMessages.map((msg) => `${msg.level}: ${msg.msg}`).join("; ");
|