import { Registrar } from '@kui-shell/core' ; import { defaultFlags } from '@kui-shell/plugin-kubectl' ; import help from './controller/krew/help' ; import info from './controller/krew/info' ; import list from './controller/krew/list' ; import genericTable from './controller/krew/generic-table' ; import popeye from './controller/popeye' ; const aliases = [ 'k' , 'kubectl' ] ; const canonical = 'kubectl' ; export default async ( registrar ) => { aliases . forEach ( command => { registrar . listen ( `/${ command }/krew/help` , help ( canonical ) , defaultFlags ) ; registrar . listen ( `/${ command }/krew/info` , info ( canonical ) , defaultFlags ) ; registrar . listen ( `/${ command }/krew/list` , list ( canonical ) , defaultFlags ) ; registrar . listen ( `/${ command }/krew/search` , genericTable ( canonical ) , defaultFlags ) ; registrar . listen ( `/${ command }/krew/version` , genericTable ( canonical ) , defaultFlags ) ; registrar . listen ( `/${ command }/popeye` , popeye ( canonical ) , defaultFlags ) ; } ) ; } ;