import { Plugin , CoreSetup , CoreStart } from 'kibana/public' ; import { first } from 'rxjs/operators' ; import './types' ; export class ApplicationUsageTest implements Plugin { public setup ( core ) { } public start ( core ) { core . application . applications$ . pipe ( first ( ) ) . toPromise ( ) . then ( ( applications ) => { window . __applicationIds__ = [ ... applications . keys ( ) ] ; } ) ; } }