@mcesystems/apple-kit 1.0.6 → 1.0.10
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 +817 -22
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1381 -0
- package/dist/index.mjs.map +7 -0
- package/dist/types/logic/actions/pair.d.ts.map +1 -1
- package/dist/types/logic/dataParser.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/types/logic/devicesMonitor.d.ts +0 -45
- package/dist/types/logic/devicesMonitor.d.ts.map +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1381 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
|
|
33
|
+
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
34
|
+
var require_ms = __commonJS({
|
|
35
|
+
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
|
36
|
+
var s = 1e3;
|
|
37
|
+
var m = s * 60;
|
|
38
|
+
var h = m * 60;
|
|
39
|
+
var d = h * 24;
|
|
40
|
+
var w = d * 7;
|
|
41
|
+
var y = d * 365.25;
|
|
42
|
+
module.exports = function(val, options) {
|
|
43
|
+
options = options || {};
|
|
44
|
+
var type = typeof val;
|
|
45
|
+
if (type === "string" && val.length > 0) {
|
|
46
|
+
return parse(val);
|
|
47
|
+
} else if (type === "number" && isFinite(val)) {
|
|
48
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
49
|
+
}
|
|
50
|
+
throw new Error(
|
|
51
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
function parse(str) {
|
|
55
|
+
str = String(str);
|
|
56
|
+
if (str.length > 100) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
60
|
+
str
|
|
61
|
+
);
|
|
62
|
+
if (!match) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
var n = parseFloat(match[1]);
|
|
66
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
67
|
+
switch (type) {
|
|
68
|
+
case "years":
|
|
69
|
+
case "year":
|
|
70
|
+
case "yrs":
|
|
71
|
+
case "yr":
|
|
72
|
+
case "y":
|
|
73
|
+
return n * y;
|
|
74
|
+
case "weeks":
|
|
75
|
+
case "week":
|
|
76
|
+
case "w":
|
|
77
|
+
return n * w;
|
|
78
|
+
case "days":
|
|
79
|
+
case "day":
|
|
80
|
+
case "d":
|
|
81
|
+
return n * d;
|
|
82
|
+
case "hours":
|
|
83
|
+
case "hour":
|
|
84
|
+
case "hrs":
|
|
85
|
+
case "hr":
|
|
86
|
+
case "h":
|
|
87
|
+
return n * h;
|
|
88
|
+
case "minutes":
|
|
89
|
+
case "minute":
|
|
90
|
+
case "mins":
|
|
91
|
+
case "min":
|
|
92
|
+
case "m":
|
|
93
|
+
return n * m;
|
|
94
|
+
case "seconds":
|
|
95
|
+
case "second":
|
|
96
|
+
case "secs":
|
|
97
|
+
case "sec":
|
|
98
|
+
case "s":
|
|
99
|
+
return n * s;
|
|
100
|
+
case "milliseconds":
|
|
101
|
+
case "millisecond":
|
|
102
|
+
case "msecs":
|
|
103
|
+
case "msec":
|
|
104
|
+
case "ms":
|
|
105
|
+
return n;
|
|
106
|
+
default:
|
|
107
|
+
return void 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function fmtShort(ms) {
|
|
111
|
+
var msAbs = Math.abs(ms);
|
|
112
|
+
if (msAbs >= d) {
|
|
113
|
+
return Math.round(ms / d) + "d";
|
|
114
|
+
}
|
|
115
|
+
if (msAbs >= h) {
|
|
116
|
+
return Math.round(ms / h) + "h";
|
|
117
|
+
}
|
|
118
|
+
if (msAbs >= m) {
|
|
119
|
+
return Math.round(ms / m) + "m";
|
|
120
|
+
}
|
|
121
|
+
if (msAbs >= s) {
|
|
122
|
+
return Math.round(ms / s) + "s";
|
|
123
|
+
}
|
|
124
|
+
return ms + "ms";
|
|
125
|
+
}
|
|
126
|
+
function fmtLong(ms) {
|
|
127
|
+
var msAbs = Math.abs(ms);
|
|
128
|
+
if (msAbs >= d) {
|
|
129
|
+
return plural(ms, msAbs, d, "day");
|
|
130
|
+
}
|
|
131
|
+
if (msAbs >= h) {
|
|
132
|
+
return plural(ms, msAbs, h, "hour");
|
|
133
|
+
}
|
|
134
|
+
if (msAbs >= m) {
|
|
135
|
+
return plural(ms, msAbs, m, "minute");
|
|
136
|
+
}
|
|
137
|
+
if (msAbs >= s) {
|
|
138
|
+
return plural(ms, msAbs, s, "second");
|
|
139
|
+
}
|
|
140
|
+
return ms + " ms";
|
|
141
|
+
}
|
|
142
|
+
function plural(ms, msAbs, n, name) {
|
|
143
|
+
var isPlural = msAbs >= n * 1.5;
|
|
144
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
150
|
+
var require_common = __commonJS({
|
|
151
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
|
|
152
|
+
function setup(env) {
|
|
153
|
+
createDebug2.debug = createDebug2;
|
|
154
|
+
createDebug2.default = createDebug2;
|
|
155
|
+
createDebug2.coerce = coerce;
|
|
156
|
+
createDebug2.disable = disable;
|
|
157
|
+
createDebug2.enable = enable;
|
|
158
|
+
createDebug2.enabled = enabled;
|
|
159
|
+
createDebug2.humanize = require_ms();
|
|
160
|
+
createDebug2.destroy = destroy;
|
|
161
|
+
Object.keys(env).forEach((key) => {
|
|
162
|
+
createDebug2[key] = env[key];
|
|
163
|
+
});
|
|
164
|
+
createDebug2.names = [];
|
|
165
|
+
createDebug2.skips = [];
|
|
166
|
+
createDebug2.formatters = {};
|
|
167
|
+
function selectColor(namespace) {
|
|
168
|
+
let hash = 0;
|
|
169
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
170
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
171
|
+
hash |= 0;
|
|
172
|
+
}
|
|
173
|
+
return createDebug2.colors[Math.abs(hash) % createDebug2.colors.length];
|
|
174
|
+
}
|
|
175
|
+
createDebug2.selectColor = selectColor;
|
|
176
|
+
function createDebug2(namespace) {
|
|
177
|
+
let prevTime;
|
|
178
|
+
let enableOverride = null;
|
|
179
|
+
let namespacesCache;
|
|
180
|
+
let enabledCache;
|
|
181
|
+
function debug2(...args) {
|
|
182
|
+
if (!debug2.enabled) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const self = debug2;
|
|
186
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
187
|
+
const ms = curr - (prevTime || curr);
|
|
188
|
+
self.diff = ms;
|
|
189
|
+
self.prev = prevTime;
|
|
190
|
+
self.curr = curr;
|
|
191
|
+
prevTime = curr;
|
|
192
|
+
args[0] = createDebug2.coerce(args[0]);
|
|
193
|
+
if (typeof args[0] !== "string") {
|
|
194
|
+
args.unshift("%O");
|
|
195
|
+
}
|
|
196
|
+
let index = 0;
|
|
197
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
198
|
+
if (match === "%%") {
|
|
199
|
+
return "%";
|
|
200
|
+
}
|
|
201
|
+
index++;
|
|
202
|
+
const formatter = createDebug2.formatters[format];
|
|
203
|
+
if (typeof formatter === "function") {
|
|
204
|
+
const val = args[index];
|
|
205
|
+
match = formatter.call(self, val);
|
|
206
|
+
args.splice(index, 1);
|
|
207
|
+
index--;
|
|
208
|
+
}
|
|
209
|
+
return match;
|
|
210
|
+
});
|
|
211
|
+
createDebug2.formatArgs.call(self, args);
|
|
212
|
+
const logFn = self.log || createDebug2.log;
|
|
213
|
+
logFn.apply(self, args);
|
|
214
|
+
}
|
|
215
|
+
debug2.namespace = namespace;
|
|
216
|
+
debug2.useColors = createDebug2.useColors();
|
|
217
|
+
debug2.color = createDebug2.selectColor(namespace);
|
|
218
|
+
debug2.extend = extend;
|
|
219
|
+
debug2.destroy = createDebug2.destroy;
|
|
220
|
+
Object.defineProperty(debug2, "enabled", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
configurable: false,
|
|
223
|
+
get: () => {
|
|
224
|
+
if (enableOverride !== null) {
|
|
225
|
+
return enableOverride;
|
|
226
|
+
}
|
|
227
|
+
if (namespacesCache !== createDebug2.namespaces) {
|
|
228
|
+
namespacesCache = createDebug2.namespaces;
|
|
229
|
+
enabledCache = createDebug2.enabled(namespace);
|
|
230
|
+
}
|
|
231
|
+
return enabledCache;
|
|
232
|
+
},
|
|
233
|
+
set: (v) => {
|
|
234
|
+
enableOverride = v;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
if (typeof createDebug2.init === "function") {
|
|
238
|
+
createDebug2.init(debug2);
|
|
239
|
+
}
|
|
240
|
+
return debug2;
|
|
241
|
+
}
|
|
242
|
+
function extend(namespace, delimiter) {
|
|
243
|
+
const newDebug = createDebug2(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
244
|
+
newDebug.log = this.log;
|
|
245
|
+
return newDebug;
|
|
246
|
+
}
|
|
247
|
+
function enable(namespaces) {
|
|
248
|
+
createDebug2.save(namespaces);
|
|
249
|
+
createDebug2.namespaces = namespaces;
|
|
250
|
+
createDebug2.names = [];
|
|
251
|
+
createDebug2.skips = [];
|
|
252
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
253
|
+
for (const ns of split) {
|
|
254
|
+
if (ns[0] === "-") {
|
|
255
|
+
createDebug2.skips.push(ns.slice(1));
|
|
256
|
+
} else {
|
|
257
|
+
createDebug2.names.push(ns);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function matchesTemplate(search, template) {
|
|
262
|
+
let searchIndex = 0;
|
|
263
|
+
let templateIndex = 0;
|
|
264
|
+
let starIndex = -1;
|
|
265
|
+
let matchIndex = 0;
|
|
266
|
+
while (searchIndex < search.length) {
|
|
267
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
268
|
+
if (template[templateIndex] === "*") {
|
|
269
|
+
starIndex = templateIndex;
|
|
270
|
+
matchIndex = searchIndex;
|
|
271
|
+
templateIndex++;
|
|
272
|
+
} else {
|
|
273
|
+
searchIndex++;
|
|
274
|
+
templateIndex++;
|
|
275
|
+
}
|
|
276
|
+
} else if (starIndex !== -1) {
|
|
277
|
+
templateIndex = starIndex + 1;
|
|
278
|
+
matchIndex++;
|
|
279
|
+
searchIndex = matchIndex;
|
|
280
|
+
} else {
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
285
|
+
templateIndex++;
|
|
286
|
+
}
|
|
287
|
+
return templateIndex === template.length;
|
|
288
|
+
}
|
|
289
|
+
function disable() {
|
|
290
|
+
const namespaces = [
|
|
291
|
+
...createDebug2.names,
|
|
292
|
+
...createDebug2.skips.map((namespace) => "-" + namespace)
|
|
293
|
+
].join(",");
|
|
294
|
+
createDebug2.enable("");
|
|
295
|
+
return namespaces;
|
|
296
|
+
}
|
|
297
|
+
function enabled(name) {
|
|
298
|
+
for (const skip of createDebug2.skips) {
|
|
299
|
+
if (matchesTemplate(name, skip)) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
for (const ns of createDebug2.names) {
|
|
304
|
+
if (matchesTemplate(name, ns)) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
function coerce(val) {
|
|
311
|
+
if (val instanceof Error) {
|
|
312
|
+
return val.stack || val.message;
|
|
313
|
+
}
|
|
314
|
+
return val;
|
|
315
|
+
}
|
|
316
|
+
function destroy() {
|
|
317
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
318
|
+
}
|
|
319
|
+
createDebug2.enable(createDebug2.load());
|
|
320
|
+
return createDebug2;
|
|
321
|
+
}
|
|
322
|
+
module.exports = setup;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
327
|
+
var require_browser = __commonJS({
|
|
328
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
|
|
329
|
+
exports.formatArgs = formatArgs;
|
|
330
|
+
exports.save = save;
|
|
331
|
+
exports.load = load;
|
|
332
|
+
exports.useColors = useColors;
|
|
333
|
+
exports.storage = localstorage();
|
|
334
|
+
exports.destroy = /* @__PURE__ */ (() => {
|
|
335
|
+
let warned = false;
|
|
336
|
+
return () => {
|
|
337
|
+
if (!warned) {
|
|
338
|
+
warned = true;
|
|
339
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
})();
|
|
343
|
+
exports.colors = [
|
|
344
|
+
"#0000CC",
|
|
345
|
+
"#0000FF",
|
|
346
|
+
"#0033CC",
|
|
347
|
+
"#0033FF",
|
|
348
|
+
"#0066CC",
|
|
349
|
+
"#0066FF",
|
|
350
|
+
"#0099CC",
|
|
351
|
+
"#0099FF",
|
|
352
|
+
"#00CC00",
|
|
353
|
+
"#00CC33",
|
|
354
|
+
"#00CC66",
|
|
355
|
+
"#00CC99",
|
|
356
|
+
"#00CCCC",
|
|
357
|
+
"#00CCFF",
|
|
358
|
+
"#3300CC",
|
|
359
|
+
"#3300FF",
|
|
360
|
+
"#3333CC",
|
|
361
|
+
"#3333FF",
|
|
362
|
+
"#3366CC",
|
|
363
|
+
"#3366FF",
|
|
364
|
+
"#3399CC",
|
|
365
|
+
"#3399FF",
|
|
366
|
+
"#33CC00",
|
|
367
|
+
"#33CC33",
|
|
368
|
+
"#33CC66",
|
|
369
|
+
"#33CC99",
|
|
370
|
+
"#33CCCC",
|
|
371
|
+
"#33CCFF",
|
|
372
|
+
"#6600CC",
|
|
373
|
+
"#6600FF",
|
|
374
|
+
"#6633CC",
|
|
375
|
+
"#6633FF",
|
|
376
|
+
"#66CC00",
|
|
377
|
+
"#66CC33",
|
|
378
|
+
"#9900CC",
|
|
379
|
+
"#9900FF",
|
|
380
|
+
"#9933CC",
|
|
381
|
+
"#9933FF",
|
|
382
|
+
"#99CC00",
|
|
383
|
+
"#99CC33",
|
|
384
|
+
"#CC0000",
|
|
385
|
+
"#CC0033",
|
|
386
|
+
"#CC0066",
|
|
387
|
+
"#CC0099",
|
|
388
|
+
"#CC00CC",
|
|
389
|
+
"#CC00FF",
|
|
390
|
+
"#CC3300",
|
|
391
|
+
"#CC3333",
|
|
392
|
+
"#CC3366",
|
|
393
|
+
"#CC3399",
|
|
394
|
+
"#CC33CC",
|
|
395
|
+
"#CC33FF",
|
|
396
|
+
"#CC6600",
|
|
397
|
+
"#CC6633",
|
|
398
|
+
"#CC9900",
|
|
399
|
+
"#CC9933",
|
|
400
|
+
"#CCCC00",
|
|
401
|
+
"#CCCC33",
|
|
402
|
+
"#FF0000",
|
|
403
|
+
"#FF0033",
|
|
404
|
+
"#FF0066",
|
|
405
|
+
"#FF0099",
|
|
406
|
+
"#FF00CC",
|
|
407
|
+
"#FF00FF",
|
|
408
|
+
"#FF3300",
|
|
409
|
+
"#FF3333",
|
|
410
|
+
"#FF3366",
|
|
411
|
+
"#FF3399",
|
|
412
|
+
"#FF33CC",
|
|
413
|
+
"#FF33FF",
|
|
414
|
+
"#FF6600",
|
|
415
|
+
"#FF6633",
|
|
416
|
+
"#FF9900",
|
|
417
|
+
"#FF9933",
|
|
418
|
+
"#FFCC00",
|
|
419
|
+
"#FFCC33"
|
|
420
|
+
];
|
|
421
|
+
function useColors() {
|
|
422
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
426
|
+
return false;
|
|
427
|
+
}
|
|
428
|
+
let m;
|
|
429
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
430
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
431
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
432
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
433
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
434
|
+
}
|
|
435
|
+
function formatArgs(args) {
|
|
436
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
437
|
+
if (!this.useColors) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const c = "color: " + this.color;
|
|
441
|
+
args.splice(1, 0, c, "color: inherit");
|
|
442
|
+
let index = 0;
|
|
443
|
+
let lastC = 0;
|
|
444
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
445
|
+
if (match === "%%") {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
index++;
|
|
449
|
+
if (match === "%c") {
|
|
450
|
+
lastC = index;
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
args.splice(lastC, 0, c);
|
|
454
|
+
}
|
|
455
|
+
exports.log = console.debug || console.log || (() => {
|
|
456
|
+
});
|
|
457
|
+
function save(namespaces) {
|
|
458
|
+
try {
|
|
459
|
+
if (namespaces) {
|
|
460
|
+
exports.storage.setItem("debug", namespaces);
|
|
461
|
+
} else {
|
|
462
|
+
exports.storage.removeItem("debug");
|
|
463
|
+
}
|
|
464
|
+
} catch (error) {
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function load() {
|
|
468
|
+
let r;
|
|
469
|
+
try {
|
|
470
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
471
|
+
} catch (error) {
|
|
472
|
+
}
|
|
473
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
474
|
+
r = process.env.DEBUG;
|
|
475
|
+
}
|
|
476
|
+
return r;
|
|
477
|
+
}
|
|
478
|
+
function localstorage() {
|
|
479
|
+
try {
|
|
480
|
+
return localStorage;
|
|
481
|
+
} catch (error) {
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
module.exports = require_common()(exports);
|
|
485
|
+
var { formatters } = module.exports;
|
|
486
|
+
formatters.j = function(v) {
|
|
487
|
+
try {
|
|
488
|
+
return JSON.stringify(v);
|
|
489
|
+
} catch (error) {
|
|
490
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
497
|
+
var require_has_flag = __commonJS({
|
|
498
|
+
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
|
|
499
|
+
"use strict";
|
|
500
|
+
module.exports = (flag, argv = process.argv) => {
|
|
501
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
502
|
+
const position = argv.indexOf(prefix + flag);
|
|
503
|
+
const terminatorPosition = argv.indexOf("--");
|
|
504
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
510
|
+
var require_supports_color = __commonJS({
|
|
511
|
+
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
|
|
512
|
+
"use strict";
|
|
513
|
+
var os = __require("os");
|
|
514
|
+
var tty = __require("tty");
|
|
515
|
+
var hasFlag = require_has_flag();
|
|
516
|
+
var { env } = process;
|
|
517
|
+
var forceColor;
|
|
518
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
519
|
+
forceColor = 0;
|
|
520
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
521
|
+
forceColor = 1;
|
|
522
|
+
}
|
|
523
|
+
if ("FORCE_COLOR" in env) {
|
|
524
|
+
if (env.FORCE_COLOR === "true") {
|
|
525
|
+
forceColor = 1;
|
|
526
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
527
|
+
forceColor = 0;
|
|
528
|
+
} else {
|
|
529
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function translateLevel(level) {
|
|
533
|
+
if (level === 0) {
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
return {
|
|
537
|
+
level,
|
|
538
|
+
hasBasic: true,
|
|
539
|
+
has256: level >= 2,
|
|
540
|
+
has16m: level >= 3
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
544
|
+
if (forceColor === 0) {
|
|
545
|
+
return 0;
|
|
546
|
+
}
|
|
547
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
548
|
+
return 3;
|
|
549
|
+
}
|
|
550
|
+
if (hasFlag("color=256")) {
|
|
551
|
+
return 2;
|
|
552
|
+
}
|
|
553
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
554
|
+
return 0;
|
|
555
|
+
}
|
|
556
|
+
const min = forceColor || 0;
|
|
557
|
+
if (env.TERM === "dumb") {
|
|
558
|
+
return min;
|
|
559
|
+
}
|
|
560
|
+
if (process.platform === "win32") {
|
|
561
|
+
const osRelease = os.release().split(".");
|
|
562
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
563
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
564
|
+
}
|
|
565
|
+
return 1;
|
|
566
|
+
}
|
|
567
|
+
if ("CI" in env) {
|
|
568
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
569
|
+
return 1;
|
|
570
|
+
}
|
|
571
|
+
return min;
|
|
572
|
+
}
|
|
573
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
574
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
575
|
+
}
|
|
576
|
+
if (env.COLORTERM === "truecolor") {
|
|
577
|
+
return 3;
|
|
578
|
+
}
|
|
579
|
+
if ("TERM_PROGRAM" in env) {
|
|
580
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
581
|
+
switch (env.TERM_PROGRAM) {
|
|
582
|
+
case "iTerm.app":
|
|
583
|
+
return version >= 3 ? 3 : 2;
|
|
584
|
+
case "Apple_Terminal":
|
|
585
|
+
return 2;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
589
|
+
return 2;
|
|
590
|
+
}
|
|
591
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
592
|
+
return 1;
|
|
593
|
+
}
|
|
594
|
+
if ("COLORTERM" in env) {
|
|
595
|
+
return 1;
|
|
596
|
+
}
|
|
597
|
+
return min;
|
|
598
|
+
}
|
|
599
|
+
function getSupportLevel(stream) {
|
|
600
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
601
|
+
return translateLevel(level);
|
|
602
|
+
}
|
|
603
|
+
module.exports = {
|
|
604
|
+
supportsColor: getSupportLevel,
|
|
605
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
606
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
612
|
+
var require_node = __commonJS({
|
|
613
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
|
|
614
|
+
var tty = __require("tty");
|
|
615
|
+
var util = __require("util");
|
|
616
|
+
exports.init = init;
|
|
617
|
+
exports.log = log;
|
|
618
|
+
exports.formatArgs = formatArgs;
|
|
619
|
+
exports.save = save;
|
|
620
|
+
exports.load = load;
|
|
621
|
+
exports.useColors = useColors;
|
|
622
|
+
exports.destroy = util.deprecate(
|
|
623
|
+
() => {
|
|
624
|
+
},
|
|
625
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
626
|
+
);
|
|
627
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
628
|
+
try {
|
|
629
|
+
const supportsColor = require_supports_color();
|
|
630
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
631
|
+
exports.colors = [
|
|
632
|
+
20,
|
|
633
|
+
21,
|
|
634
|
+
26,
|
|
635
|
+
27,
|
|
636
|
+
32,
|
|
637
|
+
33,
|
|
638
|
+
38,
|
|
639
|
+
39,
|
|
640
|
+
40,
|
|
641
|
+
41,
|
|
642
|
+
42,
|
|
643
|
+
43,
|
|
644
|
+
44,
|
|
645
|
+
45,
|
|
646
|
+
56,
|
|
647
|
+
57,
|
|
648
|
+
62,
|
|
649
|
+
63,
|
|
650
|
+
68,
|
|
651
|
+
69,
|
|
652
|
+
74,
|
|
653
|
+
75,
|
|
654
|
+
76,
|
|
655
|
+
77,
|
|
656
|
+
78,
|
|
657
|
+
79,
|
|
658
|
+
80,
|
|
659
|
+
81,
|
|
660
|
+
92,
|
|
661
|
+
93,
|
|
662
|
+
98,
|
|
663
|
+
99,
|
|
664
|
+
112,
|
|
665
|
+
113,
|
|
666
|
+
128,
|
|
667
|
+
129,
|
|
668
|
+
134,
|
|
669
|
+
135,
|
|
670
|
+
148,
|
|
671
|
+
149,
|
|
672
|
+
160,
|
|
673
|
+
161,
|
|
674
|
+
162,
|
|
675
|
+
163,
|
|
676
|
+
164,
|
|
677
|
+
165,
|
|
678
|
+
166,
|
|
679
|
+
167,
|
|
680
|
+
168,
|
|
681
|
+
169,
|
|
682
|
+
170,
|
|
683
|
+
171,
|
|
684
|
+
172,
|
|
685
|
+
173,
|
|
686
|
+
178,
|
|
687
|
+
179,
|
|
688
|
+
184,
|
|
689
|
+
185,
|
|
690
|
+
196,
|
|
691
|
+
197,
|
|
692
|
+
198,
|
|
693
|
+
199,
|
|
694
|
+
200,
|
|
695
|
+
201,
|
|
696
|
+
202,
|
|
697
|
+
203,
|
|
698
|
+
204,
|
|
699
|
+
205,
|
|
700
|
+
206,
|
|
701
|
+
207,
|
|
702
|
+
208,
|
|
703
|
+
209,
|
|
704
|
+
214,
|
|
705
|
+
215,
|
|
706
|
+
220,
|
|
707
|
+
221
|
|
708
|
+
];
|
|
709
|
+
}
|
|
710
|
+
} catch (error) {
|
|
711
|
+
}
|
|
712
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
713
|
+
return /^debug_/i.test(key);
|
|
714
|
+
}).reduce((obj, key) => {
|
|
715
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
716
|
+
return k.toUpperCase();
|
|
717
|
+
});
|
|
718
|
+
let val = process.env[key];
|
|
719
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
720
|
+
val = true;
|
|
721
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
722
|
+
val = false;
|
|
723
|
+
} else if (val === "null") {
|
|
724
|
+
val = null;
|
|
725
|
+
} else {
|
|
726
|
+
val = Number(val);
|
|
727
|
+
}
|
|
728
|
+
obj[prop] = val;
|
|
729
|
+
return obj;
|
|
730
|
+
}, {});
|
|
731
|
+
function useColors() {
|
|
732
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
733
|
+
}
|
|
734
|
+
function formatArgs(args) {
|
|
735
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
736
|
+
if (useColors2) {
|
|
737
|
+
const c = this.color;
|
|
738
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
739
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
740
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
741
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
742
|
+
} else {
|
|
743
|
+
args[0] = getDate() + name + " " + args[0];
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
function getDate() {
|
|
747
|
+
if (exports.inspectOpts.hideDate) {
|
|
748
|
+
return "";
|
|
749
|
+
}
|
|
750
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
751
|
+
}
|
|
752
|
+
function log(...args) {
|
|
753
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
754
|
+
}
|
|
755
|
+
function save(namespaces) {
|
|
756
|
+
if (namespaces) {
|
|
757
|
+
process.env.DEBUG = namespaces;
|
|
758
|
+
} else {
|
|
759
|
+
delete process.env.DEBUG;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
function load() {
|
|
763
|
+
return process.env.DEBUG;
|
|
764
|
+
}
|
|
765
|
+
function init(debug2) {
|
|
766
|
+
debug2.inspectOpts = {};
|
|
767
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
768
|
+
for (let i = 0; i < keys.length; i++) {
|
|
769
|
+
debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
module.exports = require_common()(exports);
|
|
773
|
+
var { formatters } = module.exports;
|
|
774
|
+
formatters.o = function(v) {
|
|
775
|
+
this.inspectOpts.colors = this.useColors;
|
|
776
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
777
|
+
};
|
|
778
|
+
formatters.O = function(v) {
|
|
779
|
+
this.inspectOpts.colors = this.useColors;
|
|
780
|
+
return util.inspect(v, this.inspectOpts);
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
786
|
+
var require_src = __commonJS({
|
|
787
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
|
|
788
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
789
|
+
module.exports = require_browser();
|
|
790
|
+
} else {
|
|
791
|
+
module.exports = require_node();
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
// src/utils/debug.ts
|
|
797
|
+
var import_debug = __toESM(require_src());
|
|
798
|
+
var debug = (0, import_debug.default)("apple-kit");
|
|
799
|
+
var debugTask = (0, import_debug.default)("apple-kit:task");
|
|
800
|
+
var debugWarning = (0, import_debug.default)("apple-kit:warning");
|
|
801
|
+
var debugError = (0, import_debug.default)("apple-kit:error");
|
|
802
|
+
function logInfo(message) {
|
|
803
|
+
debug(message);
|
|
804
|
+
}
|
|
805
|
+
function logTask(message) {
|
|
806
|
+
debugTask(message);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// src/logic/actions/device.ts
|
|
810
|
+
import { exec as execCallback } from "node:child_process";
|
|
811
|
+
import { existsSync } from "node:fs";
|
|
812
|
+
import { join } from "node:path";
|
|
813
|
+
import { promisify } from "node:util";
|
|
814
|
+
|
|
815
|
+
// src/logic/dataParser.ts
|
|
816
|
+
function parsePlistOutput(output) {
|
|
817
|
+
const result = {};
|
|
818
|
+
const lines = output.split("\n");
|
|
819
|
+
for (const line of lines) {
|
|
820
|
+
const colonIndex = line.indexOf(":");
|
|
821
|
+
if (colonIndex > 0) {
|
|
822
|
+
const key = line.substring(0, colonIndex).trim();
|
|
823
|
+
const value = line.substring(colonIndex + 1).trim();
|
|
824
|
+
result[key] = value;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return result;
|
|
828
|
+
}
|
|
829
|
+
function parseAppList(output) {
|
|
830
|
+
const apps = [];
|
|
831
|
+
const lines = output.trim().split("\n");
|
|
832
|
+
for (const line of lines) {
|
|
833
|
+
const match = line.match(/^([^,]+),\s*([^,]+),\s*"?([^"]+)"?/);
|
|
834
|
+
if (match) {
|
|
835
|
+
apps.push({
|
|
836
|
+
bundleId: match[1].trim(),
|
|
837
|
+
version: match[2].trim(),
|
|
838
|
+
displayName: match[3].trim(),
|
|
839
|
+
bundleVersion: ""
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
return apps;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
// src/logic/actions/device.ts
|
|
847
|
+
var execAsync = promisify(execCallback);
|
|
848
|
+
async function getDeviceInfo(udid) {
|
|
849
|
+
logTask(`Getting device info for ${udid}`);
|
|
850
|
+
const result = await runIDeviceTool("ideviceinfo", ["-u", udid]);
|
|
851
|
+
if (!result) {
|
|
852
|
+
throw new Error("Failed to get device info");
|
|
853
|
+
}
|
|
854
|
+
const props = parsePlistOutput(result.stdout);
|
|
855
|
+
return {
|
|
856
|
+
deviceName: props.DeviceName || "",
|
|
857
|
+
productType: props.ProductType || "",
|
|
858
|
+
productVersion: props.ProductVersion || "",
|
|
859
|
+
buildVersion: props.BuildVersion || "",
|
|
860
|
+
serialNumber: props.SerialNumber || "",
|
|
861
|
+
udid: props.UniqueDeviceID || udid,
|
|
862
|
+
wifiAddress: props.WiFiAddress || "",
|
|
863
|
+
bluetoothAddress: props.BluetoothAddress || "",
|
|
864
|
+
phoneNumber: props.PhoneNumber || "",
|
|
865
|
+
cpuArchitecture: props.CPUArchitecture || "",
|
|
866
|
+
hardwareModel: props.HardwareModel || "",
|
|
867
|
+
modelNumber: props.ModelNumber || "",
|
|
868
|
+
regionInfo: props.RegionInfo || "",
|
|
869
|
+
timeZone: props.TimeZone || "",
|
|
870
|
+
uniqueChipID: props.UniqueChipID || "",
|
|
871
|
+
isPaired: true
|
|
872
|
+
// If we can get info, device is paired
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
async function runIDeviceTool(toolName, args = [], options = {}) {
|
|
876
|
+
const command = `"${toolName}${process.platform === "win32" ? ".exe" : ""}" ${args.map((a) => `"${a}"`).join(" ")}`;
|
|
877
|
+
return execIDevice(command, options);
|
|
878
|
+
}
|
|
879
|
+
async function execIDevice(command, options = {}) {
|
|
880
|
+
const binPath = getIDeviceBinPath();
|
|
881
|
+
options.cwd = binPath;
|
|
882
|
+
const result = await execAsync(command, {
|
|
883
|
+
...options,
|
|
884
|
+
env: process.env,
|
|
885
|
+
windowsHide: true,
|
|
886
|
+
encoding: "utf8"
|
|
887
|
+
});
|
|
888
|
+
return {
|
|
889
|
+
stdout: result.stdout.toString(),
|
|
890
|
+
stderr: result.stderr.toString()
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
function getResourcesBinPath() {
|
|
894
|
+
const binPath = process.env.IDeviceBinPath;
|
|
895
|
+
if (!binPath) {
|
|
896
|
+
throw new Error("IDeviceBinPath is not set");
|
|
897
|
+
}
|
|
898
|
+
return binPath;
|
|
899
|
+
}
|
|
900
|
+
function getIDeviceBinPath() {
|
|
901
|
+
return getResourcesBinPath();
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// src/logic/actions/activation.ts
|
|
905
|
+
async function getActivationState(udid) {
|
|
906
|
+
logTask(`Getting activation state for device ${udid}`);
|
|
907
|
+
try {
|
|
908
|
+
const result = await runIDeviceTool("ideviceinfo", ["-u", udid, "-k", "ActivationState"]);
|
|
909
|
+
if (!result) {
|
|
910
|
+
return {
|
|
911
|
+
isActivated: false,
|
|
912
|
+
activationState: "Unknown"
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
const { stdout } = result;
|
|
916
|
+
const state = stdout.trim();
|
|
917
|
+
return {
|
|
918
|
+
isActivated: state === "Activated",
|
|
919
|
+
activationState: state
|
|
920
|
+
};
|
|
921
|
+
} catch {
|
|
922
|
+
return {
|
|
923
|
+
isActivated: false,
|
|
924
|
+
activationState: "Unknown"
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
async function activate(udid) {
|
|
929
|
+
logTask(`Activating device ${udid}`);
|
|
930
|
+
try {
|
|
931
|
+
const result = await runIDeviceTool("ideviceactivation", ["-u", udid, "activate"]);
|
|
932
|
+
if (!result) {
|
|
933
|
+
return false;
|
|
934
|
+
}
|
|
935
|
+
return result.stdout.toLowerCase().includes("success") || result.stdout.toLowerCase().includes("activated");
|
|
936
|
+
} catch (error) {
|
|
937
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
938
|
+
throw new Error(`Activation failed: ${errorMsg}`);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// src/logic/actions/pair.ts
|
|
943
|
+
async function isPaired(udid) {
|
|
944
|
+
logTask(`Checking pairing status for ${udid}`);
|
|
945
|
+
try {
|
|
946
|
+
const result = await runIDeviceTool("idevicepair", ["-u", udid, "validate"]);
|
|
947
|
+
if (!result) {
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
return result.stdout.toLowerCase().includes("success");
|
|
951
|
+
} catch {
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
async function trustDevice(udid, timeout = 6e4, onWaitingForTrust) {
|
|
956
|
+
logTask(`Trusting device ${udid}`);
|
|
957
|
+
if (await isPaired(udid)) {
|
|
958
|
+
logInfo(`Device ${udid} is already trusted`);
|
|
959
|
+
return true;
|
|
960
|
+
}
|
|
961
|
+
logInfo(`Initiating pairing for device ${udid}`);
|
|
962
|
+
const pairResult = await pair(udid);
|
|
963
|
+
if (pairResult) {
|
|
964
|
+
logInfo(`Device ${udid} paired successfully`);
|
|
965
|
+
return true;
|
|
966
|
+
}
|
|
967
|
+
logInfo("Please accept the trust dialog on the device...");
|
|
968
|
+
onWaitingForTrust?.();
|
|
969
|
+
try {
|
|
970
|
+
await waitForPairing(udid, timeout, 1e3);
|
|
971
|
+
logInfo(`Device ${udid} is now trusted`);
|
|
972
|
+
return true;
|
|
973
|
+
} catch {
|
|
974
|
+
logInfo(`Timeout waiting for trust acceptance on device ${udid}`);
|
|
975
|
+
return false;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
async function waitForPairing(udid, timeout = 12e4, pollInterval = 1e3) {
|
|
979
|
+
logTask(`Waiting for pairing on device ${udid}`);
|
|
980
|
+
const startTime = Date.now();
|
|
981
|
+
while (Date.now() - startTime < timeout) {
|
|
982
|
+
if (await isPaired(udid)) {
|
|
983
|
+
logInfo(`Device ${udid} is now paired`);
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
987
|
+
}
|
|
988
|
+
throw new Error(`Timeout waiting for device pairing after ${timeout}ms`);
|
|
989
|
+
}
|
|
990
|
+
async function pair(udid) {
|
|
991
|
+
logTask(`Initiating pairing for device ${udid}`);
|
|
992
|
+
try {
|
|
993
|
+
const result = await runIDeviceTool("idevicepair", ["-u", udid, "pair"]);
|
|
994
|
+
if (!result) {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
return result.stdout.toLowerCase().includes("success");
|
|
998
|
+
} catch (error) {
|
|
999
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1000
|
+
if (errorMsg.includes("Please accept the trust dialog")) {
|
|
1001
|
+
return false;
|
|
1002
|
+
}
|
|
1003
|
+
throw error;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
async function unpair(udid) {
|
|
1007
|
+
logTask(`Un-pairing device ${udid}`);
|
|
1008
|
+
try {
|
|
1009
|
+
const result = await runIDeviceTool("idevicepair", ["-u", udid, "unpair"]);
|
|
1010
|
+
if (!result) {
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
return result.stdout.toLowerCase().includes("success");
|
|
1014
|
+
} catch {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// src/logic/actions/install.ts
|
|
1020
|
+
async function installApp(ipaPath, udid) {
|
|
1021
|
+
logTask(`Installing app ${ipaPath} on device ${udid}`);
|
|
1022
|
+
if (!await isPaired(udid)) {
|
|
1023
|
+
await waitForPairing(udid, 1e4);
|
|
1024
|
+
}
|
|
1025
|
+
await runIDeviceTool("ideviceinstaller", ["-u", udid, "-i", ipaPath]);
|
|
1026
|
+
}
|
|
1027
|
+
async function uninstallApp(bundleId, udid) {
|
|
1028
|
+
logTask(`Uninstalling app ${bundleId} from device ${udid}`);
|
|
1029
|
+
if (!await isPaired(udid)) {
|
|
1030
|
+
await waitForPairing(udid, 1e4);
|
|
1031
|
+
}
|
|
1032
|
+
await runIDeviceTool("ideviceinstaller", ["-u", udid, "-U", bundleId]);
|
|
1033
|
+
}
|
|
1034
|
+
async function listApps(udid) {
|
|
1035
|
+
logTask(`Listing apps on device ${udid}`);
|
|
1036
|
+
if (!await isPaired(udid)) {
|
|
1037
|
+
await waitForPairing(udid, 1e4);
|
|
1038
|
+
}
|
|
1039
|
+
try {
|
|
1040
|
+
const result = await runIDeviceTool("ideviceinstaller", ["-u", udid, "-l"]);
|
|
1041
|
+
if (!result) {
|
|
1042
|
+
return [];
|
|
1043
|
+
}
|
|
1044
|
+
const { stdout } = result;
|
|
1045
|
+
return parseAppList(stdout);
|
|
1046
|
+
} catch {
|
|
1047
|
+
return [];
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
async function isAppInstalled(bundleId, udid) {
|
|
1051
|
+
logTask(`Checking if app ${bundleId} is installed on device ${udid}`);
|
|
1052
|
+
const apps = await listApps(udid);
|
|
1053
|
+
return apps.some((app) => app.bundleId === bundleId);
|
|
1054
|
+
}
|
|
1055
|
+
async function wakeDevice(udid) {
|
|
1056
|
+
try {
|
|
1057
|
+
logInfo("Attempting to wake device screen...");
|
|
1058
|
+
await runIDeviceTool("ideviceinfo", ["-u", udid, "-k", "DeviceName"]);
|
|
1059
|
+
try {
|
|
1060
|
+
await runIDeviceTool("ideviceinfo", ["-u", udid, "-k", "ActivationState"]);
|
|
1061
|
+
} catch {
|
|
1062
|
+
}
|
|
1063
|
+
try {
|
|
1064
|
+
await runIDeviceTool("idevicepair", ["-u", udid, "validate"]);
|
|
1065
|
+
} catch {
|
|
1066
|
+
}
|
|
1067
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
1068
|
+
logInfo("Device wake attempt completed");
|
|
1069
|
+
} catch (error) {
|
|
1070
|
+
logInfo(
|
|
1071
|
+
`Device wake attempt failed (non-critical): ${error instanceof Error ? error.message : String(error)}`
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
async function launchApp(bundleId, args, udid) {
|
|
1076
|
+
logTask(`Launching app ${bundleId} on device ${udid}`);
|
|
1077
|
+
if (!await isPaired(udid)) {
|
|
1078
|
+
await waitForPairing(udid, 1e4);
|
|
1079
|
+
}
|
|
1080
|
+
await wakeDevice(udid);
|
|
1081
|
+
try {
|
|
1082
|
+
logInfo(`Attempting to launch ${bundleId} using idevicedebug...`);
|
|
1083
|
+
const result = await runIDeviceTool("idevicedebug", ["-u", udid, "run", bundleId, ...args]);
|
|
1084
|
+
const output = (result?.stdout ?? "") + (result?.stderr ?? "");
|
|
1085
|
+
if (output.trim()) {
|
|
1086
|
+
logInfo(`idevicedebug output: ${output.substring(0, 200)}`);
|
|
1087
|
+
}
|
|
1088
|
+
if (output.toLowerCase().includes("could not start") && output.toLowerCase().includes("debugserver")) {
|
|
1089
|
+
logInfo("idevicedebug requires debugserver, falling back to pymobiledevice3...");
|
|
1090
|
+
throw new Error("debugserver_not_available");
|
|
1091
|
+
}
|
|
1092
|
+
logInfo(`App ${bundleId} launched successfully using idevicedebug`);
|
|
1093
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
1094
|
+
return;
|
|
1095
|
+
} catch (error) {
|
|
1096
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1097
|
+
if (errorMsg.includes("debugserver_not_available") || errorMsg.toLowerCase().includes("could not start") || errorMsg.toLowerCase().includes("debugserver")) {
|
|
1098
|
+
logInfo("idevicedebug failed, trying pymobiledevice3 for iOS 17+...");
|
|
1099
|
+
await launchAppWithPymobiledevice3(bundleId, args, udid);
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
throw error;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
async function launchAppWithPymobiledevice3(bundleId, args, udid) {
|
|
1106
|
+
logTask(`Launching app ${bundleId} using pymobiledevice3`);
|
|
1107
|
+
const { exec } = await import("node:child_process");
|
|
1108
|
+
const { promisify: promisify2 } = await import("node:util");
|
|
1109
|
+
const execAsync2 = promisify2(exec);
|
|
1110
|
+
try {
|
|
1111
|
+
let cmdArgs = [
|
|
1112
|
+
"-m",
|
|
1113
|
+
"pymobiledevice3",
|
|
1114
|
+
"developer",
|
|
1115
|
+
"dvt",
|
|
1116
|
+
"launch",
|
|
1117
|
+
"--udid",
|
|
1118
|
+
udid,
|
|
1119
|
+
"--kill-existing",
|
|
1120
|
+
// Kill existing instance to bring app to foreground
|
|
1121
|
+
bundleId,
|
|
1122
|
+
...args
|
|
1123
|
+
];
|
|
1124
|
+
let command = `python ${cmdArgs.map((a) => `"${a}"`).join(" ")}`;
|
|
1125
|
+
logInfo(`Executing: ${command}`);
|
|
1126
|
+
const result = await execAsync2(command, {
|
|
1127
|
+
windowsHide: true,
|
|
1128
|
+
encoding: "utf8",
|
|
1129
|
+
timeout: 3e4
|
|
1130
|
+
// 30 second timeout
|
|
1131
|
+
});
|
|
1132
|
+
const output = result.stdout.toString() + result.stderr.toString();
|
|
1133
|
+
if (output.trim()) {
|
|
1134
|
+
logInfo(`pymobiledevice3 output: ${output.substring(0, 200)}`);
|
|
1135
|
+
}
|
|
1136
|
+
if (output.toLowerCase().includes("developer mode") && output.toLowerCase().includes("not enabled")) {
|
|
1137
|
+
throw new Error(
|
|
1138
|
+
"Developer Mode is not enabled on the device.\nPlease enable it: Settings \u2192 Privacy & Security \u2192 Developer Mode \u2192 Enable"
|
|
1139
|
+
);
|
|
1140
|
+
}
|
|
1141
|
+
if (output.toLowerCase().includes("tunneld") && (output.toLowerCase().includes("unable to connect") || output.toLowerCase().includes("invalidserviceerror"))) {
|
|
1142
|
+
logInfo("Tunnel required, retrying with tunnel option...");
|
|
1143
|
+
cmdArgs = [
|
|
1144
|
+
"-m",
|
|
1145
|
+
"pymobiledevice3",
|
|
1146
|
+
"developer",
|
|
1147
|
+
"dvt",
|
|
1148
|
+
"launch",
|
|
1149
|
+
"--udid",
|
|
1150
|
+
udid,
|
|
1151
|
+
"--tunnel",
|
|
1152
|
+
udid,
|
|
1153
|
+
// Use UDID for tunnel
|
|
1154
|
+
"--kill-existing",
|
|
1155
|
+
bundleId,
|
|
1156
|
+
...args
|
|
1157
|
+
];
|
|
1158
|
+
command = `python ${cmdArgs.map((a) => `"${a}"`).join(" ")}`;
|
|
1159
|
+
logInfo(`Retrying with tunnel: ${command}`);
|
|
1160
|
+
try {
|
|
1161
|
+
const retryResult = await execAsync2(command, {
|
|
1162
|
+
windowsHide: true,
|
|
1163
|
+
encoding: "utf8",
|
|
1164
|
+
timeout: 3e4
|
|
1165
|
+
});
|
|
1166
|
+
const retryOutput = retryResult.stdout.toString() + retryResult.stderr.toString();
|
|
1167
|
+
if (retryOutput.trim()) {
|
|
1168
|
+
logInfo(`pymobiledevice3 retry output: ${retryOutput.substring(0, 200)}`);
|
|
1169
|
+
}
|
|
1170
|
+
if (retryOutput.toLowerCase().includes("tunneld") && retryOutput.toLowerCase().includes("unable to connect")) {
|
|
1171
|
+
throw new Error(
|
|
1172
|
+
"Tunnel connection failed. For iOS 17+, you may need to start tunneld:\n python -m pymobiledevice3 remote tunneld\nOr ensure Developer Mode is enabled and device is unlocked."
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
logInfo(`App ${bundleId} launched successfully using pymobiledevice3 with tunnel`);
|
|
1176
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
1177
|
+
return;
|
|
1178
|
+
} catch {
|
|
1179
|
+
throw new Error(
|
|
1180
|
+
"Tunnel connection failed. For iOS 17+, you may need to start tunneld:\n python -m pymobiledevice3 remote tunneld\nOr ensure Developer Mode is enabled and device is unlocked."
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
if (output.toLowerCase().includes("not found") || output.toLowerCase().includes("command not found") || output.toLowerCase().includes("cannot find")) {
|
|
1185
|
+
throw new Error(
|
|
1186
|
+
"pymobiledevice3 is not installed.\nInstall it with: python -m pip install --user pymobiledevice3"
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
if (output.toLowerCase().includes("error") && !output.toLowerCase().includes("warning")) {
|
|
1190
|
+
logInfo(`Warning: pymobiledevice3 reported errors: ${output.substring(0, 300)}`);
|
|
1191
|
+
}
|
|
1192
|
+
logInfo(`App ${bundleId} launched successfully using pymobiledevice3`);
|
|
1193
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
1194
|
+
} catch (error) {
|
|
1195
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1196
|
+
if (errorMsg.includes("not found") || errorMsg.includes("command not found") || errorMsg.includes("cannot find") || errorMsg.includes("No module named")) {
|
|
1197
|
+
throw new Error(
|
|
1198
|
+
"pymobiledevice3 is not installed or Python is not available.\nInstall it with: python -m pip install --user pymobiledevice3\nFor iOS 17+, Developer Mode must also be enabled on the device."
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
throw error;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// src/logic/actions/proxy.ts
|
|
1206
|
+
async function startPortForward(localPort, devicePort, udid) {
|
|
1207
|
+
logTask(`Starting port forward ${localPort} -> ${devicePort} for device ${udid}`);
|
|
1208
|
+
const result = await runIDeviceTool("iproxy", [
|
|
1209
|
+
localPort.toString(),
|
|
1210
|
+
devicePort.toString(),
|
|
1211
|
+
"-u",
|
|
1212
|
+
udid
|
|
1213
|
+
]);
|
|
1214
|
+
return {
|
|
1215
|
+
localPort,
|
|
1216
|
+
devicePort,
|
|
1217
|
+
...result
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
async function startPortForwardAsync(localPort, devicePort, udid, _timeout = 5e3) {
|
|
1221
|
+
const result = await startPortForward(localPort, devicePort, udid);
|
|
1222
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
1223
|
+
if (result.stdout.includes("error") || result.stderr.includes("error")) {
|
|
1224
|
+
throw new Error("Port forwarding failed to start");
|
|
1225
|
+
}
|
|
1226
|
+
return result;
|
|
1227
|
+
}
|
|
1228
|
+
async function closePortForward(udid) {
|
|
1229
|
+
logTask(`Closing port forward for device ${udid}`);
|
|
1230
|
+
await runIDeviceTool("iproxy", ["-u", udid, "-c"]);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
// src/logic/appleDeviceKit.ts
|
|
1234
|
+
var AppleDeviceKit = class {
|
|
1235
|
+
constructor(udid, port) {
|
|
1236
|
+
this.port = port;
|
|
1237
|
+
this.deviceId = udid;
|
|
1238
|
+
logInfo(`AppleDeviceKit initialized for device: ${this.deviceId}`);
|
|
1239
|
+
}
|
|
1240
|
+
deviceId;
|
|
1241
|
+
/**
|
|
1242
|
+
* Get detailed device information
|
|
1243
|
+
*/
|
|
1244
|
+
async getDeviceInfo() {
|
|
1245
|
+
return getDeviceInfo(this.deviceId);
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Check if device is paired/trusted with this computer
|
|
1249
|
+
*/
|
|
1250
|
+
async isPaired() {
|
|
1251
|
+
return isPaired(this.deviceId);
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Wait for device to be paired
|
|
1255
|
+
* Polls the pairing status until successful or timeout
|
|
1256
|
+
*
|
|
1257
|
+
* @param timeout Timeout in milliseconds (default: 120000)
|
|
1258
|
+
* @param pollInterval Poll interval in milliseconds (default: 1000)
|
|
1259
|
+
*/
|
|
1260
|
+
async waitForPairing(timeout = 12e4, pollInterval = 1e3) {
|
|
1261
|
+
return waitForPairing(this.deviceId, timeout, pollInterval);
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Attempt to pair/trust the device
|
|
1265
|
+
* User must accept the trust dialog on the device
|
|
1266
|
+
*/
|
|
1267
|
+
async pair() {
|
|
1268
|
+
return pair(this.deviceId);
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Trust/pair the device - initiates pairing and waits for user to accept
|
|
1272
|
+
*
|
|
1273
|
+
* This is the recommended method for establishing trust with a device.
|
|
1274
|
+
* It will:
|
|
1275
|
+
* 1. Check if already paired
|
|
1276
|
+
* 2. If not, initiate pairing (shows "Trust This Computer?" on device)
|
|
1277
|
+
* 3. Wait for user to accept the trust dialog
|
|
1278
|
+
*
|
|
1279
|
+
* @param timeout Timeout in milliseconds to wait for user acceptance (default: 60000)
|
|
1280
|
+
* @param onWaitingForTrust Callback when waiting for user to accept trust dialog
|
|
1281
|
+
* @returns true if device is now trusted
|
|
1282
|
+
*/
|
|
1283
|
+
async trustDevice(timeout = 6e4, onWaitingForTrust) {
|
|
1284
|
+
return trustDevice(this.deviceId, timeout, onWaitingForTrust);
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Unpair/untrust the device
|
|
1288
|
+
*/
|
|
1289
|
+
async unpair() {
|
|
1290
|
+
return unpair(this.deviceId);
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Install an IPA file on the device (install agent)
|
|
1294
|
+
*
|
|
1295
|
+
* @param ipaPath Path to the IPA file
|
|
1296
|
+
*/
|
|
1297
|
+
async installApp(ipaPath) {
|
|
1298
|
+
installApp(ipaPath, this.deviceId);
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Uninstall an app by bundle ID (uninstall agent)
|
|
1302
|
+
*
|
|
1303
|
+
* @param bundleId Application bundle identifier
|
|
1304
|
+
*/
|
|
1305
|
+
async uninstallApp(bundleId) {
|
|
1306
|
+
uninstallApp(bundleId, this.deviceId);
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Check if an app is installed on the device
|
|
1310
|
+
*
|
|
1311
|
+
* @param bundleId Application bundle identifier
|
|
1312
|
+
*/
|
|
1313
|
+
async isAppInstalled(bundleId) {
|
|
1314
|
+
return isAppInstalled(bundleId, this.deviceId);
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* List all installed user applications
|
|
1318
|
+
*/
|
|
1319
|
+
async listApps() {
|
|
1320
|
+
return listApps(this.deviceId);
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Launch an application on the device
|
|
1324
|
+
*
|
|
1325
|
+
* @param bundleId Application bundle identifier
|
|
1326
|
+
* @param args Application arguments
|
|
1327
|
+
*/
|
|
1328
|
+
async launchApp(bundleId, args = []) {
|
|
1329
|
+
return launchApp(bundleId, args, this.deviceId);
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Start port forwarding and wait for it to be ready.
|
|
1333
|
+
* we need port forwarding to be able to connect to the device from the computer
|
|
1334
|
+
* and communicate with it using the local port.
|
|
1335
|
+
*
|
|
1336
|
+
* @param localPort Local port to listen on
|
|
1337
|
+
* @param devicePort Device port to forward to
|
|
1338
|
+
* @param _timeout Timeout in milliseconds (reserved for future use)
|
|
1339
|
+
*/
|
|
1340
|
+
async startPortForwardAsync(localPort, devicePort, _timeout = 5e3) {
|
|
1341
|
+
return startPortForwardAsync(localPort, devicePort, this.deviceId);
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Get the activation state of the device
|
|
1345
|
+
*/
|
|
1346
|
+
async getActivationState() {
|
|
1347
|
+
return getActivationState(this.deviceId);
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Activate the device (register in apple servers), an activated device belongs to someone (a user/company).
|
|
1351
|
+
* A device that is on hello screen cannot pass the wifi step unless it is activated.
|
|
1352
|
+
* the activate save us the need of the device to be connected to the internet to do the activation
|
|
1353
|
+
* and register in apple servers.
|
|
1354
|
+
*
|
|
1355
|
+
* Note: This requires a valid activation record or Apple server access
|
|
1356
|
+
*
|
|
1357
|
+
* precondition: the device must be paired and trusted
|
|
1358
|
+
*/
|
|
1359
|
+
async activate() {
|
|
1360
|
+
return activate(this.deviceId);
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Get the device UDID
|
|
1364
|
+
*/
|
|
1365
|
+
getDeviceId() {
|
|
1366
|
+
return this.deviceId;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Get the logical port number
|
|
1370
|
+
*/
|
|
1371
|
+
getPort() {
|
|
1372
|
+
return this.port;
|
|
1373
|
+
}
|
|
1374
|
+
async closePortForward() {
|
|
1375
|
+
return closePortForward(this.deviceId);
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
export {
|
|
1379
|
+
AppleDeviceKit
|
|
1380
|
+
};
|
|
1381
|
+
//# sourceMappingURL=index.mjs.map
|