import { IHandlerParameters , TextUtils } from "@zowe/imperative" ; import { explainPublishedTemplateInfoFull , explainPublishedTemplateInfoSummary , ListTemplateInfo , IPublishedTemplateInfo , ProvisioningConstants } from "@zowe/provisioning-for-zowe-sdk" ; import { ZosmfBaseHandler } from "@zowe/zosmf-for-zowe-sdk" ; export class implements ICommandHandler export default class TemplateInfoHandler extends ZosmfBaseHandler { public async processCmd ( commandParameters ) { const response = await ListTemplateInfo . listTemplateCommon ( this . mSession , ProvisioningConstants . ZOSMF_VERSION , commandParameters . arguments . name ) ; let prettifiedTemplateInfo = { } ; if ( commandParameters . arguments . allInfo ) { prettifiedTemplateInfo = TextUtils . explainObject ( response , explainPublishedTemplateInfoFull , false ) ; } else { prettifiedTemplateInfo = TextUtils . explainObject ( response , explainPublishedTemplateInfoSummary , false ) ; } commandParameters . response . console . log ( TextUtils . prettyJson ( prettifiedTemplateInfo ) ) ; commandParameters . response . data . setObj ( response ) ; } }