UNPKG

@capacitor/plugin-migration-v6-to-v7

Version:

Utility to help migrate Capacitor 6 plugins to Capacitor 7

29 lines (28 loc) 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = exports.output = void 0; exports.logSuccess = logSuccess; const tslib_1 = require("tslib"); const cli_framework_output_1 = require("@ionic/cli-framework-output"); const cli_1 = require("./cli"); const colors_1 = tslib_1.__importDefault(require("./colors")); const options = { colors: colors_1.default, stream: process.argv.includes('--json') ? process.stderr : process.stdout, }; exports.output = cli_1.isTTY ? new cli_framework_output_1.TTYOutputStrategy(options) : new cli_framework_output_1.StreamOutputStrategy(options); exports.logger = (0, cli_framework_output_1.createDefaultLogger)({ output: exports.output, formatterOptions: { titleize: false, tags: new Map([ [cli_framework_output_1.LOGGER_LEVELS.DEBUG, colors_1.default.log.DEBUG('[debug]')], [cli_framework_output_1.LOGGER_LEVELS.INFO, colors_1.default.log.INFO('[info]')], [cli_framework_output_1.LOGGER_LEVELS.WARN, colors_1.default.log.WARN('[warn]')], [cli_framework_output_1.LOGGER_LEVELS.ERROR, colors_1.default.log.ERROR('[error]')], ]), }, }); function logSuccess(msg) { exports.logger.msg(`${colors_1.default.success('[success]')} ${msg}`); }