appium-ios-remotexpc 0.11.0 → 0.12.0
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/CHANGELOG.md +6 -0
- package/README.md +28 -0
- package/build/src/lib/apple-tv/encryption/chacha20-poly1305.js +2 -2
- package/build/src/lib/apple-tv/encryption/ed25519.js +2 -2
- package/build/src/lib/apple-tv/encryption/hkdf.js +2 -2
- package/build/src/lib/apple-tv/srp/srp-client.js +2 -2
- package/build/src/lib/bonjour/bonjour-discovery.d.ts.map +1 -1
- package/build/src/lib/bonjour/bonjour-discovery.js +2 -2
- package/build/src/lib/lockdown/index.d.ts.map +1 -1
- package/build/src/lib/lockdown/index.js +4 -4
- package/build/src/lib/logger.d.ts +2 -0
- package/build/src/lib/logger.d.ts.map +1 -0
- package/build/src/lib/logger.js +7 -0
- package/build/src/lib/pair-record/pair-record.d.ts.map +1 -1
- package/build/src/lib/pair-record/pair-record.js +2 -2
- package/build/src/lib/plist/binary-plist-parser.d.ts.map +1 -1
- package/build/src/lib/plist/binary-plist-parser.js +2 -2
- package/build/src/lib/plist/length-based-splitter.d.ts.map +1 -1
- package/build/src/lib/plist/length-based-splitter.js +2 -2
- package/build/src/lib/plist/plist-decoder.d.ts.map +1 -1
- package/build/src/lib/plist/plist-decoder.js +2 -2
- package/build/src/lib/plist/plist-parser.js +2 -2
- package/build/src/lib/plist/plist-service.d.ts.map +1 -1
- package/build/src/lib/plist/plist-service.js +3 -3
- package/build/src/lib/remote-xpc/remote-xpc-connection.js +2 -2
- package/build/src/lib/tss/index.js +2 -2
- package/build/src/lib/tunnel/index.d.ts.map +1 -1
- package/build/src/lib/tunnel/index.js +2 -2
- package/build/src/lib/tunnel/packet-stream-client.d.ts.map +1 -1
- package/build/src/lib/tunnel/packet-stream-client.js +2 -2
- package/build/src/lib/tunnel/packet-stream-server.d.ts.map +1 -1
- package/build/src/lib/tunnel/packet-stream-server.js +2 -2
- package/build/src/lib/tunnel/tunnel-api-client.d.ts.map +1 -1
- package/build/src/lib/tunnel/tunnel-api-client.js +2 -2
- package/build/src/lib/tunnel/tunnel-registry-server.js +2 -2
- package/build/src/lib/usbmux/index.d.ts.map +1 -1
- package/build/src/lib/usbmux/index.js +2 -2
- package/build/src/services/ios/afc/index.d.ts.map +1 -1
- package/build/src/services/ios/afc/index.js +2 -2
- package/build/src/services/ios/base-service.d.ts.map +1 -1
- package/build/src/services/ios/base-service.js +2 -2
- package/build/src/services/ios/diagnostic-service/index.d.ts.map +1 -1
- package/build/src/services/ios/diagnostic-service/index.js +2 -2
- package/build/src/services/ios/mobile-config/index.d.ts.map +1 -1
- package/build/src/services/ios/mobile-config/index.js +3 -2
- package/build/src/services/ios/mobile-image-mounter/index.js +2 -2
- package/build/src/services/ios/notification-proxy/index.d.ts.map +1 -1
- package/build/src/services/ios/notification-proxy/index.js +2 -2
- package/build/src/services/ios/power-assertion/index.d.ts.map +1 -1
- package/build/src/services/ios/power-assertion/index.js +2 -2
- package/build/src/services/ios/syslog-service/index.d.ts.map +1 -1
- package/build/src/services/ios/syslog-service/index.js +3 -3
- package/build/src/services/ios/tunnel-service/index.d.ts.map +1 -1
- package/build/src/services/ios/tunnel-service/index.js +2 -2
- package/build/src/services/ios/webinspector/index.js +2 -2
- package/package.json +1 -1
- package/src/lib/apple-tv/encryption/chacha20-poly1305.ts +2 -2
- package/src/lib/apple-tv/encryption/ed25519.ts +2 -2
- package/src/lib/apple-tv/encryption/hkdf.ts +2 -2
- package/src/lib/apple-tv/srp/srp-client.ts +2 -2
- package/src/lib/bonjour/bonjour-discovery.ts +2 -2
- package/src/lib/lockdown/index.ts +4 -4
- package/src/lib/logger.ts +9 -0
- package/src/lib/pair-record/pair-record.ts +3 -2
- package/src/lib/plist/binary-plist-parser.ts +2 -3
- package/src/lib/plist/length-based-splitter.ts +2 -2
- package/src/lib/plist/plist-decoder.ts +2 -2
- package/src/lib/plist/plist-parser.ts +2 -2
- package/src/lib/plist/plist-service.ts +3 -3
- package/src/lib/remote-xpc/remote-xpc-connection.ts +2 -2
- package/src/lib/tss/index.ts +2 -2
- package/src/lib/tunnel/index.ts +2 -2
- package/src/lib/tunnel/packet-stream-client.ts +3 -2
- package/src/lib/tunnel/packet-stream-server.ts +3 -2
- package/src/lib/tunnel/tunnel-api-client.ts +2 -3
- package/src/lib/tunnel/tunnel-registry-server.ts +2 -2
- package/src/lib/usbmux/index.ts +2 -2
- package/src/services/ios/afc/index.ts +2 -2
- package/src/services/ios/base-service.ts +2 -3
- package/src/services/ios/diagnostic-service/index.ts +2 -3
- package/src/services/ios/mobile-config/index.ts +3 -2
- package/src/services/ios/mobile-image-mounter/index.ts +2 -2
- package/src/services/ios/notification-proxy/index.ts +2 -3
- package/src/services/ios/power-assertion/index.ts +2 -3
- package/src/services/ios/syslog-service/index.ts +3 -3
- package/src/services/ios/tunnel-service/index.ts +2 -2
- package/src/services/ios/webinspector/index.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/syslog-service/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/syslog-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,aAAa,IAAI,sBAAsB,EACxC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqB/D;;;GAGG;AACH,cAAM,aAAc,SAAQ,YAAa,YAAW,sBAAsB;IACxE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,mBAAmB,CAA8B;IACzD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,oBAAoB,CAAS;IAErC;;;OAGG;gBACS,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAKrC;;;;;;OAMG;IACG,KAAK,CACT,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,EACtD,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC;IAgChB;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9C,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,cAAc;YASR,mBAAmB;IAejC,OAAO,CAAC,aAAa;IAQrB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAcvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,WAAW;IAOnB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAqCpB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;CA2B1B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { EventEmitter } from 'events';
|
|
2
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
3
3
|
import { isBinaryPlist } from '../../../lib/plist/binary-plist-parser.js';
|
|
4
4
|
import { parsePlist } from '../../../lib/plist/unified-plist-parser.js';
|
|
5
5
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
6
6
|
import { BaseService } from '../base-service.js';
|
|
7
|
-
const syslogLog =
|
|
8
|
-
const log =
|
|
7
|
+
const syslogLog = getLogger('SyslogMessages');
|
|
8
|
+
const log = getLogger('Syslog');
|
|
9
9
|
const MIN_PRINTABLE_RATIO = 0.5;
|
|
10
10
|
const ASCII_PRINTABLE_MIN = 32;
|
|
11
11
|
const ASCII_PRINTABLE_MAX = 126;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/tunnel-service/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/tunnel-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EACL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAMnE;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,eAAe,EAC/B,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,OAAO,CAAC,OAAO,KAAK,EAAE,iBAAiB,CAAM,GACxD,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,YAAY,EAAE,YAAY,CAAA;CAAE,CAAC,CA4D5D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { TLSSocket } from 'tls';
|
|
3
2
|
import { LockdownService, upgradeSocketToTLS, } from '../../../lib/lockdown/index.js';
|
|
3
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
4
4
|
import { PlistService } from '../../../lib/plist/plist-service.js';
|
|
5
5
|
import { createUsbmux } from '../../../lib/usbmux/index.js';
|
|
6
|
-
const log =
|
|
6
|
+
const log = getLogger('TunnelService');
|
|
7
7
|
const LABEL = 'appium-internal';
|
|
8
8
|
/**
|
|
9
9
|
* Starts a CoreDeviceProxy session over an existing TLS-upgraded lockdown connection.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { randomUUID } from 'crypto';
|
|
3
2
|
import { EventEmitter } from 'events';
|
|
3
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
4
4
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
5
5
|
import { BaseService } from '../base-service.js';
|
|
6
|
-
const log =
|
|
6
|
+
const log = getLogger('WebInspectorService');
|
|
7
7
|
/**
|
|
8
8
|
* WebInspectorService provides an API to:
|
|
9
9
|
* - Send messages to webinspectord
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { createCipheriv, createDecipheriv } from 'node:crypto';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../../logger.js';
|
|
4
4
|
import { CryptographyError } from '../errors.js';
|
|
5
5
|
|
|
6
|
-
const log =
|
|
6
|
+
const log = getLogger('ChaCha20Poly1305');
|
|
7
7
|
|
|
8
8
|
export interface ChaCha20Poly1305Params {
|
|
9
9
|
plaintext?: Buffer;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import {
|
|
3
2
|
type KeyPairKeyObjectResult,
|
|
4
3
|
generateKeyPairSync,
|
|
5
4
|
sign,
|
|
6
5
|
} from 'node:crypto';
|
|
7
6
|
|
|
7
|
+
import { getLogger } from '../../logger.js';
|
|
8
8
|
import { CryptographyError } from '../errors.js';
|
|
9
9
|
import type { PairingKeys } from '../types.js';
|
|
10
10
|
|
|
11
|
-
const log =
|
|
11
|
+
const log = getLogger('Ed25519');
|
|
12
12
|
|
|
13
13
|
const ED25519_PUBLIC_KEY_LENGTH = 32;
|
|
14
14
|
const ED25519_PRIVATE_KEY_LENGTH = 32;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { createHmac } from 'node:crypto';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../../logger.js';
|
|
4
4
|
import { HKDF_HASH_ALGORITHM, HKDF_HASH_LENGTH } from '../constants.js';
|
|
5
5
|
import { CryptographyError } from '../errors.js';
|
|
6
6
|
|
|
7
|
-
const log =
|
|
7
|
+
const log = getLogger('HKDF');
|
|
8
8
|
|
|
9
9
|
export interface HKDFParams {
|
|
10
10
|
ikm: Buffer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { randomBytes } from 'node:crypto';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../../logger.js';
|
|
4
4
|
import {
|
|
5
5
|
SRP_GENERATOR,
|
|
6
6
|
SRP_KEY_LENGTH_BYTES,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
hash,
|
|
23
23
|
} from './crypto-utils.js';
|
|
24
24
|
|
|
25
|
-
const log =
|
|
25
|
+
const log = getLogger('SRPClient');
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* SRP (Secure Remote Password) client implementation following RFC 5054.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { type ChildProcess, spawn } from 'node:child_process';
|
|
3
2
|
import { lookup } from 'node:dns/promises';
|
|
4
3
|
import { EventEmitter } from 'node:events';
|
|
5
4
|
import { clearTimeout, setTimeout } from 'node:timers';
|
|
6
5
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
7
6
|
|
|
7
|
+
import { getLogger } from '../logger.js';
|
|
8
8
|
import {
|
|
9
9
|
BONJOUR_DEFAULT_DOMAIN,
|
|
10
10
|
BONJOUR_SERVICE_TYPES,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
DNS_SD_PATTERNS,
|
|
15
15
|
} from './constants.js';
|
|
16
16
|
|
|
17
|
-
const log =
|
|
17
|
+
const log = getLogger('BonjourDiscovery');
|
|
18
18
|
|
|
19
19
|
const DNS_SD_COMMAND = 'dns-sd';
|
|
20
20
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { Socket } from 'node:net';
|
|
3
2
|
import tls, { type ConnectionOptions, TLSSocket } from 'tls';
|
|
4
3
|
|
|
5
4
|
import { BasePlistService } from '../../base-plist-service.js';
|
|
5
|
+
import { getLogger } from '../logger.js';
|
|
6
6
|
import { type PairRecord } from '../pair-record/index.js';
|
|
7
7
|
import { PlistService } from '../plist/plist-service.js';
|
|
8
8
|
import type { PlistMessage, PlistValue } from '../types.js';
|
|
9
9
|
import { RelayService, createUsbmux } from '../usbmux/index.js';
|
|
10
10
|
|
|
11
|
-
const log =
|
|
11
|
+
const log = getLogger('Lockdown');
|
|
12
12
|
|
|
13
13
|
// Constants
|
|
14
14
|
const LABEL = 'appium-internal';
|
|
@@ -86,7 +86,7 @@ class DeviceNotFoundError extends Error {
|
|
|
86
86
|
|
|
87
87
|
// TLS Manager for handling TLS operations
|
|
88
88
|
class TLSManager {
|
|
89
|
-
private readonly log =
|
|
89
|
+
private readonly log = getLogger('TLSManager');
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Upgrades a socket to TLS
|
|
@@ -127,7 +127,7 @@ class TLSManager {
|
|
|
127
127
|
|
|
128
128
|
// Device Manager for handling device operations
|
|
129
129
|
class DeviceManager {
|
|
130
|
-
private readonly log =
|
|
130
|
+
private readonly log = getLogger('DeviceManager');
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Lists all connected devices
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import fs from 'fs';
|
|
3
2
|
import path from 'path';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
import { getLogger } from '../logger.js';
|
|
5
|
+
|
|
6
|
+
const log = getLogger('PairRecord');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Interface defining the structure of a pair record.
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* This module provides functionality to parse binary property lists (bplists)
|
|
5
5
|
* commonly used in Apple's iOS and macOS systems.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { getLogger } from '../logger.js';
|
|
9
8
|
import type { PlistArray, PlistDictionary, PlistValue } from '../types.js';
|
|
10
9
|
import {
|
|
11
10
|
APPLE_EPOCH_OFFSET,
|
|
@@ -14,7 +13,7 @@ import {
|
|
|
14
13
|
BPLIST_TYPE,
|
|
15
14
|
} from './constants.js';
|
|
16
15
|
|
|
17
|
-
const log =
|
|
16
|
+
const log = getLogger('Plist');
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Represents a temporary object during binary plist parsing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { Transform, type TransformCallback } from 'stream';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../logger.js';
|
|
4
4
|
import {
|
|
5
5
|
BINARY_PLIST_HEADER_LENGTH,
|
|
6
6
|
BINARY_PLIST_MAGIC,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from './constants.js';
|
|
17
17
|
import { isXmlPlistContent } from './utils.js';
|
|
18
18
|
|
|
19
|
-
const log =
|
|
19
|
+
const log = getLogger('Plist');
|
|
20
20
|
|
|
21
21
|
// Constants
|
|
22
22
|
const DEFAULT_MAX_FRAME_LENGTH = 100 * 1024 * 1024; // 100MB default for large IORegistry responses
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { Transform, type TransformCallback } from 'stream';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../logger.js';
|
|
4
4
|
import { UTF8_ENCODING } from './constants.js';
|
|
5
5
|
import { parsePlist } from './unified-plist-parser.js';
|
|
6
6
|
import {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
hasUnicodeReplacementCharacter,
|
|
11
11
|
} from './utils.js';
|
|
12
12
|
|
|
13
|
-
const log =
|
|
13
|
+
const log = getLogger('Plist');
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Decodes plist format data with length prefix to JavaScript objects
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { DOMParser, Element, Node } from '@xmldom/xmldom';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../logger.js';
|
|
4
4
|
import type { PlistArray, PlistDictionary, PlistValue } from '../types.js';
|
|
5
5
|
import { PlistService } from './plist-service.js';
|
|
6
6
|
import {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
trimBeforeXmlDeclaration,
|
|
15
15
|
} from './utils.js';
|
|
16
16
|
|
|
17
|
-
const errorLog =
|
|
17
|
+
const errorLog = getLogger('PlistError');
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Parses an XML plist string into a JavaScript object
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { Socket } from 'net';
|
|
3
2
|
import { TLSSocket } from 'tls';
|
|
4
3
|
|
|
4
|
+
import { getLogger } from '../logger.js';
|
|
5
5
|
import type { PlistDictionary } from '../types.js';
|
|
6
6
|
import { LengthBasedSplitter } from './length-based-splitter.js';
|
|
7
7
|
import { PlistServiceDecoder } from './plist-decoder.js';
|
|
8
8
|
import { PlistServiceEncoder } from './plist-encoder.js';
|
|
9
9
|
|
|
10
|
-
const log =
|
|
11
|
-
const errorLog =
|
|
10
|
+
const log = getLogger('Plist');
|
|
11
|
+
const errorLog = getLogger('PlistError');
|
|
12
12
|
|
|
13
13
|
const config = {
|
|
14
14
|
verboseErrorLogging: false,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import net from 'node:net';
|
|
3
2
|
|
|
3
|
+
import { getLogger } from '../logger.js';
|
|
4
4
|
import Handshake from './handshake.js';
|
|
5
5
|
|
|
6
|
-
const log =
|
|
6
|
+
const log = getLogger('RemoteXpcConnection');
|
|
7
7
|
|
|
8
8
|
// Timeout constants
|
|
9
9
|
const CONNECTION_TIMEOUT_MS = 30000; // 30 seconds
|
package/src/lib/tss/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import axios from 'axios';
|
|
3
2
|
import { randomUUID } from 'node:crypto';
|
|
4
3
|
|
|
4
|
+
import { getLogger } from '../logger.js';
|
|
5
5
|
import { createPlist, parsePlist } from '../plist/index.js';
|
|
6
6
|
import type { PlistDictionary } from '../types.js';
|
|
7
7
|
|
|
8
|
-
const log =
|
|
8
|
+
const log = getLogger('TSSRequestor');
|
|
9
9
|
|
|
10
10
|
// TSS Constants
|
|
11
11
|
const TSS_CONTROLLER_ACTION_URL = 'http://gs.apple.com/TSS/controller?action=2';
|
package/src/lib/tunnel/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import {
|
|
3
2
|
type TunnelConnection,
|
|
4
3
|
connectToTunnelLockdown,
|
|
5
4
|
} from 'appium-ios-tuntap';
|
|
6
5
|
import type { TLSSocket } from 'tls';
|
|
7
6
|
|
|
7
|
+
import { getLogger } from '../logger.js';
|
|
8
8
|
import { RemoteXpcConnection } from '../remote-xpc/remote-xpc-connection.js';
|
|
9
9
|
|
|
10
|
-
const log =
|
|
10
|
+
const log = getLogger('TunnelManager');
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Interface for tunnel registry entry
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import type { PacketConsumer, PacketData } from 'appium-ios-tuntap';
|
|
3
2
|
import { EventEmitter } from 'events';
|
|
4
3
|
import { type Socket, createConnection } from 'net';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
import { getLogger } from '../logger.js';
|
|
6
|
+
|
|
7
|
+
const log = getLogger('PacketStreamClient');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Constants for packet stream protocol
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import type { PacketConsumer, PacketData } from 'appium-ios-tuntap';
|
|
3
2
|
import { EventEmitter } from 'events';
|
|
4
3
|
import { type Server, type Socket, createServer } from 'net';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
import { getLogger } from '../logger.js';
|
|
6
|
+
|
|
7
|
+
const log = getLogger('PacketStreamServer');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Interface for serialized packet message
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getLogger } from '../logger.js';
|
|
3
2
|
import type { TunnelRegistry, TunnelRegistryEntry } from '../types.js';
|
|
4
3
|
|
|
5
|
-
const log =
|
|
4
|
+
const log = getLogger('TunnelApiClient');
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* API client for tunnel registry operations
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import * as http from 'node:http';
|
|
3
2
|
import { URL } from 'node:url';
|
|
4
3
|
|
|
4
|
+
import { getLogger } from '../logger.js';
|
|
5
5
|
import type { TunnelRegistry, TunnelRegistryEntry } from '../types.js';
|
|
6
6
|
|
|
7
7
|
// Constants
|
|
@@ -9,7 +9,7 @@ const DEFAULT_TUNNEL_REGISTRY_PORT = 42314;
|
|
|
9
9
|
const API_BASE_PATH = '/remotexpc/tunnels';
|
|
10
10
|
|
|
11
11
|
// Logger instance
|
|
12
|
-
const log =
|
|
12
|
+
const log = getLogger('TunnelRegistryServer');
|
|
13
13
|
|
|
14
14
|
// Helper functions
|
|
15
15
|
/**
|
package/src/lib/usbmux/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { Server, Socket, createConnection, createServer } from 'node:net';
|
|
3
2
|
import { release } from 'node:os';
|
|
4
3
|
|
|
5
4
|
import { BaseSocketService } from '../../base-socket-service.js';
|
|
5
|
+
import { getLogger } from '../logger.js';
|
|
6
6
|
import { type PairRecord, processPlistResponse } from '../pair-record/index.js';
|
|
7
7
|
import { type RawPairRecordResponse } from '../pair-record/pair-record.js';
|
|
8
8
|
import { LengthBasedSplitter, parsePlist } from '../plist/index.js';
|
|
@@ -32,7 +32,7 @@ export interface Device {
|
|
|
32
32
|
Properties: DeviceProperties;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const log =
|
|
35
|
+
const log = getLogger('Usbmux');
|
|
36
36
|
|
|
37
37
|
export const USBMUXD_PORT = 27015;
|
|
38
38
|
export const DEFAULT_USBMUXD_SOCKET = '/var/run/usbmuxd';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import fs from 'node:fs';
|
|
3
2
|
import net from 'node:net';
|
|
4
3
|
import path from 'node:path';
|
|
5
4
|
import { Readable, Writable } from 'node:stream';
|
|
6
5
|
import { pipeline } from 'node:stream/promises';
|
|
7
6
|
|
|
7
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
8
8
|
import {
|
|
9
9
|
buildClosePayload,
|
|
10
10
|
buildFopenPayload,
|
|
@@ -25,7 +25,7 @@ import { AFC_FOPEN_TEXTUAL_MODES, AFC_WRITE_THIS_LENGTH } from './constants.js';
|
|
|
25
25
|
import { AfcError, AfcFileMode, AfcOpcode } from './enums.js';
|
|
26
26
|
import { createAfcReadStream, createAfcWriteStream } from './stream-utils.js';
|
|
27
27
|
|
|
28
|
-
const log =
|
|
28
|
+
const log = getLogger('AfcService');
|
|
29
29
|
|
|
30
30
|
const NON_LISTABLE_ENTRIES = ['', '.', '..'];
|
|
31
31
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getLogger } from '../../lib/logger.js';
|
|
3
2
|
import { ServiceConnection } from '../../service-connection.js';
|
|
4
3
|
|
|
5
|
-
const log =
|
|
4
|
+
const log = getLogger('BaseService');
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Interface for service information
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
3
2
|
import { PlistServiceDecoder } from '../../../lib/plist/plist-decoder.js';
|
|
4
3
|
import type {
|
|
5
4
|
DiagnosticsService as DiagnosticsServiceInterface,
|
|
@@ -7,7 +6,7 @@ import type {
|
|
|
7
6
|
} from '../../../lib/types.js';
|
|
8
7
|
import { BaseService } from '../base-service.js';
|
|
9
8
|
|
|
10
|
-
const log =
|
|
9
|
+
const log = getLogger('DiagnosticService');
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* DiagnosticsService provides an API to:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { fs
|
|
1
|
+
import { fs } from '@appium/support';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
4
5
|
import { SUPPORTED_EXTENSIONS } from '../../../lib/plist/constants.js';
|
|
5
6
|
import { createPlist, parsePlist } from '../../../lib/plist/index.js';
|
|
6
7
|
import {
|
|
@@ -11,7 +12,7 @@ import { ServiceConnection } from '../../../service-connection.js';
|
|
|
11
12
|
import { BaseService } from '../base-service.js';
|
|
12
13
|
|
|
13
14
|
const ERROR_CLOUD_CONFIGURATION_ALREADY_PRESENT = 14002;
|
|
14
|
-
const log =
|
|
15
|
+
const log = getLogger('MobileConfigService');
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* MobileConfigService provides an API to:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { createHash } from 'crypto';
|
|
3
2
|
import { Stats, promises as fs } from 'fs';
|
|
4
3
|
import { performance } from 'perf_hooks';
|
|
5
4
|
import { Readable } from 'stream';
|
|
6
5
|
|
|
6
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
7
7
|
import { parseXmlPlist } from '../../../lib/plist/index.js';
|
|
8
8
|
import { getManifestFromTSS } from '../../../lib/tss/index.js';
|
|
9
9
|
import type {
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
14
14
|
import { BaseService } from '../base-service.js';
|
|
15
15
|
|
|
16
|
-
const log =
|
|
16
|
+
const log = getLogger('MobileImageMounterService');
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Base interface for service responses
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
3
2
|
import type {
|
|
4
3
|
NotificationProxyService as NotificationProxyServiceInterface,
|
|
5
4
|
PlistDictionary,
|
|
@@ -8,7 +7,7 @@ import type {
|
|
|
8
7
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
9
8
|
import { BaseService } from '../base-service.js';
|
|
10
9
|
|
|
11
|
-
const log =
|
|
10
|
+
const log = getLogger('NotificationProxyService');
|
|
12
11
|
|
|
13
12
|
export interface ObserveNotificationRequest extends PlistDictionary {
|
|
14
13
|
Command: 'ObserveNotification';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
3
2
|
import type {
|
|
4
3
|
PlistDictionary,
|
|
5
4
|
PowerAssertionService as PowerAssertionServiceInterface,
|
|
@@ -7,7 +6,7 @@ import type {
|
|
|
7
6
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
8
7
|
import { BaseService } from '../base-service.js';
|
|
9
8
|
|
|
10
|
-
const log =
|
|
9
|
+
const log = getLogger('PowerAssertionService');
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Power assertion types that can be used to prevent system sleep
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import type { PacketConsumer, PacketData } from 'appium-ios-tuntap';
|
|
3
2
|
import { EventEmitter } from 'events';
|
|
4
3
|
|
|
4
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
5
5
|
import { isBinaryPlist } from '../../../lib/plist/binary-plist-parser.js';
|
|
6
6
|
import { parsePlist } from '../../../lib/plist/unified-plist-parser.js';
|
|
7
7
|
import type {
|
|
@@ -12,8 +12,8 @@ import type {
|
|
|
12
12
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
13
13
|
import { BaseService, type Service } from '../base-service.js';
|
|
14
14
|
|
|
15
|
-
const syslogLog =
|
|
16
|
-
const log =
|
|
15
|
+
const syslogLog = getLogger('SyslogMessages');
|
|
16
|
+
const log = getLogger('Syslog');
|
|
17
17
|
|
|
18
18
|
const MIN_PRINTABLE_RATIO = 0.5;
|
|
19
19
|
const ASCII_PRINTABLE_MIN = 32;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { TLSSocket } from 'tls';
|
|
3
2
|
|
|
4
3
|
import {
|
|
5
4
|
LockdownService,
|
|
6
5
|
upgradeSocketToTLS,
|
|
7
6
|
} from '../../../lib/lockdown/index.js';
|
|
7
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
8
8
|
import { PlistService } from '../../../lib/plist/plist-service.js';
|
|
9
9
|
import { createUsbmux } from '../../../lib/usbmux/index.js';
|
|
10
10
|
|
|
11
|
-
const log =
|
|
11
|
+
const log = getLogger('TunnelService');
|
|
12
12
|
const LABEL = 'appium-internal';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { logger } from '@appium/support';
|
|
2
1
|
import { randomUUID } from 'crypto';
|
|
3
2
|
import { EventEmitter } from 'events';
|
|
4
3
|
|
|
4
|
+
import { getLogger } from '../../../lib/logger.js';
|
|
5
5
|
import type { PlistDictionary, PlistMessage } from '../../../lib/types.js';
|
|
6
6
|
import { ServiceConnection } from '../../../service-connection.js';
|
|
7
7
|
import { BaseService } from '../base-service.js';
|
|
8
8
|
|
|
9
|
-
const log =
|
|
9
|
+
const log = getLogger('WebInspectorService');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Interface for WebInspector message structure
|