Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
/* global window: true */
/* eslint-disable
no-shadow,
no-param-reassign,
space-before-function-paren
*/
const uuid = require('uuid/v4');
const colors = require('ansi-colors');
const loglevel = require('loglevelnext');
const symbols = {
trace: colors.grey('₸'),
debug: colors.cyan('➤'),
info: colors.blue(colors.symbols.info),
warn: colors.yellow(colors.symbols.warning),
error: colors.red(colors.symbols.cross),
};
const defaults = {
name: '',
level: 'info',
unique: true,
color: true,
};
const prefix = {
level(options) {
return symbols[options.level];
},
template: `{{level}} ${colors.gray('「{{name}}」')}: `,
return through.obj((file, enc, cb) => {
if (options.showFiles) {
let output = chalk.whiteBright.bold(chalk.symbols.pointer) + ' ';
const name = path.relative(file.base, file.path);
if (options.minimal) {
output += inputStyle(options.srcName || name);
} else {
output =
'\n' +
(file.cwd ? 'cwd: ' + inputStyle(tildify(file.cwd)) : '') +
(file.base ? '\nbase: ' + inputStyle(tildify(file.base)) : '') +
(file.path ? '\npath: ' + inputStyle(tildify(file.path)) : '') +
// (file.stat && options.verbose ? '\nstat: ' + prop(stringifyObject(file.stat, { indent: ' ' }).replace(/[{}]/g, '').trim()) : '') +
'\n';
}
// let outPath = ''
if (options.distName) {
output += outputStyle(options.distName);
.then(() => {
console.log(colors.green(colors.symbols.check), 'done');
process.exit();
})
.catch(err => {
packages.map(function(package) {
const packagePath = `${__dirname}/../dist/${package}`;
execSync(`cd ${packagePath} && npm publish`);
console.log(c.magenta(package), 'has been published', c.green(c.symbols.check));
});
const c = require('ansi-colors');
const { execSync } = require('child_process');
const { readdirSync, statSync } = require('fs');
const { join } = require('path');
const getPackages = p =>
readdirSync(p).filter(f => statSync(join(p, f)).isDirectory());
const packages = getPackages('dist');
console.log(
'Publishing packages',
c.cyan(c.symbols.pointerSmall),
c.yellow(packages)
);
packages.map(function(package) {
const packagePath = `${__dirname}/../dist/${package}`;
execSync(`cd ${packagePath} && npm publish`);
console.log(c.magenta(package), 'has been published', c.green(c.symbols.check));
});
function logReplace(n, key, value, file) {
log.info(
colors.gray(TITLE),
colors.gray.bold(colors.symbols.check.repeat(n)),
colors.gray.dim.italic.strikethrough(key.toString()),
colors.dim.gray(colors.symbols.pointerSmall),
typeof value === 'function' ? colors.cyan(colors.italic('Function:') + (value.name || '')) : colors.underline(value),
colors.gray('(' + colors.underline(
path.relative(file.base, file.path)
) + ')')
)
}
'use strict';
const isWindows = process.platform === 'win32';
const colors = require('ansi-colors');
const utils = require('./utils');
const symbols = {
...colors.symbols,
upDownDoubleArrow: '⇕',
upDownDoubleArrow2: '⬍',
upDownArrow: '↕',
asterisk: '*',
asterism: '⁂',
bulletWhite: '◦',
electricArrow: '⌁',
ellipsisLarge: '⋯',
ellipsisSmall: '…',
fullBlock: '█',
identicalTo: '≡',
indicator: colors.symbols.check,
leftAngle: '‹',
mark: '※',
minus: '−',
multiplication: '×',
'use strict';
const colors = require('ansi-colors');
const isWindows = process.platform === 'win32';
const utils = require('../utils');
const checkboxSymbols = {
indicator: colors.symbols.check,
hexagon: {
off: '⬡',
on: '⬢'
},
ballot: {
on: '☑',
off: '☐',
disabled: '☒'
},
stars: {
on: '★',
off: '☆',
disabled: '☆'
},
folder: {
on: '▼',
const finish = (err, size) => {
if (err) {
cb(new PluginError('size', err));
return;
}
totalSize += size;
if (opts.showFiles === true && size > 0) {
log(
chalk.reset.whiteBright.dim(chalk.symbols.check),
chalk.green.underline.bold(opts.showTotal ? chalk.dim(file.relative) : file.relative),
size,
!opts.showTotal);
}
fileCount++;
cb(null, file);
};
pilcrow2: '❡',
pencilUpRight: '✐',
pencilDownRight: '✎',
pencilRight: '✏',
plus: '+',
plusMinus: '±',
pointRight: '☞',
rightAngle: '›',
section: '§',
hexagon: { off: '⬡', on: '⬢', disabled: '⬢' },
ballot: { on: '☑', off: '☐', disabled: '☒' },
stars: { on: '★', off: '☆', disabled: '☆' },
folder: { on: '▼', off: '▶', disabled: '▶' },
prefix: {
pending: colors.symbols.question,
submitted: colors.symbols.check,
cancelled: colors.symbols.cross
},
separator: {
pending: colors.symbols.pointerSmall,
submitted: colors.symbols.middot,
cancelled: colors.symbols.middot
},
radio: {
off: isWindows ? '( )' : '◯',
on: isWindows ? '(*)' : '◉',
disabled: isWindows ? '(|)' : 'Ⓘ'
},
numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿']
};
symbols.merge = options => {