@apistudio/apim-cli
Version:
CLI for API Management Products
47 lines (46 loc) • 2.07 kB
JavaScript
/**
* Copyright Super iPaaS Integration LLC, an IBM Company 2024
*/
export class AppConstants {
;
}
AppConstants.KIND_FILE = "file";
AppConstants.KIND_DIRECTORY = "directory";
AppConstants.STUDIO_PROJECT_FILENAME = ".apistudio-projects";
AppConstants.CRSWAP_FILE = ".crswap";
AppConstants.YAMLContent = 'YAML Content';
AppConstants.YAMLStructure = 'YAML Structure';
AppConstants.pathVariable = '$path';
AppConstants.YAML_FILE = 'STU-YAML_FILE';
// ASSET KINDS
AppConstants.POLICY = 'Policy';
AppConstants.MOCK_END_POINT = 'MockEndpoint';
AppConstants.MOCK_RESPONSE = 'MockResponse';
AppConstants.POLICY_SEQ = 'policy-sequence';
AppConstants.apiSpec = 'api-spec';
// EXCEPTIONS
AppConstants.EXCEPTION_DIRECTORY_ACCESS = 'Exception occured while accessing the directory.';
// ERROR MESSAGES
AppConstants.VALIDATION_ERROR_CODE = 'STU-VAL_ERR';
AppConstants.PARSING_EXCEPTION = (fileName = '') => `Exception occured while parsing ${fileName}.`;
AppConstants.ERROR_INVALID_PROJECT = 'Invalid project. Please ensure that the project file is valid';
AppConstants.ERROR_STUDIO_PROJECTS_FILE_NOT_FOUND = (rootDirAlias) => `.apistudio-projects file not found in root directory with alias ${rootDirAlias}`;
AppConstants.ERROR_ASSET_PARSING = (fileName) => `Error in parsing file: ${fileName}`;
AppConstants.FAILED_TO_LOAD_PROJECT = 'Failed to load project';
AppConstants.NO_ROOT_DIR_IN_PROJECT = 'No projects folder configured in the project';
AppConstants.NO_PROJECT_DIR_FOUND = 'No Project Directory Found';
AppConstants.DIR_NOT_EXISTS = 'Directory not exists';
AppConstants.ASSET_META_DATA_NOT_FOUND = 'Asset metadata not found';
AppConstants.DUPLICATE_PROJECT_EXCEPTION = (projectName = '') => `Project with name ${projectName} already exists.`;
AppConstants.TEST = 'test';
AppConstants.ASSERTION = 'assertion';
AppConstants.ENVIRONMENT = 'environment';
AppConstants.ALLOWED_ENDPOINTS = [
'default-endpoint',
'conditional-endpoints',
'loadbalance-endpoints',
'messageConfig',
'content-based-endpoints',
'dynamic-endpoints',
'mock-endpoint'
];