import { KubernetesExplorer } from "../../../components/clusterexplorer/explorer" ; import { ClusterExplorerV1_1 } from '../../contract/cluster-explorer/v1_1' ; import { resolveCommandTarget , adaptToExplorerUICustomizer , internalNodeContributorOf , allNodeSources } from './common' ; export function impl ( explorer ) { return new ClusterExplorerV1_1Impl ( explorer ) ; } class ClusterExplorerV1_1Impl implements ClusterExplorerV1_1 { constructor ( private readonly explorer ) { } resolveCommandTarget ( target ? ) { return resolveCommandTarget ( target ) ; } registerNodeContributor ( nodeContributor ) { const adapted = internalNodeContributorOf ( nodeContributor ) ; this . explorer . registerExtender ( adapted ) ; } registerNodeUICustomizer ( nodeUICustomizer ) { const adapted = adaptToExplorerUICustomizer ( nodeUICustomizer ) ; this . explorer . registerUICustomiser ( adapted ) ; } get nodeSources ( ) : ClusterExplorerV1_1 . NodeSources { return allNodeSources ( ) ; } refresh ( ) { this . explorer . refresh ( ) ; } }