@broadcom/endevor-bridge-for-git-for-zowe-cli
Version:
Endevor Bridge for Git plug-in for Zowe CLI
131 lines (127 loc) • 4.59 kB
JavaScript
;
var EBGOptions = require('./EBGOptions.js');
var index = require('../../node_modules/@broadcom/bridge-for-git-zowe-client/dist/index.js');
var HelpConstants = require('../constants/HelpConstants.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.
*/
class MappingOptions extends EBGOptions.EBGOptions {
}
MappingOptions.MAPPING_VIEW_DEFAULT = "default";
MappingOptions.MAPPING_VIEW_ENDEVOR = "endevor";
MappingOptions.MAPPING_VIEW_ALL = "all";
MappingOptions.CREATE_MAPPING_JSON_FILE = {
name: "json-file",
aliases: ["json"],
description: "Mapping JSON file to import.",
type: "existingLocalFile",
required: false,
conflictsWith: [
"remote-url",
"endevor-stage-number",
"read-only",
MappingOptions.ENDEVOR_INSTANCE.name,
MappingOptions.ENDEVOR_ENVIRONMENT.name,
MappingOptions.ENDEVOR_SYSTEM.name,
MappingOptions.ENDEVOR_SUBSYSTEM.name,
],
};
MappingOptions.GIT_REMOTE_URL = {
name: "remote-url",
aliases: ["url"],
description: "Git repository remote URL.",
type: "string",
required: false,
conflictsWith: [MappingOptions.CREATE_MAPPING_JSON_FILE.name],
};
MappingOptions.ENDEVOR_STAGE_NUMBER = {
name: "endevor-stage-number",
aliases: ["endevorsn"],
description: HelpConstants.helpConstants.endevorStgNumberDesc,
type: "string",
implies: ["read-only"],
conflictsWith: [MappingOptions.CREATE_MAPPING_JSON_FILE.name],
};
MappingOptions.READ_ONLY = {
name: "read-only",
description: "If specified, it is necessary to use the option --endevor-stage-number. The synchronized elements will be read-only.",
type: "boolean",
required: false,
implies: [MappingOptions.ENDEVOR_STAGE_NUMBER.name],
conflictsWith: [MappingOptions.CREATE_MAPPING_JSON_FILE.name],
};
MappingOptions.VIEW_TYPE = {
name: "view",
aliases: ["v"],
description: "Type of detail to be displayed.",
type: "string",
allowableValues: {
values: [
MappingOptions.MAPPING_VIEW_DEFAULT,
MappingOptions.MAPPING_VIEW_ENDEVOR,
MappingOptions.MAPPING_VIEW_ALL,
],
caseSensitive: false,
},
defaultValue: "default",
};
MappingOptions.EXPORT_LIST = {
name: "export",
description: "Export list of mapping to a json file.",
type: "boolean",
defaultValue: false,
};
MappingOptions.CONNECTION_NAME = {
name: "connection",
description: "Endevor connection name.",
type: "string",
required: false,
};
MappingOptions.TYPE_FILTERS = {
name: "type-filters",
description: "Type filters that your mapping will be using. " +
'There can be multiple separated by a space. eg --type-filters "COBOL" "COPY".',
type: "array",
required: false,
};
MappingOptions.NAME_FILTERS = {
name: "name-filters",
description: "Name filters that your mapping will be using. " +
'There can be multiple separated by a space. eg --name-filters "ELE*" "CO*".',
type: "array",
required: false,
};
MappingOptions.REPOSITORY_CHECK = {
name: "repository-check",
description: "If set to allowNonEmpty, user can proceed with initialization" +
" even if the repository is not empty.",
allowableValues: {
values: [
index.RepositoryCheckE.REQUIRE_EMPTY,
index.RepositoryCheckE.ALLOW_NON_EMPTY,
],
},
type: "string",
defaultValue: index.RepositoryCheckE.REQUIRE_EMPTY,
required: false,
};
exports.MappingOptions = MappingOptions;