Comparing version 2.2.3 to 2.2.4
39
index.js
@@ -16,2 +16,3 @@ var fs = require('fs') | ||
module.exports = function (args, binary) { | ||
if (args.q) { log = noop } | ||
isSudo(function (sudo) { | ||
@@ -65,3 +66,3 @@ switch (process.platform) { | ||
if (code !== 0) { | ||
tidy() | ||
tidy(args) | ||
process.exit(code) | ||
@@ -91,3 +92,3 @@ } | ||
process.stdin.resume() | ||
process.stdout.write('\u001b[?25l') | ||
if (!args.q) { process.stdout.write('\u001b[?25l') } | ||
} | ||
@@ -112,3 +113,3 @@ | ||
console.log('No stacks, profiling had not begun') | ||
tidy() | ||
tidy(args) | ||
process.exit() | ||
@@ -122,3 +123,3 @@ } | ||
var clock = spawn(__dirname + '/node_modules/.bin/clockface', {stdio: 'inherit'}) | ||
var clock = makeClock(args) | ||
process.on('uncaughtException', function (e) { | ||
@@ -135,3 +136,3 @@ clock.kill() | ||
debug('unable to find map file') | ||
tidy() | ||
tidy(args) | ||
process.exit() | ||
@@ -149,5 +150,5 @@ } | ||
clock.kill() | ||
process.stdout.write('\u001b[K\n') | ||
if (!args.q) { process.stdout.write('\u001b[K\n') } | ||
console.log() | ||
tidy() | ||
tidy(args) | ||
process.exit() | ||
@@ -201,3 +202,3 @@ }) | ||
if (code !== 0 && code !== 143 && code !== 130) { | ||
tidy() | ||
tidy(args) | ||
process.exit(code) | ||
@@ -215,3 +216,3 @@ } | ||
process.stdin.resume() | ||
process.stdout.write('\u001b[?25l') | ||
if (!args.q) { process.stdout.write('\u001b[?25l') } | ||
} | ||
@@ -230,3 +231,3 @@ | ||
var clock = spawn(__dirname + '/node_modules/.bin/clockface', {stdio: 'inherit'}) | ||
var clock = makeClock(args) | ||
process.on('uncaughtException', function (e) { | ||
@@ -252,5 +253,5 @@ clock.kill() | ||
clock.kill() | ||
process.stdout.write('\u001b[K\n') | ||
if (!args.q) { process.stdout.write('\u001b[K\n') } | ||
console.log() | ||
tidy() | ||
tidy(args) | ||
process.exit() | ||
@@ -351,3 +352,3 @@ }) | ||
tidy() | ||
tidy(args) | ||
console.log('file://' + process.cwd() + '/' + folder + '/flamegraph.html', '\n') | ||
@@ -365,5 +366,5 @@ debug('exiting') | ||
global.count = 0 | ||
function tidy () { | ||
function tidy (args) { | ||
debug('tidying up') | ||
process.stdout.write('\u001b[?25h') | ||
if (!args.q) { process.stdout.write('\u001b[?25h') } | ||
@@ -406,1 +407,9 @@ fs.readdirSync('./') | ||
} | ||
function makeClock(args) { | ||
return args.q ? | ||
{kill: noop} : | ||
spawn(__dirname + '/node_modules/.bin/clockface', {stdio: 'inherit'}) | ||
} | ||
function noop () {} |
{ | ||
"name": "0x", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -44,2 +44,5 @@ | ||
-q Only output flamegraph URI | ||
Default: false | ||
--cmd | -c Command Mode - A tool set for processing data in | ||
@@ -46,0 +49,0 @@ the profile folder. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48619418
2512