appium-ios-remotexpc 0.8.0 → 0.9.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/build/src/index.d.ts +2 -1
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +1 -0
- package/build/src/lib/types.d.ts +30 -0
- package/build/src/lib/types.d.ts.map +1 -1
- package/build/src/lib/types.js +2 -0
- package/build/src/services/index.d.ts +2 -1
- package/build/src/services/index.d.ts.map +1 -1
- package/build/src/services/index.js +2 -1
- package/build/src/services/ios/power-assertion/index.d.ts +40 -0
- package/build/src/services/ios/power-assertion/index.d.ts.map +1 -0
- package/build/src/services/ios/power-assertion/index.js +64 -0
- package/build/src/services.d.ts +2 -1
- package/build/src/services.d.ts.map +1 -1
- package/build/src/services.js +12 -0
- package/package.json +2 -1
- package/src/index.ts +4 -0
- package/src/lib/types.ts +34 -0
- package/src/services/index.ts +2 -0
- package/src/services/ios/power-assertion/index.ts +100 -0
- package/src/services.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.9.0](https://github.com/appium/appium-ios-remotexpc/compare/v0.8.0...v0.9.0) (2025-10-27)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add power assertion agent shim service ([#87](https://github.com/appium/appium-ios-remotexpc/issues/87)) ([6c7aa54](https://github.com/appium/appium-ios-remotexpc/commit/6c7aa54be2aff1f2dadaf13250c59583a2e0617c))
|
|
6
|
+
|
|
1
7
|
## [0.8.0](https://github.com/appium/appium-ios-remotexpc/compare/v0.7.0...v0.8.0) (2025-10-17)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/build/src/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { TunnelRegistryServer, startTunnelRegistryServer } from './lib/tunnel/tu
|
|
|
4
4
|
import { Usbmux, createUsbmux } from './lib/usbmux/index.js';
|
|
5
5
|
import * as Services from './services.js';
|
|
6
6
|
import { startCoreDeviceProxy } from './services/ios/tunnel-service/index.js';
|
|
7
|
-
export type { DiagnosticsService, MobileImageMounterService, NotificationProxyService, MobileConfigService, SpringboardService, WebInspectorService, SyslogService, SocketInfo, TunnelResult, TunnelRegistry, TunnelRegistryEntry, DiagnosticsServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, MobileConfigServiceWithConnection, SpringboardServiceWithConnection, WebInspectorServiceWithConnection, } from './lib/types.js';
|
|
7
|
+
export type { DiagnosticsService, MobileImageMounterService, NotificationProxyService, MobileConfigService, PowerAssertionService, PowerAssertionOptions, SpringboardService, WebInspectorService, SyslogService, SocketInfo, TunnelResult, TunnelRegistry, TunnelRegistryEntry, DiagnosticsServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, MobileConfigServiceWithConnection, PowerAssertionServiceWithConnection, SpringboardServiceWithConnection, WebInspectorServiceWithConnection, } from './lib/types.js';
|
|
8
|
+
export { PowerAssertionType } from './lib/types.js';
|
|
8
9
|
export { createUsbmux, Services, Usbmux, TunnelManager, PacketStreamServer, PacketStreamClient, createLockdownServiceByUDID, startCoreDeviceProxy, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/build/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gCAAgC,EAChC,uCAAuC,EACvC,sCAAsC,EACtC,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gCAAgC,EAChC,uCAAuC,EACvC,sCAAsC,EACtC,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
package/build/src/index.js
CHANGED
|
@@ -4,4 +4,5 @@ import { TunnelRegistryServer, startTunnelRegistryServer, } from './lib/tunnel/t
|
|
|
4
4
|
import { Usbmux, createUsbmux } from './lib/usbmux/index.js';
|
|
5
5
|
import * as Services from './services.js';
|
|
6
6
|
import { startCoreDeviceProxy } from './services/ios/tunnel-service/index.js';
|
|
7
|
+
export { PowerAssertionType } from './lib/types.js';
|
|
7
8
|
export { createUsbmux, Services, Usbmux, TunnelManager, PacketStreamServer, PacketStreamClient, createLockdownServiceByUDID, startCoreDeviceProxy, TunnelRegistryServer, startTunnelRegistryServer, };
|
package/build/src/lib/types.d.ts
CHANGED
|
@@ -5,9 +5,13 @@ import type { PacketData } from 'appium-ios-tuntap';
|
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import type { ServiceConnection } from '../service-connection.js';
|
|
7
7
|
import type { BaseService, Service } from '../services/ios/base-service.js';
|
|
8
|
+
import type { PowerAssertionOptions } from '../services/ios/power-assertion/index.js';
|
|
9
|
+
import { PowerAssertionType } from '../services/ios/power-assertion/index.js';
|
|
8
10
|
import type { InterfaceOrientation } from '../services/ios/springboard-service/index.js';
|
|
9
11
|
import type { RemoteXpcConnection } from './remote-xpc/remote-xpc-connection.js';
|
|
10
12
|
import type { Device } from './usbmux/index.js';
|
|
13
|
+
export type { PowerAssertionOptions };
|
|
14
|
+
export { PowerAssertionType };
|
|
11
15
|
/**
|
|
12
16
|
* Represents a value that can be stored in a plist
|
|
13
17
|
*/
|
|
@@ -175,6 +179,22 @@ export interface NotificationProxyService extends BaseService {
|
|
|
175
179
|
*/
|
|
176
180
|
expectNotification(timeout?: number): Promise<PlistMessage>;
|
|
177
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Represents the PowerAssertionService for preventing system sleep
|
|
184
|
+
*/
|
|
185
|
+
export interface PowerAssertionService extends BaseService {
|
|
186
|
+
/**
|
|
187
|
+
* Create a power assertion to prevent system sleep
|
|
188
|
+
* @param options Options for creating the power assertion
|
|
189
|
+
* @returns Promise that resolves when the assertion is created
|
|
190
|
+
*/
|
|
191
|
+
createPowerAssertion(options: PowerAssertionOptions): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Close the connection to the power assertion service
|
|
194
|
+
* @returns Promise that resolves when the connection is closed
|
|
195
|
+
*/
|
|
196
|
+
close(): Promise<void>;
|
|
197
|
+
}
|
|
178
198
|
/**
|
|
179
199
|
* Represents the static side of MobileConfigService
|
|
180
200
|
*/
|
|
@@ -269,6 +289,16 @@ export interface MobileConfigServiceWithConnection {
|
|
|
269
289
|
/** The RemoteXPC connection that can be used to close the connection */
|
|
270
290
|
remoteXPC: RemoteXpcConnection;
|
|
271
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Represents a PowerAssertionService instance with its associated RemoteXPC connection
|
|
294
|
+
* This allows callers to properly manage the connection lifecycle
|
|
295
|
+
*/
|
|
296
|
+
export interface PowerAssertionServiceWithConnection {
|
|
297
|
+
/** The PowerAssertionService instance */
|
|
298
|
+
powerAssertionService: PowerAssertionService;
|
|
299
|
+
/** The RemoteXPC connection that can be used to close the connection */
|
|
300
|
+
remoteXPC: RemoteXpcConnection;
|
|
301
|
+
}
|
|
272
302
|
/**
|
|
273
303
|
* Represents the WebInspectorService
|
|
274
304
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CA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AC,CAAC;IAEzD;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD;;;;;;OAMG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAElE;;;;;;;;;;;;;;;;;OAiBG;IACH,wBAAwB,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAErD;;;;;;;OAOG;IACH,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEzD;;;;OAIG;IACH,wBAAwB,CACtB,aAAa,EAAE,YAAY,GAAG,YAAY,GACzC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;OAMG;IACH,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sCAAsC;IACtC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,sDAAsD;IACtD,SAAS,EAAE,mBAAmB,CAAC;CAChC"}
|
package/build/src/lib/types.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TunnelRegistryServer, startTunnelRegistryServer } from '../lib/tunnel/tunnel-registry-server.js';
|
|
2
2
|
import * as diagnostics from './ios/diagnostic-service/index.js';
|
|
3
3
|
import * as mobileImageMounter from './ios/mobile-image-mounter/index.js';
|
|
4
|
+
import * as powerAssertion from './ios/power-assertion/index.js';
|
|
4
5
|
import * as syslog from './ios/syslog-service/index.js';
|
|
5
6
|
import * as tunnel from './ios/tunnel-service/index.js';
|
|
6
7
|
import * as webinspector from './ios/webinspector/index.js';
|
|
7
|
-
export { diagnostics, mobileImageMounter, syslog, tunnel, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
8
|
+
export { diagnostics, mobileImageMounter, powerAssertion, syslog, tunnel, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,MAAM,EACN,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TunnelRegistryServer, startTunnelRegistryServer, } from '../lib/tunnel/tunnel-registry-server.js';
|
|
2
2
|
import * as diagnostics from './ios/diagnostic-service/index.js';
|
|
3
3
|
import * as mobileImageMounter from './ios/mobile-image-mounter/index.js';
|
|
4
|
+
import * as powerAssertion from './ios/power-assertion/index.js';
|
|
4
5
|
import * as syslog from './ios/syslog-service/index.js';
|
|
5
6
|
import * as tunnel from './ios/tunnel-service/index.js';
|
|
6
7
|
import * as webinspector from './ios/webinspector/index.js';
|
|
7
|
-
export { diagnostics, mobileImageMounter, syslog, tunnel, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
8
|
+
export { diagnostics, mobileImageMounter, powerAssertion, syslog, tunnel, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PowerAssertionService as PowerAssertionServiceInterface } from '../../../lib/types.js';
|
|
2
|
+
import { BaseService } from '../base-service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Power assertion types that can be used to prevent system sleep
|
|
5
|
+
*/
|
|
6
|
+
export declare enum PowerAssertionType {
|
|
7
|
+
WIRELESS_SYNC = "AMDPowerAssertionTypeWirelessSync",
|
|
8
|
+
PREVENT_USER_IDLE_SYSTEM_SLEEP = "PreventUserIdleSystemSleep",
|
|
9
|
+
PREVENT_SYSTEM_SLEEP = "PreventSystemSleep"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for power assertion creation
|
|
13
|
+
*/
|
|
14
|
+
export interface PowerAssertionOptions {
|
|
15
|
+
type: PowerAssertionType;
|
|
16
|
+
name: string;
|
|
17
|
+
timeout: number;
|
|
18
|
+
details?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* PowerAssertionService provides an API to create power assertions.
|
|
22
|
+
*/
|
|
23
|
+
declare class PowerAssertionService extends BaseService implements PowerAssertionServiceInterface {
|
|
24
|
+
static readonly RSD_SERVICE_NAME = "com.apple.mobile.assertion_agent.shim.remote";
|
|
25
|
+
private _conn;
|
|
26
|
+
/**
|
|
27
|
+
* Create a power assertion to prevent system sleep
|
|
28
|
+
* @param options Options for creating the power assertion
|
|
29
|
+
* @returns Promise that resolves when the assertion is created
|
|
30
|
+
*/
|
|
31
|
+
createPowerAssertion(options: PowerAssertionOptions): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Close the connection to the power assertion service
|
|
34
|
+
*/
|
|
35
|
+
close(): Promise<void>;
|
|
36
|
+
private connectToPowerAssertionService;
|
|
37
|
+
private buildCreateAssertionRequest;
|
|
38
|
+
}
|
|
39
|
+
export { PowerAssertionService };
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/power-assertion/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,qBAAqB,IAAI,8BAA8B,EACxD,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,aAAa,sCAAsC;IACnD,8BAA8B,+BAA+B;IAC7D,oBAAoB,uBAAuB;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,cAAM,qBACJ,SAAQ,WACR,YAAW,8BAA8B;IAEzC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,kDACiB;IAEjD,OAAO,CAAC,KAAK,CAAkC;IAE/C;;;;OAIG;IACG,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYzE;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAQd,8BAA8B;IAW5C,OAAO,CAAC,2BAA2B;CAgBpC;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { logger } from '@appium/support';
|
|
2
|
+
import { ServiceConnection } from '../../../service-connection.js';
|
|
3
|
+
import { BaseService } from '../base-service.js';
|
|
4
|
+
const log = logger.getLogger('PowerAssertionService');
|
|
5
|
+
/**
|
|
6
|
+
* Power assertion types that can be used to prevent system sleep
|
|
7
|
+
*/
|
|
8
|
+
export var PowerAssertionType;
|
|
9
|
+
(function (PowerAssertionType) {
|
|
10
|
+
PowerAssertionType["WIRELESS_SYNC"] = "AMDPowerAssertionTypeWirelessSync";
|
|
11
|
+
PowerAssertionType["PREVENT_USER_IDLE_SYSTEM_SLEEP"] = "PreventUserIdleSystemSleep";
|
|
12
|
+
PowerAssertionType["PREVENT_SYSTEM_SLEEP"] = "PreventSystemSleep";
|
|
13
|
+
})(PowerAssertionType || (PowerAssertionType = {}));
|
|
14
|
+
/**
|
|
15
|
+
* PowerAssertionService provides an API to create power assertions.
|
|
16
|
+
*/
|
|
17
|
+
class PowerAssertionService extends BaseService {
|
|
18
|
+
static RSD_SERVICE_NAME = 'com.apple.mobile.assertion_agent.shim.remote';
|
|
19
|
+
_conn = null;
|
|
20
|
+
/**
|
|
21
|
+
* Create a power assertion to prevent system sleep
|
|
22
|
+
* @param options Options for creating the power assertion
|
|
23
|
+
* @returns Promise that resolves when the assertion is created
|
|
24
|
+
*/
|
|
25
|
+
async createPowerAssertion(options) {
|
|
26
|
+
if (!this._conn) {
|
|
27
|
+
this._conn = await this.connectToPowerAssertionService();
|
|
28
|
+
}
|
|
29
|
+
const request = this.buildCreateAssertionRequest(options);
|
|
30
|
+
await this._conn.sendPlistRequest(request);
|
|
31
|
+
log.info(`Power assertion created: type="${options.type}", name="${options.name}", timeout=${options.timeout}s`);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Close the connection to the power assertion service
|
|
35
|
+
*/
|
|
36
|
+
async close() {
|
|
37
|
+
if (this._conn) {
|
|
38
|
+
await this._conn.close();
|
|
39
|
+
this._conn = null;
|
|
40
|
+
log.debug('Power assertion service connection closed');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async connectToPowerAssertionService() {
|
|
44
|
+
const service = {
|
|
45
|
+
serviceName: PowerAssertionService.RSD_SERVICE_NAME,
|
|
46
|
+
port: this.address[1].toString(),
|
|
47
|
+
};
|
|
48
|
+
log.debug(`Connecting to power assertion service at ${this.address[0]}:${this.address[1]}`);
|
|
49
|
+
return await this.startLockdownService(service);
|
|
50
|
+
}
|
|
51
|
+
buildCreateAssertionRequest(options) {
|
|
52
|
+
const request = {
|
|
53
|
+
CommandKey: 'CommandCreateAssertion',
|
|
54
|
+
AssertionTypeKey: options.type,
|
|
55
|
+
AssertionNameKey: options.name,
|
|
56
|
+
AssertionTimeoutKey: options.timeout,
|
|
57
|
+
};
|
|
58
|
+
if (options.details !== undefined) {
|
|
59
|
+
request.AssertionDetailKey = options.details;
|
|
60
|
+
}
|
|
61
|
+
return request;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export { PowerAssertionService };
|
package/build/src/services.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { RemoteXpcConnection } from './lib/remote-xpc/remote-xpc-connection.js';
|
|
2
|
-
import type { DiagnosticsServiceWithConnection, MobileConfigServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, SpringboardServiceWithConnection, SyslogService as SyslogServiceType, WebInspectorServiceWithConnection } from './lib/types.js';
|
|
2
|
+
import type { DiagnosticsServiceWithConnection, MobileConfigServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, PowerAssertionServiceWithConnection, SpringboardServiceWithConnection, SyslogService as SyslogServiceType, WebInspectorServiceWithConnection } from './lib/types.js';
|
|
3
3
|
export declare function startDiagnosticsService(udid: string): Promise<DiagnosticsServiceWithConnection>;
|
|
4
4
|
export declare function startNotificationProxyService(udid: string): Promise<NotificationProxyServiceWithConnection>;
|
|
5
5
|
export declare function startMobileConfigService(udid: string): Promise<MobileConfigServiceWithConnection>;
|
|
6
6
|
export declare function startMobileImageMounterService(udid: string): Promise<MobileImageMounterServiceWithConnection>;
|
|
7
7
|
export declare function startSpringboardService(udid: string): Promise<SpringboardServiceWithConnection>;
|
|
8
|
+
export declare function startPowerAssertionService(udid: string): Promise<PowerAssertionServiceWithConnection>;
|
|
8
9
|
export declare function startSyslogService(udid: string): Promise<SyslogServiceType>;
|
|
9
10
|
export declare function startWebInspectorService(udid: string): Promise<WebInspectorServiceWithConnection>;
|
|
10
11
|
export declare function createRemoteXPCConnection(udid: string): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EACjC,uCAAuC,EACvC,sCAAsC,EACtC,gCAAgC,EAChC,aAAa,IAAI,iBAAiB,EAClC,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EACjC,uCAAuC,EACvC,sCAAsC,EACtC,mCAAmC,EACnC,gCAAgC,EAChC,aAAa,IAAI,iBAAiB,EAClC,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAaxB,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gCAAgC,CAAC,CAY3C;AAED,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,sCAAsC,CAAC,CAYjD;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iCAAiC,CAAC,CAY5C;AACD,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,uCAAuC,CAAC,CAYlD;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gCAAgC,CAAC,CAY3C;AAED,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,mCAAmC,CAAC,CAY9C;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iBAAiB,CAAC,CAG5B;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iCAAiC,CAAC,CAY5C;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM;;;;;;;;GAO3D"}
|
package/build/src/services.js
CHANGED
|
@@ -6,6 +6,7 @@ import DiagnosticsService from './services/ios/diagnostic-service/index.js';
|
|
|
6
6
|
import { MobileConfigService } from './services/ios/mobile-config/index.js';
|
|
7
7
|
import MobileImageMounterService from './services/ios/mobile-image-mounter/index.js';
|
|
8
8
|
import { NotificationProxyService } from './services/ios/notification-proxy/index.js';
|
|
9
|
+
import { PowerAssertionService } from './services/ios/power-assertion/index.js';
|
|
9
10
|
import { SpringBoardService } from './services/ios/springboard-service/index.js';
|
|
10
11
|
import SyslogService from './services/ios/syslog-service/index.js';
|
|
11
12
|
import { WebInspectorService } from './services/ios/webinspector/index.js';
|
|
@@ -66,6 +67,17 @@ export async function startSpringboardService(udid) {
|
|
|
66
67
|
]),
|
|
67
68
|
};
|
|
68
69
|
}
|
|
70
|
+
export async function startPowerAssertionService(udid) {
|
|
71
|
+
const { remoteXPC, tunnelConnection } = await createRemoteXPCConnection(udid);
|
|
72
|
+
const powerAssertionService = remoteXPC.findService(PowerAssertionService.RSD_SERVICE_NAME);
|
|
73
|
+
return {
|
|
74
|
+
remoteXPC: remoteXPC,
|
|
75
|
+
powerAssertionService: new PowerAssertionService([
|
|
76
|
+
tunnelConnection.host,
|
|
77
|
+
parseInt(powerAssertionService.port, 10),
|
|
78
|
+
]),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
69
81
|
export async function startSyslogService(udid) {
|
|
70
82
|
const { tunnelConnection } = await createRemoteXPCConnection(udid);
|
|
71
83
|
return new SyslogService([tunnelConnection.host, tunnelConnection.port]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-ios-remotexpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"main": "build/src/index.js",
|
|
5
5
|
"types": "build/src/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"test:mobile-config": "mocha test/integration/mobile-config-test.ts --exit --timeout 1m",
|
|
34
34
|
"test:springboard": "mocha test/integration/springboard-service-test.ts --exit --timeout 1m",
|
|
35
35
|
"test:webinspector": "mocha test/integration/webinspector-test.ts --exit --timeout 1m",
|
|
36
|
+
"test:power-assertion": "mocha test/integration/power-assertion-test.ts --exit --timeout 1m",
|
|
36
37
|
"test:unit": "mocha 'test/unit/**/*.ts' --exit --timeout 2m",
|
|
37
38
|
"test:tunnel-creation": "sudo tsx scripts/test-tunnel-creation.ts",
|
|
38
39
|
"test:tunnel-creation:lsof": "sudo tsx scripts/test-tunnel-creation.ts --keep-open"
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,8 @@ export type {
|
|
|
17
17
|
MobileImageMounterService,
|
|
18
18
|
NotificationProxyService,
|
|
19
19
|
MobileConfigService,
|
|
20
|
+
PowerAssertionService,
|
|
21
|
+
PowerAssertionOptions,
|
|
20
22
|
SpringboardService,
|
|
21
23
|
WebInspectorService,
|
|
22
24
|
SyslogService,
|
|
@@ -28,9 +30,11 @@ export type {
|
|
|
28
30
|
MobileImageMounterServiceWithConnection,
|
|
29
31
|
NotificationProxyServiceWithConnection,
|
|
30
32
|
MobileConfigServiceWithConnection,
|
|
33
|
+
PowerAssertionServiceWithConnection,
|
|
31
34
|
SpringboardServiceWithConnection,
|
|
32
35
|
WebInspectorServiceWithConnection,
|
|
33
36
|
} from './lib/types.js';
|
|
37
|
+
export { PowerAssertionType } from './lib/types.js';
|
|
34
38
|
export {
|
|
35
39
|
createUsbmux,
|
|
36
40
|
Services,
|
package/src/lib/types.ts
CHANGED
|
@@ -6,10 +6,15 @@ import { EventEmitter } from 'events';
|
|
|
6
6
|
|
|
7
7
|
import type { ServiceConnection } from '../service-connection.js';
|
|
8
8
|
import type { BaseService, Service } from '../services/ios/base-service.js';
|
|
9
|
+
import type { PowerAssertionOptions } from '../services/ios/power-assertion/index.js';
|
|
10
|
+
import { PowerAssertionType } from '../services/ios/power-assertion/index.js';
|
|
9
11
|
import type { InterfaceOrientation } from '../services/ios/springboard-service/index.js';
|
|
10
12
|
import type { RemoteXpcConnection } from './remote-xpc/remote-xpc-connection.js';
|
|
11
13
|
import type { Device } from './usbmux/index.js';
|
|
12
14
|
|
|
15
|
+
export type { PowerAssertionOptions };
|
|
16
|
+
export { PowerAssertionType };
|
|
17
|
+
|
|
13
18
|
/**
|
|
14
19
|
* Represents a value that can be stored in a plist
|
|
15
20
|
*/
|
|
@@ -213,6 +218,24 @@ export interface NotificationProxyService extends BaseService {
|
|
|
213
218
|
expectNotification(timeout?: number): Promise<PlistMessage>;
|
|
214
219
|
}
|
|
215
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Represents the PowerAssertionService for preventing system sleep
|
|
223
|
+
*/
|
|
224
|
+
export interface PowerAssertionService extends BaseService {
|
|
225
|
+
/**
|
|
226
|
+
* Create a power assertion to prevent system sleep
|
|
227
|
+
* @param options Options for creating the power assertion
|
|
228
|
+
* @returns Promise that resolves when the assertion is created
|
|
229
|
+
*/
|
|
230
|
+
createPowerAssertion(options: PowerAssertionOptions): Promise<void>;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Close the connection to the power assertion service
|
|
234
|
+
* @returns Promise that resolves when the connection is closed
|
|
235
|
+
*/
|
|
236
|
+
close(): Promise<void>;
|
|
237
|
+
}
|
|
238
|
+
|
|
216
239
|
/**
|
|
217
240
|
* Represents the static side of MobileConfigService
|
|
218
241
|
*/
|
|
@@ -312,6 +335,17 @@ export interface MobileConfigServiceWithConnection {
|
|
|
312
335
|
remoteXPC: RemoteXpcConnection;
|
|
313
336
|
}
|
|
314
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Represents a PowerAssertionService instance with its associated RemoteXPC connection
|
|
340
|
+
* This allows callers to properly manage the connection lifecycle
|
|
341
|
+
*/
|
|
342
|
+
export interface PowerAssertionServiceWithConnection {
|
|
343
|
+
/** The PowerAssertionService instance */
|
|
344
|
+
powerAssertionService: PowerAssertionService;
|
|
345
|
+
/** The RemoteXPC connection that can be used to close the connection */
|
|
346
|
+
remoteXPC: RemoteXpcConnection;
|
|
347
|
+
}
|
|
348
|
+
|
|
315
349
|
/**
|
|
316
350
|
* Represents the WebInspectorService
|
|
317
351
|
*/
|
package/src/services/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from '../lib/tunnel/tunnel-registry-server.js';
|
|
5
5
|
import * as diagnostics from './ios/diagnostic-service/index.js';
|
|
6
6
|
import * as mobileImageMounter from './ios/mobile-image-mounter/index.js';
|
|
7
|
+
import * as powerAssertion from './ios/power-assertion/index.js';
|
|
7
8
|
import * as syslog from './ios/syslog-service/index.js';
|
|
8
9
|
import * as tunnel from './ios/tunnel-service/index.js';
|
|
9
10
|
import * as webinspector from './ios/webinspector/index.js';
|
|
@@ -11,6 +12,7 @@ import * as webinspector from './ios/webinspector/index.js';
|
|
|
11
12
|
export {
|
|
12
13
|
diagnostics,
|
|
13
14
|
mobileImageMounter,
|
|
15
|
+
powerAssertion,
|
|
14
16
|
syslog,
|
|
15
17
|
tunnel,
|
|
16
18
|
webinspector,
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { logger } from '@appium/support';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
PlistDictionary,
|
|
5
|
+
PowerAssertionService as PowerAssertionServiceInterface,
|
|
6
|
+
} from '../../../lib/types.js';
|
|
7
|
+
import { ServiceConnection } from '../../../service-connection.js';
|
|
8
|
+
import { BaseService } from '../base-service.js';
|
|
9
|
+
|
|
10
|
+
const log = logger.getLogger('PowerAssertionService');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Power assertion types that can be used to prevent system sleep
|
|
14
|
+
*/
|
|
15
|
+
export enum PowerAssertionType {
|
|
16
|
+
WIRELESS_SYNC = 'AMDPowerAssertionTypeWirelessSync',
|
|
17
|
+
PREVENT_USER_IDLE_SYSTEM_SLEEP = 'PreventUserIdleSystemSleep',
|
|
18
|
+
PREVENT_SYSTEM_SLEEP = 'PreventSystemSleep',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Options for power assertion creation
|
|
23
|
+
*/
|
|
24
|
+
export interface PowerAssertionOptions {
|
|
25
|
+
type: PowerAssertionType;
|
|
26
|
+
name: string;
|
|
27
|
+
timeout: number; // timeout in seconds
|
|
28
|
+
details?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* PowerAssertionService provides an API to create power assertions.
|
|
33
|
+
*/
|
|
34
|
+
class PowerAssertionService
|
|
35
|
+
extends BaseService
|
|
36
|
+
implements PowerAssertionServiceInterface
|
|
37
|
+
{
|
|
38
|
+
static readonly RSD_SERVICE_NAME =
|
|
39
|
+
'com.apple.mobile.assertion_agent.shim.remote';
|
|
40
|
+
|
|
41
|
+
private _conn: ServiceConnection | null = null;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Create a power assertion to prevent system sleep
|
|
45
|
+
* @param options Options for creating the power assertion
|
|
46
|
+
* @returns Promise that resolves when the assertion is created
|
|
47
|
+
*/
|
|
48
|
+
async createPowerAssertion(options: PowerAssertionOptions): Promise<void> {
|
|
49
|
+
if (!this._conn) {
|
|
50
|
+
this._conn = await this.connectToPowerAssertionService();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const request = this.buildCreateAssertionRequest(options);
|
|
54
|
+
await this._conn.sendPlistRequest(request);
|
|
55
|
+
log.info(
|
|
56
|
+
`Power assertion created: type="${options.type}", name="${options.name}", timeout=${options.timeout}s`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Close the connection to the power assertion service
|
|
62
|
+
*/
|
|
63
|
+
async close(): Promise<void> {
|
|
64
|
+
if (this._conn) {
|
|
65
|
+
await this._conn.close();
|
|
66
|
+
this._conn = null;
|
|
67
|
+
log.debug('Power assertion service connection closed');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private async connectToPowerAssertionService(): Promise<ServiceConnection> {
|
|
72
|
+
const service = {
|
|
73
|
+
serviceName: PowerAssertionService.RSD_SERVICE_NAME,
|
|
74
|
+
port: this.address[1].toString(),
|
|
75
|
+
};
|
|
76
|
+
log.debug(
|
|
77
|
+
`Connecting to power assertion service at ${this.address[0]}:${this.address[1]}`,
|
|
78
|
+
);
|
|
79
|
+
return await this.startLockdownService(service);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private buildCreateAssertionRequest(
|
|
83
|
+
options: PowerAssertionOptions,
|
|
84
|
+
): PlistDictionary {
|
|
85
|
+
const request: PlistDictionary = {
|
|
86
|
+
CommandKey: 'CommandCreateAssertion',
|
|
87
|
+
AssertionTypeKey: options.type,
|
|
88
|
+
AssertionNameKey: options.name,
|
|
89
|
+
AssertionTimeoutKey: options.timeout,
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
if (options.details !== undefined) {
|
|
93
|
+
request.AssertionDetailKey = options.details;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return request;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export { PowerAssertionService };
|
package/src/services.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
MobileConfigServiceWithConnection,
|
|
9
9
|
MobileImageMounterServiceWithConnection,
|
|
10
10
|
NotificationProxyServiceWithConnection,
|
|
11
|
+
PowerAssertionServiceWithConnection,
|
|
11
12
|
SpringboardServiceWithConnection,
|
|
12
13
|
SyslogService as SyslogServiceType,
|
|
13
14
|
WebInspectorServiceWithConnection,
|
|
@@ -16,6 +17,7 @@ import DiagnosticsService from './services/ios/diagnostic-service/index.js';
|
|
|
16
17
|
import { MobileConfigService } from './services/ios/mobile-config/index.js';
|
|
17
18
|
import MobileImageMounterService from './services/ios/mobile-image-mounter/index.js';
|
|
18
19
|
import { NotificationProxyService } from './services/ios/notification-proxy/index.js';
|
|
20
|
+
import { PowerAssertionService } from './services/ios/power-assertion/index.js';
|
|
19
21
|
import { SpringBoardService } from './services/ios/springboard-service/index.js';
|
|
20
22
|
import SyslogService from './services/ios/syslog-service/index.js';
|
|
21
23
|
import { WebInspectorService } from './services/ios/webinspector/index.js';
|
|
@@ -102,6 +104,22 @@ export async function startSpringboardService(
|
|
|
102
104
|
};
|
|
103
105
|
}
|
|
104
106
|
|
|
107
|
+
export async function startPowerAssertionService(
|
|
108
|
+
udid: string,
|
|
109
|
+
): Promise<PowerAssertionServiceWithConnection> {
|
|
110
|
+
const { remoteXPC, tunnelConnection } = await createRemoteXPCConnection(udid);
|
|
111
|
+
const powerAssertionService = remoteXPC.findService(
|
|
112
|
+
PowerAssertionService.RSD_SERVICE_NAME,
|
|
113
|
+
);
|
|
114
|
+
return {
|
|
115
|
+
remoteXPC: remoteXPC as RemoteXpcConnection,
|
|
116
|
+
powerAssertionService: new PowerAssertionService([
|
|
117
|
+
tunnelConnection.host,
|
|
118
|
+
parseInt(powerAssertionService.port, 10),
|
|
119
|
+
]),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
105
123
|
export async function startSyslogService(
|
|
106
124
|
udid: string,
|
|
107
125
|
): Promise<SyslogServiceType> {
|