Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import consola from 'consola'
import chalk from 'chalk'
import env from 'std-env'
import exit from 'exit'
const isWin = env.windows
describe.win = isWin ? describe : describe.skip
test.win = isWin ? test : test.skip
describe.posix = !isWin ? describe : describe.skip
test.posix = !isWin ? test : test.skip
chalk.enabled = false
jest.setTimeout(60000)
consola.mockTypes(() => jest.fn())
function errorTrap (error) {
process.stderr.write('\n' + error.stack + '\n')
exit(1)
import path from 'path'
import exit from 'exit'
import { lock } from '@nuxt/utils'
import chalk from 'chalk'
import env from 'std-env'
import { warningBox } from './formatting'
export const eventsMapping = {
add: { icon: '+', color: 'green', action: 'Created' },
change: { icon: env.windows ? '»' : '↻', color: 'blue', action: 'Updated' },
unlink: { icon: '-', color: 'red', action: 'Removed' }
}
export function formatPath (filePath) {
if (!filePath) {
return
}
return filePath.replace(process.cwd() + path.sep, '')
}
/**
* Normalize string argument in command
*
* @export
* @param {String} argument
* @param {*} defaultValue