@hg-ts/exception 0.1.49 → 0.1.51
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/.eslintcache +1 -1
- package/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-lint$colon$ts.log +2 -0
- package/.turbo/turbo-test.log +19 -0
- package/dist/exceptions/aggregate-error.exception.d.ts.map +1 -1
- package/dist/exceptions/aggregate-error.exception.js +7 -3
- package/dist/exceptions/aggregate-error.exception.js.map +1 -1
- package/dist/exceptions/base.aggregate.exception.d.ts +1 -1
- package/dist/exceptions/base.aggregate.exception.js +1 -1
- package/dist/exceptions/base.exception.d.ts +1 -3
- package/dist/exceptions/base.exception.d.ts.map +1 -1
- package/dist/exceptions/base.exception.js +4 -10
- package/dist/exceptions/base.exception.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/tests/serialization.test-suite.js +2 -2
- package/dist/tests/serialization.test-suite.js.map +1 -1
- package/{dist-esm/tests/serialization.test-suite.d.ts → dist/tests/serialization.test.d.ts} +3 -3
- package/dist/tests/serialization.test.d.ts.map +1 -0
- package/dist/tests/serialization.test.js +142 -0
- package/dist/tests/serialization.test.js.map +1 -0
- package/dist/utils/stack-trace.formatter.js.map +1 -1
- package/eslint.config.mjs +3 -0
- package/package.json +21 -27
- package/src/exceptions/aggregate-error.exception.ts +7 -3
- package/src/exceptions/base.aggregate.exception.ts +1 -1
- package/src/exceptions/base.exception.ts +4 -11
- package/src/index.ts +0 -1
- package/src/tests/{serialization.test-suite.ts → serialization.test.ts} +4 -4
- package/tsconfig.json +1 -1
- package/.eslintrc.json +0 -1
- package/.mocharc.cjs +0 -1
- package/.nyc_output/ac7e4aa0-bc88-465a-9721-d2d291d2b2ba.json +0 -1
- package/.nyc_output/e1f8b43f-c513-4e11-b557-32a0406d8593.json +0 -1
- package/.nyc_output/e3971402-33e6-4cdb-a72c-41318dd55dcd.json +0 -1
- package/.nyc_output/processinfo/ac7e4aa0-bc88-465a-9721-d2d291d2b2ba.json +0 -1
- package/.nyc_output/processinfo/e1f8b43f-c513-4e11-b557-32a0406d8593.json +0 -1
- package/.nyc_output/processinfo/e3971402-33e6-4cdb-a72c-41318dd55dcd.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.nycrc +0 -3
- package/coverage/cobertura-coverage.xml +0 -574
- package/coverage/coverage-final.json +0 -18
- package/dist/tests/test.d.ts +0 -6
- package/dist/tests/test.d.ts.map +0 -1
- package/dist/tests/test.js +0 -22
- package/dist/tests/test.js.map +0 -1
- package/dist-esm/consts.d.ts +0 -2
- package/dist-esm/consts.d.ts.map +0 -1
- package/dist-esm/consts.js +0 -2
- package/dist-esm/consts.js.map +0 -1
- package/dist-esm/exceptions/aggregate-error.exception.d.ts +0 -5
- package/dist-esm/exceptions/aggregate-error.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/aggregate-error.exception.js +0 -16
- package/dist-esm/exceptions/aggregate-error.exception.js.map +0 -1
- package/dist-esm/exceptions/base.aggregate.exception.d.ts +0 -13
- package/dist-esm/exceptions/base.aggregate.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/base.aggregate.exception.js +0 -29
- package/dist-esm/exceptions/base.aggregate.exception.js.map +0 -1
- package/dist-esm/exceptions/base.exception.d.ts +0 -37
- package/dist-esm/exceptions/base.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/base.exception.js +0 -97
- package/dist-esm/exceptions/base.exception.js.map +0 -1
- package/dist-esm/exceptions/error.exception.d.ts +0 -5
- package/dist-esm/exceptions/error.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/error.exception.js +0 -13
- package/dist-esm/exceptions/error.exception.js.map +0 -1
- package/dist-esm/exceptions/forbidden.exception.d.ts +0 -4
- package/dist-esm/exceptions/forbidden.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/forbidden.exception.js +0 -4
- package/dist-esm/exceptions/forbidden.exception.js.map +0 -1
- package/dist-esm/exceptions/index.d.ts +0 -9
- package/dist-esm/exceptions/index.d.ts.map +0 -1
- package/dist-esm/exceptions/index.js +0 -9
- package/dist-esm/exceptions/index.js.map +0 -1
- package/dist-esm/exceptions/not-implemented.exception.d.ts +0 -5
- package/dist-esm/exceptions/not-implemented.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/not-implemented.exception.js +0 -7
- package/dist-esm/exceptions/not-implemented.exception.js.map +0 -1
- package/dist-esm/exceptions/unknown.exception.d.ts +0 -5
- package/dist-esm/exceptions/unknown.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/unknown.exception.js +0 -7
- package/dist-esm/exceptions/unknown.exception.js.map +0 -1
- package/dist-esm/exceptions/will-never-happened.exception.d.ts +0 -5
- package/dist-esm/exceptions/will-never-happened.exception.d.ts.map +0 -1
- package/dist-esm/exceptions/will-never-happened.exception.js +0 -7
- package/dist-esm/exceptions/will-never-happened.exception.js.map +0 -1
- package/dist-esm/index.d.ts +0 -3
- package/dist-esm/index.d.ts.map +0 -1
- package/dist-esm/index.js +0 -3
- package/dist-esm/index.js.map +0 -1
- package/dist-esm/tests/serialization.test-suite.d.ts.map +0 -1
- package/dist-esm/tests/serialization.test-suite.js +0 -139
- package/dist-esm/tests/serialization.test-suite.js.map +0 -1
- package/dist-esm/tests/test.aggregate-exception.d.ts +0 -5
- package/dist-esm/tests/test.aggregate-exception.d.ts.map +0 -1
- package/dist-esm/tests/test.aggregate-exception.js +0 -12
- package/dist-esm/tests/test.aggregate-exception.js.map +0 -1
- package/dist-esm/tests/test.exception.d.ts +0 -5
- package/dist-esm/tests/test.exception.d.ts.map +0 -1
- package/dist-esm/tests/test.exception.js +0 -7
- package/dist-esm/tests/test.exception.js.map +0 -1
- package/dist-esm/utils/index.d.ts +0 -2
- package/dist-esm/utils/index.d.ts.map +0 -1
- package/dist-esm/utils/index.js +0 -2
- package/dist-esm/utils/index.js.map +0 -1
- package/dist-esm/utils/stack-trace.formatter.d.ts +0 -6
- package/dist-esm/utils/stack-trace.formatter.d.ts.map +0 -1
- package/dist-esm/utils/stack-trace.formatter.js +0 -25
- package/dist-esm/utils/stack-trace.formatter.js.map +0 -1
- package/mocha.junit.xml +0 -23
- package/tsconfig.esm.json +0 -9
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Volumes/Work/ts/hg/framework/packages/exception/src/consts.ts":"1","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/aggregate-error.exception.ts":"2","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/base.aggregate.exception.ts":"3","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/base.exception.ts":"4","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/error.exception.ts":"5","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/forbidden.exception.ts":"6","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/index.ts":"7","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/not-implemented.exception.ts":"8","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/unknown.exception.ts":"9","/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/will-never-happened.exception.ts":"10","/Volumes/Work/ts/hg/framework/packages/exception/src/index.ts":"11","/Volumes/Work/ts/hg/framework/packages/exception/src/tests/serialization.test-suite.ts":"12","/Volumes/Work/ts/hg/framework/packages/exception/src/tests/test.aggregate-exception.ts":"13","/Volumes/Work/ts/hg/framework/packages/exception/src/tests/test.exception.ts":"14","/Volumes/Work/ts/hg/framework/packages/exception/src/utils/index.ts":"15","/Volumes/Work/ts/hg/framework/packages/exception/src/utils/stack-trace.formatter.ts":"16"},{"size":73,"mtime":1659719206461,"results":"17","hashOfConfig":"18"},{"size":520,"mtime":1720379890541,"results":"19","hashOfConfig":"18"},{"size":1377,"mtime":1720379841735,"results":"20","hashOfConfig":"18"},{"size":3430,"mtime":1720379783614,"results":"21","hashOfConfig":"18"},{"size":375,"mtime":1658005568468,"results":"22","hashOfConfig":"18"},{"size":108,"mtime":1643091718782,"results":"23","hashOfConfig":"18"},{"size":418,"mtime":1643091718779,"results":"24","hashOfConfig":"18"},{"size":169,"mtime":1626299896345,"results":"25","hashOfConfig":"18"},{"size":167,"mtime":1626299896345,"results":"26","hashOfConfig":"18"},{"size":177,"mtime":1626299896345,"results":"27","hashOfConfig":"18"},{"size":53,"mtime":1665300013469,"results":"28","hashOfConfig":"18"},{"size":3373,"mtime":1720379827230,"results":"29","hashOfConfig":"18"},{"size":430,"mtime":1660867792014,"results":"30","hashOfConfig":"18"},{"size":186,"mtime":1657995065457,"results":"31","hashOfConfig":"18"},{"size":41,"mtime":1626299896346,"results":"32","hashOfConfig":"18"},{"size":930,"mtime":1659719246420,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","suppressedMessages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"16009u",{"filePath":"37","messages":"38","suppressedMessages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","suppressedMessages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","suppressedMessages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","suppressedMessages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","suppressedMessages":"51","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","suppressedMessages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","suppressedMessages":"72","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","suppressedMessages":"75","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","suppressedMessages":"78","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","suppressedMessages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Volumes/Work/ts/hg/framework/packages/exception/src/consts.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/aggregate-error.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/base.aggregate.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/base.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/error.exception.ts",[],["82"],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/forbidden.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/index.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/not-implemented.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/unknown.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/exceptions/will-never-happened.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/index.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/tests/serialization.test-suite.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/tests/test.aggregate-exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/tests/test.exception.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/utils/index.ts",[],[],"/Volumes/Work/ts/hg/framework/packages/exception/src/utils/stack-trace.formatter.ts",[],[],{"ruleId":"83","severity":2,"message":"84","line":11,"column":7,"nodeType":"85","messageId":"86","endLine":11,"endColumn":16,"suppressions":"87"},"no-undefined","Unexpected use of undefined.","Identifier","unexpectedUndefined",["88"],{"kind":"89","justification":"90"},"directive",""]
|
|
1
|
+
[{"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/consts.js":"1","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/aggregate-error.exception.js":"2","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/base.aggregate.exception.js":"3","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/base.exception.js":"4","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/error.exception.js":"5","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/forbidden.exception.js":"6","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/index.js":"7","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/not-implemented.exception.js":"8","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/unknown.exception.js":"9","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/will-never-happened.exception.js":"10","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/index.js":"11","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/serialization.test-suite.js":"12","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/serialization.test.js":"13","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/test.aggregate-exception.js":"14","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/test.exception.js":"15","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/utils/index.js":"16","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/utils/stack-trace.formatter.js":"17","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/eslint.config.mjs":"18","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/consts.ts":"19","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/aggregate-error.exception.ts":"20","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/base.aggregate.exception.ts":"21","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/base.exception.ts":"22","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/error.exception.ts":"23","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/forbidden.exception.ts":"24","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/index.ts":"25","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/not-implemented.exception.ts":"26","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/unknown.exception.ts":"27","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/will-never-happened.exception.ts":"28","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/index.ts":"29","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/serialization.test.ts":"30","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/test.aggregate-exception.ts":"31","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/test.exception.ts":"32","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/utils/index.ts":"33","/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/utils/stack-trace.formatter.ts":"34"},{"size":216,"mtime":1746292854677,"results":"35","hashOfConfig":"36"},{"size":984,"mtime":1746292854695,"results":"37","hashOfConfig":"36"},{"size":1316,"mtime":1746292854691,"results":"38","hashOfConfig":"36"},{"size":3141,"mtime":1746292854687,"results":"39","hashOfConfig":"36"},{"size":568,"mtime":1746292854690,"results":"40","hashOfConfig":"36"},{"size":332,"mtime":1746292854701,"results":"41","hashOfConfig":"36"},{"size":680,"mtime":1746292854703,"results":"42","hashOfConfig":"36"},{"size":418,"mtime":1746292854699,"results":"43","hashOfConfig":"36"},{"size":379,"mtime":1746292854697,"results":"44","hashOfConfig":"36"},{"size":431,"mtime":1746292854700,"results":"45","hashOfConfig":"36"},{"size":200,"mtime":1746292854703,"results":"46","hashOfConfig":"36"},{"size":6664,"mtime":1746286930305,"results":"47","hashOfConfig":"36"},{"size":6659,"mtime":1746292854714,"results":"48","hashOfConfig":"36"},{"size":711,"mtime":1746292854705,"results":"49","hashOfConfig":"36"},{"size":369,"mtime":1746292854704,"results":"50","hashOfConfig":"36"},{"size":211,"mtime":1746292854683,"results":"51","hashOfConfig":"36"},{"size":1229,"mtime":1746292854681,"results":"52","hashOfConfig":"36"},{"size":59,"mtime":1736896000123,"results":"53","hashOfConfig":"36"},{"size":73,"mtime":1745052066252,"results":"54","hashOfConfig":"55"},{"size":656,"mtime":1736876770672,"results":"56","hashOfConfig":"55"},{"size":1377,"mtime":1736876770672,"results":"57","hashOfConfig":"55"},{"size":3276,"mtime":1736893346284,"results":"58","hashOfConfig":"55"},{"size":375,"mtime":1736876770672,"results":"59","hashOfConfig":"55"},{"size":108,"mtime":1736876770672,"results":"60","hashOfConfig":"55"},{"size":418,"mtime":1736876770672,"results":"61","hashOfConfig":"55"},{"size":169,"mtime":1736876770672,"results":"62","hashOfConfig":"55"},{"size":167,"mtime":1736876770672,"results":"63","hashOfConfig":"55"},{"size":177,"mtime":1736876770672,"results":"64","hashOfConfig":"55"},{"size":30,"mtime":1740597478194,"results":"65","hashOfConfig":"55"},{"size":3367,"mtime":1739852996637,"results":"66","hashOfConfig":"55"},{"size":430,"mtime":1736876770673,"results":"67","hashOfConfig":"55"},{"size":186,"mtime":1736876770673,"results":"68","hashOfConfig":"55"},{"size":41,"mtime":1736876770673,"results":"69","hashOfConfig":"55"},{"size":930,"mtime":1736876770673,"results":"70","hashOfConfig":"55"},{"filePath":"71","messages":"72","suppressedMessages":"73","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gtnk1i",{"filePath":"74","messages":"75","suppressedMessages":"76","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","suppressedMessages":"79","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","suppressedMessages":"82","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","suppressedMessages":"85","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","suppressedMessages":"88","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"89","messages":"90","suppressedMessages":"91","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"92","messages":"93","suppressedMessages":"94","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"95","messages":"96","suppressedMessages":"97","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"98","messages":"99","suppressedMessages":"100","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"101","messages":"102","suppressedMessages":"103","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"104","messages":"105","suppressedMessages":"106","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"107","messages":"108","suppressedMessages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"110","messages":"111","suppressedMessages":"112","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","suppressedMessages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","suppressedMessages":"118","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"119","messages":"120","suppressedMessages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","suppressedMessages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"125","messages":"126","suppressedMessages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i5df87",{"filePath":"128","messages":"129","suppressedMessages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","suppressedMessages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","suppressedMessages":"136","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"137","messages":"138","suppressedMessages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","suppressedMessages":"142","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"143","messages":"144","suppressedMessages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","suppressedMessages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"149","messages":"150","suppressedMessages":"151","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"152","messages":"153","suppressedMessages":"154","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"155","messages":"156","suppressedMessages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","suppressedMessages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"161","messages":"162","suppressedMessages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","suppressedMessages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"167","messages":"168","suppressedMessages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","suppressedMessages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/consts.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/aggregate-error.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/base.aggregate.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/base.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/error.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/forbidden.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/not-implemented.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/unknown.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/exceptions/will-never-happened.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/serialization.test-suite.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/serialization.test.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/test.aggregate-exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/tests/test.exception.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/utils/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/dist/utils/stack-trace.formatter.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/eslint.config.mjs",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/consts.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/aggregate-error.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/base.aggregate.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/base.exception.ts",[],["173"],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/error.exception.ts",[],["174"],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/forbidden.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/not-implemented.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/unknown.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/exceptions/will-never-happened.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/serialization.test.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/test.aggregate-exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/tests/test.exception.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/utils/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/exception/src/utils/stack-trace.formatter.ts",[],[],{"ruleId":"175","severity":2,"message":"176","line":86,"column":54,"nodeType":"177","messageId":"178","endLine":86,"endColumn":61,"suppressions":"179"},{"ruleId":"180","severity":2,"message":"181","line":11,"column":7,"nodeType":"177","messageId":"182","endLine":11,"endColumn":16,"suppressions":"183"},"@typescript/unbound-method","Avoid referencing unbound methods which may cause unintentional scoping of `this`.\nIf your function does not access `this`, you can annotate it with `this: void`, or consider using an arrow function instead.","Identifier","unboundWithoutThisAnnotation",["184"],"no-undefined","Unexpected use of undefined.","unexpectedUndefined",["185"],{"kind":"186","justification":"187"},{"kind":"186","justification":"187"},"directive",""]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
▶ SerializationTestSuite
|
|
3
|
+
[32m✔ commonTest [90m(1.997333ms)[39m[39m
|
|
4
|
+
[32m✔ baseExceptionFromError [90m(0.578916ms)[39m[39m
|
|
5
|
+
[32m✔ aggregateExceptionTest [90m(0.595084ms)[39m[39m
|
|
6
|
+
[32m✔ syncStackTest [90m(0.273875ms)[39m[39m
|
|
7
|
+
[32m✔ isFromNextTickTest [90m(0.60525ms)[39m[39m
|
|
8
|
+
[32m✔ isFromImmediateTest [90m(2.144875ms)[39m[39m
|
|
9
|
+
[32m✔ fromTimeoutTest [90m(0.322125ms)[39m[39m
|
|
10
|
+
[32m✔ fromIntervalTest [90m(1.509834ms)[39m[39m
|
|
11
|
+
[32m✔ SerializationTestSuite [90m(8.827625ms)[39m[39m
|
|
12
|
+
[34mℹ tests 8[39m
|
|
13
|
+
[34mℹ suites 1[39m
|
|
14
|
+
[34mℹ pass 8[39m
|
|
15
|
+
[34mℹ fail 0[39m
|
|
16
|
+
[34mℹ cancelled 0[39m
|
|
17
|
+
[34mℹ skipped 0[39m
|
|
18
|
+
[34mℹ todo 0[39m
|
|
19
|
+
[34mℹ duration_ms 171.145458[39m
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-error.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/aggregate-error.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,qBAAa,uBAAwB,SAAQ,sBAAsB;gBAC/C,KAAK,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"aggregate-error.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/aggregate-error.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,qBAAa,uBAAwB,SAAQ,sBAAsB;gBAC/C,KAAK,EAAE,cAAc;CAqBxC"}
|
|
@@ -9,10 +9,14 @@ class AggregateErrorException extends base_aggregate_exception_1.BaseAggregateEx
|
|
|
9
9
|
super(errors
|
|
10
10
|
.map(error => {
|
|
11
11
|
if (error instanceof AggregateError) {
|
|
12
|
-
base_aggregate_exception_1.BaseAggregateException.
|
|
12
|
+
base_aggregate_exception_1.BaseAggregateException.fromError(error);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if (error instanceof Error) {
|
|
15
|
+
return base_exception_1.BaseException.fromError(error);
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
})
|
|
19
|
+
.filter((exception) => exception !== null), error.message);
|
|
16
20
|
this.stack = error.stack;
|
|
17
21
|
}
|
|
18
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-error.exception.js","sourceRoot":"","sources":["../../src/exceptions/aggregate-error.exception.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AACpE,qDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,iDAAsB;IAClE,YAAmB,KAAqB;QACvC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAEzB,KAAK,CACJ,MAAM;aACJ,GAAG,CAAC,KAAK,CAAC,EAAE;YACZ,IAAI,KAAK,YAAY,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"aggregate-error.exception.js","sourceRoot":"","sources":["../../src/exceptions/aggregate-error.exception.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AACpE,qDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,iDAAsB;IAClE,YAAmB,KAAqB;QACvC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAEzB,KAAK,CACJ,MAAM;aACJ,GAAG,CAAC,KAAK,CAAC,EAAE;YACZ,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;gBACrC,iDAAsB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC5B,OAAO,8BAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC;YAED,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,SAAS,EAA8B,EAAE,CAAC,SAAS,KAAK,IAAI,CAAC,EACvE,KAAK,CAAC,OAAO,CACb,CAAC;QAED,IAAY,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IACnC,CAAC;CACD;AAtBD,0DAsBC"}
|
|
@@ -7,7 +7,7 @@ export declare abstract class BaseAggregateException extends BaseException {
|
|
|
7
7
|
readonly exceptions: BaseException[];
|
|
8
8
|
protected constructor(exceptions: BaseException[], message: string, options?: BaseAggregateExceptionOptions);
|
|
9
9
|
toJSON(): JSONBaseAggregateException;
|
|
10
|
-
static
|
|
10
|
+
static fromError(error: AggregateError): BaseAggregateException;
|
|
11
11
|
protected injectBeforeStack(padCount: number): string[];
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=base.aggregate.exception.d.ts.map
|
|
@@ -16,7 +16,7 @@ class BaseAggregateException extends base_exception_1.BaseException {
|
|
|
16
16
|
exceptions: this.exceptions.map(exception => exception.toJSON()),
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
static
|
|
19
|
+
static fromError(error) {
|
|
20
20
|
return new aggregate_error_exception_1.AggregateErrorException(error);
|
|
21
21
|
}
|
|
22
22
|
injectBeforeStack(padCount) {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="@hg-ts/types" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { InspectOptionsStylized, inspect } from 'util';
|
|
4
2
|
export type JSONBaseException = {
|
|
5
3
|
name: string;
|
|
@@ -27,7 +25,7 @@ export declare abstract class BaseException extends Error {
|
|
|
27
25
|
isFromNextTick(): boolean;
|
|
28
26
|
isFromImmediate(): boolean;
|
|
29
27
|
isFromTimer(): boolean;
|
|
30
|
-
static
|
|
28
|
+
static fromError(error: Error): BaseException;
|
|
31
29
|
protected getCtor(): Function;
|
|
32
30
|
protected getStringifyFirstLine(): string;
|
|
33
31
|
protected injectBeforeStack(padCount: number): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts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C,SAAS,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAQvD,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIhE,OAAO,CAAC,gBAAgB;CAKxB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseException = exports.PAD_COUNT_PER_DEPTH = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const os = tslib_1.__importStar(require("os"));
|
|
6
6
|
const util_1 = require("util");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const error_exception_1 = require("./error.exception");
|
|
@@ -51,7 +51,7 @@ class BaseException extends Error {
|
|
|
51
51
|
...this.injectBeforeStack(padCount + exports.PAD_COUNT_PER_DEPTH),
|
|
52
52
|
...formattedStack,
|
|
53
53
|
];
|
|
54
|
-
return errorLines.join(
|
|
54
|
+
return errorLines.join(os.EOL);
|
|
55
55
|
}
|
|
56
56
|
[util_1.inspect.custom](_depth, { stylize }) {
|
|
57
57
|
return stylize(this.toString(), 'regexp');
|
|
@@ -68,14 +68,8 @@ class BaseException extends Error {
|
|
|
68
68
|
const lastLine = this.getLastStackLine();
|
|
69
69
|
return lastLine.includes('Timeout._onTimeout');
|
|
70
70
|
}
|
|
71
|
-
static
|
|
72
|
-
|
|
73
|
-
return error;
|
|
74
|
-
}
|
|
75
|
-
if (error instanceof Error) {
|
|
76
|
-
return new error_exception_1.ErrorException(error);
|
|
77
|
-
}
|
|
78
|
-
return new error_exception_1.ErrorException(new Error(defaultMessage, { cause: error }));
|
|
71
|
+
static fromError(error) {
|
|
72
|
+
return new error_exception_1.ErrorException(error);
|
|
79
73
|
}
|
|
80
74
|
getCtor() {
|
|
81
75
|
return Object.getPrototypeOf(this).constructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.exception.js","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"base.exception.js","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,+BAGc;AAEd,oCAA+C;AAC/C,uDAAmD;AAetC,QAAA,mBAAmB,GAAG,CAAC,CAAC;AAErC,MAAsB,aAAc,SAAQ,KAAK;IAChC,IAAI,GAAqB,IAAI,CAAC;IACrB,KAAK,CAAS;IACd,OAAO,CAAS;IAChB,KAAK,CAAiB;IACvC,UAAU,GAAgC,IAAI,CAAC;IAEvD,YAAmB,OAAe,EAAE,gBAAkC,EAAE;QACvE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAGvB,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;QAClC,CAAC;QACD,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;QAChC,CAAC;QAED,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,IAAoB,IAAI;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAEhC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM;QACZ,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;YAC9B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAEnD,IAAI,CAAC,UAAU,GAAG;gBACjB,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,KAAK,EAAE,2BAAmB,CAAC,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AO,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAChD,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAY;QACnC,OAAO,IAAI,gCAAc,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAES,OAAO;QAChB,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAE,CAAC,WAAW,CAAC;IACjD,CAAC;IAES,qBAAqB;QAC9B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAE9C,OAAO,GAAG,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;IACxE,CAAC;IAES,iBAAiB,CAAC,QAAgB;QAC3C,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC9E,CAAC;QAED,OAAO,EAAE,CAAC;IACX,CAAC;IAES,MAAM,CAAC,OAAO,CAAC,IAAY,EAAE,QAAgB;QACtD,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC;IACzC,CAAC;IAEO,gBAAgB;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAEhC,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,CAAC;CACD;AAlHD,sCAkHC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
|
|
@@ -23,7 +23,7 @@ let SerializationTestSuite = class SerializationTestSuite extends tests_1.TestSu
|
|
|
23
23
|
async baseExceptionFromError() {
|
|
24
24
|
const message = 'Test message';
|
|
25
25
|
const error = new Error(message);
|
|
26
|
-
const exception = exceptions_1.BaseException.
|
|
26
|
+
const exception = exceptions_1.BaseException.fromError(error);
|
|
27
27
|
(0, tests_1.expect)(exception).toBeInstanceOf(Error);
|
|
28
28
|
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.BaseException);
|
|
29
29
|
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.ErrorException);
|
|
@@ -137,6 +137,6 @@ tslib_1.__decorate([
|
|
|
137
137
|
tslib_1.__metadata("design:returntype", Promise)
|
|
138
138
|
], SerializationTestSuite.prototype, "fromIntervalTest", null);
|
|
139
139
|
exports.SerializationTestSuite = SerializationTestSuite = tslib_1.__decorate([
|
|
140
|
-
(0, tests_1.
|
|
140
|
+
(0, tests_1.Suite)()
|
|
141
141
|
], SerializationTestSuite);
|
|
142
142
|
//# sourceMappingURL=serialization.test-suite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.test-suite.js","sourceRoot":"","sources":["../../src/tests/serialization.test-suite.ts"],"names":[],"mappings":";;;;AAAA,wBAAsB;AACtB,wCAKsB;AACtB,8CAIuB;AACvB,yEAAoE;AACpE,qDAAiD;AAG1C,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,iBAAS;IAEvC,A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M,SAAS,GAAG,IAAI,8BAAa,CAAC,cAAc,CAAC,CAAC;gBAEpD,IAAA,cAAM,EAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC7C,aAAa,CAAC,QAAQ,CAAC,CAAC;gBACxB,OAAO,EAAE,CAAC;YACX,CAAC,EAAE,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAxGY,wDAAsB;AAErB;IADZ,IAAA,YAAI,GAAE;;;;wDAaN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;oEAaN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;oEAeN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;2DAKN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;gEAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;iEAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;6DAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;8DAYN;iCAvGW,sBAAsB;IADlC,IAAA,aAAK,GAAE;GACK,sBAAsB,CAwGlC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@hg-ts/types';
|
|
2
|
-
import {
|
|
3
|
-
export declare class SerializationTestSuite extends
|
|
2
|
+
import { Suite } from '@hg-ts/tests';
|
|
3
|
+
export declare class SerializationTestSuite extends Suite {
|
|
4
4
|
commonTest(): Promise<void>;
|
|
5
5
|
baseExceptionFromError(): Promise<void>;
|
|
6
6
|
aggregateExceptionTest(): Promise<void>;
|
|
@@ -10,4 +10,4 @@ export declare class SerializationTestSuite extends TestSuite {
|
|
|
10
10
|
fromTimeoutTest(): Promise<void>;
|
|
11
11
|
fromIntervalTest(): Promise<void>;
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=serialization.test
|
|
13
|
+
//# sourceMappingURL=serialization.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.test.d.ts","sourceRoot":"","sources":["../../src/tests/serialization.test.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAIN,KAAK,EACL,MAAM,cAAc,CAAC;AAStB,qBACa,sBAAuB,SAAQ,KAAK;IAEnC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAe3B,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAevC,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBvC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYnC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYpC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAYhC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CAY9C"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SerializationTestSuite = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
require("@hg-ts/types");
|
|
6
|
+
const tests_1 = require("@hg-ts/tests");
|
|
7
|
+
const exceptions_1 = require("../exceptions");
|
|
8
|
+
const test_aggregate_exception_1 = require("./test.aggregate-exception");
|
|
9
|
+
const test_exception_1 = require("./test.exception");
|
|
10
|
+
let SerializationTestSuite = class SerializationTestSuite extends tests_1.Suite {
|
|
11
|
+
async commonTest() {
|
|
12
|
+
const message = 'Test message';
|
|
13
|
+
const exception = new test_exception_1.TestException(message);
|
|
14
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(Error);
|
|
15
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.BaseException);
|
|
16
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(test_exception_1.TestException);
|
|
17
|
+
(0, tests_1.expect)(exception.message).toEqual(message);
|
|
18
|
+
(0, tests_1.expect)(exception.code).toBeNull();
|
|
19
|
+
(0, tests_1.expect)(exception.toJSON().name).toEqual(test_exception_1.TestException.name);
|
|
20
|
+
(0, tests_1.expect)(exception.toJSON().stack).toBeInstanceOf(Array);
|
|
21
|
+
(0, tests_1.expect)(exception.toJSON().stack).not.toEqual([]);
|
|
22
|
+
}
|
|
23
|
+
async baseExceptionFromError() {
|
|
24
|
+
const message = 'Test message';
|
|
25
|
+
const error = new Error(message);
|
|
26
|
+
const exception = exceptions_1.BaseException.fromError(error);
|
|
27
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(Error);
|
|
28
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.BaseException);
|
|
29
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.ErrorException);
|
|
30
|
+
(0, tests_1.expect)(exception.message).toEqual(message);
|
|
31
|
+
(0, tests_1.expect)(exception.code).toBeNull();
|
|
32
|
+
(0, tests_1.expect)(exception.toJSON().stack).toBeInstanceOf(Array);
|
|
33
|
+
(0, tests_1.expect)(exception.toJSON().stack).not.toEqual([]);
|
|
34
|
+
}
|
|
35
|
+
async aggregateExceptionTest() {
|
|
36
|
+
const message = 'Test aggregate message';
|
|
37
|
+
const exception = new test_aggregate_exception_1.TestAggregateException(message);
|
|
38
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(Error);
|
|
39
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.BaseException);
|
|
40
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(exceptions_1.BaseAggregateException);
|
|
41
|
+
(0, tests_1.expect)(exception).toBeInstanceOf(test_aggregate_exception_1.TestAggregateException);
|
|
42
|
+
(0, tests_1.expect)(exception.message).toEqual(message);
|
|
43
|
+
(0, tests_1.expect)(exception.code).toBeNull();
|
|
44
|
+
(0, tests_1.expect)(exception.exceptions).toBeInstanceOf(Array);
|
|
45
|
+
(0, tests_1.expect)(exception.exceptions).toHaveLength(3);
|
|
46
|
+
}
|
|
47
|
+
async syncStackTest() {
|
|
48
|
+
const { stack } = new test_exception_1.TestException('Test message').toJSON();
|
|
49
|
+
(0, tests_1.expect)(stack[0].startsWith(`at ${this.constructor.name}.syncStackTest`)).toBeTruthy();
|
|
50
|
+
}
|
|
51
|
+
async isFromNextTickTest() {
|
|
52
|
+
return new Promise(resolve => {
|
|
53
|
+
process.nextTick(() => {
|
|
54
|
+
const exception = new test_exception_1.TestException('Test message');
|
|
55
|
+
(0, tests_1.expect)(exception.isFromNextTick()).toBeTruthy();
|
|
56
|
+
resolve();
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async isFromImmediateTest() {
|
|
61
|
+
return new Promise(resolve => {
|
|
62
|
+
setImmediate(() => {
|
|
63
|
+
const exception = new test_exception_1.TestException('Test message');
|
|
64
|
+
(0, tests_1.expect)(exception.isFromImmediate()).toBeTruthy();
|
|
65
|
+
resolve();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async fromTimeoutTest() {
|
|
70
|
+
return new Promise(resolve => {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
const exception = new test_exception_1.TestException('Test message');
|
|
73
|
+
(0, tests_1.expect)(exception.isFromTimer()).toBeTruthy();
|
|
74
|
+
resolve();
|
|
75
|
+
}, 0);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async fromIntervalTest() {
|
|
79
|
+
let interval;
|
|
80
|
+
return new Promise(resolve => {
|
|
81
|
+
interval = setInterval(() => {
|
|
82
|
+
const exception = new test_exception_1.TestException('Test message');
|
|
83
|
+
(0, tests_1.expect)(exception.isFromTimer()).toBeTruthy();
|
|
84
|
+
clearInterval(interval);
|
|
85
|
+
resolve();
|
|
86
|
+
}, 0);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
exports.SerializationTestSuite = SerializationTestSuite;
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, tests_1.Test)(),
|
|
93
|
+
tslib_1.__metadata("design:type", Function),
|
|
94
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
95
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
96
|
+
], SerializationTestSuite.prototype, "commonTest", null);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, tests_1.Test)(),
|
|
99
|
+
tslib_1.__metadata("design:type", Function),
|
|
100
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
101
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
102
|
+
], SerializationTestSuite.prototype, "baseExceptionFromError", null);
|
|
103
|
+
tslib_1.__decorate([
|
|
104
|
+
(0, tests_1.Test)(),
|
|
105
|
+
tslib_1.__metadata("design:type", Function),
|
|
106
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
107
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
108
|
+
], SerializationTestSuite.prototype, "aggregateExceptionTest", null);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, tests_1.Test)(),
|
|
111
|
+
tslib_1.__metadata("design:type", Function),
|
|
112
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
113
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
114
|
+
], SerializationTestSuite.prototype, "syncStackTest", null);
|
|
115
|
+
tslib_1.__decorate([
|
|
116
|
+
(0, tests_1.Test)(),
|
|
117
|
+
tslib_1.__metadata("design:type", Function),
|
|
118
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
119
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
120
|
+
], SerializationTestSuite.prototype, "isFromNextTickTest", null);
|
|
121
|
+
tslib_1.__decorate([
|
|
122
|
+
(0, tests_1.Test)(),
|
|
123
|
+
tslib_1.__metadata("design:type", Function),
|
|
124
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
125
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
126
|
+
], SerializationTestSuite.prototype, "isFromImmediateTest", null);
|
|
127
|
+
tslib_1.__decorate([
|
|
128
|
+
(0, tests_1.Test)(),
|
|
129
|
+
tslib_1.__metadata("design:type", Function),
|
|
130
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
131
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
132
|
+
], SerializationTestSuite.prototype, "fromTimeoutTest", null);
|
|
133
|
+
tslib_1.__decorate([
|
|
134
|
+
(0, tests_1.Test)(),
|
|
135
|
+
tslib_1.__metadata("design:type", Function),
|
|
136
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
137
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
138
|
+
], SerializationTestSuite.prototype, "fromIntervalTest", null);
|
|
139
|
+
exports.SerializationTestSuite = SerializationTestSuite = tslib_1.__decorate([
|
|
140
|
+
(0, tests_1.Describe)()
|
|
141
|
+
], SerializationTestSuite);
|
|
142
|
+
//# sourceMappingURL=serialization.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.test.js","sourceRoot":"","sources":["../../src/tests/serialization.test.ts"],"names":[],"mappings":";;;;AAAA,wBAAsB;AACtB,wCAKsB;AACtB,8CAIuB;AACvB,yEAAoE;AACpE,qDAAiD;AAG1C,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,aAAK;IAEnC,AAAN,KAAK,CAAC,UAAU;QACtB,MAAM,OAAO,GAAG,cAAc,CAAC;QAC/B,MAAM,SAAS,GAAG,IAAI,8BAAa,CAAC,OAAO,CAAC,CAAC;QAE7C,IAAA,cAAM,EAAC,SAAS,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACxC,IAAA,cAAM,EAAC,SAAS,CAAC,CAAC,cAAc,CAAC,0BAAa,CAAC,CAAC;QAChD,IAAA,cAAM,EAAC,SAAS,CAAC,CAAC,cAAc,CAAC,8BAAa,CAAC,CAAC;QAChD,IAAA,cAAM,EAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAA,cAAM,EAAC,SAA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AAC,CAAC;IACJ,CAAC;CACD,CAAA;AAxGY,wDAAsB;AAErB;IADZ,IAAA,YAAI,GAAE;;;;wDAaN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;oEAaN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;oEAeN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;2DAKN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;gEAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;iEAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;6DAUN;AAGY;IADZ,IAAA,YAAI,GAAE;;;;8DAYN;iCAvGW,sBAAsB;IADlC,IAAA,gBAAQ,GAAE;GACE,sBAAsB,CAwGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-trace.formatter.js","sourceRoot":"","sources":["../../src/utils/stack-trace.formatter.ts"],"names":[],"mappings":";;;;AAAA,oDAAoB;AACpB,sCAA+C;AAE/C,MAAa,mBAAmB;IACxB,MAAM,CAAC,MAAM,CAAC,KAAa,EAAE,aAAqB;QACxD,OAAO,mBAAmB,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC;IAES,MAAM,CAAC,aAAa,CAAC,KAAa,EAAE,aAAqB;QAClE,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,YAAE,CAAC,GAAG,CAAC;aAC7B,MAAM,CAAC,CAAC,CAAC;aACT,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;aACxE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3B,IAAI,2BAAkB,EAAE;
|
|
1
|
+
{"version":3,"file":"stack-trace.formatter.js","sourceRoot":"","sources":["../../src/utils/stack-trace.formatter.ts"],"names":[],"mappings":";;;;AAAA,oDAAoB;AACpB,sCAA+C;AAE/C,MAAa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+
"exports": {
|
|
6
|
+
".": "./dist/index.js"
|
|
7
|
+
},
|
|
6
8
|
"repository": "git@gitlab.com:hyper-graph/framework.git",
|
|
7
9
|
"scripts": {
|
|
8
|
-
"prepack": "yarn build && yarn lint && yarn test",
|
|
9
|
-
"build": "
|
|
10
|
-
"build:dev": "
|
|
11
|
-
"lint": "
|
|
12
|
-
"lint:fix": "
|
|
13
|
-
"test": "
|
|
14
|
-
"test:dev": "
|
|
15
|
-
"test:coverage": "hg test:coverage"
|
|
10
|
+
"prepack": "yarn build && yarn lint:ts && yarn test",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"build:dev": "tsc-watch",
|
|
13
|
+
"lint:ts": "lint-ts",
|
|
14
|
+
"lint:ts:fix": "lint-ts --fix",
|
|
15
|
+
"test": "node --test",
|
|
16
|
+
"test:dev": "yarn build:dev --onSuccess \"yarn test\""
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@hg-ts-config/
|
|
19
|
-
"@hg-ts
|
|
20
|
-
"@hg-ts
|
|
21
|
-
"@hg-ts/
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"mocha": "10.2.0",
|
|
29
|
-
"mocha-junit-reporter": "2.2.1",
|
|
30
|
-
"nyc": "15.1.0",
|
|
31
|
-
"reflect-metadata": "*",
|
|
32
|
-
"tsc-watch": "6.0.4",
|
|
33
|
-
"tslib": "2.6.2",
|
|
34
|
-
"typescript": "5.2.2"
|
|
19
|
+
"@hg-ts-config/typescript": "0.1.51",
|
|
20
|
+
"@hg-ts/linter": "0.1.51",
|
|
21
|
+
"@hg-ts/tests": "0.1.51",
|
|
22
|
+
"@hg-ts/types": "0.1.51",
|
|
23
|
+
"@types/node": "22.10.6",
|
|
24
|
+
"eslint": "9.18.0",
|
|
25
|
+
"reflect-metadata": "0.2.2",
|
|
26
|
+
"tsc-watch": "6.3.0",
|
|
27
|
+
"tslib": "2.8.1",
|
|
28
|
+
"typescript": "5.7.3"
|
|
35
29
|
},
|
|
36
30
|
"peerDependencies": {
|
|
37
31
|
"reflect-metadata": "*",
|
|
@@ -9,11 +9,15 @@ export class AggregateErrorException extends BaseAggregateException {
|
|
|
9
9
|
errors
|
|
10
10
|
.map(error => {
|
|
11
11
|
if (error instanceof AggregateError) {
|
|
12
|
-
BaseAggregateException.
|
|
12
|
+
BaseAggregateException.fromError(error);
|
|
13
|
+
}
|
|
14
|
+
if (error instanceof Error) {
|
|
15
|
+
return BaseException.fromError(error);
|
|
13
16
|
}
|
|
14
17
|
|
|
15
|
-
return
|
|
16
|
-
})
|
|
18
|
+
return null;
|
|
19
|
+
})
|
|
20
|
+
.filter((exception): exception is BaseException => exception !== null),
|
|
17
21
|
error.message,
|
|
18
22
|
);
|
|
19
23
|
|
|
@@ -34,7 +34,7 @@ export abstract class BaseAggregateException extends BaseException {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
public static override
|
|
37
|
+
public static override fromError(error: AggregateError): BaseAggregateException {
|
|
38
38
|
return new AggregateErrorException(error);
|
|
39
39
|
}
|
|
40
40
|
|