UNPKG

@dotenvx/dotenvx-radar

Version:
34 lines (27 loc) 771 B
const { logger } = require('@dotenvx/dotenvx') const main = require('./../../lib/main') async function observe (base64) { const commandArgs = this.args logger.debug(`process command [${commandArgs.join(' ')}]`) const options = this.opts() logger.debug(`options: ${JSON.stringify(options)}`) const hostname = options.hostname const token = options.token try { await main.observe(base64, { hostname, token }) } catch (error) { if (error.message) { logger.error(error.message) } else { logger.error(error) } if (error.help) { logger.help(error.help) } if (error.stack) { logger.debug(error.stack) } // do not process exit 1 since that would exit dotenvx run -- } } module.exports = observe