UNPKG

@broadcom/jclcheck-for-zowe-cli

Version:

JCLCheck Plug-in for Zowe CLI

90 lines 4.24 kB
"use strict"; /** * Copyright (c) 2023. Broadcom. All rights reserved. * * 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 CA IS EXPRESSLY ADVISED OF SUCH LOSS OR * DAMAGE. * * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * **/ Object.defineProperty(exports, "__esModule", { value: true }); exports.LifeCycleForJCLCheck = void 0; const imperative_1 = require("@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. */ class LifeCycleForJCLCheck extends imperative_1.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() { /* It is up to you to decide what actions are meaningful for you * to perform immediately after your plugin is installed. */ } /** * 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() { /* The comments from the postInstall function also apply to the * preUninstall function. */ } } exports.LifeCycleForJCLCheck = LifeCycleForJCLCheck; module.exports = LifeCycleForJCLCheck; //# sourceMappingURL=LifeCycleForJCLCheck.js.map