Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
})
.catch(e => ({
error: e.message
}));
});
await page.close();
if (results.error) {
throw Error(results.error);
}
//violations, passes, incomplete, inapplicable
if (results.violations.length) {
term.yellow((url || 'Docsify Index Page') + '\n');
} else {
term.green('✅ ' + (url || 'Docsify Index Page') + '\n');
}
for (const violation of results.violations) {
hasViolations = true;
term.bold(violation.description + '\n');
for (const node of violation.nodes) {
term[colorMap[node.impact] || 'green'](
(node.impact === 'critical' ?'!!':'•') + ' ' + node.impact
);
term(' ' + node.html + '\n');
}
console.log('\n');
}
}
term.cyan(line.value);
break;
case 'boolean':
term.magenta(line.value);
break;
case 'json':
term.colorRgb(150, 200, 255, line.value);
break;
default:
term(line.value);
break;
}
}
else if(line.empty) {
term.yellow('""');
}
else if(line.deleted) {
term.italic.colorRgb(50, 50, 50, '- removed -');
}
else {
term.colorRgb(50, 50, 50, '______');
}
term(',');
});
}
emitter.on('start:watchers', () => {
term.yellow('Starting watchers')
term('\n')
})
emitter.on('start:localServer:customPort', ({ port, host }) => {
term('*************** Action required *****************\n')
term.red('[local:functionServer] You have specified a custom port.\n')
term.yellow('You must update the views/index.html to match this setting as follow:\n\n')
term(`\n\n`)
term('*************************************************\n')
})