@apistudio/apim-cli
Version:
CLI for API Management Products
146 lines (145 loc) • 10.9 kB
JavaScript
/**
* Copyright Super iPaaS Integration LLC, an IBM Company 2024
*/
export const CHECKING_ROOT_DIRECTORY = 'Checking local directory...';
export const CHECKING_FOR_PROJECT = 'Checking for projects... ';
export const INVALID_PROJECT_NAMES = 'Invalid project names...';
export const BUILDING_PROJECTS = 'Building projects...';
export const CHECKING_ALL_PROJECTS = 'Checking list of all projects in the directory ';
export const DEPLOYING_PROJECTS = 'Deploying to the api gateway...';
export const IDENTIFIED_PROJECTS = 'Identified projects: ';
export const BUILDING_LIST_ALL_PROJECTS = 'Building list of all projects in the local directory ';
export const DEPLOYMENT_SUCCESS = '\n\nDeployment to api gateway is successful!';
export const DEPLOYMENT_FAILURE = '\n\nDeployment to api gateway has failed!';
export const DIRECTORY_DOESNT_EXIST = 'Directory do not exist :';
export const ERROR_PROCESSING_YAML_FILE = 'Error processing YAML file';
export const IGNORE_PROJECT_ARG = '[WARNING] Using --all with projects will ignore the projects argument\n';
export const IGNORE_NAMES_OPT = '[WARNING] Using --all with --names will ignore the names option\n';
export const BUILD_SUCCESSFUL = '\nBuild completed successfully!\n';
export const MULTIPLE_PROJECTS_SPECIFIED = 'You can not specify multiple projects with --names';
export const EXECUTING_TESTS_SUCCESS = 'Test executed successfully...';
export const ERROR_IN_EXECUTING_TEST = 'Validation failed. Test results were null.';
export const ERROR_PREPARE_TEST_RESULTS = 'Error preparing test results';
export const ERROR_GENERATE_TEST_RESULTS_FILE = 'Error in generating test results file';
export const ERROR_DURING_TESTING = 'An error occurred during testing';
export const NO_VALID_API_ASSET_FOUND = 'No valid API asset ref found in the test file.';
export const INVALID_OR_EMPTY_DEPLOYMENT_RESPONSES = 'Invalid or empty deployment responses provided.';
export const TEST_EXECUTION_FAILED = 'Test execution failed :';
export const FAILED_TESTS = 'There are failed tests ';
export const ADDING_ENDPOINT_FILE_FAILED = 'Adding endpoint file to test assets failed:';
export const FAILED_TO_BUILD_TEST_ASSETS = 'Failed to build test assets';
export const INVALID_ASSET_KIND_TEST = 'Invalid asset of kind \'TEST\' :';
export const NO_API_ASSET_REF_FOUND = 'No API asset reference found in the test file.';
export const CREATED_DEPLOY_ZIP = '[ZIP FILE GENERATED] Zip file created from the build is available at ';
export const ERROR_PROCESSING_JSON_FILE = 'Error processing JSON file';
export const LINE = '--------------------------';
export const BUILD_STARTED = 'Build Started';
export const ASSERT_ADDED = 'Asset Added : ';
export const SPEC_ADDED = 'Spec Added : ';
export const DEPLOY_STARTED = 'Deploy Started';
export const TEST_STARTED = 'Test Started';
export const CHECKING_DEPENDENCY = 'Checking dependency for kind';
export const INVALID_ASSET = 'Invalid asset: ';
export const KIND = 'Kind';
export const REF = 'ref';
export const NAME = 'Name';
export const VERSION = 'Version';
export const SKIPPED = 'Skipped';
export const DEPENDENCY_IDENTIFIED = 'Dependency identified: ';
export const AND_REF = 'and ref';
export const NO_DEPENDENCY_FOUND = 'There are no dependencies found for kind';
export const INVALID_DIRECTORY = 'Invalid directory';
export const DUPLICATE_ENTRIES_FOR_KIND = 'Duplicate entries for kind';
export const NO_ENTRIES_FOUND_FOR_KIND = 'No entries found for kind';
export const NO_FURTHER_DEPENDENCY = 'There are no further dependency assets to check in the given local directory.';
export const DEPENDENT_ASSETS_TO_BE_PROCESSED = 'dependent assets to be processed';
export const ASSET_DEPENDENCIES = 'asset dependencies are identified to check:';
export const THERE_ARE = 'There are ';
export const FOLLOWING = 'Following ';
export const METADATA_NAME = 'metadata name';
export const IS_FOUND_IN = 'is found in';
export const SEARCHING = 'Searching';
export const INSIDE_THE_PROJECT_PATH = 'inside the project path';
export const ADDING_DEPENDENCY = 'Adding dependency: ';
export const API_DEPENDENCY_IDENTIFIED = 'API Dependency identified: ';
export const DEPLOYMENT_FAILURE_SOME_ASSET = 'Deployment to the api gateway has failed for some assets';
export const APIENDPOINTS = '\nGateway endpoints of the APIs in the project';
export const DETAILED_INFO = 'Detailed info about deployment';
export const TESTING_LIST_ALL_PROJECTS = 'Testing list of all projects in the local directory ';
export const ERROR_IN_SEARCH_OF_ASSET = 'Error searching valid asset files of kind: ';
export const ERROR_IN_COMBINING_TEST_ASSET = 'Error occured while combining ZIPs of test assets for project:';
export const MULTIPLE_PROJECTS_NOT_ALLOWED = 'Multiple projects are not allowed when using --names.\nPlease specify only one project.\n';
export const SEARCH_METADATA = 'Searching test meta data...';
export const EXTRACT_METADATA_PROJECT = 'Searching test meta data for project -';
export const EXTRACT_METADATA_PROJECT_SUCCESS = 'Successfully extracted meta data for project - ';
export const EXTRACT_METADATA_SUCCESS = 'Successfully extracted test metadata for projects';
export const FORMAT_METADATA = 'Formatting metadata ...';
export const FORMAT_METADATA_SUCCESS = 'Successfully formatted metadata';
export const COMBINING_TEST_ZIP = 'Combining ZIPs of test assets for project...';
export const BUILDING_TEST = 'Building test asset for project ';
export const BUILDING_TEST_SUCCESS = 'Successfully built test asset for project ';
export const COMBINING_TEST_ZIP_SUCCESS = 'Successfully extracted test assets and combined to a zip';
export const EXECUTING_TEST = 'Executing test files ...';
export const PREPARE_TESTS_RESULT = 'Preparing test results ...';
export const PREPARE_TESTS_RESULT_SUCCESS = 'Successfully prepared and printed test result';
export const CREATE_TEST_TABLE = 'Creating test table ...';
export const CREATE_TEST_TABLE_SUCCESS = 'Successfully created test table';
export const ENTER_PASS = 'Enter the password: ';
export const ENTER_SECRET = 'Enter the secret: ';
export const PROCESS_ENDPOINT_RESPONSE = 'Processing endpoint from response...';
export const PROCESS_ENDPOINT_RESPONSE_SUCCESS = 'Successfully processed endpoint from response...';
export const PROCESS_GATEWAY_RESPONSE = 'Processing gateway response : ';
export const ENDPOINT_TEST = 'Adding endpoint to test assets...';
export const ENDPOINT_TEST_SUCCESS = 'Endpoint Successfully added to test assets...';
export const PREPARE_TEST_RESULT = 'Preparing test result for ';
export const PREPARE_TEST_RESULT_SUCCESS = 'Successfully prepared test result for ';
export const NO_ASSET_METADATA = 'No asset metadata provided';
export const CREATED_TEST_ZIP = '[ZIP FILE GENERATED] Zip file created from the test is available at ';
export const YAML_SEPARATOR = '---\n';
export const ALL_ENDPOINTS_FETCHED_FROM_STORE = 'Got all gatewayEndpoints from the store';
export const SOME_ENDPOINTS_MISSING_FROM_STORE = 'Some gatewayEndpoints aren\'t available in the store \nBuilding those assets.....\n';
export const NO_ENDPOINTS_IN_STORE = 'No gatewayEndpoints found in the store';
export const NO_ENDPOINTS_STORE_CONFIGURED = 'gatewayEndpoint store is not configured yet';
export const JSON_FILE_MISSING = 'The JSON file does not exist in the zip buffer.';
export const UPDATE_ENDPOINT_FAILED = 'Failed to update the endpoint file:';
export const ASSETS_BUILD_FAILED = 'Failed to build assets for project:';
export const FAILED_TO_SET_ENDPOINT = 'Failed to set gateway endpoint:';
export const NO_DATA_TO_PROCESS = 'No endpoint data received from deployment to store';
export const DEPLOYMENT_DATA_UPDATED = 'Deployment data updated';
export const APPEND_ENDPOINTS_FAILED = 'Failed to append endpoints:';
export const UPDATE_ENDPOINTS_FAILED = 'Failed to check and update endpoints:';
export const CONFIG_FILE_CREATION_FAILED = 'Failed to create configuration file,';
export const CONFIG_FILE_CREATED = 'Created configuration file';
export const READ_CURRENT_ENDPOINTS_FAILED = 'Failed to read current endpoints,';
export const NO_UPDATES_NEEDED = 'No updates needed for existing APIs.';
export const CONFIG = '[CONFIG] ';
export const TESTING = 'Executing Tests';
export const API_DETAILS_MISSING = 'API Gateway details are missing. Please try again with the following command.';
export const RETRY_TEST_COMMAND = 'apic test <project_name> --localDir <local_dir_path> --target <target> --username <username> --password <password>';
export const DEPLOYMENT_DETAILS_NOT_IDENTIFIED_LOCALLY = `Deployment details can't be identified locally...Proceeding with build and deploy..`;
export const DEPLOYMENT_DOESNOT_OVERWRITE = `Please note that the deployment doesn't overwrite the existing assets in the api gateway`;
export const NO_ENV_FILE = 'No environment kind files found in the directory.';
export const KEY_MISSING = 'Key must be provided for the value: ';
export const VALUE_MISSING = 'Value must be provided for the key: ';
export const DUPLICATE_KEY_WARNING = '\nOnly the last occurrence of key and it\'s value will be considered.';
export const FAILED_TO_PROCESS_ENTRY = 'Failed to process entry:';
export const INVALID_ENV_VARIABLE_FORMAT = 'Invalid environment variable format:';
export const OVERALL_TEST_SUMMARY = 'Overall Test Summary';
export const OVERALL_TEST_SUMMARY_HEADINGS = ['Total Tests', 'Total No.of Assertions', 'Total Passed Assertions', 'Total Failed Assertions', 'Overall Status'];
export const INDIVIDUAL_TEST_RESULT_HEADINGS = ['Test Name', 'Total Passed', 'Total Failed', 'Status'];
export const INDIVIDUAL_TEST_SUMMARY_HEADINGS = ['Resource', 'Assertions', 'Status', 'Message'];
export const FAILED = 'Failed';
export const PASSED = 'Passed';
export const FILE_OVERWRITTEN = '[WARNING] If a build zip with the name exists, it will be overwritten';
export const CREATED_BUILD_ZIP = '[ZIP FILE GENERATED] Your build can be found at ';
export const OUTPUT_FORMAT_NOT_SUPPORTED_ERROR = 'Error: Output format not supported, make sure you are providing a .zip ouput path';
export const OUTPUT_DIR_PATH_TO_BE_CREATED = '[WARNING] The specified directory in output will be created if it does not already exist';
export const EMPTY_RESULT = 'Test results are empty';
export const ENDPOINT_ARGUMENT_NOT_AVAILABLE = 'The -en /--endpoint option is only available when asset names are specified.';
export const INVALID_ENDPOINT = (endpoint) => `Endpoint: ${endpoint} is invalid`;
export const NO_VALID_ENDPOINT_FOUND = 'No valid endpoints found';
export const ERROR_PROCESSING_ENDPOINT = 'Error processing endpoint:';
export const MISMATCH_IN_API_AND_ENDPOINT = 'The number of endpoints provided is not match with api reference';
export const UNKNOWN_ERROR = "Unknown error";
export const MIGRATION_STARTED = "Starting migration of ATM test files";
export const MIGRATION_COMPLETED = "Migration of ATM test files completed";