Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import path from 'path';
import { createInternalDebugger } from '@boost/internal';
import { createTranslator } from '@boost/translate';
import { LogLevel } from './types';
export const debug = createInternalDebugger('log');
export const msg = createTranslator('log', path.join(__dirname, '../res'));
// In order of priority!
export const LOG_LEVELS: LogLevel[] = ['log', 'trace', 'debug', 'info', 'warn', 'error'];
name: this.constructor.name,
},
);
this.appPath = Path.resolve(this.options.appPath);
this.rootPath = Path.resolve(this.options.root);
// Set environment variables
env('DEBUG_GLOBAL_NAMESPACE', this.options.appName);
// Core debugger, logger, and translator for the entire tool
this.debug = createDebugger('core');
this.log = createLogger();
this.msg = createTranslator(
['app', 'errors'],
[
new Path(__dirname, '../res'),
this.appPath.append('res'),
// TODO Remove in 2.0
this.appPath.append('resources'),
],
{
// TODO Change to yaml in 2.0
resourceFormat: 'json',
},
);
// eslint-disable-next-line global-require
this.debug('Using boost v%s', require('../package.json').version);
import path from 'path';
import { createTranslator } from '@boost/translate';
export const msg = createTranslator('cli', path.join(__dirname, '../res'));
export const META_NAME = Symbol('name');
export const META_OPTIONS = Symbol('options');
export const META_PARAMS = Symbol('params');
export const META_REST = Symbol('rest');
export const META_COMMANDS = Symbol('commands');