@mcesystems/apple-kit 1.0.96 → 1.0.97

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.
@@ -295,16 +295,26 @@ export declare class AppleDeviceKit {
295
295
  private readonly activationFlow;
296
296
  private readonly proxyActions;
297
297
  private tunnelProcess;
298
+ private tunnelReadyPromise;
298
299
  private static readonly IOS_17_VERSION;
299
300
  constructor(udid: string, logicalPort: number, usbmuxdAddress?: string);
301
+ /**
302
+ * Returns a promise that resolves when the tunnel is ready (or immediately if not needed).
303
+ * Reuses the same in-flight promise so constructor and methods don't race.
304
+ */
305
+ private getTunnelReady;
300
306
  /**
301
307
  * Check if iOS version requires tunneling (iOS 17+)
302
308
  */
303
309
  private requiresTunneling;
304
310
  /**
305
- * Ensure tunnel is started for iOS 17+ devices
311
+ * Ensure tunnel is started for iOS 17+ devices. Safe to call multiple times; reuses in-flight setup.
306
312
  */
307
313
  private ensureTunnel;
314
+ /**
315
+ * Internal tunnel startup. Called once per tunnel lifecycle; getTunnelReady() caches this promise.
316
+ */
317
+ private runEnsureTunnel;
308
318
  /**
309
319
  * Stop tunnel for a device
310
320
  */
@@ -496,7 +506,7 @@ export declare class IosClient {
496
506
  version: string;
497
507
  }[]>;
498
508
  devMode(): Promise<IosCommandResult>;
499
- tunnelStart(userspace?: boolean, pairRecordPath?: string): Promise<import("child_process").ChildProcessByStdio<null, import("stream").Readable, import("stream").Readable>>;
509
+ tunnelStart(userspace?: boolean, pairRecordPath?: string): Promise<ChildProcess>;
500
510
  fsyncPull({ app, srcPath, dstPath, }: {
501
511
  app: string;
502
512
  srcPath: string;
@@ -524,43 +534,11 @@ export declare class IosClient {
524
534
  path?: string;
525
535
  }): Promise<IosFsyncTreeResult>;
526
536
  }
527
- declare class DeviceActions {
528
- private readonly udid;
529
- private readonly iosClient;
530
- constructor(udid: string, iosClient: IosClient);
531
- info(): Promise<LockdownInfo>;
532
- listDevices(): Promise<IosListResult>;
533
- wipe(): Promise<void>;
534
- removeProfile(profileIdentifier: string): Promise<void>;
535
- listProfiles(): Promise<IosProfileListResult>;
536
- pair(): Promise<boolean>;
537
- trustDevice({ timeout, pollInterval, onWaitingForTrust, signal, }: {
538
- timeout?: number;
539
- pollInterval?: number;
540
- onWaitingForTrust?: () => void;
541
- signal?: AbortSignal;
542
- }): Promise<boolean>;
543
- waitForPairing({ timeout, pollInterval, signal, }: {
544
- timeout?: number;
545
- pollInterval?: number;
546
- signal?: AbortSignal;
547
- }): Promise<boolean>;
548
- /**
549
- * Returns true if device is paired and trusted.
550
- * Uses info() which only succeeds when full pairing is established (user has accepted Trust).
551
- * Prefer this over lockdown file check since file location/timing can vary by platform.
552
- */
553
- private isPairedViaInfo;
554
- isWifiConnected(timeoutMs?: number): Promise<string | undefined>;
555
- unpair(): Promise<boolean>;
556
- getLockdownPath(): string | null;
557
- }
558
537
  export declare class ActivationFlow {
559
538
  private readonly udid;
560
539
  private readonly iosClient;
561
- private readonly deviceActions;
562
540
  private mdmClient;
563
- constructor(udid: string, iosClient: IosClient, deviceActions: DeviceActions);
541
+ constructor(udid: string, iosClient: IosClient);
564
542
  run(steps?: string[], signal?: AbortSignal, config?: ActivationFlowConfig): {
565
543
  promise: Promise<(() => Promise<void>) | undefined>;
566
544
  events: EventEmitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcesystems/apple-kit",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "iOS device management toolkit using libimobiledevice command-line tools",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -39,8 +39,8 @@
39
39
  "tsx": "^4.21.0",
40
40
  "plist": "^3.1.0",
41
41
  "ts-retry-promise": "^0.8.1",
42
- "@mcesystems/mdm-client-g4": "1.0.96",
43
- "@mcesystems/tool-debug-g4": "1.0.96"
42
+ "@mcesystems/mdm-client-g4": "1.0.97",
43
+ "@mcesystems/tool-debug-g4": "1.0.97"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^22.10.2",