@@ -21,7 +21,6 @@ import type { DeviceData } from './listHarmonyDevices.js';
2121import { listHarmonyDevices } from './listHarmonyDevices.js' ;
2222import { tryInstallAppOnDevice } from './tryInstallAppOnDevice.js' ;
2323import { tryLaunchAppOnDevice } from './tryLaunchAppOnDevice.js' ;
24- // import { tryLaunchEmulator } from './tryLaunchEmulator.js';
2524
2625export interface Flags extends BuildFlags {
2726 ability : string ;
@@ -69,13 +68,11 @@ export async function runHarmony(
6968 if ( device ) {
7069 if ( device . deviceId ) {
7170 if ( ! binaryPath ) {
72- // @todo fix sourceDir
7371 await runHvigor ( { sourceDir, args, artifactName, device, bundleName } ) ;
7472 }
7573 await runOnDevice ( { device, sourceDir, args, binaryPath, bundleName } ) ;
7674 }
7775 } else {
78- // @todo consider filtering out offline devices
7976 if ( ( await getDevices ( ) ) . length === 0 ) {
8077 if ( isInteractive ( ) ) {
8178 await selectAndLaunchDevice ( ) ;
@@ -84,7 +81,6 @@ export async function runHarmony(
8481 'No booted devices or emulators found. Launching first available emulator.' ,
8582 ) ;
8683 // @todo add emulators
87- // await tryLaunchEmulator();
8884 }
8985 }
9086
@@ -108,7 +104,6 @@ async function selectAndLaunchDevice() {
108104
109105 if ( ! device . connected ) {
110106 // @todo add emulators
111- // await tryLaunchEmulator(device.readableName);
112107 // list devices once again when emulator is booted
113108 const allDevices = await listHarmonyDevices ( ) ;
114109 const newDevice =
@@ -155,11 +150,13 @@ async function promptForDeviceSelection(
155150) : Promise < DeviceData > {
156151 if ( ! allDevices . length ) {
157152 throw new RockError (
158- 'No devices and/or emulators connected. Please create emulator with DevEco Studio or connect HarmonyOS device.' ,
153+ // @todo add emulators
154+ 'No devices connected. Please create connect HarmonyOS device.' ,
159155 ) ;
160156 }
161157 const selected = await promptSelect ( {
162- message : 'Select the device / emulator you want to use' ,
158+ // @todo add emulators
159+ message : 'Select the device you want to use' ,
163160 options : allDevices . map ( ( d ) => ( {
164161 label : `${ d . readableName } ${
165162 d . type === 'phone' ? ' - (physical device)' : ''
0 commit comments