@jsenv/test 3.4.2 → 3.4.3
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/jsenv_test.js
CHANGED
|
@@ -4143,26 +4143,28 @@ const formatErrorForTerminal = (
|
|
|
4143
4143
|
error.site.url.startsWith("file:") &&
|
|
4144
4144
|
typeof error.site.line === "number"
|
|
4145
4145
|
) {
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4146
|
+
try {
|
|
4147
|
+
const content = readFileSync(new URL(error.site.url), "utf8");
|
|
4148
|
+
text += generateContentFrame({
|
|
4149
|
+
content,
|
|
4150
|
+
line: error.site.line,
|
|
4151
|
+
column: error.site.column,
|
|
4152
|
+
linesAbove: 2,
|
|
4153
|
+
linesBelow: 0,
|
|
4154
|
+
lineMaxWidth: process.stdout.columns,
|
|
4155
|
+
format: (string, type) => {
|
|
4156
|
+
return {
|
|
4157
|
+
line_number_aside: () => ANSI.color(string, ANSI.GREY),
|
|
4158
|
+
char: () => string,
|
|
4159
|
+
marker_overflow_left: () => ANSI.color(string, ANSI.GREY),
|
|
4160
|
+
marker_overflow_right: () => ANSI.color(string, ANSI.GREY),
|
|
4161
|
+
marker_line: () => ANSI.color(string, ANSI.RED),
|
|
4162
|
+
marker_column: () => ANSI.color(string, ANSI.RED),
|
|
4163
|
+
}[type]();
|
|
4164
|
+
},
|
|
4165
|
+
});
|
|
4166
|
+
text += `\n`;
|
|
4167
|
+
} catch {}
|
|
4166
4168
|
}
|
|
4167
4169
|
}
|
|
4168
4170
|
text += `${error.name}: ${error.message}`;
|
|
@@ -5576,7 +5578,7 @@ const startServerUsingCommand = async (
|
|
|
5576
5578
|
if (timeoutAbortSource.signal.aborted) {
|
|
5577
5579
|
// aborted by timeout
|
|
5578
5580
|
throw new Error(
|
|
5579
|
-
`"${webServer.command}" command did not start a server in less than ${allocatedMs}ms`,
|
|
5581
|
+
`"${webServer.command}" command did not start a server at ${webServer.origin} in less than ${allocatedMs}ms`,
|
|
5580
5582
|
);
|
|
5581
5583
|
}
|
|
5582
5584
|
if (signal.aborted) {
|
package/package.json
CHANGED
|
@@ -25,26 +25,28 @@ export const formatErrorForTerminal = (
|
|
|
25
25
|
error.site.url.startsWith("file:") &&
|
|
26
26
|
typeof error.site.line === "number"
|
|
27
27
|
) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
try {
|
|
29
|
+
const content = readFileSync(new URL(error.site.url), "utf8");
|
|
30
|
+
text += generateContentFrame({
|
|
31
|
+
content,
|
|
32
|
+
line: error.site.line,
|
|
33
|
+
column: error.site.column,
|
|
34
|
+
linesAbove: 2,
|
|
35
|
+
linesBelow: 0,
|
|
36
|
+
lineMaxWidth: process.stdout.columns,
|
|
37
|
+
format: (string, type) => {
|
|
38
|
+
return {
|
|
39
|
+
line_number_aside: () => ANSI.color(string, ANSI.GREY),
|
|
40
|
+
char: () => string,
|
|
41
|
+
marker_overflow_left: () => ANSI.color(string, ANSI.GREY),
|
|
42
|
+
marker_overflow_right: () => ANSI.color(string, ANSI.GREY),
|
|
43
|
+
marker_line: () => ANSI.color(string, ANSI.RED),
|
|
44
|
+
marker_column: () => ANSI.color(string, ANSI.RED),
|
|
45
|
+
}[type]();
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
text += `\n`;
|
|
49
|
+
} catch {}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
text += `${error.name}: ${error.message}`;
|
|
@@ -117,7 +117,7 @@ export const startServerUsingCommand = async (
|
|
|
117
117
|
if (timeoutAbortSource.signal.aborted) {
|
|
118
118
|
// aborted by timeout
|
|
119
119
|
throw new Error(
|
|
120
|
-
`"${webServer.command}" command did not start a server in less than ${allocatedMs}ms`,
|
|
120
|
+
`"${webServer.command}" command did not start a server at ${webServer.origin} in less than ${allocatedMs}ms`,
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
if (signal.aborted) {
|