UNPKG

@reactivehub/cli

Version:
38 lines (31 loc) 1.95 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk); var _index = require('./index'); var _index2 = _interopRequireDefault(_index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { testing: (eventId = '') => _index2.default.info(`Validating event${eventId ? ` ${eventId} ` : ' '}configuration data.`), totalBeignProcessed: (total = 0) => _index2.default.info(`Checking ${total} event(s).`), hasErrors: (totalErrors = 0, logFileLink = null, deploy = false, type = 'events') => { let errorMessage = _chalk2.default.red(`Test failed, ${totalErrors} ${type} with errors${deploy ? ', could not deploy' : ''}.\n`); if (logFileLink) errorMessage += _chalk2.default.red(`This is not a problem with Reactivehub services, check the log file for more info ${logFileLink}\n`); _index2.default.error(errorMessage); console.log(''); }, eventErrors: (eventId, total) => _index2.default.error(`Event ${eventId} ${total} error(s) found.`), testPassed: (deploy = false) => { console.log(''); _index2.default.success(_chalk2.default.green(`Event config test passed${deploy ? ', starting deploy.' : '.'}`)); console.log(''); }, startingDeploy: (type = 'all') => _index2.default.info(`Deploy ${type} started.`), eventDeploySuccess: (eventId, type = 'Event') => _index2.default.success(`${type} "${eventId}" successfully deployed.`), listenerDeploySuccess: id => _index2.default.success(`Listener "${id}" successfully deployed.`), deployFinished: (total, types = 'events') => _index2.default.success(`${total} ${types} successfully deployed.`), queryErrors: () => _index2.default.error('Could not deploy your queries; This is not a problem with Reactivehub services, check the log for more info') }; //# sourceMappingURL=checkDeploy.js.map