@broadcom/jclcheck-for-zowe-cli
Version:
JCLCheck Plug-in for Zowe CLI
78 lines (76 loc) • 3.73 kB
TypeScript
/**
* Copyright (c) 2025. Broadcom. All rights reserved. The term
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*
* This software and all information contained therein is
* confidential and proprietary and shall not be duplicated,
* used, disclosed, or disseminated in any way except as
* authorized by the applicable license agreement, without the
* express written permission of Broadcom. All authorized
* reproductions must be marked with this language.
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
*
**/
import { AbstractPluginLifeCycle } from "@zowe/imperative";
/**
* This class performs lifecycle functions for your plugin. You are free to
* change the name of this class to reflect your plugin and its actions.
*
* You only have to supply such a class if you specify the 'pluginLifeCycle'
* property in your IImperativeConfig definition for your plugin. In this sample,
* that definition is supplied in src/pluginDef.ts.
*/
export declare class LifeCycleForJCLCheck extends AbstractPluginLifeCycle {
/**
* This function will be called after a plugin is installed.
* A plugin can use this opportunity to perform a sanity test or to
* perform some additional setup which is specific to your plugin.
*
* If your plugin's postInstall function performs an asynchronous operation,
* its postInstall function should return a promise, allowing the CLI
* to await the postInstall function. Such a signature would be like this:
*
* public async postInstall(): Promise<void>
*
* If it has no asynchronous operation, the postInstall function can be
* written as a synchronous function. That is the style which this trivial
* synchronous sample uses below.
*
* If you supply this class, you must supply this function. If you have nothing to
* do post-install, then simply return from the function.
*/
postInstall(): void;
/**
* This function will be called before a plugin is uninstalled.
* This lifecycle hook is intended to replace the capability that used to
* be performed by the NPM pre-uninstall action before NPM removed that
* capability in NPM version 7.
* See https://docs.npmjs.com/cli/v9/using-npm/scripts#a-note-on-a-lack-of-npm-uninstall-scripts
*
* A plugin can use this opportunity to revert any specialized setup that was
* established during the lifetime of your plugin.
*
* If your plugin's preUninstall function performs an asynchronous operation,
* its preUninstall function should return a promise, allowing the CLI
* framework to await the preUninstall function. Such a signature would be like this:
*
* public async preUninstall(): Promise<void>
*
* If it has no asynchronous operation, the preUninstall function can be
* written as a synchronous function. That is the style which this trivial
* synchronous sample uses below.
*
* If you supply this class, you must supply this function. If you have nothing to
* do pre-uninstall, then simply return from the function.
*/
preUninstall(): void;
}