1- import type { LaunchAppOptions , ProcessInfo , TerminateAppOptions } from '../types.js' ;
21import type { Devicectl } from '../devicectl.js' ;
2+ import type { LaunchAppOptions , ProcessInfo , TerminateAppOptions } from '../types.js' ;
33
44/**
55 * Simulates memory warning for the process with the given PID
@@ -28,11 +28,7 @@ export async function sendSignalToProcess(
2828 * This method is over devicectl command, this it may take additional seconds to launch the app.
2929 * Please use via WDA or via appium-ios-device as primary method to launch app if possible.
3030 */
31- export async function launchApp (
32- this : Devicectl ,
33- bundleId : string ,
34- opts : LaunchAppOptions = { } ,
35- ) : Promise < void > {
31+ export async function launchApp ( this : Devicectl , bundleId : string , opts : LaunchAppOptions = { } ) : Promise < void > {
3632 const { env, terminateExisting = false } = opts ;
3733
3834 const subcommandOptions : string [ ] = [ ] ;
@@ -44,9 +40,7 @@ export async function launchApp(
4440 if ( env && Object . keys ( env ) . length > 0 ) {
4541 subcommandOptions . push (
4642 '--environment-variables' ,
47- JSON . stringify (
48- Object . fromEntries ( Object . entries ( env ) . map ( ( [ key , value ] ) => [ key , String ( value ) ] ) ) ,
49- ) ,
43+ JSON . stringify ( Object . fromEntries ( Object . entries ( env ) . map ( ( [ key , value ] ) => [ key , String ( value ) ] ) ) ) ,
5044 ) ;
5145 }
5246
@@ -112,10 +106,7 @@ export function escapeProcessFilterValue(value: string): string {
112106 return value . replace ( / \\ / g, '\\\\' ) . replace ( / " / g, '\\"' ) ;
113107}
114108
115- async function listProcessesForAppPath (
116- devicectl : Devicectl ,
117- appPath : string ,
118- ) : Promise < ProcessInfo [ ] > {
109+ async function listProcessesForAppPath ( devicectl : Devicectl , appPath : string ) : Promise < ProcessInfo [ ] > {
119110 const filter = `executable.path BEGINSWITH "${ escapeProcessFilterValue ( appPath ) } "` ;
120111 const { stdout} = await devicectl . execute ( [ 'device' , 'info' , 'processes' ] , {
121112 subcommandOptions : [ '--filter' , filter ] ,
0 commit comments