@visulima/error 4.6.0 → 4.6.2

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/code-frame/index.cjs +6 -136
  3. package/dist/code-frame/index.mjs +6 -131
  4. package/dist/error/index.cjs +1 -25
  5. package/dist/error/index.mjs +1 -8
  6. package/dist/index.cjs +1 -43
  7. package/dist/index.mjs +1 -16
  8. package/dist/packem_shared/NonError-CQn4sdxd.cjs +1 -0
  9. package/dist/packem_shared/NonError-CS10kwil.mjs +1 -0
  10. package/dist/packem_shared/addKnownErrorConstructor-B5dNFGsR.cjs +1 -0
  11. package/dist/packem_shared/addKnownErrorConstructor-BqqnTSZp.mjs +1 -0
  12. package/dist/packem_shared/aiFinder-Be-xHFVO.mjs +1 -0
  13. package/dist/packem_shared/aiFinder-CN0pneE2.cjs +1 -0
  14. package/dist/packem_shared/aiSolutionResponse-C5apAmTu.cjs +10 -0
  15. package/dist/packem_shared/aiSolutionResponse-RD0AK1jh.mjs +10 -0
  16. package/dist/packem_shared/captureRawStackTrace-B9d1821F.cjs +1 -0
  17. package/dist/packem_shared/captureRawStackTrace-CQPNHvBG.mjs +1 -0
  18. package/dist/packem_shared/deserializeError-2C6o7QF7.cjs +1 -0
  19. package/dist/packem_shared/deserializeError-tzZhIV70.mjs +1 -0
  20. package/dist/packem_shared/errorHintFinder-C_g0nvml.mjs +2 -0
  21. package/dist/packem_shared/errorHintFinder-DRCn1Ysx.cjs +2 -0
  22. package/dist/packem_shared/formatStackFrameLine-DD2DUdW0.cjs +2 -0
  23. package/dist/packem_shared/formatStackFrameLine-iU54KA81.mjs +2 -0
  24. package/dist/packem_shared/getErrorCauses-B7_Z_gEF.cjs +1 -0
  25. package/dist/packem_shared/getErrorCauses-D025FGyO.mjs +1 -0
  26. package/dist/packem_shared/index-CLFYRLyq.mjs +1 -0
  27. package/dist/packem_shared/index-CqSGigts.cjs +1 -0
  28. package/dist/packem_shared/indexToLineColumn-B1F7aNZh.mjs +1 -0
  29. package/dist/packem_shared/indexToLineColumn-C_v57REF.cjs +1 -0
  30. package/dist/packem_shared/isVisulimaError-CrvBm0kw.cjs +1 -0
  31. package/dist/packem_shared/isVisulimaError-jVZgumOU.mjs +1 -0
  32. package/dist/packem_shared/parseStacktrace-Dnxnc4PL.mjs +2 -0
  33. package/dist/packem_shared/parseStacktrace-MW4-SLXl.cjs +2 -0
  34. package/dist/packem_shared/renderError-D7R71d_7.mjs +18 -0
  35. package/dist/packem_shared/renderError-D8XJnkIF.cjs +18 -0
  36. package/dist/packem_shared/ruleBasedFinder-B1jRHBM_.cjs +34 -0
  37. package/dist/packem_shared/ruleBasedFinder-P88d0gpK.mjs +34 -0
  38. package/dist/packem_shared/serializeError-7S1IG6zs.cjs +1 -0
  39. package/dist/packem_shared/serializeError-Bc-QciX0.mjs +1 -0
  40. package/dist/solution/ai/ai-prompt.cjs +7 -17
  41. package/dist/solution/ai/ai-prompt.mjs +7 -15
  42. package/dist/solution/ai/index.cjs +1 -13
  43. package/dist/solution/ai/index.mjs +1 -3
  44. package/dist/solution/index.cjs +1 -11
  45. package/dist/solution/index.mjs +1 -2
  46. package/dist/stacktrace/index.cjs +1 -12
  47. package/dist/stacktrace/index.mjs +1 -2
  48. package/package.json +1 -1
  49. package/dist/packem_shared/NonError-BrwMc2LE.mjs +0 -13
  50. package/dist/packem_shared/NonError-DqwGL5Cy.cjs +0 -15
  51. package/dist/packem_shared/addKnownErrorConstructor-DBmmT2OF.mjs +0 -32
  52. package/dist/packem_shared/addKnownErrorConstructor-J1_ZUURa.cjs +0 -39
  53. package/dist/packem_shared/aiFinder-BR9Pq804.cjs +0 -259
  54. package/dist/packem_shared/aiFinder-CFHvOjD8.mjs +0 -257
  55. package/dist/packem_shared/aiSolutionResponse-BaN1M990.mjs +0 -36
  56. package/dist/packem_shared/aiSolutionResponse-Cqi0mFxy.cjs +0 -38
  57. package/dist/packem_shared/captureRawStackTrace-ClSI1tHb.cjs +0 -14
  58. package/dist/packem_shared/captureRawStackTrace-Tl3Rqkat.mjs +0 -12
  59. package/dist/packem_shared/deserializeError-Be3qOGBQ.cjs +0 -120
  60. package/dist/packem_shared/deserializeError-DuzHucBb.mjs +0 -118
  61. package/dist/packem_shared/errorHintFinder-CQy_qIK3.mjs +0 -23
  62. package/dist/packem_shared/errorHintFinder-DZugFHq0.cjs +0 -25
  63. package/dist/packem_shared/formatStackFrameLine-DcXSX--m.cjs +0 -31
  64. package/dist/packem_shared/formatStackFrameLine-DqkmKWH3.mjs +0 -26
  65. package/dist/packem_shared/getErrorCauses-CG_JRE6j.mjs +0 -24
  66. package/dist/packem_shared/getErrorCauses-miTeYJEG.cjs +0 -26
  67. package/dist/packem_shared/index-BmoOJLvu.mjs +0 -12
  68. package/dist/packem_shared/index-C53Tqb7g.cjs +0 -14
  69. package/dist/packem_shared/indexToLineColumn-CKQKtKEK.mjs +0 -52
  70. package/dist/packem_shared/indexToLineColumn-Cro5eT8v.cjs +0 -54
  71. package/dist/packem_shared/isVisulimaError-Bb1_TB6w.cjs +0 -44
  72. package/dist/packem_shared/isVisulimaError-zyd80Gui.mjs +0 -39
  73. package/dist/packem_shared/parseStacktrace-BlguTUcF.mjs +0 -275
  74. package/dist/packem_shared/parseStacktrace-woJgU2XY.cjs +0 -277
  75. package/dist/packem_shared/renderError-Cn8M0fQ3.mjs +0 -180
  76. package/dist/packem_shared/renderError-n3kXGdYj.cjs +0 -184
  77. package/dist/packem_shared/ruleBasedFinder-Cbmc6N7f.mjs +0 -227
  78. package/dist/packem_shared/ruleBasedFinder-CkybTSHw.cjs +0 -229
  79. package/dist/packem_shared/serializeError-DHIelq5o.mjs +0 -144
  80. package/dist/packem_shared/serializeError-Dt7oFM2R.cjs +0 -148
@@ -1,229 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const code = /* @__PURE__ */ __name((s) => `\`\`\`
6
- ${s.trim()}
7
- \`\`\``, "code");
8
- const bash = /* @__PURE__ */ __name((s) => `\`\`\`bash
9
- ${s.trim()}
10
- \`\`\``, "bash");
11
- const ts = /* @__PURE__ */ __name((s) => `\`\`\`ts
12
- ${s.trim()}
13
- \`\`\``, "ts");
14
- const js = /* @__PURE__ */ __name((s) => `\`\`\`js
15
- ${s.trim()}
16
- \`\`\``, "js");
17
- const has = /* @__PURE__ */ __name((message, ...needles) => {
18
- const lower = message.toLowerCase();
19
- return needles.some((n) => lower.includes(n.toLowerCase()));
20
- }, "has");
21
- const rules = [
22
- {
23
- name: "esm-cjs-interop",
24
- test: /* @__PURE__ */ __name((error) => {
25
- const message = (error?.message || String(error || "")).toString();
26
- if (has(
27
- message,
28
- "err_require_esm",
29
- "cannot use import statement outside a module",
30
- "must use import to load es module",
31
- "require() of es module",
32
- "does not provide an export named"
33
- )) {
34
- return {
35
- md: [
36
- "Your project or a dependency may be mixing CommonJS and ES Modules.",
37
- "",
38
- "Try:",
39
- "- Ensure package.json has the correct `type` (either `module` or `commonjs`).",
40
- "- Use dynamic `import()` when requiring ESM from CJS.",
41
- "- Prefer ESM-compatible entrypoints from dependencies.",
42
- "- In Node, align `module` resolution with your bundler config.",
43
- "",
44
- "Check Node resolution:",
45
- bash("node -v\ncat package.json | jq .type"),
46
- "",
47
- "Example dynamic import in CJS:",
48
- js("(async () => { const mod = await import('some-esm'); mod.default(); })();")
49
- ].join("\n"),
50
- title: "ESM/CJS interop"
51
- };
52
- }
53
- return void 0;
54
- }, "test")
55
- },
56
- {
57
- name: "missing-default-export",
58
- test: /* @__PURE__ */ __name((error) => {
59
- const message = (error?.message || String(error || "")).toString();
60
- if (has(message, "default export not found", "has no default export", "does not provide an export named 'default'", "is not exported from")) {
61
- return {
62
- md: [
63
- "Verify your import/export shapes.",
64
- "",
65
- "Default export example:",
66
- ts("export default function Component() {}\n// import Component from './file'"),
67
- "",
68
- "Named export example:",
69
- ts("export function Component() {}\n// import { Component } from './file'")
70
- ].join("\n"),
71
- title: "Export mismatch (default vs named)"
72
- };
73
- }
74
- return void 0;
75
- }, "test")
76
- },
77
- {
78
- name: "port-in-use",
79
- test: /* @__PURE__ */ __name((error) => {
80
- const message = (error?.message || String(error || "")).toString();
81
- if (has(message, "eaddrinuse", "address already in use", "listen eaddrinuse")) {
82
- return {
83
- md: [
84
- "Another process is using the port.",
85
- "",
86
- "Change the port or stop the other process.",
87
- "",
88
- "On macOS/Linux:",
89
- bash("lsof -i :3000\nkill -9 <PID>"),
90
- "",
91
- "On Windows (PowerShell):",
92
- bash("netstat -ano | findstr :3000\ntaskkill /PID <PID> /F")
93
- ].join("\n"),
94
- title: "Port already in use"
95
- };
96
- }
97
- return void 0;
98
- }, "test")
99
- },
100
- {
101
- name: "file-not-found-or-case",
102
- test: /* @__PURE__ */ __name((error, file) => {
103
- const message = (error?.message || String(error || "")).toString();
104
- if (has(message, "enoent", "module not found", "cannot find module")) {
105
- return {
106
- md: [
107
- "Check the import path and filename case (Linux/macOS are case-sensitive).",
108
- "If using TS path aliases, verify `tsconfig.paths` and bundler aliases.",
109
- "",
110
- "Current file:",
111
- code(`${file.file}:${file.line}`)
112
- ].join("\n"),
113
- title: "Missing file or path case mismatch"
114
- };
115
- }
116
- return void 0;
117
- }, "test")
118
- },
119
- {
120
- name: "ts-path-mapping",
121
- test: /* @__PURE__ */ __name((error) => {
122
- const message = (error?.message || String(error || "")).toString();
123
- if (has(message, "ts2307", "cannot find module") || message.includes("TS2307")) {
124
- return {
125
- md: [
126
- "If you use path aliases, align TS `paths` with Vite/Webpack resolve aliases.",
127
- "Ensure file extensions are correct and included in resolver.",
128
- "",
129
- "tsconfig.json excerpt:",
130
- ts(`{
131
- "compilerOptions": {
132
- "baseUrl": ".",
133
- "paths": { "@/*": ["src/*"] }
134
- }
135
- }`)
136
- ].join("\n"),
137
- title: "TypeScript path mapping / resolution"
138
- };
139
- }
140
- return void 0;
141
- }, "test")
142
- },
143
- {
144
- name: "network-dns-enotfound",
145
- test: /* @__PURE__ */ __name((error) => {
146
- const message = (error?.message || String(error || "")).toString();
147
- if (has(message, "enotfound", "getaddrinfo enotfound", "dns", "fetch failed", "ecconnrefused", "econnrefused")) {
148
- return {
149
- md: [
150
- "The host may be unreachable or misconfigured.",
151
- "",
152
- "Try:",
153
- "- Verify the hostname and protocol (http/https).",
154
- "- Check VPN/proxy and firewall.",
155
- "- Confirm the service is running and listening on the expected port.",
156
- "",
157
- bash("ping <host>\nnslookup <host>\ncurl -v http://<host>:<port>")
158
- ].join("\n"),
159
- title: "Network/DNS connection issue"
160
- };
161
- }
162
- return void 0;
163
- }, "test")
164
- },
165
- {
166
- name: "react-hydration-mismatch",
167
- test: /* @__PURE__ */ __name((error) => {
168
- const message = (error?.message || String(error || "")).toString();
169
- if (has(message, "hydration failed", "did not match", "expected server html", "text content does not match")) {
170
- return {
171
- md: [
172
- "Client and server rendered markup differ.",
173
- "",
174
- "Checklist:",
175
- "- Avoid non-deterministic rendering during SSR (dates, random, locale).",
176
- "- Ensure feature flags / env checks are consistent between server and client.",
177
- "- Wrap browser-only code with guards (e.g., check `typeof window !== 'undefined'`).",
178
- "- Ensure data used on server matches client rehydration data."
179
- ].join("\n"),
180
- title: "React hydration mismatch"
181
- };
182
- }
183
- return void 0;
184
- }, "test")
185
- },
186
- {
187
- name: "undefined-property",
188
- test: /* @__PURE__ */ __name((error) => {
189
- const message = (error?.message || String(error || "")).toString();
190
- if (has(message, "cannot read properties of undefined", "reading '")) {
191
- return {
192
- md: [
193
- "A variable or function returned `undefined`.",
194
- "",
195
- "Mitigations:",
196
- "- Add nullish checks before property access.",
197
- "- Validate function return values and input props/state.",
198
- "",
199
- ts("const value = maybe?.prop; // or: if (maybe) { use(maybe.prop) }")
200
- ].join("\n"),
201
- title: "Accessing property of undefined"
202
- };
203
- }
204
- return void 0;
205
- }, "test")
206
- }
207
- ];
208
- const ruleBasedFinder = {
209
- handle: /* @__PURE__ */ __name(async (error, file) => {
210
- try {
211
- const matches = rules.map((r) => {
212
- return { match: r.test(error, file), rule: r };
213
- }).filter((x) => Boolean(x.match));
214
- if (matches.length === 0) {
215
- return void 0;
216
- }
217
- const sections = matches.toSorted((a, b) => (a.match.priority || 0) - (b.match.priority || 0)).map((m) => `#### ${m.match.title}
218
-
219
- ${m.match.md}`).join("\n\n---\n\n");
220
- return { body: sections, header: "### Potential fixes detected" };
221
- } catch {
222
- return void 0;
223
- }
224
- }, "handle"),
225
- name: "ruleBasedHints",
226
- priority: 0
227
- };
228
-
229
- module.exports = ruleBasedFinder;
@@ -1,144 +0,0 @@
1
- import { i as isPlainObject } from './index-BmoOJLvu.mjs';
2
-
3
- const ErrorProto = Object.create(
4
- {},
5
- {
6
- cause: {
7
- enumerable: true,
8
- value: void 0,
9
- writable: true
10
- },
11
- code: {
12
- enumerable: true,
13
- value: void 0,
14
- writable: true
15
- },
16
- errors: {
17
- enumerable: true,
18
- value: void 0,
19
- writable: true
20
- },
21
- message: {
22
- enumerable: true,
23
- value: void 0,
24
- writable: true
25
- },
26
- name: {
27
- enumerable: true,
28
- value: void 0,
29
- writable: true
30
- },
31
- stack: {
32
- enumerable: true,
33
- value: void 0,
34
- writable: true
35
- }
36
- }
37
- );
38
-
39
- var __defProp = Object.defineProperty;
40
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
41
- const toJsonWasCalled = /* @__PURE__ */ new WeakSet();
42
- const toJSON = /* @__PURE__ */ __name((from) => {
43
- toJsonWasCalled.add(from);
44
- const json = from.toJSON();
45
- toJsonWasCalled.delete(from);
46
- return json;
47
- }, "toJSON");
48
- const serializeValue = /* @__PURE__ */ __name((value, seen, depth, options) => {
49
- if (value && value instanceof Uint8Array && value.constructor.name === "Buffer") {
50
- return "[object Buffer]";
51
- }
52
- if (value !== null && typeof value === "object" && typeof value.pipe === "function") {
53
- return "[object Stream]";
54
- }
55
- if (value instanceof Error) {
56
- if (seen.includes(value)) {
57
- return "[Circular]";
58
- }
59
- depth += 1;
60
- return _serialize(value, options, seen, depth);
61
- }
62
- if (options.useToJSON && typeof value.toJSON === "function") {
63
- return value.toJSON();
64
- }
65
- if (typeof value === "object" && value instanceof Date) {
66
- return value.toISOString();
67
- }
68
- if (typeof value === "function") {
69
- return `[Function: ${value.name || "anonymous"}]`;
70
- }
71
- if (isPlainObject(value)) {
72
- depth += 1;
73
- if (options.maxDepth && depth >= options.maxDepth) {
74
- return {};
75
- }
76
- const plainObject = {};
77
- for (const key in value) {
78
- plainObject[key] = serializeValue(value[key], seen, depth, options);
79
- }
80
- return plainObject;
81
- }
82
- try {
83
- return value;
84
- } catch {
85
- return "[Not Available]";
86
- }
87
- }, "serializeValue");
88
- const _serialize = /* @__PURE__ */ __name((error, options, seen, depth) => {
89
- seen.push(error);
90
- if (options.maxDepth === 0) {
91
- return {};
92
- }
93
- if (options.useToJSON && typeof error.toJSON === "function" && !toJsonWasCalled.has(error)) {
94
- return toJSON(error);
95
- }
96
- const protoError = Object.create(ErrorProto);
97
- protoError.name = Object.prototype.toString.call(error.constructor) === "[object Function]" ? error.constructor.name : error.name;
98
- protoError.message = error.message;
99
- protoError.stack = error.stack;
100
- if (Array.isArray(error.errors)) {
101
- const aggregateErrors = [];
102
- for (const aggregateError of error.errors) {
103
- if (!(aggregateError instanceof Error)) {
104
- throw new TypeError("All errors in the 'errors' property must be instances of Error");
105
- }
106
- if (seen.includes(aggregateError)) {
107
- protoError.errors = [];
108
- return protoError;
109
- }
110
- aggregateErrors.push(_serialize(aggregateError, options, seen, depth));
111
- }
112
- protoError.errors = aggregateErrors;
113
- }
114
- if (error.cause instanceof Error && !seen.includes(error.cause)) {
115
- protoError.cause = _serialize(error.cause, options, seen, depth);
116
- }
117
- for (const key in error) {
118
- if (protoError[key] === void 0) {
119
- const value = error[key];
120
- protoError[key] = serializeValue(value, seen, depth, options);
121
- }
122
- }
123
- if (Array.isArray(options.exclude) && options.exclude.length > 0) {
124
- for (const key of options.exclude) {
125
- try {
126
- delete protoError[key];
127
- } catch {
128
- }
129
- }
130
- }
131
- return protoError;
132
- }, "_serialize");
133
- const serialize = /* @__PURE__ */ __name((error, options = {}) => _serialize(
134
- error,
135
- {
136
- exclude: options.exclude ?? [],
137
- maxDepth: options.maxDepth ?? Number.POSITIVE_INFINITY,
138
- useToJSON: options.useToJSON ?? false
139
- },
140
- [],
141
- 0
142
- ), "serialize");
143
-
144
- export { serialize };
@@ -1,148 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
-
5
- const index = require('./index-C53Tqb7g.cjs');
6
-
7
- const ErrorProto = Object.create(
8
- {},
9
- {
10
- cause: {
11
- enumerable: true,
12
- value: void 0,
13
- writable: true
14
- },
15
- code: {
16
- enumerable: true,
17
- value: void 0,
18
- writable: true
19
- },
20
- errors: {
21
- enumerable: true,
22
- value: void 0,
23
- writable: true
24
- },
25
- message: {
26
- enumerable: true,
27
- value: void 0,
28
- writable: true
29
- },
30
- name: {
31
- enumerable: true,
32
- value: void 0,
33
- writable: true
34
- },
35
- stack: {
36
- enumerable: true,
37
- value: void 0,
38
- writable: true
39
- }
40
- }
41
- );
42
-
43
- var __defProp = Object.defineProperty;
44
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
45
- const toJsonWasCalled = /* @__PURE__ */ new WeakSet();
46
- const toJSON = /* @__PURE__ */ __name((from) => {
47
- toJsonWasCalled.add(from);
48
- const json = from.toJSON();
49
- toJsonWasCalled.delete(from);
50
- return json;
51
- }, "toJSON");
52
- const serializeValue = /* @__PURE__ */ __name((value, seen, depth, options) => {
53
- if (value && value instanceof Uint8Array && value.constructor.name === "Buffer") {
54
- return "[object Buffer]";
55
- }
56
- if (value !== null && typeof value === "object" && typeof value.pipe === "function") {
57
- return "[object Stream]";
58
- }
59
- if (value instanceof Error) {
60
- if (seen.includes(value)) {
61
- return "[Circular]";
62
- }
63
- depth += 1;
64
- return _serialize(value, options, seen, depth);
65
- }
66
- if (options.useToJSON && typeof value.toJSON === "function") {
67
- return value.toJSON();
68
- }
69
- if (typeof value === "object" && value instanceof Date) {
70
- return value.toISOString();
71
- }
72
- if (typeof value === "function") {
73
- return `[Function: ${value.name || "anonymous"}]`;
74
- }
75
- if (index.isPlainObject(value)) {
76
- depth += 1;
77
- if (options.maxDepth && depth >= options.maxDepth) {
78
- return {};
79
- }
80
- const plainObject = {};
81
- for (const key in value) {
82
- plainObject[key] = serializeValue(value[key], seen, depth, options);
83
- }
84
- return plainObject;
85
- }
86
- try {
87
- return value;
88
- } catch {
89
- return "[Not Available]";
90
- }
91
- }, "serializeValue");
92
- const _serialize = /* @__PURE__ */ __name((error, options, seen, depth) => {
93
- seen.push(error);
94
- if (options.maxDepth === 0) {
95
- return {};
96
- }
97
- if (options.useToJSON && typeof error.toJSON === "function" && !toJsonWasCalled.has(error)) {
98
- return toJSON(error);
99
- }
100
- const protoError = Object.create(ErrorProto);
101
- protoError.name = Object.prototype.toString.call(error.constructor) === "[object Function]" ? error.constructor.name : error.name;
102
- protoError.message = error.message;
103
- protoError.stack = error.stack;
104
- if (Array.isArray(error.errors)) {
105
- const aggregateErrors = [];
106
- for (const aggregateError of error.errors) {
107
- if (!(aggregateError instanceof Error)) {
108
- throw new TypeError("All errors in the 'errors' property must be instances of Error");
109
- }
110
- if (seen.includes(aggregateError)) {
111
- protoError.errors = [];
112
- return protoError;
113
- }
114
- aggregateErrors.push(_serialize(aggregateError, options, seen, depth));
115
- }
116
- protoError.errors = aggregateErrors;
117
- }
118
- if (error.cause instanceof Error && !seen.includes(error.cause)) {
119
- protoError.cause = _serialize(error.cause, options, seen, depth);
120
- }
121
- for (const key in error) {
122
- if (protoError[key] === void 0) {
123
- const value = error[key];
124
- protoError[key] = serializeValue(value, seen, depth, options);
125
- }
126
- }
127
- if (Array.isArray(options.exclude) && options.exclude.length > 0) {
128
- for (const key of options.exclude) {
129
- try {
130
- delete protoError[key];
131
- } catch {
132
- }
133
- }
134
- }
135
- return protoError;
136
- }, "_serialize");
137
- const serialize = /* @__PURE__ */ __name((error, options = {}) => _serialize(
138
- error,
139
- {
140
- exclude: options.exclude ?? [],
141
- maxDepth: options.maxDepth ?? Number.POSITIVE_INFINITY,
142
- useToJSON: options.useToJSON ?? false
143
- },
144
- [],
145
- 0
146
- ), "serialize");
147
-
148
- exports.serialize = serialize;