@visulima/error 4.4.14 → 4.4.16
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/CHANGELOG.md +31 -0
- package/README.md +2 -1
- package/dist/code-frame/index.cjs +1 -2
- package/dist/code-frame/index.d.ts +2 -2
- package/dist/code-frame/index.mjs +1 -2
- package/dist/error/index.cjs +3 -3
- package/dist/error/index.d.cts +1 -1
- package/dist/error/index.d.mts +1 -1
- package/dist/error/index.d.ts +2 -2
- package/dist/error/index.mjs +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/packem_shared/{captureRawStackTrace-DjD7FUtZ.cjs → captureRawStackTrace-ClSI1tHb.cjs} +1 -1
- package/dist/packem_shared/{captureRawStackTrace-CAQrHENg.mjs → captureRawStackTrace-Tl3Rqkat.mjs} +1 -1
- package/dist/packem_shared/{parseStacktrace-CPbfvO-n.cjs → parseStacktrace-6pFoXW43.cjs} +30 -30
- package/dist/packem_shared/{parseStacktrace-B-BUrkkI.mjs → parseStacktrace-BKGoWCwC.mjs} +30 -30
- package/dist/packem_shared/{renderError-ndNjm7dW.mjs → renderError-BWpM2m6k.mjs} +17 -17
- package/dist/packem_shared/{renderError-ZhN2-BE7.cjs → renderError-CXZTAXig.cjs} +17 -17
- package/dist/packem_shared/{serializeError-C3BTAUm5.cjs → serializeError-CT7s0Ffk.cjs} +7 -7
- package/dist/packem_shared/{serializeError-BNAsxuJ_.mjs → serializeError-DusTUACt.mjs} +7 -7
- package/dist/stacktrace/index.cjs +1 -1
- package/dist/stacktrace/index.mjs +1 -1
- package/package.json +2 -2
- /package/dist/packem_shared/{types-CrVmNoPV.d.mjs → types-CrVmNoPV.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## @visulima/error [4.4.16](https://github.com/visulima/visulima/compare/@visulima/error@4.4.15...@visulima/error@4.4.16) (2025-03-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* **@visulima/path:** upgraded to 1.3.5
|
|
15
|
+
|
|
16
|
+
## @visulima/error [4.4.15](https://github.com/visulima/visulima/compare/@visulima/error@4.4.14...@visulima/error@4.4.15) (2025-01-25)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* fixed wrong node version range in package.json ([4ae2929](https://github.com/visulima/visulima/commit/4ae292984681c71a770e4d4560432f7b7c5a141a))
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* fixed typescript url ([fe65a8c](https://github.com/visulima/visulima/commit/fe65a8c0296ece7ee26474c70d065b06d4d0da89))
|
|
25
|
+
* updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* **@visulima/path:** upgraded to 1.3.4
|
|
31
|
+
|
|
1
32
|
## @visulima/error [4.4.14](https://github.com/visulima/visulima/compare/@visulima/error@4.4.13...@visulima/error@4.4.14) (2025-01-22)
|
|
2
33
|
|
|
3
34
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -430,7 +430,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
430
430
|
The visulima error is open-sourced software licensed under the [MIT][license-url]
|
|
431
431
|
|
|
432
432
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
433
|
-
|
|
433
|
+
|
|
434
|
+
[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
|
|
434
435
|
[license-image]: https://img.shields.io/npm/l/@visulima/error?color=blueviolet&style=for-the-badge
|
|
435
436
|
[license-url]: LICENSE.md "license"
|
|
436
437
|
[npm-image]: https://img.shields.io/npm/v/@visulima/error/latest.svg?style=for-the-badge&logo=npm
|
|
@@ -18,7 +18,7 @@ const process = new Proxy(_process, {
|
|
|
18
18
|
if (property in processShims) {
|
|
19
19
|
return processShims[property];
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return void 0;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -82,7 +82,6 @@ const codeFrame = /* @__PURE__ */ __name((source, loc, options) => {
|
|
|
82
82
|
linesBelow: 3,
|
|
83
83
|
prefix: "",
|
|
84
84
|
showGutter: true,
|
|
85
|
-
showLineNumbers: true,
|
|
86
85
|
tabWidth: 4,
|
|
87
86
|
...options,
|
|
88
87
|
color: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as CodeFrameNodeLocation, b as CodeFrameOptions } from '../packem_shared/types-CrVmNoPV.
|
|
2
|
-
export { C as CodeFrameLocation, c as ColorizeMethod } from '../packem_shared/types-CrVmNoPV.
|
|
1
|
+
import { a as CodeFrameNodeLocation, b as CodeFrameOptions } from '../packem_shared/types-CrVmNoPV.js';
|
|
2
|
+
export { C as CodeFrameLocation, c as ColorizeMethod } from '../packem_shared/types-CrVmNoPV.js';
|
|
3
3
|
|
|
4
4
|
declare const CODE_FRAME_POINTER: string;
|
|
5
5
|
declare const codeFrame: (source: string, loc: CodeFrameNodeLocation, options?: CodeFrameOptions) => string;
|
|
@@ -14,7 +14,7 @@ const process = new Proxy(_process, {
|
|
|
14
14
|
if (property in processShims) {
|
|
15
15
|
return processShims[property];
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return void 0;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -78,7 +78,6 @@ const codeFrame = /* @__PURE__ */ __name((source, loc, options) => {
|
|
|
78
78
|
linesBelow: 3,
|
|
79
79
|
prefix: "",
|
|
80
80
|
showGutter: true,
|
|
81
|
-
showLineNumbers: true,
|
|
82
81
|
tabWidth: 4,
|
|
83
82
|
...options,
|
|
84
83
|
color: {
|
package/dist/error/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
|
-
const captureRawStackTrace = require('../packem_shared/captureRawStackTrace-
|
|
5
|
+
const captureRawStackTrace = require('../packem_shared/captureRawStackTrace-ClSI1tHb.cjs');
|
|
6
6
|
const getErrorCauses = require('../packem_shared/getErrorCauses-miTeYJEG.cjs');
|
|
7
|
-
const renderError = require('../packem_shared/renderError-
|
|
8
|
-
const serializeError = require('../packem_shared/serializeError-
|
|
7
|
+
const renderError = require('../packem_shared/renderError-CXZTAXig.cjs');
|
|
8
|
+
const serializeError = require('../packem_shared/serializeError-CT7s0Ffk.cjs');
|
|
9
9
|
const isVisulimaError = require('../packem_shared/isVisulimaError-BVLWvREw.cjs');
|
|
10
10
|
|
|
11
11
|
|
package/dist/error/index.d.cts
CHANGED
|
@@ -31,7 +31,7 @@ declare class VisulimaError extends Error {
|
|
|
31
31
|
setHint(hint: ErrorHint): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare const getErrorCauses: <E = unknown>(error: E) => E[];
|
|
34
|
+
declare const getErrorCauses: <E = Error | VisulimaError | unknown>(error: E) => E[];
|
|
35
35
|
|
|
36
36
|
type Options$1 = Omit<CodeFrameOptions, "message | prefix"> & {
|
|
37
37
|
color: CodeFrameOptions["color"] & {
|
package/dist/error/index.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ declare class VisulimaError extends Error {
|
|
|
31
31
|
setHint(hint: ErrorHint): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare const getErrorCauses: <E = unknown>(error: E) => E[];
|
|
34
|
+
declare const getErrorCauses: <E = Error | VisulimaError | unknown>(error: E) => E[];
|
|
35
35
|
|
|
36
36
|
type Options$1 = Omit<CodeFrameOptions, "message | prefix"> & {
|
|
37
37
|
color: CodeFrameOptions["color"] & {
|
package/dist/error/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as CodeFrameOptions, c as ColorizeMethod } from '../packem_shared/types-CrVmNoPV.
|
|
1
|
+
import { b as CodeFrameOptions, c as ColorizeMethod } from '../packem_shared/types-CrVmNoPV.js';
|
|
2
2
|
|
|
3
3
|
declare const captureRawStackTrace: () => string | undefined;
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ declare class VisulimaError extends Error {
|
|
|
31
31
|
setHint(hint: ErrorHint): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare const getErrorCauses: <E = unknown>(error: E) => E[];
|
|
34
|
+
declare const getErrorCauses: <E = Error | VisulimaError | unknown>(error: E) => E[];
|
|
35
35
|
|
|
36
36
|
type Options$1 = Omit<CodeFrameOptions, "message | prefix"> & {
|
|
37
37
|
color: CodeFrameOptions["color"] & {
|
package/dist/error/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as captureRawStackTrace } from '../packem_shared/captureRawStackTrace-
|
|
1
|
+
export { default as captureRawStackTrace } from '../packem_shared/captureRawStackTrace-Tl3Rqkat.mjs';
|
|
2
2
|
export { default as getErrorCauses } from '../packem_shared/getErrorCauses-CG_JRE6j.mjs';
|
|
3
|
-
export { renderError } from '../packem_shared/renderError-
|
|
4
|
-
export { serialize as serializeError } from '../packem_shared/serializeError-
|
|
3
|
+
export { renderError } from '../packem_shared/renderError-BWpM2m6k.mjs';
|
|
4
|
+
export { serialize as serializeError } from '../packem_shared/serializeError-DusTUACt.mjs';
|
|
5
5
|
export { VisulimaError, isVisulimaError } from '../packem_shared/isVisulimaError-H6TqEA42.mjs';
|
package/dist/index.cjs
CHANGED
|
@@ -4,12 +4,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const codeFrame_index = require('./code-frame/index.cjs');
|
|
6
6
|
const indexToLineColumn = require('./packem_shared/indexToLineColumn-DjmjeiIY.cjs');
|
|
7
|
-
const captureRawStackTrace = require('./packem_shared/captureRawStackTrace-
|
|
7
|
+
const captureRawStackTrace = require('./packem_shared/captureRawStackTrace-ClSI1tHb.cjs');
|
|
8
8
|
const getErrorCauses = require('./packem_shared/getErrorCauses-miTeYJEG.cjs');
|
|
9
|
-
const parseStacktrace = require('./packem_shared/parseStacktrace-
|
|
9
|
+
const parseStacktrace = require('./packem_shared/parseStacktrace-6pFoXW43.cjs');
|
|
10
10
|
const isVisulimaError = require('./packem_shared/isVisulimaError-BVLWvREw.cjs');
|
|
11
|
-
const renderError = require('./packem_shared/renderError-
|
|
12
|
-
const serializeError = require('./packem_shared/serializeError-
|
|
11
|
+
const renderError = require('./packem_shared/renderError-CXZTAXig.cjs');
|
|
12
|
+
const serializeError = require('./packem_shared/serializeError-CT7s0Ffk.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CODE_FRAME_POINTER, codeFrame } from './code-frame/index.js';
|
|
2
2
|
export { ErrorHint, ErrorLocation, ErrorProperties, ErrorWithCauseSerializerOptions, RenderErrorOptions, SerializedError, VisulimaError, captureRawStackTrace, getErrorCauses, isVisulimaError, renderError, serializeError } from './error/index.js';
|
|
3
3
|
export { Trace, TraceType, parseStacktrace } from './stacktrace/index.js';
|
|
4
|
-
export { C as CodeFrameLocation, a as CodeFrameNodeLocation, b as CodeFrameOptions, c as ColorizeMethod } from './packem_shared/types-CrVmNoPV.
|
|
4
|
+
export { C as CodeFrameLocation, a as CodeFrameNodeLocation, b as CodeFrameOptions, c as ColorizeMethod } from './packem_shared/types-CrVmNoPV.js';
|
|
5
5
|
|
|
6
6
|
declare const indexToLineColumn: (input: number[] | string, index: number, options?: {
|
|
7
7
|
skipChecks: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { CODE_FRAME_POINTER, codeFrame } from './code-frame/index.mjs';
|
|
2
2
|
export { default as indexToLineColumn } from './packem_shared/indexToLineColumn-Dx91YDU1.mjs';
|
|
3
|
-
export { default as captureRawStackTrace } from './packem_shared/captureRawStackTrace-
|
|
3
|
+
export { default as captureRawStackTrace } from './packem_shared/captureRawStackTrace-Tl3Rqkat.mjs';
|
|
4
4
|
export { default as getErrorCauses } from './packem_shared/getErrorCauses-CG_JRE6j.mjs';
|
|
5
|
-
export { default as parseStacktrace } from './packem_shared/parseStacktrace-
|
|
5
|
+
export { default as parseStacktrace } from './packem_shared/parseStacktrace-BKGoWCwC.mjs';
|
|
6
6
|
export { VisulimaError, isVisulimaError } from './packem_shared/isVisulimaError-H6TqEA42.mjs';
|
|
7
|
-
export { renderError } from './packem_shared/renderError-
|
|
8
|
-
export { serialize as serializeError } from './packem_shared/serializeError-
|
|
7
|
+
export { renderError } from './packem_shared/renderError-BWpM2m6k.mjs';
|
|
8
|
+
export { serialize as serializeError } from './packem_shared/serializeError-DusTUACt.mjs';
|
package/dist/packem_shared/{captureRawStackTrace-DjD7FUtZ.cjs → captureRawStackTrace-ClSI1tHb.cjs}
RENAMED
|
@@ -4,7 +4,7 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
5
|
const captureRawStackTrace = /* @__PURE__ */ __name(() => {
|
|
6
6
|
if (!Error.captureStackTrace) {
|
|
7
|
-
return
|
|
7
|
+
return void 0;
|
|
8
8
|
}
|
|
9
9
|
const stack = new Error();
|
|
10
10
|
Error.captureStackTrace(stack);
|
package/dist/packem_shared/{captureRawStackTrace-CAQrHENg.mjs → captureRawStackTrace-Tl3Rqkat.mjs}
RENAMED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
const captureRawStackTrace = /* @__PURE__ */ __name(() => {
|
|
4
4
|
if (!Error.captureStackTrace) {
|
|
5
|
-
return
|
|
5
|
+
return void 0;
|
|
6
6
|
}
|
|
7
7
|
const stack = new Error();
|
|
8
8
|
Error.captureStackTrace(stack);
|
|
@@ -44,31 +44,31 @@ const parseNode = /* @__PURE__ */ __name((line) => {
|
|
|
44
44
|
debugLog(`parse nested node error stack line: "${line}"`, `found: ${JSON.stringify(nestedNode)}`);
|
|
45
45
|
const split = nestedNode[2].split(":");
|
|
46
46
|
return {
|
|
47
|
-
column: split[2] ? +split[2] :
|
|
47
|
+
column: split[2] ? +split[2] : void 0,
|
|
48
48
|
file: split[0],
|
|
49
|
-
line: split[1] ? +split[1] :
|
|
49
|
+
line: split[1] ? +split[1] : void 0,
|
|
50
50
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
51
51
|
methodName: nestedNode[1] || UNKNOWN_FUNCTION,
|
|
52
52
|
raw: line,
|
|
53
|
-
type:
|
|
53
|
+
type: void 0
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
const node = NODE_REGEX.exec(line);
|
|
57
57
|
if (node) {
|
|
58
58
|
debugLog(`parse node error stack line: "${line}"`, `found: ${JSON.stringify(node)}`);
|
|
59
59
|
const trace = {
|
|
60
|
-
column: node[4] ? +node[4] :
|
|
61
|
-
file: node[2] ? node[2].replace(/at\s/, "") :
|
|
62
|
-
line: node[3] ? +node[3] :
|
|
60
|
+
column: node[4] ? +node[4] : void 0,
|
|
61
|
+
file: node[2] ? node[2].replace(/at\s/, "") : void 0,
|
|
62
|
+
line: node[3] ? +node[3] : void 0,
|
|
63
63
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
64
64
|
methodName: node[1] || UNKNOWN_FUNCTION,
|
|
65
65
|
raw: line,
|
|
66
|
-
type: line.startsWith("internal") ? "internal" :
|
|
66
|
+
type: line.startsWith("internal") ? "internal" : void 0
|
|
67
67
|
};
|
|
68
68
|
parseMapped(trace, node[2] + ":" + node[3] + ":" + node[4]);
|
|
69
69
|
return trace;
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return void 0;
|
|
72
72
|
}, "parseNode");
|
|
73
73
|
const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
74
74
|
const parts = CHROMIUM_REGEX.exec(line);
|
|
@@ -91,9 +91,9 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
91
91
|
}
|
|
92
92
|
if (subMatch[2]) {
|
|
93
93
|
evalOrigin = {
|
|
94
|
-
column: subMatch[4] ? +subMatch[4] :
|
|
94
|
+
column: subMatch[4] ? +subMatch[4] : void 0,
|
|
95
95
|
file: subMatch[2],
|
|
96
|
-
line: subMatch[3] ? +subMatch[3] :
|
|
96
|
+
line: subMatch[3] ? +subMatch[3] : void 0,
|
|
97
97
|
methodName: "eval",
|
|
98
98
|
raw: line,
|
|
99
99
|
type: "eval"
|
|
@@ -103,14 +103,14 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
103
103
|
const windowsSubMatch = WINDOWS_EVAL_REGEX.exec(line);
|
|
104
104
|
if (windowsSubMatch) {
|
|
105
105
|
windowsParts = {
|
|
106
|
-
column: windowsSubMatch[5] ? +windowsSubMatch[5] :
|
|
106
|
+
column: windowsSubMatch[5] ? +windowsSubMatch[5] : void 0,
|
|
107
107
|
file: windowsSubMatch[3],
|
|
108
|
-
line: windowsSubMatch[4] ? +windowsSubMatch[4] :
|
|
108
|
+
line: windowsSubMatch[4] ? +windowsSubMatch[4] : void 0
|
|
109
109
|
};
|
|
110
110
|
evalOrigin = {
|
|
111
|
-
column: windowsSubMatch[8] ? +windowsSubMatch[8] :
|
|
111
|
+
column: windowsSubMatch[8] ? +windowsSubMatch[8] : void 0,
|
|
112
112
|
file: windowsSubMatch[2],
|
|
113
|
-
line: windowsSubMatch[7] ? +windowsSubMatch[7] :
|
|
113
|
+
line: windowsSubMatch[7] ? +windowsSubMatch[7] : void 0,
|
|
114
114
|
methodName: "eval",
|
|
115
115
|
raw: windowsSubMatch[0],
|
|
116
116
|
type: "eval"
|
|
@@ -124,13 +124,13 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
124
124
|
parts[2]
|
|
125
125
|
);
|
|
126
126
|
const trace = {
|
|
127
|
-
column: parts[4] ? +parts[4] :
|
|
127
|
+
column: parts[4] ? +parts[4] : void 0,
|
|
128
128
|
evalOrigin,
|
|
129
129
|
file,
|
|
130
|
-
line: parts[3] ? +parts[3] :
|
|
130
|
+
line: parts[3] ? +parts[3] : void 0,
|
|
131
131
|
methodName,
|
|
132
132
|
raw: line,
|
|
133
|
-
type: isEval ? "eval" : isNative ? "native" :
|
|
133
|
+
type: isEval ? "eval" : isNative ? "native" : void 0
|
|
134
134
|
};
|
|
135
135
|
if (windowsParts) {
|
|
136
136
|
trace.column = windowsParts.column;
|
|
@@ -141,7 +141,7 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
141
141
|
}
|
|
142
142
|
return trace;
|
|
143
143
|
}
|
|
144
|
-
return
|
|
144
|
+
return void 0;
|
|
145
145
|
}, "parseChromium");
|
|
146
146
|
const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
147
147
|
const parts = GECKO_REGEX.exec(line);
|
|
@@ -153,9 +153,9 @@ const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
153
153
|
if (isEval && subMatch) {
|
|
154
154
|
parts[3] = subMatch[1];
|
|
155
155
|
evalOrigin = {
|
|
156
|
-
column: parts[5] ? +parts[5] :
|
|
156
|
+
column: parts[5] ? +parts[5] : void 0,
|
|
157
157
|
file: parts[3],
|
|
158
|
-
line: parts[4] ? +parts[4] :
|
|
158
|
+
line: parts[4] ? +parts[4] : void 0,
|
|
159
159
|
methodName: "eval",
|
|
160
160
|
raw: line,
|
|
161
161
|
type: "eval"
|
|
@@ -186,10 +186,10 @@ const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
186
186
|
line: lineNumber,
|
|
187
187
|
methodName,
|
|
188
188
|
raw: line,
|
|
189
|
-
type: isEval ? "eval" : file.includes("[native code]") ? "native" :
|
|
189
|
+
type: isEval ? "eval" : file.includes("[native code]") ? "native" : void 0
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
return
|
|
192
|
+
return void 0;
|
|
193
193
|
}, "parseGecko");
|
|
194
194
|
const parseFirefox = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
195
195
|
const parts = FIREFOX_REGEX.exec(line);
|
|
@@ -197,31 +197,31 @@ const parseFirefox = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
197
197
|
if (!isEval && parts) {
|
|
198
198
|
debugLog(`parse firefox error stack line: "${line}"`, `found: ${JSON.stringify(parts)}`);
|
|
199
199
|
return {
|
|
200
|
-
column: parts[4] ? +parts[4] : topFrameMeta?.column ??
|
|
200
|
+
column: parts[4] ? +parts[4] : topFrameMeta?.column ?? void 0,
|
|
201
201
|
file: parts[2],
|
|
202
|
-
line: parts[3] ? +parts[3] : topFrameMeta?.line ??
|
|
202
|
+
line: parts[3] ? +parts[3] : topFrameMeta?.line ?? void 0,
|
|
203
203
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
204
204
|
methodName: parts[1] || UNKNOWN_FUNCTION,
|
|
205
205
|
raw: line,
|
|
206
|
-
type:
|
|
206
|
+
type: void 0
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
return
|
|
209
|
+
return void 0;
|
|
210
210
|
}, "parseFirefox");
|
|
211
211
|
const parseReactAndroidNative = /* @__PURE__ */ __name((line) => {
|
|
212
212
|
const parts = REACT_ANDROID_NATIVE_REGEX.exec(line);
|
|
213
213
|
if (parts) {
|
|
214
214
|
debugLog(`parse react android native error stack line: "${line}"`, `found: ${JSON.stringify(parts)}`);
|
|
215
215
|
return {
|
|
216
|
-
column: parts[3] ? +parts[3] :
|
|
216
|
+
column: parts[3] ? +parts[3] : void 0,
|
|
217
217
|
file: parts[1],
|
|
218
|
-
line: parts[2] ? +parts[2] :
|
|
218
|
+
line: parts[2] ? +parts[2] : void 0,
|
|
219
219
|
methodName: UNKNOWN_FUNCTION,
|
|
220
220
|
raw: line,
|
|
221
|
-
type:
|
|
221
|
+
type: void 0
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
return
|
|
224
|
+
return void 0;
|
|
225
225
|
}, "parseReactAndroidNative");
|
|
226
226
|
const parse = /* @__PURE__ */ __name((error, { filter, frameLimit = 50 } = {}) => {
|
|
227
227
|
let lines = (error.stacktrace ?? error.stack ?? "").split("\n").map((line) => {
|
|
@@ -42,31 +42,31 @@ const parseNode = /* @__PURE__ */ __name((line) => {
|
|
|
42
42
|
debugLog(`parse nested node error stack line: "${line}"`, `found: ${JSON.stringify(nestedNode)}`);
|
|
43
43
|
const split = nestedNode[2].split(":");
|
|
44
44
|
return {
|
|
45
|
-
column: split[2] ? +split[2] :
|
|
45
|
+
column: split[2] ? +split[2] : void 0,
|
|
46
46
|
file: split[0],
|
|
47
|
-
line: split[1] ? +split[1] :
|
|
47
|
+
line: split[1] ? +split[1] : void 0,
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
49
49
|
methodName: nestedNode[1] || UNKNOWN_FUNCTION,
|
|
50
50
|
raw: line,
|
|
51
|
-
type:
|
|
51
|
+
type: void 0
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
const node = NODE_REGEX.exec(line);
|
|
55
55
|
if (node) {
|
|
56
56
|
debugLog(`parse node error stack line: "${line}"`, `found: ${JSON.stringify(node)}`);
|
|
57
57
|
const trace = {
|
|
58
|
-
column: node[4] ? +node[4] :
|
|
59
|
-
file: node[2] ? node[2].replace(/at\s/, "") :
|
|
60
|
-
line: node[3] ? +node[3] :
|
|
58
|
+
column: node[4] ? +node[4] : void 0,
|
|
59
|
+
file: node[2] ? node[2].replace(/at\s/, "") : void 0,
|
|
60
|
+
line: node[3] ? +node[3] : void 0,
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
62
62
|
methodName: node[1] || UNKNOWN_FUNCTION,
|
|
63
63
|
raw: line,
|
|
64
|
-
type: line.startsWith("internal") ? "internal" :
|
|
64
|
+
type: line.startsWith("internal") ? "internal" : void 0
|
|
65
65
|
};
|
|
66
66
|
parseMapped(trace, node[2] + ":" + node[3] + ":" + node[4]);
|
|
67
67
|
return trace;
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return void 0;
|
|
70
70
|
}, "parseNode");
|
|
71
71
|
const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
72
72
|
const parts = CHROMIUM_REGEX.exec(line);
|
|
@@ -89,9 +89,9 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
89
89
|
}
|
|
90
90
|
if (subMatch[2]) {
|
|
91
91
|
evalOrigin = {
|
|
92
|
-
column: subMatch[4] ? +subMatch[4] :
|
|
92
|
+
column: subMatch[4] ? +subMatch[4] : void 0,
|
|
93
93
|
file: subMatch[2],
|
|
94
|
-
line: subMatch[3] ? +subMatch[3] :
|
|
94
|
+
line: subMatch[3] ? +subMatch[3] : void 0,
|
|
95
95
|
methodName: "eval",
|
|
96
96
|
raw: line,
|
|
97
97
|
type: "eval"
|
|
@@ -101,14 +101,14 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
101
101
|
const windowsSubMatch = WINDOWS_EVAL_REGEX.exec(line);
|
|
102
102
|
if (windowsSubMatch) {
|
|
103
103
|
windowsParts = {
|
|
104
|
-
column: windowsSubMatch[5] ? +windowsSubMatch[5] :
|
|
104
|
+
column: windowsSubMatch[5] ? +windowsSubMatch[5] : void 0,
|
|
105
105
|
file: windowsSubMatch[3],
|
|
106
|
-
line: windowsSubMatch[4] ? +windowsSubMatch[4] :
|
|
106
|
+
line: windowsSubMatch[4] ? +windowsSubMatch[4] : void 0
|
|
107
107
|
};
|
|
108
108
|
evalOrigin = {
|
|
109
|
-
column: windowsSubMatch[8] ? +windowsSubMatch[8] :
|
|
109
|
+
column: windowsSubMatch[8] ? +windowsSubMatch[8] : void 0,
|
|
110
110
|
file: windowsSubMatch[2],
|
|
111
|
-
line: windowsSubMatch[7] ? +windowsSubMatch[7] :
|
|
111
|
+
line: windowsSubMatch[7] ? +windowsSubMatch[7] : void 0,
|
|
112
112
|
methodName: "eval",
|
|
113
113
|
raw: windowsSubMatch[0],
|
|
114
114
|
type: "eval"
|
|
@@ -122,13 +122,13 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
122
122
|
parts[2]
|
|
123
123
|
);
|
|
124
124
|
const trace = {
|
|
125
|
-
column: parts[4] ? +parts[4] :
|
|
125
|
+
column: parts[4] ? +parts[4] : void 0,
|
|
126
126
|
evalOrigin,
|
|
127
127
|
file,
|
|
128
|
-
line: parts[3] ? +parts[3] :
|
|
128
|
+
line: parts[3] ? +parts[3] : void 0,
|
|
129
129
|
methodName,
|
|
130
130
|
raw: line,
|
|
131
|
-
type: isEval ? "eval" : isNative ? "native" :
|
|
131
|
+
type: isEval ? "eval" : isNative ? "native" : void 0
|
|
132
132
|
};
|
|
133
133
|
if (windowsParts) {
|
|
134
134
|
trace.column = windowsParts.column;
|
|
@@ -139,7 +139,7 @@ const parseChromium = /* @__PURE__ */ __name((line) => {
|
|
|
139
139
|
}
|
|
140
140
|
return trace;
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return void 0;
|
|
143
143
|
}, "parseChromium");
|
|
144
144
|
const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
145
145
|
const parts = GECKO_REGEX.exec(line);
|
|
@@ -151,9 +151,9 @@ const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
151
151
|
if (isEval && subMatch) {
|
|
152
152
|
parts[3] = subMatch[1];
|
|
153
153
|
evalOrigin = {
|
|
154
|
-
column: parts[5] ? +parts[5] :
|
|
154
|
+
column: parts[5] ? +parts[5] : void 0,
|
|
155
155
|
file: parts[3],
|
|
156
|
-
line: parts[4] ? +parts[4] :
|
|
156
|
+
line: parts[4] ? +parts[4] : void 0,
|
|
157
157
|
methodName: "eval",
|
|
158
158
|
raw: line,
|
|
159
159
|
type: "eval"
|
|
@@ -184,10 +184,10 @@ const parseGecko = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
184
184
|
line: lineNumber,
|
|
185
185
|
methodName,
|
|
186
186
|
raw: line,
|
|
187
|
-
type: isEval ? "eval" : file.includes("[native code]") ? "native" :
|
|
187
|
+
type: isEval ? "eval" : file.includes("[native code]") ? "native" : void 0
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
return
|
|
190
|
+
return void 0;
|
|
191
191
|
}, "parseGecko");
|
|
192
192
|
const parseFirefox = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
193
193
|
const parts = FIREFOX_REGEX.exec(line);
|
|
@@ -195,31 +195,31 @@ const parseFirefox = /* @__PURE__ */ __name((line, topFrameMeta) => {
|
|
|
195
195
|
if (!isEval && parts) {
|
|
196
196
|
debugLog(`parse firefox error stack line: "${line}"`, `found: ${JSON.stringify(parts)}`);
|
|
197
197
|
return {
|
|
198
|
-
column: parts[4] ? +parts[4] : topFrameMeta?.column ??
|
|
198
|
+
column: parts[4] ? +parts[4] : topFrameMeta?.column ?? void 0,
|
|
199
199
|
file: parts[2],
|
|
200
|
-
line: parts[3] ? +parts[3] : topFrameMeta?.line ??
|
|
200
|
+
line: parts[3] ? +parts[3] : topFrameMeta?.line ?? void 0,
|
|
201
201
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
202
202
|
methodName: parts[1] || UNKNOWN_FUNCTION,
|
|
203
203
|
raw: line,
|
|
204
|
-
type:
|
|
204
|
+
type: void 0
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return void 0;
|
|
208
208
|
}, "parseFirefox");
|
|
209
209
|
const parseReactAndroidNative = /* @__PURE__ */ __name((line) => {
|
|
210
210
|
const parts = REACT_ANDROID_NATIVE_REGEX.exec(line);
|
|
211
211
|
if (parts) {
|
|
212
212
|
debugLog(`parse react android native error stack line: "${line}"`, `found: ${JSON.stringify(parts)}`);
|
|
213
213
|
return {
|
|
214
|
-
column: parts[3] ? +parts[3] :
|
|
214
|
+
column: parts[3] ? +parts[3] : void 0,
|
|
215
215
|
file: parts[1],
|
|
216
|
-
line: parts[2] ? +parts[2] :
|
|
216
|
+
line: parts[2] ? +parts[2] : void 0,
|
|
217
217
|
methodName: UNKNOWN_FUNCTION,
|
|
218
218
|
raw: line,
|
|
219
|
-
type:
|
|
219
|
+
type: void 0
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
return
|
|
222
|
+
return void 0;
|
|
223
223
|
}, "parseReactAndroidNative");
|
|
224
224
|
const parse = /* @__PURE__ */ __name((error, { filter, frameLimit = 50 } = {}) => {
|
|
225
225
|
let lines = (error.stacktrace ?? error.stack ?? "").split("\n").map((line) => {
|
|
@@ -3,7 +3,7 @@ import { relative } from 'node:path';
|
|
|
3
3
|
import { cwd } from 'node:process';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { codeFrame } from '../code-frame/index.mjs';
|
|
6
|
-
import parse from './parseStacktrace-
|
|
6
|
+
import parse from './parseStacktrace-BKGoWCwC.mjs';
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -22,8 +22,8 @@ const getRelativePath = /* @__PURE__ */ __name((filePath, cwdPath) => {
|
|
|
22
22
|
}, "getRelativePath");
|
|
23
23
|
const getMessage = /* @__PURE__ */ __name((error, { color, hideErrorTitle, indentation, prefix }, deep) => getPrefix(prefix, indentation, deep) + (hideErrorTitle ? color.title(error.message) : color.title(error.name + (error.message ? ": " + error.message : ""))) + "\n", "getMessage");
|
|
24
24
|
const getHint = /* @__PURE__ */ __name((error, { color, indentation, prefix }, deep) => {
|
|
25
|
-
if (error.hint ===
|
|
26
|
-
return
|
|
25
|
+
if (error.hint === void 0) {
|
|
26
|
+
return void 0;
|
|
27
27
|
}
|
|
28
28
|
const spaces = getPrefix(prefix, indentation, deep);
|
|
29
29
|
let message = "";
|
|
@@ -43,12 +43,12 @@ const getMainFrame = /* @__PURE__ */ __name((trace, { color, cwd: cwdPath, displ
|
|
|
43
43
|
fileLine(trace.line + "");
|
|
44
44
|
}, "getMainFrame");
|
|
45
45
|
const getCode = /* @__PURE__ */ __name((trace, { color, indentation, linesAbove, linesBelow, prefix, showGutter, showLineNumbers, tabWidth }, deep) => {
|
|
46
|
-
if (trace.file ===
|
|
47
|
-
return
|
|
46
|
+
if (trace.file === void 0) {
|
|
47
|
+
return void 0;
|
|
48
48
|
}
|
|
49
49
|
const filePath = trace.file.replace("file://", "");
|
|
50
50
|
if (!existsSync(filePath)) {
|
|
51
|
-
return
|
|
51
|
+
return void 0;
|
|
52
52
|
}
|
|
53
53
|
const fileContent = readFileSync(filePath, "utf8");
|
|
54
54
|
return codeFrame(
|
|
@@ -61,7 +61,7 @@ const getCode = /* @__PURE__ */ __name((trace, { color, indentation, linesAbove,
|
|
|
61
61
|
}, "getCode");
|
|
62
62
|
const getErrors = /* @__PURE__ */ __name((error, options, deep) => {
|
|
63
63
|
if (error.errors.length === 0) {
|
|
64
|
-
return
|
|
64
|
+
return void 0;
|
|
65
65
|
}
|
|
66
66
|
let message = getPrefix(options.prefix, options.indentation, deep) + "Errors:\n\n";
|
|
67
67
|
let first = true;
|
|
@@ -94,7 +94,7 @@ const getCause = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
94
94
|
message += getMainFrame(mainFrame, options, deep);
|
|
95
95
|
if (!options.hideErrorCauseCodeView) {
|
|
96
96
|
const code = getCode(mainFrame, options, deep);
|
|
97
|
-
if (code !==
|
|
97
|
+
if (code !== void 0) {
|
|
98
98
|
message += "\n" + code;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -103,7 +103,7 @@ const getCause = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
103
103
|
message += "\n" + getCause(cause, options, deep + 1);
|
|
104
104
|
} else if (cause instanceof AggregateError) {
|
|
105
105
|
const errors = getErrors(cause, options, deep);
|
|
106
|
-
if (errors !==
|
|
106
|
+
if (errors !== void 0) {
|
|
107
107
|
message += "\n" + errors;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -114,7 +114,7 @@ const internalRenderError = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
114
114
|
const config = {
|
|
115
115
|
cwd: cwd(),
|
|
116
116
|
displayShortPath: false,
|
|
117
|
-
filterStacktrace:
|
|
117
|
+
filterStacktrace: void 0,
|
|
118
118
|
framesMaxLimit: Number.POSITIVE_INFINITY,
|
|
119
119
|
hideErrorCauseCodeView: false,
|
|
120
120
|
hideErrorCodeView: false,
|
|
@@ -146,17 +146,17 @@ const internalRenderError = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
146
146
|
});
|
|
147
147
|
const mainFrame = stack.shift();
|
|
148
148
|
return [
|
|
149
|
-
options.hideMessage ?
|
|
149
|
+
options.hideMessage ? void 0 : getMessage(error, config, deep),
|
|
150
150
|
getHint(error, config, deep),
|
|
151
|
-
mainFrame ? getMainFrame(mainFrame, config, deep) :
|
|
152
|
-
mainFrame && !config.hideErrorCodeView ? getCode(mainFrame, config, deep) :
|
|
153
|
-
error instanceof AggregateError ? getErrors(error, config, deep) :
|
|
154
|
-
error.cause ===
|
|
155
|
-
stack.length > 0 ? getStacktrace(stack, config) :
|
|
151
|
+
mainFrame ? getMainFrame(mainFrame, config, deep) : void 0,
|
|
152
|
+
mainFrame && !config.hideErrorCodeView ? getCode(mainFrame, config, deep) : void 0,
|
|
153
|
+
error instanceof AggregateError ? getErrors(error, config, deep) : void 0,
|
|
154
|
+
error.cause === void 0 ? void 0 : getCause(error, config, deep),
|
|
155
|
+
stack.length > 0 ? getStacktrace(stack, config) : void 0
|
|
156
156
|
].filter(Boolean).join("\n").replaceAll("\\", "/");
|
|
157
157
|
}, "internalRenderError");
|
|
158
158
|
const renderError = /* @__PURE__ */ __name((error, options = {}) => {
|
|
159
|
-
if (options.framesMaxLimit !==
|
|
159
|
+
if (options.framesMaxLimit !== void 0 && options.framesMaxLimit <= 0) {
|
|
160
160
|
throw new RangeError("The 'framesMaxLimit' option must be a positive number");
|
|
161
161
|
}
|
|
162
162
|
return internalRenderError(error, options, 0);
|
|
@@ -7,7 +7,7 @@ const node_path = require('node:path');
|
|
|
7
7
|
const node_process = require('node:process');
|
|
8
8
|
const node_url = require('node:url');
|
|
9
9
|
const codeFrame_index = require('../code-frame/index.cjs');
|
|
10
|
-
const parseStacktrace = require('./parseStacktrace-
|
|
10
|
+
const parseStacktrace = require('./parseStacktrace-6pFoXW43.cjs');
|
|
11
11
|
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -26,8 +26,8 @@ const getRelativePath = /* @__PURE__ */ __name((filePath, cwdPath) => {
|
|
|
26
26
|
}, "getRelativePath");
|
|
27
27
|
const getMessage = /* @__PURE__ */ __name((error, { color, hideErrorTitle, indentation, prefix }, deep) => getPrefix(prefix, indentation, deep) + (hideErrorTitle ? color.title(error.message) : color.title(error.name + (error.message ? ": " + error.message : ""))) + "\n", "getMessage");
|
|
28
28
|
const getHint = /* @__PURE__ */ __name((error, { color, indentation, prefix }, deep) => {
|
|
29
|
-
if (error.hint ===
|
|
30
|
-
return
|
|
29
|
+
if (error.hint === void 0) {
|
|
30
|
+
return void 0;
|
|
31
31
|
}
|
|
32
32
|
const spaces = getPrefix(prefix, indentation, deep);
|
|
33
33
|
let message = "";
|
|
@@ -47,12 +47,12 @@ const getMainFrame = /* @__PURE__ */ __name((trace, { color, cwd: cwdPath, displ
|
|
|
47
47
|
fileLine(trace.line + "");
|
|
48
48
|
}, "getMainFrame");
|
|
49
49
|
const getCode = /* @__PURE__ */ __name((trace, { color, indentation, linesAbove, linesBelow, prefix, showGutter, showLineNumbers, tabWidth }, deep) => {
|
|
50
|
-
if (trace.file ===
|
|
51
|
-
return
|
|
50
|
+
if (trace.file === void 0) {
|
|
51
|
+
return void 0;
|
|
52
52
|
}
|
|
53
53
|
const filePath = trace.file.replace("file://", "");
|
|
54
54
|
if (!node_fs.existsSync(filePath)) {
|
|
55
|
-
return
|
|
55
|
+
return void 0;
|
|
56
56
|
}
|
|
57
57
|
const fileContent = node_fs.readFileSync(filePath, "utf8");
|
|
58
58
|
return codeFrame_index.codeFrame(
|
|
@@ -65,7 +65,7 @@ const getCode = /* @__PURE__ */ __name((trace, { color, indentation, linesAbove,
|
|
|
65
65
|
}, "getCode");
|
|
66
66
|
const getErrors = /* @__PURE__ */ __name((error, options, deep) => {
|
|
67
67
|
if (error.errors.length === 0) {
|
|
68
|
-
return
|
|
68
|
+
return void 0;
|
|
69
69
|
}
|
|
70
70
|
let message = getPrefix(options.prefix, options.indentation, deep) + "Errors:\n\n";
|
|
71
71
|
let first = true;
|
|
@@ -98,7 +98,7 @@ const getCause = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
98
98
|
message += getMainFrame(mainFrame, options, deep);
|
|
99
99
|
if (!options.hideErrorCauseCodeView) {
|
|
100
100
|
const code = getCode(mainFrame, options, deep);
|
|
101
|
-
if (code !==
|
|
101
|
+
if (code !== void 0) {
|
|
102
102
|
message += "\n" + code;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -107,7 +107,7 @@ const getCause = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
107
107
|
message += "\n" + getCause(cause, options, deep + 1);
|
|
108
108
|
} else if (cause instanceof AggregateError) {
|
|
109
109
|
const errors = getErrors(cause, options, deep);
|
|
110
|
-
if (errors !==
|
|
110
|
+
if (errors !== void 0) {
|
|
111
111
|
message += "\n" + errors;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -118,7 +118,7 @@ const internalRenderError = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
118
118
|
const config = {
|
|
119
119
|
cwd: node_process.cwd(),
|
|
120
120
|
displayShortPath: false,
|
|
121
|
-
filterStacktrace:
|
|
121
|
+
filterStacktrace: void 0,
|
|
122
122
|
framesMaxLimit: Number.POSITIVE_INFINITY,
|
|
123
123
|
hideErrorCauseCodeView: false,
|
|
124
124
|
hideErrorCodeView: false,
|
|
@@ -150,17 +150,17 @@ const internalRenderError = /* @__PURE__ */ __name((error, options, deep) => {
|
|
|
150
150
|
});
|
|
151
151
|
const mainFrame = stack.shift();
|
|
152
152
|
return [
|
|
153
|
-
options.hideMessage ?
|
|
153
|
+
options.hideMessage ? void 0 : getMessage(error, config, deep),
|
|
154
154
|
getHint(error, config, deep),
|
|
155
|
-
mainFrame ? getMainFrame(mainFrame, config, deep) :
|
|
156
|
-
mainFrame && !config.hideErrorCodeView ? getCode(mainFrame, config, deep) :
|
|
157
|
-
error instanceof AggregateError ? getErrors(error, config, deep) :
|
|
158
|
-
error.cause ===
|
|
159
|
-
stack.length > 0 ? getStacktrace(stack, config) :
|
|
155
|
+
mainFrame ? getMainFrame(mainFrame, config, deep) : void 0,
|
|
156
|
+
mainFrame && !config.hideErrorCodeView ? getCode(mainFrame, config, deep) : void 0,
|
|
157
|
+
error instanceof AggregateError ? getErrors(error, config, deep) : void 0,
|
|
158
|
+
error.cause === void 0 ? void 0 : getCause(error, config, deep),
|
|
159
|
+
stack.length > 0 ? getStacktrace(stack, config) : void 0
|
|
160
160
|
].filter(Boolean).join("\n").replaceAll("\\", "/");
|
|
161
161
|
}, "internalRenderError");
|
|
162
162
|
const renderError = /* @__PURE__ */ __name((error, options = {}) => {
|
|
163
|
-
if (options.framesMaxLimit !==
|
|
163
|
+
if (options.framesMaxLimit !== void 0 && options.framesMaxLimit <= 0) {
|
|
164
164
|
throw new RangeError("The 'framesMaxLimit' option must be a positive number");
|
|
165
165
|
}
|
|
166
166
|
return internalRenderError(error, options, 0);
|
|
@@ -18,32 +18,32 @@ const ErrorProto = Object.create(
|
|
|
18
18
|
{
|
|
19
19
|
cause: {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
value:
|
|
21
|
+
value: void 0,
|
|
22
22
|
writable: true
|
|
23
23
|
},
|
|
24
24
|
code: {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
value:
|
|
26
|
+
value: void 0,
|
|
27
27
|
writable: true
|
|
28
28
|
},
|
|
29
29
|
errors: {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
value:
|
|
31
|
+
value: void 0,
|
|
32
32
|
writable: true
|
|
33
33
|
},
|
|
34
34
|
message: {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
value:
|
|
36
|
+
value: void 0,
|
|
37
37
|
writable: true
|
|
38
38
|
},
|
|
39
39
|
name: {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
value:
|
|
41
|
+
value: void 0,
|
|
42
42
|
writable: true
|
|
43
43
|
},
|
|
44
44
|
stack: {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
value:
|
|
46
|
+
value: void 0,
|
|
47
47
|
writable: true
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -128,7 +128,7 @@ const _serialize = /* @__PURE__ */ __name((error, options, seen, depth) => {
|
|
|
128
128
|
protoError.cause = _serialize(error.cause, options, seen, depth);
|
|
129
129
|
}
|
|
130
130
|
for (const key in error) {
|
|
131
|
-
if (protoError[key] ===
|
|
131
|
+
if (protoError[key] === void 0) {
|
|
132
132
|
const value = error[key];
|
|
133
133
|
protoError[key] = serializeValue(value, seen, depth, options);
|
|
134
134
|
}
|
|
@@ -14,32 +14,32 @@ const ErrorProto = Object.create(
|
|
|
14
14
|
{
|
|
15
15
|
cause: {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
value:
|
|
17
|
+
value: void 0,
|
|
18
18
|
writable: true
|
|
19
19
|
},
|
|
20
20
|
code: {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
value:
|
|
22
|
+
value: void 0,
|
|
23
23
|
writable: true
|
|
24
24
|
},
|
|
25
25
|
errors: {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
value:
|
|
27
|
+
value: void 0,
|
|
28
28
|
writable: true
|
|
29
29
|
},
|
|
30
30
|
message: {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
value:
|
|
32
|
+
value: void 0,
|
|
33
33
|
writable: true
|
|
34
34
|
},
|
|
35
35
|
name: {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
value:
|
|
37
|
+
value: void 0,
|
|
38
38
|
writable: true
|
|
39
39
|
},
|
|
40
40
|
stack: {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
value:
|
|
42
|
+
value: void 0,
|
|
43
43
|
writable: true
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -124,7 +124,7 @@ const _serialize = /* @__PURE__ */ __name((error, options, seen, depth) => {
|
|
|
124
124
|
protoError.cause = _serialize(error.cause, options, seen, depth);
|
|
125
125
|
}
|
|
126
126
|
for (const key in error) {
|
|
127
|
-
if (protoError[key] ===
|
|
127
|
+
if (protoError[key] === void 0) {
|
|
128
128
|
const value = error[key];
|
|
129
129
|
protoError[key] = serializeValue(value, seen, depth, options);
|
|
130
130
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
|
-
const parseStacktrace = require('../packem_shared/parseStacktrace-
|
|
5
|
+
const parseStacktrace = require('../packem_shared/parseStacktrace-6pFoXW43.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as parseStacktrace } from '../packem_shared/parseStacktrace-
|
|
1
|
+
export { default as parseStacktrace } from '../packem_shared/parseStacktrace-BKGoWCwC.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/error",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.16",
|
|
4
4
|
"description": "Error with more than just a message, stacktrace parsing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"LICENSE.md"
|
|
132
132
|
],
|
|
133
133
|
"engines": {
|
|
134
|
-
"node": ">=18
|
|
134
|
+
"node": ">=18.0.0 <=23.x"
|
|
135
135
|
},
|
|
136
136
|
"os": [
|
|
137
137
|
"darwin",
|
|
File without changes
|