gobble-cli
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -7,5 +7,7 @@ /*global console */ | ||
ansiRegex = require( 'ansi-regex' ), | ||
sorcery = require( 'sorcery' ), | ||
frames = require( './frames' ), | ||
summariseChanges = require( './summariseChanges' ), | ||
tryInstallPlugin = require( './tryInstallPlugin' ), | ||
getSyntaxErrorBlock = require( './getSyntaxErrorBlock' ), | ||
messages = '', | ||
@@ -158,3 +160,3 @@ logger, | ||
console.log( GOBBLE_INFO + 'could not load ' + plugin + ' plugin. Have you installed it? ' + chalk.cyan( 'npm\u00A0install\u00A0--save-dev\u00A0gobble-' + plugin ) ); | ||
info( 'could not load ' + plugin + ' plugin. Have you installed it? ' + chalk.cyan( 'npm\u00A0install\u00A0--save-dev\u00A0gobble-' + plugin ) ); | ||
@@ -167,3 +169,3 @@ tryInstallPlugin( plugin, function ( err ) { | ||
console.log( GOBBLE_INFO + 'successfully installed ' + plugin + ' plugin' ); | ||
info( GOBBLE_INFO + 'successfully installed ' + plugin + ' plugin' ); | ||
// TODO how to restart on install? | ||
@@ -182,6 +184,6 @@ // restart(); | ||
console.log( chalk.red( '>>>' ) ); | ||
console.log( ( err.original.message || err.original ).trim() ); | ||
console.log( chalk.grey( err.original.stack ) ); | ||
console.log( chalk.red( '<<<' ) ); | ||
console.error( chalk.red( '>>>' ) ); | ||
console.error( ( err.original.message || err.original ).trim() ); | ||
console.error( chalk.grey( err.original.stack ) ); | ||
console.error( chalk.red( '<<<' ) ); | ||
@@ -192,8 +194,38 @@ return true; // fatal | ||
TRANSFORMATION_FAILED: function ( err ) { | ||
var chain, loc; | ||
error( err.id + ' transformation failed\n' ); | ||
console.log( chalk.red( '>>>' ) ); | ||
console.log( ( err.original.message || err.original ).trim() ); | ||
console.log( chalk.grey( err.stack ) ); | ||
console.log( chalk.red( '<<<' ) ); | ||
console.error( chalk.red( '>>>' ) ); | ||
if ( err.file ) { | ||
console.error( chalk.grey( '===' ) ); | ||
console.error( err.file ); | ||
if ( err.line ) { | ||
console.error( chalk.grey( '---' ) ); | ||
console.error( getSyntaxErrorBlock( err.file, err.line, err.column ) ); | ||
try { | ||
chain = sorcery.loadSync( err.file ); | ||
loc = chain.trace( err.line, err.column ); | ||
if ( loc && loc.source !== err.file ) { | ||
console.error( chalk.grey( '===' ) ); | ||
console.error( 'original error in ' + loc.source + ' (best guess)' ); | ||
console.error( chalk.grey( '---' ) ); | ||
console.error( getSyntaxErrorBlock( loc.source, loc.line, loc.column ) ); | ||
} | ||
} catch ( err ) { | ||
// do nothing - this is best effort only | ||
} | ||
} | ||
console.error( chalk.grey( '===' ) ); | ||
} | ||
console.error( ( err.original.message || err.original ).trim() ); | ||
console.error( chalk.grey( err.stack ) ); | ||
console.error( chalk.red( '<<<' ) ); | ||
} | ||
@@ -200,0 +232,0 @@ }; |
{ | ||
"name": "gobble-cli", | ||
"description": "Command line interface for gobble", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Rich Harris", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18344
14
557
1
9