effect-errors 1.7.18 → 1.7.19
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/logic/pretty-printing/format-span-attributes.js +0 -9
- package/cjs/logic/pretty-printing/format-span-attributes.js.map +1 -1
- package/dts/index.d.ts +1 -0
- package/dts/index.d.ts.map +1 -1
- package/dts/logic/pretty-printing/format-span-attributes.d.ts.map +1 -1
- package/esm/logic/pretty-printing/format-span-attributes.js +0 -9
- package/esm/logic/pretty-printing/format-span-attributes.js.map +1 -1
- package/package.json +3 -3
|
@@ -40,15 +40,6 @@ const formatSpanAttributes = (span, {
|
|
|
40
40
|
} = (0, _getSpanAttributes.getSpanAttributes)(attributes, isLastEntry);
|
|
41
41
|
const maybeCircle = isFirstEntry ? `\r\n${_picocolors.default.gray('◯')}` : '';
|
|
42
42
|
const message = _picocolors.default.white(`${maybeCircle}\r\n${(0, _spansStackTrailingChar.spanStackTrailingChar)(isLastEntry)}${_picocolors.default.gray('─')}${filePath}${(0, _getSpanDuration.getSpanDuration)(status, isLastEntry)}${formattedAttributes}`);
|
|
43
|
-
// const message = color.white(
|
|
44
|
-
// maybeCircle +
|
|
45
|
-
// '\r\n' +
|
|
46
|
-
// spanStackTrailingChar(isLastEntry) +
|
|
47
|
-
// color.gray('─') +
|
|
48
|
-
// filePath +
|
|
49
|
-
// getSpanDuration(status, isLastEntry) +
|
|
50
|
-
// formattedAttributes,
|
|
51
|
-
// );
|
|
52
43
|
return {
|
|
53
44
|
message,
|
|
54
45
|
stack
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-span-attributes.js","names":["_effect","require","_picocolors","_interopRequireDefault","_getSpanAttributes","_getSpanDuration","_spansStackTrailingChar","_stripCwdPath","e","__esModule","default","formatSpanAttributes","span","stripCwd","reverseSpans","current","spans","undefined","_tag","push","Option","getOrUndefined","parent","orderedSpans","toReversed","map","name","attributes","status","index","isFirstEntry","isLastEntry","length","filePath","stripCwdPath","formattedAttributes","stack","getSpanAttributes","maybeCircle","gray","message","white","spanStackTrailingChar","getSpanDuration","reduce","prev","curr","exports"],"sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAEA,IAAAC,WAAA,gBAAAC,sBAAA,cAAAF,OAAA;AAGA,IAAAG,kBAAA,gBAAAH,OAAA;AACA,IAAAI,gBAAA,gBAAAJ,OAAA;AACA,IAAAK,uBAAA,gBAAAL,OAAA;AACA,IAAAM,aAAA,gBAAAN,OAAA;AAAoD,SAAAE,uBAAAK,CAAA;EAAA,OAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA;IAAAE,OAAA,EAAAF;EAAA;AAAA;AAE7C,MAAMG,oBAAoB,GAAGA,CAClCC,IAAsB,EACtB;EAAEC,QAAQ;EAAEC;AAAY,CAAsB,KAC5C;EACF,IAAIC,OAAO,GAA+BH,IAAI;EAE9C,MAAMI,KAAK,GAAG,EAAE;EAChB,OAAOD,OAAO,KAAKE,SAAS,IAAIF,OAAO,CAACG,IAAI,KAAK,MAAM,EAAE;IACvDF,KAAK,CAACG,IAAI,CAACJ,OAAO,CAAC;IACnBA,OAAO,GAAGf,OAAA,CAAAoB,MAAM,CAACC,cAAc,CAACN,OAAO,CAACO,MAAM,CAAC;EACjD;EAEA,MAAMC,YAAY,GAAGT,YAAY,KAAK,IAAI,GAAGE,KAAK,CAACQ,UAAU,EAAE,GAAGR,KAAK;EAEvE,OAAOO,YAAY,CAChBE,GAAG,CAAC,CAAC;IAAEC,IAAI;IAAEC,UAAU;IAAEC;EAAM,CAAE,EAAEC,KAAK,KAAI;IAC3C,MAAMC,YAAY,GAAGD,KAAK,KAAK,CAAC;IAChC,MAAME,WAAW,GAAGF,KAAK,KAAKb,KAAK,CAACgB,MAAM,GAAG,CAAC;IAE9C,MAAMC,QAAQ,GAAG,OAAOpB,QAAQ,KAAKI,SAAS,GAAG,IAAAV,aAAA,CAAA2B,YAAY,EAACR,IAAI,CAAC,GAAGA,IAAI,EAAE;IAE5E,MAAM;MAAES,mBAAmB;MAAEC;IAAK,CAAE,GAAG,IAAAhC,kBAAA,CAAAiC,iBAAiB,EACtDV,UAAU,EACVI,WAAW,CACZ;IAED,MAAMO,WAAW,GAAGR,YAAY,GAAG,OAAO5B,WAAA,CAAAQ,OAAK,CAAC6B,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE;IAEhE,MAAMC,OAAO,GAAGtC,WAAA,CAAAQ,OAAK,CAAC+B,KAAK,CACzB,GAAGH,WAAW,OAAO,IAAAhC,uBAAA,CAAAoC,qBAAqB,EAACX,WAAW,CAAC,GAAG7B,WAAA,CAAAQ,OAAK,CAAC6B,IAAI,CAAC,GAAG,CAAC,GAAGN,QAAQ,GAAG,IAAA5B,gBAAA,CAAAsC,eAAe,EAACf,MAAM,EAAEG,WAAW,CAAC,GAAGI,mBAAmB,EAAE,CACpJ;
|
|
1
|
+
{"version":3,"file":"format-span-attributes.js","names":["_effect","require","_picocolors","_interopRequireDefault","_getSpanAttributes","_getSpanDuration","_spansStackTrailingChar","_stripCwdPath","e","__esModule","default","formatSpanAttributes","span","stripCwd","reverseSpans","current","spans","undefined","_tag","push","Option","getOrUndefined","parent","orderedSpans","toReversed","map","name","attributes","status","index","isFirstEntry","isLastEntry","length","filePath","stripCwdPath","formattedAttributes","stack","getSpanAttributes","maybeCircle","gray","message","white","spanStackTrailingChar","getSpanDuration","reduce","prev","curr","exports"],"sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAEA,IAAAC,WAAA,gBAAAC,sBAAA,cAAAF,OAAA;AAGA,IAAAG,kBAAA,gBAAAH,OAAA;AACA,IAAAI,gBAAA,gBAAAJ,OAAA;AACA,IAAAK,uBAAA,gBAAAL,OAAA;AACA,IAAAM,aAAA,gBAAAN,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K,CACzB,GAAGH,WAAW,OAAO,IAAAhC,uBAAA,CAAAoC,qBAAqB,EAACX,WAAW,CAAC,GAAG7B,WAAA,CAAAQ,OAAK,CAAC6B,IAAI,CAAC,GAAG,CAAC,GAAGN,QAAQ,GAAG,IAAA5B,gBAAA,CAAAsC,eAAe,EAACf,MAAM,EAAEG,WAAW,CAAC,GAAGI,mBAAmB,EAAE,CACpJ;IAED,OAAO;MACLK,OAAO;MACPJ;KACD;EACH,CAAC,CAAC,CACDQ,MAAM,CACL,CAACC,IAAI,EAAEC,IAAI,MAAM;IACfN,OAAO,EAAEK,IAAI,CAACL,OAAO,GAAGM,IAAI,CAACN,OAAO;IACpCJ,KAAK,EAAE,CAAC,GAAGS,IAAI,CAACT,KAAK,EAAE,GAAGU,IAAI,CAACV,KAAK;GACrC,CAAC,EACF;IACEI,OAAO,EAAE,EAAE;IACXJ,KAAK,EAAE;GACR,CACF;AACL,CAAC;AAACW,OAAA,CAAApC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/dts/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export * from './capture-errors.js';
|
|
|
6
6
|
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
|
+
export type { ErrorLocation } from './source-maps/get-error-location-from-file-path.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-span-attributes.d.ts","sourceRoot":"","sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAMnF,eAAO,MAAM,oBAAoB,SACzB,IAAI,GAAG,SAAS,8BACM,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"format-span-attributes.d.ts","sourceRoot":"","sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAMnF,eAAO,MAAM,oBAAoB,SACzB,IAAI,GAAG,SAAS,8BACM,kBAAkB;;;CA6C/C,CAAC"}
|
|
@@ -29,15 +29,6 @@ export const formatSpanAttributes = (span, {
|
|
|
29
29
|
} = getSpanAttributes(attributes, isLastEntry);
|
|
30
30
|
const maybeCircle = isFirstEntry ? `\r\n${color.gray('◯')}` : '';
|
|
31
31
|
const message = color.white(`${maybeCircle}\r\n${spanStackTrailingChar(isLastEntry)}${color.gray('─')}${filePath}${getSpanDuration(status, isLastEntry)}${formattedAttributes}`);
|
|
32
|
-
// const message = color.white(
|
|
33
|
-
// maybeCircle +
|
|
34
|
-
// '\r\n' +
|
|
35
|
-
// spanStackTrailingChar(isLastEntry) +
|
|
36
|
-
// color.gray('─') +
|
|
37
|
-
// filePath +
|
|
38
|
-
// getSpanDuration(status, isLastEntry) +
|
|
39
|
-
// formattedAttributes,
|
|
40
|
-
// );
|
|
41
32
|
return {
|
|
42
33
|
message,
|
|
43
34
|
stack
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-span-attributes.js","names":["Option","color","getSpanAttributes","getSpanDuration","spanStackTrailingChar","stripCwdPath","formatSpanAttributes","span","stripCwd","reverseSpans","current","spans","undefined","_tag","push","getOrUndefined","parent","orderedSpans","toReversed","map","name","attributes","status","index","isFirstEntry","isLastEntry","length","filePath","formattedAttributes","stack","maybeCircle","gray","message","white","reduce","prev","curr"],"sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAQ;AAE/B,OAAOC,KAAK,MAAM,YAAY;AAG9B,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,qBAAqB,QAAQ,uCAAuC;AAC7E,SAASC,YAAY,QAAQ,sBAAsB;AAEnD,OAAO,MAAMC,oBAAoB,GAAGA,CAClCC,IAAsB,EACtB;EAAEC,QAAQ;EAAEC;AAAY,CAAsB,KAC5C;EACF,IAAIC,OAAO,GAA+BH,IAAI;EAE9C,MAAMI,KAAK,GAAG,EAAE;EAChB,OAAOD,OAAO,KAAKE,SAAS,IAAIF,OAAO,CAACG,IAAI,KAAK,MAAM,EAAE;IACvDF,KAAK,CAACG,IAAI,CAACJ,OAAO,CAAC;IACnBA,OAAO,GAAGV,MAAM,CAACe,cAAc,CAACL,OAAO,CAACM,MAAM,CAAC;EACjD;EAEA,MAAMC,YAAY,GAAGR,YAAY,KAAK,IAAI,GAAGE,KAAK,CAACO,UAAU,EAAE,GAAGP,KAAK;EAEvE,OAAOM,YAAY,CAChBE,GAAG,CAAC,CAAC;IAAEC,IAAI;IAAEC,UAAU;IAAEC;EAAM,CAAE,EAAEC,KAAK,KAAI;IAC3C,MAAMC,YAAY,GAAGD,KAAK,KAAK,CAAC;IAChC,MAAME,WAAW,GAAGF,KAAK,KAAKZ,KAAK,CAACe,MAAM,GAAG,CAAC;IAE9C,MAAMC,QAAQ,GAAG,OAAOnB,QAAQ,KAAKI,SAAS,GAAGP,YAAY,CAACe,IAAI,CAAC,GAAGA,IAAI,EAAE;IAE5E,MAAM;MAAEQ,mBAAmB;MAAEC;IAAK,CAAE,GAAG3B,iBAAiB,CACtDmB,UAAU,EACVI,WAAW,CACZ;IAED,MAAMK,WAAW,GAAGN,YAAY,GAAG,OAAOvB,KAAK,CAAC8B,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE;IAEhE,MAAMC,OAAO,GAAG/B,KAAK,CAACgC,KAAK,CACzB,GAAGH,WAAW,OAAO1B,qBAAqB,CAACqB,WAAW,CAAC,GAAGxB,KAAK,CAAC8B,IAAI,CAAC,GAAG,CAAC,GAAGJ,QAAQ,GAAGxB,eAAe,CAACmB,MAAM,EAAEG,WAAW,CAAC,GAAGG,mBAAmB,EAAE,CACpJ;
|
|
1
|
+
{"version":3,"file":"format-span-attributes.js","names":["Option","color","getSpanAttributes","getSpanDuration","spanStackTrailingChar","stripCwdPath","formatSpanAttributes","span","stripCwd","reverseSpans","current","spans","undefined","_tag","push","getOrUndefined","parent","orderedSpans","toReversed","map","name","attributes","status","index","isFirstEntry","isLastEntry","length","filePath","formattedAttributes","stack","maybeCircle","gray","message","white","reduce","prev","curr"],"sources":["../../../../src/logic/pretty-printing/format-span-attributes.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAQ;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,qBAAqB,CAACqB,WAAW,CAAC,GAAGxB,KAAK,CAAC8B,IAAI,CAAC,GAAG,CAAC,GAAGJ,QAAQ,GAAGxB,eAAe,CAACmB,MAAM,EAAEG,WAAW,CAAC,GAAGG,mBAAmB,EAAE,CACpJ;IAED,OAAO;MACLI,OAAO;MACPH;KACD;EACH,CAAC,CAAC,CACDK,MAAM,CACL,CAACC,IAAI,EAAEC,IAAI,MAAM;IACfJ,OAAO,EAAEG,IAAI,CAACH,OAAO,GAAGI,IAAI,CAACJ,OAAO;IACpCH,KAAK,EAAE,CAAC,GAAGM,IAAI,CAACN,KAAK,EAAE,GAAGO,IAAI,CAACP,KAAK;GACrC,CAAC,EACF;IACEG,OAAO,EAAE,EAAE;IACXH,KAAK,EAAE;GACR,CACF;AACL,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"name": "effect-errors",
|
|
20
|
-
"version": "1.7.
|
|
20
|
+
"version": "1.7.19",
|
|
21
21
|
"author": "jpb06 <jp.bois.06@outlook.fr>",
|
|
22
22
|
"description": "A POC for errors reporting in Effect",
|
|
23
23
|
"keywords": [
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"@babel/core": "^7.25.8",
|
|
63
63
|
"@babel/plugin-transform-export-namespace-from": "^7.25.8",
|
|
64
64
|
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
|
|
65
|
-
"@biomejs/biome": "^1.9.
|
|
65
|
+
"@biomejs/biome": "^1.9.4",
|
|
66
66
|
"@types/fs-extra": "^11.0.4",
|
|
67
|
-
"@types/node": "^22.7.
|
|
67
|
+
"@types/node": "^22.7.7",
|
|
68
68
|
"@vitest/coverage-v8": "^2.1.3",
|
|
69
69
|
"babel-plugin-annotate-pure-calls": "^0.4.0",
|
|
70
70
|
"copyfiles": "^2.4.1",
|