effect-errors 1.7.28 → 1.7.30
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/cjs/capture-errors.js +18 -21
- package/cjs/capture-errors.js.map +1 -1
- package/cjs/index.js +20 -69
- package/cjs/index.js.map +1 -1
- package/cjs/logic/effects/fs/fs-error.js +4 -6
- package/cjs/logic/effects/fs/fs-error.js.map +1 -1
- package/cjs/logic/effects/fs/fs-extra.effects.js +20 -45
- package/cjs/logic/effects/fs/fs-extra.effects.js.map +1 -1
- package/cjs/logic/errors/capture-errors-from-cause.js +10 -13
- package/cjs/logic/errors/capture-errors-from-cause.js.map +1 -1
- package/cjs/logic/errors/extract-error-details.js +53 -57
- package/cjs/logic/errors/extract-error-details.js.map +1 -1
- package/cjs/logic/errors/parse-error.js +17 -19
- package/cjs/logic/errors/parse-error.js.map +1 -1
- package/cjs/logic/pretty-printing/format-failures-title.js +11 -14
- package/cjs/logic/pretty-printing/format-failures-title.js.map +1 -1
- package/cjs/logic/pretty-printing/format-span-attributes.js +38 -51
- package/cjs/logic/pretty-printing/format-span-attributes.js.map +1 -1
- package/cjs/logic/pretty-printing/maybe-print-node-stacktrace.js +13 -19
- package/cjs/logic/pretty-printing/maybe-print-node-stacktrace.js.map +1 -1
- package/cjs/logic/pretty-printing/maybe-print-span-attributes.js +18 -26
- package/cjs/logic/pretty-printing/maybe-print-span-attributes.js.map +1 -1
- package/cjs/logic/pretty-printing/maybe-warn-about-plain-strings.js +9 -14
- package/cjs/logic/pretty-printing/maybe-warn-about-plain-strings.js.map +1 -1
- package/cjs/logic/pretty-printing/print-effect-stacktrace.js +12 -19
- package/cjs/logic/pretty-printing/print-effect-stacktrace.js.map +1 -1
- package/cjs/logic/spans/get-span-attributes.js +16 -25
- package/cjs/logic/spans/get-span-attributes.js.map +1 -1
- package/cjs/logic/spans/get-span-duration.js +10 -15
- package/cjs/logic/spans/get-span-duration.js.map +1 -1
- package/cjs/logic/spans/maybe-add-error-to-spans-stack.js +13 -16
- package/cjs/logic/spans/maybe-add-error-to-spans-stack.js.map +1 -1
- package/cjs/logic/spans/spans-stack-trailing-char.js +6 -11
- package/cjs/logic/spans/spans-stack-trailing-char.js.map +1 -1
- package/cjs/logic/spans/split-spans-attributes-by-type.js +12 -15
- package/cjs/logic/spans/split-spans-attributes-by-type.js.map +1 -1
- package/cjs/logic/stack/filter-stack.js +14 -17
- package/cjs/logic/stack/filter-stack.js.map +1 -1
- package/cjs/logic/stack/stack-regex.js +4 -7
- package/cjs/logic/stack/stack-regex.js.map +1 -1
- package/cjs/logic/strip-cwd-path.js +3 -6
- package/cjs/logic/strip-cwd-path.js.map +1 -1
- package/cjs/logic/util/big-int-replacer.js +8 -11
- package/cjs/logic/util/big-int-replacer.js.map +1 -1
- package/cjs/package.json +1 -0
- package/cjs/pretty-print.js +34 -40
- package/cjs/pretty-print.js.map +1 -1
- package/cjs/runners/run-promise.js +11 -14
- package/cjs/runners/run-promise.js.map +1 -1
- package/cjs/runners/run-sync.js +10 -13
- package/cjs/runners/run-sync.js.map +1 -1
- package/cjs/source-maps/get-error-location-from-file-path.js +11 -18
- package/cjs/source-maps/get-error-location-from-file-path.js.map +1 -1
- package/cjs/source-maps/get-error-related-sources.js +22 -29
- package/cjs/source-maps/get-error-related-sources.js.map +1 -1
- package/cjs/source-maps/get-source-code.js +18 -22
- package/cjs/source-maps/get-source-code.js.map +1 -1
- package/cjs/source-maps/get-sources-from-map-file.js +42 -45
- package/cjs/source-maps/get-sources-from-map-file.js.map +1 -1
- package/cjs/source-maps/get-sources-from-span.js +36 -48
- package/cjs/source-maps/get-sources-from-span.js.map +1 -1
- package/cjs/source-maps/get-sources-from-stack.js +16 -19
- package/cjs/source-maps/get-sources-from-stack.js.map +1 -1
- package/cjs/source-maps/maybe-map-sourcemaps.js +24 -25
- package/cjs/source-maps/maybe-map-sourcemaps.js.map +1 -1
- package/cjs/source-maps/transform-raw-error.js +30 -48
- package/cjs/source-maps/transform-raw-error.js.map +1 -1
- package/cjs/types/pretty-error.type.js +13 -16
- package/cjs/types/pretty-error.type.js.map +1 -1
- package/cjs/types/pretty-print-options.type.js +5 -8
- package/cjs/types/pretty-print-options.type.js.map +1 -1
- package/dts/capture-errors.d.ts +0 -1
- package/dts/index.d.ts +0 -1
- package/dts/logic/effects/fs/fs-error.d.ts +0 -1
- package/dts/logic/effects/fs/fs-extra.effects.d.ts +0 -1
- package/dts/logic/errors/capture-errors-from-cause.d.ts +0 -1
- package/dts/logic/errors/extract-error-details.d.ts +0 -1
- package/dts/logic/errors/parse-error.d.ts +0 -1
- package/dts/logic/pretty-printing/format-failures-title.d.ts +0 -1
- package/dts/logic/pretty-printing/format-span-attributes.d.ts +0 -1
- package/dts/logic/pretty-printing/maybe-print-node-stacktrace.d.ts +0 -1
- package/dts/logic/pretty-printing/maybe-print-span-attributes.d.ts +0 -1
- package/dts/logic/pretty-printing/maybe-warn-about-plain-strings.d.ts +0 -1
- package/dts/logic/pretty-printing/print-effect-stacktrace.d.ts +0 -1
- package/dts/logic/spans/get-span-attributes.d.ts +0 -1
- package/dts/logic/spans/get-span-duration.d.ts +0 -1
- package/dts/logic/spans/maybe-add-error-to-spans-stack.d.ts +0 -1
- package/dts/logic/spans/spans-stack-trailing-char.d.ts +0 -1
- package/dts/logic/spans/split-spans-attributes-by-type.d.ts +0 -1
- package/dts/logic/stack/filter-stack.d.ts +0 -1
- package/dts/logic/stack/stack-regex.d.ts +0 -1
- package/dts/logic/strip-cwd-path.d.ts +0 -1
- package/dts/logic/util/big-int-replacer.d.ts +0 -1
- package/dts/pretty-print.d.ts +0 -1
- package/dts/runners/run-promise.d.ts +0 -1
- package/dts/runners/run-sync.d.ts +0 -1
- package/dts/source-maps/get-error-location-from-file-path.d.ts +0 -1
- package/dts/source-maps/get-error-related-sources.d.ts +0 -1
- package/dts/source-maps/get-source-code.d.ts +0 -1
- package/dts/source-maps/get-sources-from-map-file.d.ts +0 -1
- package/dts/source-maps/get-sources-from-span.d.ts +0 -1
- package/dts/source-maps/get-sources-from-stack.d.ts +0 -1
- package/dts/source-maps/maybe-map-sourcemaps.d.ts +0 -1
- package/dts/source-maps/transform-raw-error.d.ts +0 -1
- package/dts/types/pretty-error.type.d.ts +0 -1
- package/dts/types/pretty-print-options.type.d.ts +0 -1
- package/esm/capture-errors.js +12 -12
- package/esm/capture-errors.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/logic/effects/fs/fs-error.js +2 -1
- package/esm/logic/effects/fs/fs-error.js.map +1 -1
- package/esm/logic/effects/fs/fs-extra.effects.js +12 -32
- package/esm/logic/effects/fs/fs-extra.effects.js.map +1 -1
- package/esm/logic/errors/capture-errors-from-cause.js +7 -7
- package/esm/logic/errors/capture-errors-from-cause.js.map +1 -1
- package/esm/logic/errors/extract-error-details.js +50 -51
- package/esm/logic/errors/extract-error-details.js.map +1 -1
- package/esm/logic/errors/parse-error.js +13 -12
- package/esm/logic/errors/parse-error.js.map +1 -1
- package/esm/logic/pretty-printing/format-failures-title.js +6 -4
- package/esm/logic/pretty-printing/format-failures-title.js.map +1 -1
- package/esm/logic/pretty-printing/format-span-attributes.js +28 -36
- package/esm/logic/pretty-printing/format-span-attributes.js.map +1 -1
- package/esm/logic/pretty-printing/maybe-print-node-stacktrace.js +7 -8
- package/esm/logic/pretty-printing/maybe-print-node-stacktrace.js.map +1 -1
- package/esm/logic/pretty-printing/maybe-print-span-attributes.js +12 -15
- package/esm/logic/pretty-printing/maybe-print-span-attributes.js.map +1 -1
- package/esm/logic/pretty-printing/maybe-warn-about-plain-strings.js +4 -4
- package/esm/logic/pretty-printing/maybe-warn-about-plain-strings.js.map +1 -1
- package/esm/logic/pretty-printing/print-effect-stacktrace.js +6 -8
- package/esm/logic/pretty-printing/print-effect-stacktrace.js.map +1 -1
- package/esm/logic/spans/get-span-attributes.js +10 -14
- package/esm/logic/spans/get-span-attributes.js.map +1 -1
- package/esm/logic/spans/get-span-duration.js +5 -5
- package/esm/logic/spans/get-span-duration.js.map +1 -1
- package/esm/logic/spans/maybe-add-error-to-spans-stack.js +11 -11
- package/esm/logic/spans/maybe-add-error-to-spans-stack.js.map +1 -1
- package/esm/logic/spans/spans-stack-trailing-char.js +1 -1
- package/esm/logic/spans/spans-stack-trailing-char.js.map +1 -1
- package/esm/logic/spans/split-spans-attributes-by-type.js +11 -11
- package/esm/logic/spans/split-spans-attributes-by-type.js.map +1 -1
- package/esm/logic/stack/filter-stack.js +10 -10
- package/esm/logic/stack/filter-stack.js.map +1 -1
- package/esm/logic/stack/stack-regex.js.map +1 -1
- package/esm/logic/strip-cwd-path.js +2 -2
- package/esm/logic/strip-cwd-path.js.map +1 -1
- package/esm/logic/util/big-int-replacer.js +7 -7
- package/esm/logic/util/big-int-replacer.js.map +1 -1
- package/esm/package.json +1 -0
- package/esm/pretty-print.js +20 -21
- package/esm/pretty-print.js.map +1 -1
- package/esm/runners/run-promise.js +8 -8
- package/esm/runners/run-promise.js.map +1 -1
- package/esm/runners/run-sync.js +7 -7
- package/esm/runners/run-sync.js.map +1 -1
- package/esm/source-maps/get-error-location-from-file-path.js +9 -13
- package/esm/source-maps/get-error-location-from-file-path.js.map +1 -1
- package/esm/source-maps/get-error-related-sources.js +18 -22
- package/esm/source-maps/get-error-related-sources.js.map +1 -1
- package/esm/source-maps/get-source-code.js +15 -16
- package/esm/source-maps/get-source-code.js.map +1 -1
- package/esm/source-maps/get-sources-from-map-file.js +34 -32
- package/esm/source-maps/get-sources-from-map-file.js.map +1 -1
- package/esm/source-maps/get-sources-from-span.js +31 -40
- package/esm/source-maps/get-sources-from-span.js.map +1 -1
- package/esm/source-maps/get-sources-from-stack.js +11 -11
- package/esm/source-maps/get-sources-from-stack.js.map +1 -1
- package/esm/source-maps/maybe-map-sourcemaps.js +20 -18
- package/esm/source-maps/maybe-map-sourcemaps.js.map +1 -1
- package/esm/source-maps/transform-raw-error.js +23 -38
- package/esm/source-maps/transform-raw-error.js.map +1 -1
- package/esm/types/pretty-error.type.js +12 -12
- package/esm/types/pretty-error.type.js.map +1 -1
- package/esm/types/pretty-print-options.type.js +3 -3
- package/esm/types/pretty-print-options.type.js.map +1 -1
- package/package.json +11 -10
- package/dts/capture-errors.d.ts.map +0 -1
- package/dts/index.d.ts.map +0 -1
- package/dts/logic/effects/fs/fs-error.d.ts.map +0 -1
- package/dts/logic/effects/fs/fs-extra.effects.d.ts.map +0 -1
- package/dts/logic/errors/capture-errors-from-cause.d.ts.map +0 -1
- package/dts/logic/errors/extract-error-details.d.ts.map +0 -1
- package/dts/logic/errors/parse-error.d.ts.map +0 -1
- package/dts/logic/pretty-printing/format-failures-title.d.ts.map +0 -1
- package/dts/logic/pretty-printing/format-span-attributes.d.ts.map +0 -1
- package/dts/logic/pretty-printing/maybe-print-node-stacktrace.d.ts.map +0 -1
- package/dts/logic/pretty-printing/maybe-print-span-attributes.d.ts.map +0 -1
- package/dts/logic/pretty-printing/maybe-warn-about-plain-strings.d.ts.map +0 -1
- package/dts/logic/pretty-printing/print-effect-stacktrace.d.ts.map +0 -1
- package/dts/logic/spans/get-span-attributes.d.ts.map +0 -1
- package/dts/logic/spans/get-span-duration.d.ts.map +0 -1
- package/dts/logic/spans/maybe-add-error-to-spans-stack.d.ts.map +0 -1
- package/dts/logic/spans/spans-stack-trailing-char.d.ts.map +0 -1
- package/dts/logic/spans/split-spans-attributes-by-type.d.ts.map +0 -1
- package/dts/logic/stack/filter-stack.d.ts.map +0 -1
- package/dts/logic/stack/stack-regex.d.ts.map +0 -1
- package/dts/logic/strip-cwd-path.d.ts.map +0 -1
- package/dts/logic/util/big-int-replacer.d.ts.map +0 -1
- package/dts/pretty-print.d.ts.map +0 -1
- package/dts/runners/run-promise.d.ts.map +0 -1
- package/dts/runners/run-sync.d.ts.map +0 -1
- package/dts/source-maps/get-error-location-from-file-path.d.ts.map +0 -1
- package/dts/source-maps/get-error-related-sources.d.ts.map +0 -1
- package/dts/source-maps/get-source-code.d.ts.map +0 -1
- package/dts/source-maps/get-sources-from-map-file.d.ts.map +0 -1
- package/dts/source-maps/get-sources-from-span.d.ts.map +0 -1
- package/dts/source-maps/get-sources-from-stack.d.ts.map +0 -1
- package/dts/source-maps/maybe-map-sourcemaps.d.ts.map +0 -1
- package/dts/source-maps/transform-raw-error.d.ts.map +0 -1
- package/dts/types/pretty-error.type.d.ts.map +0 -1
- package/dts/types/pretty-print-options.type.d.ts.map +0 -1
- package/esm/tsconfig-prod.tsbuildinfo +0 -1
|
@@ -1,54 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getSourcesFromSpan = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const getSourcesFromSpan = ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
const split_spans_attributes_by_type_js_1 = require("../logic/spans/split-spans-attributes-by-type.js");
|
|
6
|
+
const maybe_map_sourcemaps_js_1 = require("./maybe-map-sourcemaps.js");
|
|
7
|
+
const getSourcesFromSpan = ({ span, sources, location, }) => (0, effect_1.pipe)(effect_1.Effect.gen(function* () {
|
|
8
|
+
if (span === undefined) {
|
|
9
|
+
return {
|
|
10
|
+
spans: [],
|
|
11
|
+
sources,
|
|
12
|
+
location,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const spans = [];
|
|
16
|
+
let current = span;
|
|
17
|
+
while (current !== undefined && current._tag === 'Span') {
|
|
18
|
+
const { name, attributes: allAttributes, status } = current;
|
|
19
|
+
const { attributes, stacktrace } = (0, split_spans_attributes_by_type_js_1.splitSpansAttributesByTypes)(allAttributes);
|
|
20
|
+
const sourcesOrLocation = yield* (0, maybe_map_sourcemaps_js_1.maybeMapSourcemaps)(stacktrace);
|
|
21
|
+
const duration = status._tag === 'Ended'
|
|
22
|
+
? +`${(status.endTime - status.startTime) / BigInt(1000000)}`
|
|
23
|
+
: undefined;
|
|
24
|
+
sources.push(...sourcesOrLocation.filter((el) => el._tag === 'sources'));
|
|
25
|
+
location.push(...sourcesOrLocation.filter((el) => el._tag === 'location'));
|
|
26
|
+
spans.push({
|
|
27
|
+
name,
|
|
28
|
+
attributes: Object.fromEntries(attributes),
|
|
29
|
+
durationInMilliseconds: duration,
|
|
30
|
+
startTime: status.startTime,
|
|
31
|
+
endTime: status._tag === 'Ended' ? status.endTime : undefined,
|
|
32
|
+
});
|
|
33
|
+
current = effect_1.Option.getOrUndefined(current.parent);
|
|
34
|
+
}
|
|
16
35
|
return {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
spans,
|
|
37
|
+
location,
|
|
38
|
+
sources,
|
|
20
39
|
};
|
|
21
|
-
|
|
22
|
-
const spans = [];
|
|
23
|
-
let current = span;
|
|
24
|
-
while (current !== undefined && current._tag === 'Span') {
|
|
25
|
-
const {
|
|
26
|
-
name,
|
|
27
|
-
attributes: allAttributes,
|
|
28
|
-
status
|
|
29
|
-
} = current;
|
|
30
|
-
const {
|
|
31
|
-
attributes,
|
|
32
|
-
stacktrace
|
|
33
|
-
} = (0, _splitSpansAttributesByType.splitSpansAttributesByTypes)(allAttributes);
|
|
34
|
-
const sourcesOrLocation = yield* (0, _maybeMapSourcemaps.maybeMapSourcemaps)(stacktrace);
|
|
35
|
-
const duration = status._tag === 'Ended' ? +`${(status.endTime - status.startTime) / BigInt(1000000)}` : undefined;
|
|
36
|
-
sources.push(...sourcesOrLocation.filter(el => el._tag === 'sources'));
|
|
37
|
-
location.push(...sourcesOrLocation.filter(el => el._tag === 'location'));
|
|
38
|
-
spans.push({
|
|
39
|
-
name,
|
|
40
|
-
attributes: Object.fromEntries(attributes),
|
|
41
|
-
durationInMilliseconds: duration,
|
|
42
|
-
startTime: status.startTime,
|
|
43
|
-
endTime: status._tag === 'Ended' ? status.endTime : undefined
|
|
44
|
-
});
|
|
45
|
-
current = _effect.Option.getOrUndefined(current.parent);
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
spans,
|
|
49
|
-
location,
|
|
50
|
-
sources
|
|
51
|
-
};
|
|
52
|
-
}), _effect.Effect.withSpan('get-sources-from-span'));
|
|
40
|
+
}), effect_1.Effect.withSpan('get-sources-from-span'));
|
|
53
41
|
exports.getSourcesFromSpan = getSourcesFromSpan;
|
|
54
42
|
//# sourceMappingURL=get-sources-from-span.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources-from-span.js","
|
|
1
|
+
{"version":3,"file":"get-sources-from-span.js","sourceRoot":"","sources":["../../../src/source-maps/get-sources-from-span.ts"],"names":[],"mappings":";;;AAAA,mCAA8C;AAG9C,wGAA+F;AAM/F,uEAA+D;AAExD,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,QAAQ,GAKT,EAAE,EAAE,CACH,IAAA,aAAI,EACF,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO;YACL,KAAK,EAAE,EAAE;YACT,OAAO;YACP,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,IAAI,OAAO,GAA+B,IAAI,CAAC;IAC/C,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACxD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAE5D,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAC9B,IAAA,+DAA2B,EAAC,aAAa,CAAC,CAAC;QAE7C,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,IAAA,4CAAkB,EAAC,UAAU,CAAC,CAAC;QAEhE,MAAM,QAAQ,GACZ,MAAM,CAAC,IAAI,KAAK,OAAO;YACrB,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE;YAC7D,CAAC,CAAC,SAAS,CAAC;QAEhB,OAAO,CAAC,IAAI,CACV,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAC3D,CAAC;QACF,QAAQ,CAAC,IAAI,CACX,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAC5D,CAAC;QACF,KAAK,CAAC,IAAI,CAAC;YACT,IAAI;YACJ,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;YAC1C,sBAAsB,EAAE,QAAQ;YAChC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,OAAO,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;SAC9D,CAAC,CAAC;QAEH,OAAO,GAAG,eAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,OAAO;QACL,KAAK;QACL,QAAQ;QACR,OAAO;KACR,CAAC;AACJ,CAAC,CAAC,EACF,eAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CACzC,CAAC;AA3DS,QAAA,kBAAkB,sBA2D3B"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getSourcesFromStack = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const getSourcesFromStack = maybeStack => (0,
|
|
11
|
-
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
const maybe_add_error_to_spans_stack_js_1 = require("../logic/spans/maybe-add-error-to-spans-stack.js");
|
|
6
|
+
const maybe_map_sourcemaps_js_1 = require("./maybe-map-sourcemaps.js");
|
|
7
|
+
const getSourcesFromStack = (maybeStack) => (0, effect_1.pipe)(effect_1.Effect.gen(function* () {
|
|
8
|
+
if (maybeStack === undefined) {
|
|
9
|
+
return {
|
|
10
|
+
sources: [],
|
|
11
|
+
location: [],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const relevantStackEntries = (0, maybe_add_error_to_spans_stack_js_1.removeNodeModulesEntriesFromStack)(maybeStack);
|
|
15
|
+
const sourcesOrLocation = yield* (0, maybe_map_sourcemaps_js_1.maybeMapSourcemaps)(relevantStackEntries);
|
|
12
16
|
return {
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
sources: sourcesOrLocation.filter((el) => el._tag === 'sources'),
|
|
18
|
+
location: sourcesOrLocation.filter((el) => el._tag === 'location'),
|
|
15
19
|
};
|
|
16
|
-
|
|
17
|
-
const relevantStackEntries = (0, _maybeAddErrorToSpansStack.removeNodeModulesEntriesFromStack)(maybeStack);
|
|
18
|
-
const sourcesOrLocation = yield* (0, _maybeMapSourcemaps.maybeMapSourcemaps)(relevantStackEntries);
|
|
19
|
-
return {
|
|
20
|
-
sources: sourcesOrLocation.filter(el => el._tag === 'sources'),
|
|
21
|
-
location: sourcesOrLocation.filter(el => el._tag === 'location')
|
|
22
|
-
};
|
|
23
|
-
}), _effect.Effect.withSpan('get-sources-from-stack'));
|
|
20
|
+
}), effect_1.Effect.withSpan('get-sources-from-stack'));
|
|
24
21
|
exports.getSourcesFromStack = getSourcesFromStack;
|
|
25
22
|
//# sourceMappingURL=get-sources-from-stack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sources-from-stack.js","
|
|
1
|
+
{"version":3,"file":"get-sources-from-stack.js","sourceRoot":"","sources":["../../../src/source-maps/get-sources-from-stack.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEtC,wGAAqG;AAErG,uEAA+D;AAExD,MAAM,mBAAmB,GAAG,CAAC,UAA8B,EAAE,EAAE,CACpE,IAAA,aAAI,EACF,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IAED,MAAM,oBAAoB,GACxB,IAAA,qEAAiC,EAAC,UAAU,CAAC,CAAC;IAChD,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,IAAA,4CAAkB,EAAC,oBAAoB,CAAC,CAAC;IAE1E,OAAO;QACL,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC;QAChE,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC;KACnE,CAAC;AACJ,CAAC,CAAC,EACF,eAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAC1C,CAAC;AApBS,QAAA,mBAAmB,uBAoB5B"}
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.maybeMapSourcemaps = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const maybeMapSourcemaps = stacktrace => (0,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
const stack_regex_js_1 = require("../logic/stack/stack-regex.js");
|
|
6
|
+
const get_error_related_sources_js_1 = require("./get-error-related-sources.js");
|
|
7
|
+
const maybeMapSourcemaps = (stacktrace) => (0, effect_1.pipe)(effect_1.Effect.forEach(stacktrace, (stackLine) => effect_1.Effect.gen(function* () {
|
|
8
|
+
const chunks = stackLine.trimStart().split(' ');
|
|
9
|
+
const mapFileReportedPath = chunks.length === 2
|
|
10
|
+
? chunks[1]
|
|
11
|
+
: chunks[chunks.length - 1].slice(1, -1);
|
|
12
|
+
const details = yield* (0, get_error_related_sources_js_1.getErrorRelatedSources)(mapFileReportedPath);
|
|
13
|
+
if (details === undefined) {
|
|
14
|
+
return {
|
|
15
|
+
_tag: 'stack-entry',
|
|
16
|
+
runPath: stackLine.replaceAll(stack_regex_js_1.stackAtRegex, 'at '),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (details._tag === 'location') {
|
|
20
|
+
return details;
|
|
21
|
+
}
|
|
22
|
+
const regex = new RegExp(`${process.cwd()}/node_modules/`);
|
|
23
|
+
if (details.sourcesPath?.match(regex)) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
21
26
|
return details;
|
|
22
|
-
|
|
23
|
-
const regex = new RegExp(`${process.cwd()}/node_modules/`);
|
|
24
|
-
if (details.sourcesPath?.match(regex)) {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
return details;
|
|
28
|
-
})), _effect.Effect.map(array => array.filter(maybeSources => maybeSources !== undefined)));
|
|
27
|
+
})), effect_1.Effect.map((array) => array.filter((maybeSources) => maybeSources !== undefined)));
|
|
29
28
|
exports.maybeMapSourcemaps = maybeMapSourcemaps;
|
|
30
29
|
//# sourceMappingURL=maybe-map-sourcemaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybe-map-sourcemaps.js","
|
|
1
|
+
{"version":3,"file":"maybe-map-sourcemaps.js","sourceRoot":"","sources":["../../../src/source-maps/maybe-map-sourcemaps.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAGtC,kEAA6D;AAE7D,iFAAwE;AAgBjE,MAAM,kBAAkB,GAAG,CAChC,UAAoB,EAC0B,EAAE,CAChD,IAAA,aAAI,EACF,eAAM,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE,CACvC,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,MAAM,mBAAmB,GACvB,MAAM,CAAC,MAAM,KAAK,CAAC;QACjB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACX,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,IAAA,qDAAsB,EAAC,mBAAmB,CAAC,CAAC;IACnE,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO;YACL,IAAI,EAAE,aAAsB;YAC5B,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,6BAAY,EAAE,KAAK,CAAC;SACnD,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAC3D,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC,CACH,EACD,eAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACnB,KAAK,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,KAAK,SAAS,CAAC,CAC3D,CACF,CAAC;AAlCS,QAAA,kBAAkB,sBAkC3B"}
|
|
@@ -1,52 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.transformRawError = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const transformRawError = ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
errorType,
|
|
37
|
-
message,
|
|
38
|
-
stack: stack?.replaceAll(_stackRegex.stackAtRegex, 'at ').split('\r\n'),
|
|
39
|
-
sources: sources.length > 0 ? sources.map(({
|
|
40
|
-
_tag,
|
|
41
|
-
...data
|
|
42
|
-
}) => data) : undefined,
|
|
43
|
-
location: location.length > 0 ? location.map(({
|
|
44
|
-
_tag,
|
|
45
|
-
...data
|
|
46
|
-
}) => data) : undefined,
|
|
47
|
-
spans: reverseSpans === true ? spans.toReversed() : spans,
|
|
48
|
-
isPlainString
|
|
49
|
-
};
|
|
50
|
-
}), _effect.Effect.withSpan('transform-raw-error'));
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
const stack_regex_js_1 = require("../logic/stack/stack-regex.js");
|
|
6
|
+
const strip_cwd_path_js_1 = require("../logic/strip-cwd-path.js");
|
|
7
|
+
const get_sources_from_span_js_1 = require("./get-sources-from-span.js");
|
|
8
|
+
const get_sources_from_stack_js_1 = require("./get-sources-from-stack.js");
|
|
9
|
+
const transformRawError = ({ reverseSpans, stripCwd }) => ({ message, stack: maybeStack, span, errorType, isPlainString, }) => (0, effect_1.pipe)(effect_1.Effect.gen(function* () {
|
|
10
|
+
const data = yield* (0, get_sources_from_stack_js_1.getSourcesFromStack)(maybeStack);
|
|
11
|
+
const { spans, sources, location } = yield* (0, get_sources_from_span_js_1.getSourcesFromSpan)({
|
|
12
|
+
span,
|
|
13
|
+
...data,
|
|
14
|
+
});
|
|
15
|
+
let stack;
|
|
16
|
+
if (maybeStack !== undefined) {
|
|
17
|
+
stack = stripCwd === true ? (0, strip_cwd_path_js_1.stripCwdPath)(maybeStack) : maybeStack;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
errorType,
|
|
21
|
+
message,
|
|
22
|
+
stack: stack?.replaceAll(stack_regex_js_1.stackAtRegex, 'at ').split('\r\n'),
|
|
23
|
+
sources: sources.length > 0
|
|
24
|
+
? sources.map(({ _tag, ...data }) => data)
|
|
25
|
+
: undefined,
|
|
26
|
+
location: location.length > 0
|
|
27
|
+
? location.map(({ _tag, ...data }) => data)
|
|
28
|
+
: undefined,
|
|
29
|
+
spans: reverseSpans === true ? spans.toReversed() : spans,
|
|
30
|
+
isPlainString,
|
|
31
|
+
};
|
|
32
|
+
}), effect_1.Effect.withSpan('transform-raw-error'));
|
|
51
33
|
exports.transformRawError = transformRawError;
|
|
52
34
|
//# sourceMappingURL=transform-raw-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-raw-error.js","
|
|
1
|
+
{"version":3,"file":"transform-raw-error.js","sourceRoot":"","sources":["../../../src/source-maps/transform-raw-error.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAGtC,kEAA6D;AAC7D,kEAA0D;AAG1D,yEAAgE;AAChE,2EAAkE;AAE3D,MAAM,iBAAiB,GAC5B,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAwB,EAAE,EAAE,CACrD,CAAC,EACC,OAAO,EACP,KAAK,EAAE,UAAU,EACjB,IAAI,EACJ,SAAS,EACT,aAAa,GACD,EAAE,EAAE,CAChB,IAAA,aAAI,EACF,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAA,+CAAmB,EAAC,UAAU,CAAC,CAAC;IACpD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,IAAA,6CAAkB,EAAC;QAC7D,IAAI;QACJ,GAAG,IAAI;KACR,CAAC,CAAC;IAEH,IAAI,KAAyB,CAAC;IAC9B,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,KAAK,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAA,gCAAY,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpE,CAAC;IAED,OAAO;QACL,SAAS;QACT,OAAO;QACP,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,6BAAY,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;QAC3D,OAAO,EACL,OAAO,CAAC,MAAM,GAAG,CAAC;YAChB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;YAC1C,CAAC,CAAC,SAAS;QACf,QAAQ,EACN,QAAQ,CAAC,MAAM,GAAG,CAAC;YACjB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;YAC3C,CAAC,CAAC,SAAS;QACf,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,KAAK;QACzD,aAAa;KACd,CAAC;AACJ,CAAC,CAAC,EACF,eAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC,CAAC;AAvCO,QAAA,iBAAiB,qBAuCxB"}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.PrettyError = void 0;
|
|
7
4
|
class PrettyError {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
message;
|
|
6
|
+
stack;
|
|
7
|
+
span;
|
|
8
|
+
isPlainString;
|
|
9
|
+
errorType;
|
|
10
|
+
constructor(message, stack, span, isPlainString, errorType) {
|
|
11
|
+
this.message = message;
|
|
12
|
+
this.stack = stack;
|
|
13
|
+
this.span = span;
|
|
14
|
+
this.isPlainString = isPlainString;
|
|
15
|
+
this.errorType = errorType;
|
|
16
|
+
}
|
|
20
17
|
}
|
|
21
18
|
exports.PrettyError = PrettyError;
|
|
22
19
|
//# sourceMappingURL=pretty-error.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pretty-error.type.js","
|
|
1
|
+
{"version":3,"file":"pretty-error.type.js","sourceRoot":"","sources":["../../../src/types/pretty-error.type.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAEX;IACA;IACA;IACA;IACA;IALX,YACW,OAAgB,EAChB,KAAyB,EACzB,IAAsB,EACtB,aAAsB,EACtB,SAAmB;QAJnB,YAAO,GAAP,OAAO,CAAS;QAChB,UAAK,GAAL,KAAK,CAAoB;QACzB,SAAI,GAAJ,IAAI,CAAkB;QACtB,kBAAa,GAAb,aAAa,CAAS;QACtB,cAAS,GAAT,SAAS,CAAU;IAC3B,CAAC;CACL;AARD,kCAQC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.prettyPrintOptionsDefault = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
exports.prettyPrintOptionsDefault = {
|
|
5
|
+
enabled: true,
|
|
6
|
+
stripCwd: false,
|
|
7
|
+
reverseSpans: true,
|
|
11
8
|
};
|
|
12
9
|
//# sourceMappingURL=pretty-print-options.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pretty-print-options.type.js","
|
|
1
|
+
{"version":3,"file":"pretty-print-options.type.js","sourceRoot":"","sources":["../../../src/types/pretty-print-options.type.ts"],"names":[],"mappings":";;;AAMa,QAAA,yBAAyB,GAAuB;IAC3D,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,IAAI;CACnB,CAAC"}
|
package/dts/capture-errors.d.ts
CHANGED
package/dts/index.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export * from './logic/util/big-int-replacer.js';
|
|
|
7
7
|
export type { ErrorRelatedSources } from './source-maps/get-sources-from-map-file.js';
|
|
8
8
|
export type { SourceCode } from './source-maps/get-source-code.ts';
|
|
9
9
|
export type { ErrorLocation } from './source-maps/get-error-location-from-file-path.js';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { FsError } from './fs-error.js';
|
|
|
3
3
|
export declare const readFileEffect: (path: string) => Effect.Effect<string, FsError, never>;
|
|
4
4
|
export declare const existsEffect: (path: string) => Effect.Effect<boolean, FsError, never>;
|
|
5
5
|
export declare const readJsonEffect: <TResult>(path: string) => Effect.Effect<TResult, FsError, never>;
|
|
6
|
-
//# sourceMappingURL=fs-extra.effects.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Span } from 'effect/Tracer';
|
|
2
2
|
import type { PrettyPrintOptions } from '../../types/pretty-print-options.type.js';
|
|
3
3
|
export declare const maybePrintNodeStacktrace: (d: string[], span: Span | undefined, stack: string | undefined, isPlainString: boolean, { stripCwd }: PrettyPrintOptions) => void;
|
|
4
|
-
//# sourceMappingURL=maybe-print-node-stacktrace.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Span } from 'effect/Tracer';
|
|
2
2
|
import type { PrettyPrintOptions } from '../../types/pretty-print-options.type.js';
|
|
3
3
|
export declare const maybePrintSpanAttributes: (d: string[], span: Span | undefined, isPlainString: boolean, { stripCwd, reverseSpans }: PrettyPrintOptions) => string[] | undefined;
|
|
4
|
-
//# sourceMappingURL=maybe-print-span-attributes.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Span } from 'effect/Tracer';
|
|
2
2
|
import type { PrettyPrintOptions } from '../../types/pretty-print-options.type.js';
|
|
3
3
|
export declare const printEffectStacktrace: (d: string[], span: Span | undefined, spanAttributesStack: string[] | undefined, { stripCwd }: PrettyPrintOptions) => void;
|
|
4
|
-
//# sourceMappingURL=print-effect-stacktrace.d.ts.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export declare const removeNodeModulesEntriesFromStack: (stack: string) => string[];
|
|
2
2
|
export declare const maybeAddErrorToSpansStack: (stack: string | undefined, spanAttributesStack: string[] | undefined) => string[];
|
|
3
|
-
//# sourceMappingURL=maybe-add-error-to-spans-stack.d.ts.map
|
package/dts/pretty-print.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
import { type PrettyPrintOptions } from '../types/pretty-print-options.type.js';
|
|
3
3
|
export declare const runPromise: <A, E>(effect: Effect.Effect<A, E>, options?: PrettyPrintOptions) => Promise<A>;
|
|
4
|
-
//# sourceMappingURL=run-promise.d.ts.map
|
|
@@ -2,4 +2,3 @@ import { Effect } from 'effect';
|
|
|
2
2
|
import type { FsError } from '../logic/effects/fs/fs-error.js';
|
|
3
3
|
import { type ErrorRelatedSources, type RawErrorLocation } from './get-sources-from-map-file.js';
|
|
4
4
|
export declare const getErrorRelatedSources: (sourceFile: string) => Effect.Effect<ErrorRelatedSources | RawErrorLocation | undefined, FsError>;
|
|
5
|
-
//# sourceMappingURL=get-error-related-sources.d.ts.map
|
|
@@ -12,4 +12,3 @@ export interface RawErrorLocation extends ErrorLocation {
|
|
|
12
12
|
_tag: 'location';
|
|
13
13
|
}
|
|
14
14
|
export declare const getSourcesFromMapFile: (location: ErrorLocation) => Effect.Effect<ErrorRelatedSources | RawErrorLocation | undefined, FsError>;
|
|
15
|
-
//# sourceMappingURL=get-sources-from-map-file.d.ts.map
|
|
@@ -3,4 +3,3 @@ export declare const getSourcesFromStack: (maybeStack: string | undefined) => Ef
|
|
|
3
3
|
sources: import("./get-sources-from-map-file.js").ErrorRelatedSources[];
|
|
4
4
|
location: import("./get-sources-from-map-file.js").RawErrorLocation[];
|
|
5
5
|
}, import("../logic/effects/fs/fs-error.js").FsError, never>;
|
|
6
|
-
//# sourceMappingURL=get-sources-from-stack.d.ts.map
|
|
@@ -7,4 +7,3 @@ export type StackEntry = {
|
|
|
7
7
|
};
|
|
8
8
|
export type MaybeMappedSources = ErrorRelatedSources | RawErrorLocation | StackEntry;
|
|
9
9
|
export declare const maybeMapSourcemaps: (stacktrace: string[]) => Effect.Effect<MaybeMappedSources[], FsError>;
|
|
10
|
-
//# sourceMappingURL=maybe-map-sourcemaps.d.ts.map
|