@broadcom/endevor-bridge-for-git-for-zowe-cli
Version:
Endevor Bridge for Git plug-in for Zowe CLI
116 lines (112 loc) • 5.17 kB
JavaScript
;
var PluginConstants = require('./api/constants/PluginConstants.js');
var EBGSession = require('./cli/sessions/EBGSession.js');
var ListDefinition = require('./cli/commands/list/ListDefinition.js');
var Add_definition = require('./cli/commands/add/Add.definition.js');
var Admin_definition = require('./cli/commands/admin/Admin.definition.js');
var Create_definition = require('./cli/commands/create/Create.definition.js');
var Delete_definition = require('./cli/commands/delete/Delete.definition.js');
var Rename_definition = require('./cli/commands/rename/Rename.definition.js');
var Transfer_definition = require('./cli/commands/transfer/Transfer.definition.js');
var Update_definition = require('./cli/commands/update/Update.definition.js');
var SyncBack_definition = require('./cli/commands/sync-back/SyncBack.definition.js');
/*
* Copyright (c) 2019 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.
*/
const definitions = [
Add_definition.AddDefinition,
Admin_definition.AdminDefinition,
Create_definition.CreateDefinition,
Delete_definition.DeleteDefinition,
ListDefinition.ListDefinition,
Rename_definition.RenameDefinition,
Transfer_definition.TransferDefinition,
SyncBack_definition.SyncBackDefinition,
Update_definition.UpdateDefinition,
];
const config = {
definitions,
pluginSummary: PluginConstants.PluginConstants.PLUGIN_SUMMARY,
rootCommandDescription: PluginConstants.PluginConstants.PLUGIN_DESCRIPTION,
envVariablePrefix: PluginConstants.PluginConstants.ENV_PREFIX_KEY,
defaultHome: PluginConstants.PluginConstants.HOME_DIR,
productDisplayName: PluginConstants.PluginConstants.PLUGIN_DISPLAY_NAME,
name: PluginConstants.PluginConstants.PLUGIN_GROUP_NAME,
pluginAliases: [PluginConstants.PluginConstants.PLUGIN_NAME_ALIAS],
logging: {
additionalLogging: [
{
apiName: PluginConstants.PluginConstants.PLUGIN_GROUP_NAME,
},
],
appLogging: {
logFile: PluginConstants.PluginConstants.LOG_LOCATION + PluginConstants.PluginConstants.LOG_FILENAME,
},
},
secondaryTextColor: "yellow",
profiles: [
{
type: EBGSession.EBGSession.PROFILE_TYPE,
schema: {
type: "object",
title: "Endevor Bridge for Bridge Profile",
description: "An EBG profile is required to issue commands in the ebg command group. " +
"The EBG profile contains the connection details for the Endevor Bridge for Git server of your choice.",
properties: {
protocol: {
type: "string",
optionDefinition: EBGSession.EBGSession.EBG_OPTION_PROTOCOL,
includeInTemplate: true,
},
host: {
type: "string",
optionDefinition: EBGSession.EBGSession.EBG_OPTION_HOST,
includeInTemplate: true,
},
port: {
type: "number",
optionDefinition: EBGSession.EBGSession.EBG_OPTION_PORT,
includeInTemplate: true,
},
user: {
type: "string",
secure: true,
optionDefinition: EBGSession.EBGSession.EBG_OPTION_USER,
includeInTemplate: true,
},
token: {
type: "string",
secure: true,
optionDefinition: EBGSession.EBGSession.EBG_OPTION_GIT_PERSONAL_ACCESS_TOKEN,
includeInTemplate: true,
},
rejectUnauthorized: {
type: "boolean",
optionDefinition: EBGSession.EBGSession.EBG_OPTION_REJECT_UNAUTHORIZED,
},
},
},
},
],
};
module.exports = config;
exports.definitions = definitions;