smipper 37.0.0 → 39.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/init.js +10 -2
- package/dist/processFrame.js +4 -1
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -15,7 +15,8 @@ function init() {
|
|
|
15
15
|
jsc: 0,
|
|
16
16
|
cacheDir: path_1.default.join(os_1.default.homedir(), ".cache", "smipper", "cache"),
|
|
17
17
|
cacheSize: 10,
|
|
18
|
-
sourceMaps: {}
|
|
18
|
+
sourceMaps: {},
|
|
19
|
+
noOriginalUrl: false
|
|
19
20
|
};
|
|
20
21
|
for (const key in process.env) {
|
|
21
22
|
switch (key) {
|
|
@@ -35,9 +36,13 @@ function init() {
|
|
|
35
36
|
}
|
|
36
37
|
break;
|
|
37
38
|
}
|
|
39
|
+
case "SMIPPER_NO_ORIGINAL_URL": {
|
|
40
|
+
smipper.noOriginalUrl = true;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
|
-
const usage = "smipper [stack|-h|--help|-v|--verbose|--version|--jsc|--json|--file=@FILE@|-f=@FILE@|--cache-key=$CACHE_KEY$|--cache-dir=$CACHE_DIR$|--cache-size=$CACHE_SIZE
|
|
45
|
+
const usage = "smipper [stack|-h|--help|-v|--verbose|--version|--jsc|--json|--file=@FILE@|-f=@FILE@|--cache-key=$CACHE_KEY$|--cache-dir=$CACHE_DIR$|--cache-size=$CACHE_SIZE$|--no-original-url|-n|-";
|
|
41
46
|
for (let i = 2; i < process.argv.length; ++i) {
|
|
42
47
|
try {
|
|
43
48
|
const arg = process.argv[i] || "";
|
|
@@ -87,6 +92,9 @@ function init() {
|
|
|
87
92
|
console.log(usage);
|
|
88
93
|
process.exit(0);
|
|
89
94
|
}
|
|
95
|
+
else if (arg === "--no-original-url" || arg == "-n") {
|
|
96
|
+
smipper.noOriginalUrl = true;
|
|
97
|
+
}
|
|
90
98
|
else if (arg === "-") {
|
|
91
99
|
// stdin
|
|
92
100
|
}
|
package/dist/processFrame.js
CHANGED
|
@@ -62,7 +62,10 @@ function processFrame(smipper, functionName, url, line, column) {
|
|
|
62
62
|
else {
|
|
63
63
|
let str;
|
|
64
64
|
if (newUrl) {
|
|
65
|
-
str = `${(0, buildStackLine_1.buildStackLine)(functionName, newUrl, newLine, newColumn)}
|
|
65
|
+
str = `${(0, buildStackLine_1.buildStackLine)(functionName, newUrl, newLine, newColumn)}`;
|
|
66
|
+
if (!smipper.noOriginalUrl) {
|
|
67
|
+
str += ` (${(0, buildStackLine_1.buildStackLine)("", url, line, column)})`;
|
|
68
|
+
}
|
|
66
69
|
}
|
|
67
70
|
else {
|
|
68
71
|
str = (0, buildStackLine_1.buildStackLine)(functionName, url, line, column);
|