New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stacktracify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stacktracify - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+26
-18
index.js

@@ -11,21 +11,21 @@ #!/usr/bin/env node

const cli = meow(`
Usage
$ stacktracify <map-path>
Usage
$ stacktracify <map-path>
Options
Options
--file, -f (default is read from clipboard)
Examples
$ stacktracify /path/to/js.map --file /path/to/my-stacktrace.txt
Examples
$ stacktracify /path/to/js.map --file /path/to/my-stacktrace.txt
`, {
flags: {
file: {
type: 'string',
alias: 'f',
}
}
flags: {
file: {
type: 'string',
alias: 'f',
},
},
});
const file = cli.flags.file;
const { file } = cli.flags;

@@ -53,9 +53,17 @@ (async () => {

stack.forEach(({ lineNumber, column }) => {
const pos = smc.originalPositionFor({ line: lineNumber, column });
if (pos && pos.line != null) {
console.log(` at ${pos.name || ''} (${pos.source}:${pos.line}:${pos.column})`);
stack.forEach(({ methodName, lineNumber, column }) => {
try {
if (lineNumber == null || lineNumber < 1) {
console.log(` at ${methodName || ''}`);
} else {
const pos = smc.originalPositionFor({ line: lineNumber, column });
if (pos && pos.line != null) {
console.log(` at ${pos.name || ''} (${pos.source}:${pos.line}:${pos.column})`);
}
// console.log('src', smc.sourceContentFor(pos.source));
}
} catch (err) {
console.log(` at FAILED_TO_PARSE_LINE`);
}
// console.log('src', smc.sourceContentFor(pos.source));
});

@@ -62,0 +70,0 @@ } catch (err) {

{
"name": "stacktracify",
"version": "1.0.2",
"version": "1.0.3",
"description": "Make unreadable production stacktraces readable using source maps",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -45,2 +45,3 @@ # stacktracify

- https://github.com/gabmontes/source-map-cli (only takes one line at a time)
- https://github.com/gabmontes/source-map-cli (only takes one line at a time)
- https://github.com/janekp/mapstrace (not a CLI, not easy to use for any stack trace)