From 1a1e85c26bd69231755b8e180b6363e65bf7b16f Mon Sep 17 00:00:00 2001 From: Zane Rockenbaugh Date: Thu, 22 Aug 2024 17:27:19 -0500 Subject: [PATCH] Saving QA files for release v1.0.0-alpha.2. --- qa/coverage/base.css | 224 ++++++ qa/coverage/block-navigation.js | 87 ++ qa/coverage/clover.xml | 747 ++++++++++++++++++ qa/coverage/coverage-final.json | 50 ++ qa/coverage/favicon.png | Bin 0 -> 445 bytes qa/coverage/index.html | 131 +++ qa/coverage/prettify.css | 1 + qa/coverage/prettify.js | 2 + qa/coverage/sort-arrow-sprite.png | Bin 0 -> 138 bytes qa/coverage/sorter.js | 196 +++++ .../src/argument-invalid-error.mjs.html | 334 ++++++++ .../src/argument-missing-error.mjs.html | 241 ++++++ .../src/argument-out-of-range-error.mjs.html | 349 ++++++++ qa/coverage/src/argument-type-error.mjs.html | 301 +++++++ qa/coverage/src/auth-error.mjs.html | 199 +++++ .../authentication-required-error.mjs.html | 193 +++++ ...rization-conditions-not-met-error.mjs.html | 292 +++++++ .../src/common-error-settings.mjs.html | 322 ++++++++ qa/coverage/src/common-error.mjs.html | 232 ++++++ qa/coverage/src/connection-error.mjs.html | 247 ++++++ .../src/constraint-violation-error.mjs.html | 214 +++++ qa/coverage/src/data-service-error.mjs.html | 220 ++++++ qa/coverage/src/database-error.mjs.html | 268 +++++++ .../src/directory-not-found-error.mjs.html | 223 ++++++ qa/coverage/src/end-of-stream-error.mjs.html | 217 +++++ .../src/external-service-error.mjs.html | 220 ++++++ qa/coverage/src/file-load-error.mjs.html | 238 ++++++ qa/coverage/src/file-not-found-error.mjs.html | 244 ++++++ qa/coverage/src/index.html | 671 ++++++++++++++++ qa/coverage/src/io-error.mjs.html | 220 ++++++ qa/coverage/src/lib/connection-codes.mjs.html | 124 +++ .../src/lib/describe-directory.mjs.html | 94 +++ qa/coverage/src/lib/describe-file.mjs.html | 142 ++++ .../src/lib/generate-auth-message.mjs.html | 118 +++ .../lib/generate-constraint-message.mjs.html | 169 ++++ ...generate-external-service-message.mjs.html | 118 +++ .../lib/generate-io-error-message.mjs.html | 127 +++ .../lib/generate-no-access-message.mjs.html | 121 +++ .../lib/generate-not-found-message.mjs.html | 136 ++++ qa/coverage/src/lib/hoist-error-code.mjs.html | 109 +++ qa/coverage/src/lib/index.html | 266 +++++++ .../src/lib/valid-error-names.mjs.html | 145 ++++ qa/coverage/src/local-rollback-error.mjs.html | 208 +++++ .../src/local-transaction-error.mjs.html | 211 +++++ .../src/map-error-to-http-status.mjs.html | 313 ++++++++ .../src/map-http-status-to-name.mjs.html | 334 ++++++++ .../src/mask-no-access-errors.mjs.html | 154 ++++ .../src/no-access-directory-error.mjs.html | 220 ++++++ qa/coverage/src/no-access-error.mjs.html | 235 ++++++ qa/coverage/src/no-access-file-error.mjs.html | 235 ++++++ qa/coverage/src/not-found-error.mjs.html | 196 +++++ .../src/not-implemented-error.mjs.html | 232 ++++++ qa/coverage/src/not-supported-error.mjs.html | 274 +++++++ .../operation-not-permitted-error.mjs.html | 235 ++++++ qa/coverage/src/rollback-error.mjs.html | 226 ++++++ qa/coverage/src/system-error.mjs.html | 199 +++++ qa/coverage/src/timeout-error.mjs.html | 190 +++++ qa/coverage/src/transaction-error.mjs.html | 226 ++++++ qa/coverage/src/unavailable-error.mjs.html | 247 ++++++ ...unique-constraint-violation-error.mjs.html | 199 +++++ qa/coverage/src/wrap-error.mjs.html | 355 +++++++++ qa/lint.txt | 1 + qa/unit-test.txt | 90 +++ 63 files changed, 13132 insertions(+) create mode 100644 qa/coverage/base.css create mode 100644 qa/coverage/block-navigation.js create mode 100644 qa/coverage/clover.xml create mode 100644 qa/coverage/coverage-final.json create mode 100644 qa/coverage/favicon.png create mode 100644 qa/coverage/index.html create mode 100644 qa/coverage/prettify.css create mode 100644 qa/coverage/prettify.js create mode 100644 qa/coverage/sort-arrow-sprite.png create mode 100644 qa/coverage/sorter.js create mode 100644 qa/coverage/src/argument-invalid-error.mjs.html create mode 100644 qa/coverage/src/argument-missing-error.mjs.html create mode 100644 qa/coverage/src/argument-out-of-range-error.mjs.html create mode 100644 qa/coverage/src/argument-type-error.mjs.html create mode 100644 qa/coverage/src/auth-error.mjs.html create mode 100644 qa/coverage/src/authentication-required-error.mjs.html create mode 100644 qa/coverage/src/authorization-conditions-not-met-error.mjs.html create mode 100644 qa/coverage/src/common-error-settings.mjs.html create mode 100644 qa/coverage/src/common-error.mjs.html create mode 100644 qa/coverage/src/connection-error.mjs.html create mode 100644 qa/coverage/src/constraint-violation-error.mjs.html create mode 100644 qa/coverage/src/data-service-error.mjs.html create mode 100644 qa/coverage/src/database-error.mjs.html create mode 100644 qa/coverage/src/directory-not-found-error.mjs.html create mode 100644 qa/coverage/src/end-of-stream-error.mjs.html create mode 100644 qa/coverage/src/external-service-error.mjs.html create mode 100644 qa/coverage/src/file-load-error.mjs.html create mode 100644 qa/coverage/src/file-not-found-error.mjs.html create mode 100644 qa/coverage/src/index.html create mode 100644 qa/coverage/src/io-error.mjs.html create mode 100644 qa/coverage/src/lib/connection-codes.mjs.html create mode 100644 qa/coverage/src/lib/describe-directory.mjs.html create mode 100644 qa/coverage/src/lib/describe-file.mjs.html create mode 100644 qa/coverage/src/lib/generate-auth-message.mjs.html create mode 100644 qa/coverage/src/lib/generate-constraint-message.mjs.html create mode 100644 qa/coverage/src/lib/generate-external-service-message.mjs.html create mode 100644 qa/coverage/src/lib/generate-io-error-message.mjs.html create mode 100644 qa/coverage/src/lib/generate-no-access-message.mjs.html create mode 100644 qa/coverage/src/lib/generate-not-found-message.mjs.html create mode 100644 qa/coverage/src/lib/hoist-error-code.mjs.html create mode 100644 qa/coverage/src/lib/index.html create mode 100644 qa/coverage/src/lib/valid-error-names.mjs.html create mode 100644 qa/coverage/src/local-rollback-error.mjs.html create mode 100644 qa/coverage/src/local-transaction-error.mjs.html create mode 100644 qa/coverage/src/map-error-to-http-status.mjs.html create mode 100644 qa/coverage/src/map-http-status-to-name.mjs.html create mode 100644 qa/coverage/src/mask-no-access-errors.mjs.html create mode 100644 qa/coverage/src/no-access-directory-error.mjs.html create mode 100644 qa/coverage/src/no-access-error.mjs.html create mode 100644 qa/coverage/src/no-access-file-error.mjs.html create mode 100644 qa/coverage/src/not-found-error.mjs.html create mode 100644 qa/coverage/src/not-implemented-error.mjs.html create mode 100644 qa/coverage/src/not-supported-error.mjs.html create mode 100644 qa/coverage/src/operation-not-permitted-error.mjs.html create mode 100644 qa/coverage/src/rollback-error.mjs.html create mode 100644 qa/coverage/src/system-error.mjs.html create mode 100644 qa/coverage/src/timeout-error.mjs.html create mode 100644 qa/coverage/src/transaction-error.mjs.html create mode 100644 qa/coverage/src/unavailable-error.mjs.html create mode 100644 qa/coverage/src/unique-constraint-violation-error.mjs.html create mode 100644 qa/coverage/src/wrap-error.mjs.html create mode 100644 qa/lint.txt create mode 100644 qa/unit-test.txt diff --git a/qa/coverage/base.css b/qa/coverage/base.css new file mode 100644 index 0000000..f418035 --- /dev/null +++ b/qa/coverage/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/qa/coverage/block-navigation.js b/qa/coverage/block-navigation.js new file mode 100644 index 0000000..cc12130 --- /dev/null +++ b/qa/coverage/block-navigation.js @@ -0,0 +1,87 @@ +/* eslint-disable */ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + if ( + document.getElementById('fileSearch') === document.activeElement && + document.activeElement != null + ) { + // if we're currently focused on the search input, we don't want to navigate + return; + } + + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/qa/coverage/clover.xml b/qa/coverage/clover.xml new file mode 100644 index 0000000..f5c3204 --- /dev/null +++ b/qa/coverage/clover.xml @@ -0,0 +1,747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/qa/coverage/coverage-final.json b/qa/coverage/coverage-final.json new file mode 100644 index 0000000..785f4d1 --- /dev/null +++ b/qa/coverage/coverage-final.json @@ -0,0 +1,50 @@ +{"/Users/zane/playground/standard-error-set/src/argument-invalid-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/argument-invalid-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":37}},"4":{"start":{"line":17,"column":26},"end":{"line":17,"column":null}},"5":{"start":{"line":44,"column":98},"end":{"line":44,"column":96}},"6":{"start":{"line":44,"column":96},"end":{"line":44,"column":20}},"7":{"start":{"line":44,"column":20},"end":{"line":44,"column":31}},"8":{"start":{"line":44,"column":29},"end":{"line":44,"column":43}},"9":{"start":{"line":44,"column":43},"end":{"line":44,"column":57}},"10":{"start":{"line":44,"column":55},"end":{"line":44,"column":62}},"11":{"start":{"line":44,"column":62},"end":{"line":44,"column":82}},"12":{"start":{"line":44,"column":89},"end":{"line":44,"column":94}},"13":{"start":{"line":45,"column":4},"end":{"line":45,"column":null}},"14":{"start":{"line":45,"column":93},"end":{"line":46,"column":null}},"15":{"start":{"line":47,"column":3},"end":{"line":47,"column":null}},"16":{"start":{"line":50,"column":0},"end":{"line":50,"column":null}},"17":{"start":{"line":52,"column":0},"end":{"line":52,"column":null}},"18":{"start":{"line":54,"column":24},"end":{"line":81,"column":1}},"19":{"start":{"line":54,"column":39},"end":{"line":54,"column":38}},"20":{"start":{"line":54,"column":52},"end":{"line":54,"column":51}},"21":{"start":{"line":54,"column":66},"end":{"line":54,"column":65}},"22":{"start":{"line":54,"column":80},"end":{"line":54,"column":79}},"23":{"start":{"line":54,"column":95},"end":{"line":54,"column":94}},"24":{"start":{"line":54,"column":102},"end":{"line":54,"column":101}},"25":{"start":{"line":55,"column":16},"end":{"line":55,"column":82}},"26":{"start":{"line":56,"column":2},"end":{"line":58,"column":null}},"27":{"start":{"line":57,"column":4},"end":{"line":57,"column":null}},"28":{"start":{"line":59,"column":2},"end":{"line":61,"column":null}},"29":{"start":{"line":60,"column":4},"end":{"line":60,"column":null}},"30":{"start":{"line":62,"column":2},"end":{"line":62,"column":null}},"31":{"start":{"line":63,"column":2},"end":{"line":65,"column":null}},"32":{"start":{"line":64,"column":4},"end":{"line":64,"column":null}},"33":{"start":{"line":66,"column":2},"end":{"line":77,"column":null}},"34":{"start":{"line":67,"column":4},"end":{"line":76,"column":null}},"35":{"start":{"line":68,"column":6},"end":{"line":68,"column":null}},"36":{"start":{"line":71,"column":6},"end":{"line":75,"column":null}},"37":{"start":{"line":72,"column":28},"end":{"line":72,"column":125}},"38":{"start":{"line":73,"column":8},"end":{"line":73,"column":null}},"39":{"start":{"line":78,"column":2},"end":{"line":78,"column":null}},"40":{"start":{"line":80,"column":2},"end":{"line":80,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":17,"column":26},"end":{"line":17,"column":43}},"loc":{"start":{"line":17,"column":26},"end":{"line":47,"column":null}}},"2":{"name":"ArgumentInvalidError","decl":{"start":{"line":44,"column":2},"end":{"line":44,"column":16}},"loc":{"start":{"line":44,"column":98},"end":{"line":47,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":54,"column":6},"end":{"line":54,"column":21}},"loc":{"start":{"line":54,"column":109},"end":{"line":81,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":44,"column":98},"end":{"line":44,"column":96}},"type":"cond-expr","locations":[{"start":{"line":44,"column":98},"end":{"line":44,"column":null}},{"start":{"line":44,"column":94},"end":{"line":44,"column":96}}]},"3":{"loc":{"start":{"line":44,"column":98},"end":{"line":44,"column":null}},"type":"binary-expr","locations":[{"start":{"line":44,"column":98},"end":{"line":44,"column":null}},{"start":{"line":44,"column":98},"end":{"line":44,"column":null}}]},"4":{"loc":{"start":{"line":44,"column":20},"end":{"line":44,"column":31}},"type":"cond-expr","locations":[{"start":{"line":44,"column":23},"end":{"line":44,"column":29}},{"start":{"line":44,"column":29},"end":{"line":44,"column":31}}]},"5":{"loc":{"start":{"line":44,"column":43},"end":{"line":44,"column":57}},"type":"cond-expr","locations":[{"start":{"line":44,"column":46},"end":{"line":44,"column":55}},{"start":{"line":44,"column":55},"end":{"line":44,"column":57}}]},"6":{"loc":{"start":{"line":44,"column":62},"end":{"line":44,"column":82}},"type":"cond-expr","locations":[{"start":{"line":44,"column":65},"end":{"line":44,"column":77}},{"start":{"line":44,"column":77},"end":{"line":44,"column":82}}]},"7":{"loc":{"start":{"line":45,"column":22},"end":{"line":45,"column":93}},"type":"binary-expr","locations":[{"start":{"line":45,"column":22},"end":{"line":45,"column":37}},{"start":{"line":45,"column":41},"end":{"line":45,"column":93}}]},"8":{"loc":{"start":{"line":56,"column":2},"end":{"line":58,"column":null}},"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":58,"column":null}}]},"9":{"loc":{"start":{"line":57,"column":15},"end":{"line":57,"column":95}},"type":"cond-expr","locations":[{"start":{"line":57,"column":41},"end":{"line":57,"column":81}},{"start":{"line":57,"column":70},"end":{"line":57,"column":95}}]},"10":{"loc":{"start":{"line":59,"column":2},"end":{"line":61,"column":null}},"type":"if","locations":[{"start":{"line":59,"column":2},"end":{"line":61,"column":null}}]},"11":{"loc":{"start":{"line":60,"column":18},"end":{"line":60,"column":54}},"type":"cond-expr","locations":[{"start":{"line":60,"column":46},"end":{"line":60,"column":49}},{"start":{"line":60,"column":52},"end":{"line":60,"column":54}}]},"12":{"loc":{"start":{"line":63,"column":2},"end":{"line":65,"column":null}},"type":"if","locations":[{"start":{"line":63,"column":2},"end":{"line":65,"column":null}}]},"13":{"loc":{"start":{"line":66,"column":2},"end":{"line":77,"column":null}},"type":"if","locations":[{"start":{"line":66,"column":2},"end":{"line":77,"column":null}}]},"14":{"loc":{"start":{"line":67,"column":4},"end":{"line":76,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":76,"column":null}},{"start":{"line":70,"column":9},"end":{"line":76,"column":null}}]},"15":{"loc":{"start":{"line":72,"column":44},"end":{"line":72,"column":125}},"type":"cond-expr","locations":[{"start":{"line":72,"column":80},"end":{"line":72,"column":109}},{"start":{"line":72,"column":112},"end":{"line":72,"column":125}}]}},"s":{"0":9,"1":9,"2":1455,"3":9,"4":9,"5":56,"6":56,"7":56,"8":56,"9":56,"10":56,"11":56,"12":112,"13":56,"14":56,"15":18,"16":9,"17":9,"18":9,"19":51,"20":51,"21":51,"22":51,"23":51,"24":51,"25":51,"26":51,"27":9,"28":51,"29":18,"30":51,"31":51,"32":21,"33":51,"34":13,"35":1,"36":12,"37":12,"38":12,"39":51,"40":51},"f":{"0":574,"1":9,"2":56,"3":51},"b":{"0":[107],"1":[433,107],"2":[50,6],"3":[56,51],"4":[25,31],"5":[52,4],"6":[22,34],"7":[56,51],"8":[9],"9":[1,8],"10":[18],"11":[10,8],"12":[21],"13":[13],"14":[1,12],"15":[0,12]}} +,"/Users/zane/playground/standard-error-set/src/argument-missing-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/argument-missing-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":37}},"4":{"start":{"line":17,"column":26},"end":{"line":17,"column":null}},"5":{"start":{"line":43,"column":81},"end":{"line":43,"column":79}},"6":{"start":{"line":43,"column":79},"end":{"line":43,"column":20}},"7":{"start":{"line":43,"column":20},"end":{"line":43,"column":31}},"8":{"start":{"line":43,"column":29},"end":{"line":43,"column":36}},"9":{"start":{"line":43,"column":36},"end":{"line":43,"column":65}},"10":{"start":{"line":43,"column":72},"end":{"line":43,"column":77}},"11":{"start":{"line":43,"column":72},"end":{"line":44,"column":null}},"12":{"start":{"line":45,"column":3},"end":{"line":45,"column":null}},"13":{"start":{"line":48,"column":0},"end":{"line":48,"column":null}},"14":{"start":{"line":50,"column":0},"end":{"line":50,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":17,"column":26},"end":{"line":17,"column":43}},"loc":{"start":{"line":17,"column":26},"end":{"line":45,"column":null}}},"2":{"name":"ArgumentMissingError","decl":{"start":{"line":43,"column":2},"end":{"line":43,"column":16}},"loc":{"start":{"line":43,"column":81},"end":{"line":45,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":43,"column":81},"end":{"line":43,"column":79}},"type":"cond-expr","locations":[{"start":{"line":43,"column":81},"end":{"line":43,"column":null}},{"start":{"line":43,"column":77},"end":{"line":43,"column":79}}]},"3":{"loc":{"start":{"line":43,"column":81},"end":{"line":43,"column":null}},"type":"binary-expr","locations":[{"start":{"line":43,"column":81},"end":{"line":43,"column":null}},{"start":{"line":43,"column":81},"end":{"line":43,"column":null}}]},"4":{"loc":{"start":{"line":43,"column":20},"end":{"line":43,"column":31}},"type":"cond-expr","locations":[{"start":{"line":43,"column":23},"end":{"line":43,"column":29}},{"start":{"line":43,"column":29},"end":{"line":43,"column":31}}]},"5":{"loc":{"start":{"line":43,"column":36},"end":{"line":43,"column":65}},"type":"cond-expr","locations":[{"start":{"line":43,"column":39},"end":{"line":43,"column":60}},{"start":{"line":43,"column":60},"end":{"line":43,"column":65}}]}},"s":{"0":3,"1":3,"2":100,"3":3,"4":3,"5":7,"6":7,"7":7,"8":7,"9":7,"10":14,"11":7,"12":6,"13":3,"14":3},"f":{"0":39,"1":3,"2":7},"b":{"0":[7],"1":[35,7],"2":[6,1],"3":[7,7],"4":[7,0],"5":[6,1]}} +,"/Users/zane/playground/standard-error-set/src/argument-out-of-range-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/argument-out-of-range-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":40}},"4":{"start":{"line":16,"column":29},"end":{"line":16,"column":null}},"5":{"start":{"line":49,"column":77},"end":{"line":49,"column":75}},"6":{"start":{"line":49,"column":75},"end":{"line":49,"column":20}},"7":{"start":{"line":49,"column":20},"end":{"line":49,"column":31}},"8":{"start":{"line":49,"column":29},"end":{"line":49,"column":36}},"9":{"start":{"line":49,"column":36},"end":{"line":49,"column":61}},"10":{"start":{"line":49,"column":68},"end":{"line":49,"column":73}},"11":{"start":{"line":50,"column":4},"end":{"line":50,"column":null}},"12":{"start":{"line":51,"column":4},"end":{"line":51,"column":null}},"13":{"start":{"line":51,"column":43},"end":{"line":51,"column":null}},"14":{"start":{"line":52,"column":3},"end":{"line":52,"column":null}},"15":{"start":{"line":55,"column":0},"end":{"line":55,"column":null}},"16":{"start":{"line":57,"column":0},"end":{"line":57,"column":null}},"17":{"start":{"line":59,"column":23},"end":{"line":86,"column":1}},"18":{"start":{"line":59,"column":29},"end":{"line":59,"column":28}},"19":{"start":{"line":59,"column":42},"end":{"line":59,"column":41}},"20":{"start":{"line":59,"column":47},"end":{"line":59,"column":46}},"21":{"start":{"line":59,"column":60},"end":{"line":59,"column":59}},"22":{"start":{"line":60,"column":16},"end":{"line":60,"column":18}},"23":{"start":{"line":61,"column":2},"end":{"line":83,"column":null}},"24":{"start":{"line":62,"column":4},"end":{"line":62,"column":null}},"25":{"start":{"line":64,"column":4},"end":{"line":69,"column":null}},"26":{"start":{"line":65,"column":6},"end":{"line":65,"column":null}},"27":{"start":{"line":67,"column":9},"end":{"line":69,"column":null}},"28":{"start":{"line":68,"column":6},"end":{"line":68,"column":null}},"29":{"start":{"line":71,"column":4},"end":{"line":73,"column":null}},"30":{"start":{"line":72,"column":6},"end":{"line":72,"column":null}},"31":{"start":{"line":75,"column":4},"end":{"line":80,"column":null}},"32":{"start":{"line":76,"column":6},"end":{"line":76,"column":null}},"33":{"start":{"line":78,"column":9},"end":{"line":80,"column":null}},"34":{"start":{"line":79,"column":6},"end":{"line":79,"column":null}},"35":{"start":{"line":82,"column":4},"end":{"line":82,"column":null}},"36":{"start":{"line":85,"column":2},"end":{"line":85,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":29},"end":{"line":16,"column":46}},"loc":{"start":{"line":16,"column":29},"end":{"line":52,"column":null}}},"2":{"name":"ArgumentOutOfRangeError","decl":{"start":{"line":49,"column":2},"end":{"line":49,"column":16}},"loc":{"start":{"line":49,"column":77},"end":{"line":52,"column":3}}},"3":{"name":"agumentMessage","decl":{"start":{"line":59,"column":6},"end":{"line":59,"column":20}},"loc":{"start":{"line":59,"column":67},"end":{"line":86,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":49,"column":77},"end":{"line":49,"column":75}},"type":"cond-expr","locations":[{"start":{"line":49,"column":77},"end":{"line":49,"column":null}},{"start":{"line":49,"column":73},"end":{"line":49,"column":75}}]},"3":{"loc":{"start":{"line":49,"column":77},"end":{"line":49,"column":null}},"type":"binary-expr","locations":[{"start":{"line":49,"column":77},"end":{"line":49,"column":null}},{"start":{"line":49,"column":77},"end":{"line":49,"column":null}}]},"4":{"loc":{"start":{"line":49,"column":20},"end":{"line":49,"column":31}},"type":"cond-expr","locations":[{"start":{"line":49,"column":23},"end":{"line":49,"column":29}},{"start":{"line":49,"column":29},"end":{"line":49,"column":31}}]},"5":{"loc":{"start":{"line":49,"column":36},"end":{"line":49,"column":61}},"type":"cond-expr","locations":[{"start":{"line":49,"column":39},"end":{"line":49,"column":56}},{"start":{"line":49,"column":56},"end":{"line":49,"column":61}}]},"6":{"loc":{"start":{"line":61,"column":2},"end":{"line":83,"column":null}},"type":"if","locations":[{"start":{"line":61,"column":2},"end":{"line":83,"column":null}}]},"7":{"loc":{"start":{"line":61,"column":6},"end":{"line":61,"column":102}},"type":"binary-expr","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":23}},{"start":{"line":61,"column":27},"end":{"line":61,"column":52}},{"start":{"line":61,"column":56},"end":{"line":61,"column":73}},{"start":{"line":61,"column":77},"end":{"line":61,"column":102}}]},"8":{"loc":{"start":{"line":64,"column":4},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":64,"column":4},"end":{"line":69,"column":null}},{"start":{"line":67,"column":9},"end":{"line":69,"column":null}}]},"9":{"loc":{"start":{"line":67,"column":9},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":9},"end":{"line":69,"column":null}}]},"10":{"loc":{"start":{"line":71,"column":4},"end":{"line":73,"column":null}},"type":"if","locations":[{"start":{"line":71,"column":4},"end":{"line":73,"column":null}}]},"11":{"loc":{"start":{"line":71,"column":8},"end":{"line":71,"column":108}},"type":"binary-expr","locations":[{"start":{"line":71,"column":9},"end":{"line":71,"column":26}},{"start":{"line":71,"column":30},"end":{"line":71,"column":55}},{"start":{"line":71,"column":61},"end":{"line":71,"column":78}},{"start":{"line":71,"column":82},"end":{"line":71,"column":107}}]},"12":{"loc":{"start":{"line":75,"column":4},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":75,"column":4},"end":{"line":80,"column":null}},{"start":{"line":78,"column":9},"end":{"line":80,"column":null}}]},"13":{"loc":{"start":{"line":78,"column":9},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":78,"column":9},"end":{"line":80,"column":null}}]}},"s":{"0":4,"1":4,"2":192,"3":4,"4":4,"5":13,"6":13,"7":13,"8":13,"9":13,"10":26,"11":13,"12":13,"13":13,"14":8,"15":4,"16":4,"17":4,"18":13,"19":13,"20":13,"21":13,"22":13,"23":13,"24":13,"25":13,"26":1,"27":12,"28":1,"29":13,"30":1,"31":13,"32":2,"33":11,"34":1,"35":13,"36":13},"f":{"0":80,"1":4,"2":13,"3":13},"b":{"0":[13],"1":[65,13],"2":[12,1],"3":[13,13],"4":[13,0],"5":[13,0],"6":[13],"7":[13,2,2,0],"8":[1,12],"9":[1],"10":[1],"11":[13,11,3,3],"12":[2,11],"13":[1]}} +,"/Users/zane/playground/standard-error-set/src/argument-type-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/argument-type-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":34}},"4":{"start":{"line":16,"column":23},"end":{"line":16,"column":null}},"5":{"start":{"line":43,"column":75},"end":{"line":43,"column":73}},"6":{"start":{"line":43,"column":73},"end":{"line":43,"column":20}},"7":{"start":{"line":43,"column":20},"end":{"line":43,"column":31}},"8":{"start":{"line":43,"column":29},"end":{"line":43,"column":36}},"9":{"start":{"line":43,"column":36},"end":{"line":43,"column":59}},"10":{"start":{"line":43,"column":66},"end":{"line":43,"column":71}},"11":{"start":{"line":44,"column":4},"end":{"line":44,"column":null}},"12":{"start":{"line":45,"column":4},"end":{"line":45,"column":null}},"13":{"start":{"line":45,"column":43},"end":{"line":45,"column":null}},"14":{"start":{"line":46,"column":3},"end":{"line":46,"column":null}},"15":{"start":{"line":49,"column":0},"end":{"line":49,"column":null}},"16":{"start":{"line":51,"column":0},"end":{"line":51,"column":null}},"17":{"start":{"line":53,"column":23},"end":{"line":70,"column":1}},"18":{"start":{"line":53,"column":38},"end":{"line":53,"column":37}},"19":{"start":{"line":53,"column":52},"end":{"line":53,"column":51}},"20":{"start":{"line":54,"column":20},"end":{"line":54,"column":22}},"21":{"start":{"line":55,"column":2},"end":{"line":57,"column":null}},"22":{"start":{"line":56,"column":4},"end":{"line":56,"column":null}},"23":{"start":{"line":58,"column":2},"end":{"line":63,"column":null}},"24":{"start":{"line":59,"column":4},"end":{"line":61,"column":null}},"25":{"start":{"line":60,"column":6},"end":{"line":60,"column":null}},"26":{"start":{"line":62,"column":4},"end":{"line":62,"column":null}},"27":{"start":{"line":65,"column":2},"end":{"line":67,"column":null}},"28":{"start":{"line":66,"column":4},"end":{"line":66,"column":null}},"29":{"start":{"line":69,"column":2},"end":{"line":69,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":23},"end":{"line":16,"column":40}},"loc":{"start":{"line":16,"column":23},"end":{"line":46,"column":null}}},"2":{"name":"ArgumentTypeError","decl":{"start":{"line":43,"column":2},"end":{"line":43,"column":16}},"loc":{"start":{"line":43,"column":75},"end":{"line":46,"column":3}}},"3":{"name":"augmentMessage","decl":{"start":{"line":53,"column":6},"end":{"line":53,"column":20}},"loc":{"start":{"line":53,"column":59},"end":{"line":70,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":43,"column":75},"end":{"line":43,"column":73}},"type":"cond-expr","locations":[{"start":{"line":43,"column":75},"end":{"line":43,"column":null}},{"start":{"line":43,"column":71},"end":{"line":43,"column":73}}]},"3":{"loc":{"start":{"line":43,"column":75},"end":{"line":43,"column":null}},"type":"binary-expr","locations":[{"start":{"line":43,"column":75},"end":{"line":43,"column":null}},{"start":{"line":43,"column":75},"end":{"line":43,"column":null}}]},"4":{"loc":{"start":{"line":43,"column":20},"end":{"line":43,"column":31}},"type":"cond-expr","locations":[{"start":{"line":43,"column":23},"end":{"line":43,"column":29}},{"start":{"line":43,"column":29},"end":{"line":43,"column":31}}]},"5":{"loc":{"start":{"line":43,"column":36},"end":{"line":43,"column":59}},"type":"cond-expr","locations":[{"start":{"line":43,"column":39},"end":{"line":43,"column":54}},{"start":{"line":43,"column":54},"end":{"line":43,"column":59}}]},"6":{"loc":{"start":{"line":55,"column":2},"end":{"line":57,"column":null}},"type":"if","locations":[{"start":{"line":55,"column":2},"end":{"line":57,"column":null}}]},"7":{"loc":{"start":{"line":58,"column":2},"end":{"line":63,"column":null}},"type":"if","locations":[{"start":{"line":58,"column":2},"end":{"line":63,"column":null}}]},"8":{"loc":{"start":{"line":59,"column":4},"end":{"line":61,"column":null}},"type":"if","locations":[{"start":{"line":59,"column":4},"end":{"line":61,"column":null}}]},"9":{"loc":{"start":{"line":65,"column":2},"end":{"line":67,"column":null}},"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":67,"column":null}}]}},"s":{"0":4,"1":4,"2":159,"3":4,"4":4,"5":11,"6":11,"7":11,"8":11,"9":11,"10":22,"11":11,"12":11,"13":11,"14":8,"15":4,"16":4,"17":4,"18":11,"19":11,"20":11,"21":11,"22":2,"23":11,"24":2,"25":1,"26":2,"27":11,"28":3,"29":11},"f":{"0":63,"1":4,"2":11,"3":11},"b":{"0":[11],"1":[55,11],"2":[10,1],"3":[11,11],"4":[11,0],"5":[10,1],"6":[2],"7":[2],"8":[1],"9":[3]}} +,"/Users/zane/playground/standard-error-set/src/auth-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/auth-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":26}},"5":{"start":{"line":17,"column":15},"end":{"line":17,"column":null}},"6":{"start":{"line":28,"column":98},"end":{"line":28,"column":96}},"7":{"start":{"line":28,"column":96},"end":{"line":28,"column":20}},"8":{"start":{"line":28,"column":20},"end":{"line":28,"column":31}},"9":{"start":{"line":28,"column":29},"end":{"line":28,"column":37}},"10":{"start":{"line":28,"column":37},"end":{"line":28,"column":50}},"11":{"start":{"line":28,"column":48},"end":{"line":28,"column":55}},"12":{"start":{"line":28,"column":55},"end":{"line":28,"column":82}},"13":{"start":{"line":28,"column":89},"end":{"line":28,"column":94}},"14":{"start":{"line":29,"column":4},"end":{"line":29,"column":null}},"15":{"start":{"line":29,"column":91},"end":{"line":30,"column":null}},"16":{"start":{"line":31,"column":3},"end":{"line":31,"column":null}},"17":{"start":{"line":34,"column":0},"end":{"line":34,"column":null}},"18":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":17,"column":15},"end":{"line":17,"column":32}},"loc":{"start":{"line":17,"column":15},"end":{"line":31,"column":null}}},"2":{"name":"AuthError","decl":{"start":{"line":28,"column":2},"end":{"line":28,"column":16}},"loc":{"start":{"line":28,"column":98},"end":{"line":31,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":28,"column":98},"end":{"line":28,"column":96}},"type":"cond-expr","locations":[{"start":{"line":28,"column":98},"end":{"line":28,"column":null}},{"start":{"line":28,"column":94},"end":{"line":28,"column":96}}]},"3":{"loc":{"start":{"line":28,"column":98},"end":{"line":28,"column":null}},"type":"binary-expr","locations":[{"start":{"line":28,"column":98},"end":{"line":28,"column":null}},{"start":{"line":28,"column":98},"end":{"line":28,"column":null}}]},"4":{"loc":{"start":{"line":28,"column":20},"end":{"line":28,"column":31}},"type":"cond-expr","locations":[{"start":{"line":28,"column":23},"end":{"line":28,"column":29}},{"start":{"line":28,"column":29},"end":{"line":28,"column":31}}]},"5":{"loc":{"start":{"line":28,"column":37},"end":{"line":28,"column":50}},"type":"cond-expr","locations":[{"start":{"line":28,"column":40},"end":{"line":28,"column":48}},{"start":{"line":28,"column":48},"end":{"line":28,"column":50}}]},"6":{"loc":{"start":{"line":28,"column":55},"end":{"line":28,"column":82}},"type":"cond-expr","locations":[{"start":{"line":28,"column":58},"end":{"line":28,"column":77}},{"start":{"line":28,"column":77},"end":{"line":28,"column":82}}]},"7":{"loc":{"start":{"line":29,"column":22},"end":{"line":29,"column":91}},"type":"binary-expr","locations":[{"start":{"line":29,"column":22},"end":{"line":29,"column":37}},{"start":{"line":29,"column":41},"end":{"line":29,"column":91}}]}},"s":{"0":8,"1":8,"2":8,"3":633,"4":8,"5":8,"6":34,"7":34,"8":34,"9":34,"10":34,"11":34,"12":34,"13":68,"14":34,"15":34,"16":16,"17":8,"18":8},"f":{"0":269,"1":8,"2":34},"b":{"0":[43],"1":[197,43],"2":[34,0],"3":[34,34],"4":[0,34],"5":[24,10],"6":[18,16],"7":[34,9]}} +,"/Users/zane/playground/standard-error-set/src/authentication-required-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/authentication-required-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":44}},"4":{"start":{"line":11,"column":33},"end":{"line":11,"column":null}},"5":{"start":{"line":27,"column":104},"end":{"line":27,"column":102}},"6":{"start":{"line":27,"column":102},"end":{"line":27,"column":20}},"7":{"start":{"line":27,"column":20},"end":{"line":27,"column":31}},"8":{"start":{"line":27,"column":29},"end":{"line":27,"column":37}},"9":{"start":{"line":27,"column":37},"end":{"line":27,"column":50}},"10":{"start":{"line":27,"column":48},"end":{"line":27,"column":55}},"11":{"start":{"line":27,"column":55},"end":{"line":27,"column":88}},"12":{"start":{"line":27,"column":95},"end":{"line":27,"column":100}},"13":{"start":{"line":27,"column":95},"end":{"line":28,"column":null}},"14":{"start":{"line":29,"column":3},"end":{"line":29,"column":null}},"15":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"16":{"start":{"line":34,"column":0},"end":{"line":34,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":11,"column":33},"end":{"line":11,"column":50}},"loc":{"start":{"line":11,"column":33},"end":{"line":29,"column":null}}},"2":{"name":"AuthenticationRequiredError","decl":{"start":{"line":27,"column":2},"end":{"line":27,"column":16}},"loc":{"start":{"line":27,"column":104},"end":{"line":29,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":27,"column":104},"end":{"line":27,"column":102}},"type":"cond-expr","locations":[{"start":{"line":27,"column":104},"end":{"line":27,"column":null}},{"start":{"line":27,"column":100},"end":{"line":27,"column":102}}]},"3":{"loc":{"start":{"line":27,"column":104},"end":{"line":27,"column":null}},"type":"binary-expr","locations":[{"start":{"line":27,"column":104},"end":{"line":27,"column":null}},{"start":{"line":27,"column":104},"end":{"line":27,"column":null}}]},"4":{"loc":{"start":{"line":27,"column":20},"end":{"line":27,"column":31}},"type":"cond-expr","locations":[{"start":{"line":27,"column":23},"end":{"line":27,"column":29}},{"start":{"line":27,"column":29},"end":{"line":27,"column":31}}]},"5":{"loc":{"start":{"line":27,"column":37},"end":{"line":27,"column":50}},"type":"cond-expr","locations":[{"start":{"line":27,"column":40},"end":{"line":27,"column":48}},{"start":{"line":27,"column":48},"end":{"line":27,"column":50}}]},"6":{"loc":{"start":{"line":27,"column":55},"end":{"line":27,"column":88}},"type":"cond-expr","locations":[{"start":{"line":27,"column":58},"end":{"line":27,"column":83}},{"start":{"line":27,"column":83},"end":{"line":27,"column":88}}]}},"s":{"0":3,"1":3,"2":70,"3":3,"4":3,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":10,"13":5,"14":6,"15":3,"16":3},"f":{"0":25,"1":3,"2":5},"b":{"0":[5],"1":[25,5],"2":[4,1],"3":[5,5],"4":[5,0],"5":[3,2],"6":[4,1]}} +,"/Users/zane/playground/standard-error-set/src/authorization-conditions-not-met-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/authorization-conditions-not-met-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":51}},"4":{"start":{"line":18,"column":40},"end":{"line":18,"column":null}},"5":{"start":{"line":46,"column":100},"end":{"line":46,"column":98}},"6":{"start":{"line":46,"column":98},"end":{"line":46,"column":20}},"7":{"start":{"line":46,"column":20},"end":{"line":46,"column":31}},"8":{"start":{"line":46,"column":29},"end":{"line":46,"column":36}},"9":{"start":{"line":46,"column":36},"end":{"line":46,"column":84}},"10":{"start":{"line":46,"column":91},"end":{"line":46,"column":96}},"11":{"start":{"line":47,"column":4},"end":{"line":47,"column":null}},"12":{"start":{"line":47,"column":79},"end":{"line":48,"column":null}},"13":{"start":{"line":49,"column":3},"end":{"line":49,"column":null}},"14":{"start":{"line":52,"column":0},"end":{"line":52,"column":null}},"15":{"start":{"line":54,"column":0},"end":{"line":54,"column":null}},"16":{"start":{"line":56,"column":24},"end":{"line":67,"column":1}},"17":{"start":{"line":56,"column":33},"end":{"line":56,"column":32}},"18":{"start":{"line":56,"column":39},"end":{"line":56,"column":38}},"19":{"start":{"line":56,"column":46},"end":{"line":56,"column":45}},"20":{"start":{"line":57,"column":16},"end":{"line":57,"column":44}},"21":{"start":{"line":58,"column":2},"end":{"line":60,"column":null}},"22":{"start":{"line":59,"column":4},"end":{"line":59,"column":null}},"23":{"start":{"line":61,"column":2},"end":{"line":61,"column":null}},"24":{"start":{"line":62,"column":2},"end":{"line":64,"column":null}},"25":{"start":{"line":63,"column":4},"end":{"line":63,"column":null}},"26":{"start":{"line":66,"column":2},"end":{"line":66,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":18,"column":40},"end":{"line":18,"column":57}},"loc":{"start":{"line":18,"column":40},"end":{"line":49,"column":null}}},"2":{"name":"AuthorizationConditionsNotMetError","decl":{"start":{"line":46,"column":2},"end":{"line":46,"column":16}},"loc":{"start":{"line":46,"column":100},"end":{"line":49,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":56,"column":6},"end":{"line":56,"column":21}},"loc":{"start":{"line":56,"column":53},"end":{"line":67,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":46,"column":100},"end":{"line":46,"column":98}},"type":"cond-expr","locations":[{"start":{"line":46,"column":100},"end":{"line":46,"column":null}},{"start":{"line":46,"column":96},"end":{"line":46,"column":98}}]},"3":{"loc":{"start":{"line":46,"column":100},"end":{"line":46,"column":null}},"type":"binary-expr","locations":[{"start":{"line":46,"column":100},"end":{"line":46,"column":null}},{"start":{"line":46,"column":100},"end":{"line":46,"column":null}}]},"4":{"loc":{"start":{"line":46,"column":20},"end":{"line":46,"column":31}},"type":"cond-expr","locations":[{"start":{"line":46,"column":23},"end":{"line":46,"column":29}},{"start":{"line":46,"column":29},"end":{"line":46,"column":31}}]},"5":{"loc":{"start":{"line":46,"column":36},"end":{"line":46,"column":84}},"type":"cond-expr","locations":[{"start":{"line":46,"column":39},"end":{"line":46,"column":79}},{"start":{"line":46,"column":79},"end":{"line":46,"column":84}}]},"6":{"loc":{"start":{"line":47,"column":22},"end":{"line":47,"column":79}},"type":"binary-expr","locations":[{"start":{"line":47,"column":22},"end":{"line":47,"column":37}},{"start":{"line":47,"column":41},"end":{"line":47,"column":79}}]},"7":{"loc":{"start":{"line":58,"column":2},"end":{"line":60,"column":null}},"type":"if","locations":[{"start":{"line":58,"column":2},"end":{"line":60,"column":null}}]},"8":{"loc":{"start":{"line":62,"column":2},"end":{"line":64,"column":null}},"type":"if","locations":[{"start":{"line":62,"column":2},"end":{"line":64,"column":null}}]}},"s":{"0":3,"1":3,"2":127,"3":3,"4":3,"5":5,"6":5,"7":5,"8":5,"9":5,"10":10,"11":5,"12":5,"13":6,"14":3,"15":3,"16":3,"17":5,"18":5,"19":5,"20":5,"21":5,"22":2,"23":5,"24":5,"25":1,"26":5},"f":{"0":42,"1":3,"2":5,"3":5},"b":{"0":[10],"1":[40,10],"2":[4,1],"3":[5,5],"4":[5,0],"5":[3,2],"6":[5,5],"7":[2],"8":[1]}} +,"/Users/zane/playground/standard-error-set/src/common-error-settings.mjs": {"path":"/Users/zane/playground/standard-error-set/src/common-error-settings.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":5,"column":24},"end":{"line":8,"column":1}},"3":{"start":{"line":10,"column":23},"end":{"line":10,"column":25}},"4":{"start":{"line":26,"column":25},"end":{"line":46,"column":1}},"5":{"start":{"line":27,"column":2},"end":{"line":45,"column":null}},"6":{"start":{"line":28,"column":4},"end":{"line":30,"column":null}},"7":{"start":{"line":29,"column":6},"end":{"line":29,"column":null}},"8":{"start":{"line":32,"column":7},"end":{"line":45,"column":null}},"9":{"start":{"line":33,"column":4},"end":{"line":35,"column":null}},"10":{"start":{"line":33,"column":4},"end":{"line":33,"column":9}},"11":{"start":{"line":33,"column":35},"end":{"line":33,"column":57}},"12":{"start":{"line":33,"column":9},"end":{"line":33,"column":16}},"13":{"start":{"line":33,"column":22},"end":{"line":33,"column":24}},"14":{"start":{"line":33,"column":30},"end":{"line":33,"column":35}},"15":{"start":{"line":34,"column":6},"end":{"line":34,"column":null}},"16":{"start":{"line":37,"column":4},"end":{"line":37,"column":null}},"17":{"start":{"line":39,"column":7},"end":{"line":45,"column":null}},"18":{"start":{"line":40,"column":4},"end":{"line":40,"column":null}},"19":{"start":{"line":43,"column":4},"end":{"line":43,"column":null}},"20":{"start":{"line":44,"column":4},"end":{"line":44,"column":null}},"21":{"start":{"line":48,"column":24},"end":{"line":77,"column":1}},"22":{"start":{"line":49,"column":2},"end":{"line":55,"column":null}},"23":{"start":{"line":50,"column":4},"end":{"line":54,"column":null}},"24":{"start":{"line":57,"column":2},"end":{"line":76,"column":null}},"25":{"start":{"line":58,"column":4},"end":{"line":64,"column":null}},"26":{"start":{"line":59,"column":6},"end":{"line":63,"column":null}},"27":{"start":{"line":66,"column":7},"end":{"line":76,"column":null}},"28":{"start":{"line":67,"column":23},"end":{"line":67,"column":28}},"29":{"start":{"line":68,"column":22},"end":{"line":68,"column":38}},"30":{"start":{"line":69,"column":4},"end":{"line":75,"column":null}},"31":{"start":{"line":70,"column":6},"end":{"line":74,"column":null}}},"fnMap":{"0":{"name":"commonErrorSettings","decl":{"start":{"line":26,"column":6},"end":{"line":26,"column":25}},"loc":{"start":{"line":26,"column":47},"end":{"line":46,"column":1}}},"1":{"name":"verifyArguments","decl":{"start":{"line":48,"column":6},"end":{"line":48,"column":21}},"loc":{"start":{"line":48,"column":43},"end":{"line":77,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":27,"column":2},"end":{"line":45,"column":null}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":45,"column":null}},{"start":{"line":32,"column":7},"end":{"line":45,"column":null}}]},"1":{"loc":{"start":{"line":32,"column":7},"end":{"line":45,"column":null}},"type":"if","locations":[{"start":{"line":32,"column":7},"end":{"line":45,"column":null}},{"start":{"line":39,"column":7},"end":{"line":45,"column":null}}]},"2":{"loc":{"start":{"line":39,"column":7},"end":{"line":45,"column":null}},"type":"if","locations":[{"start":{"line":39,"column":7},"end":{"line":45,"column":null}},{"start":{"line":42,"column":7},"end":{"line":45,"column":null}}]},"3":{"loc":{"start":{"line":40,"column":11},"end":{"line":40,"column":60}},"type":"binary-expr","locations":[{"start":{"line":40,"column":11},"end":{"line":40,"column":33}},{"start":{"line":40,"column":37},"end":{"line":40,"column":60}}]},"4":{"loc":{"start":{"line":49,"column":2},"end":{"line":55,"column":null}},"type":"if","locations":[{"start":{"line":49,"column":2},"end":{"line":55,"column":null}}]},"5":{"loc":{"start":{"line":57,"column":2},"end":{"line":76,"column":null}},"type":"if","locations":[{"start":{"line":57,"column":2},"end":{"line":76,"column":null}},{"start":{"line":66,"column":7},"end":{"line":76,"column":null}}]},"6":{"loc":{"start":{"line":58,"column":4},"end":{"line":64,"column":null}},"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":64,"column":null}}]},"7":{"loc":{"start":{"line":58,"column":10},"end":{"line":58,"column":43}},"type":"binary-expr","locations":[{"start":{"line":58,"column":10},"end":{"line":58,"column":24}},{"start":{"line":58,"column":28},"end":{"line":58,"column":43}}]},"8":{"loc":{"start":{"line":66,"column":7},"end":{"line":76,"column":null}},"type":"if","locations":[{"start":{"line":66,"column":7},"end":{"line":76,"column":null}}]},"9":{"loc":{"start":{"line":69,"column":4},"end":{"line":75,"column":null}},"type":"if","locations":[{"start":{"line":69,"column":4},"end":{"line":75,"column":null}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":4,"5":93,"6":35,"7":6,"8":58,"9":1,"10":1,"11":1,"12":2,"13":2,"14":2,"15":2,"16":1,"17":57,"18":50,"19":7,"20":4,"21":4,"22":9,"23":1,"24":8,"25":6,"26":1,"27":2,"28":2,"29":2,"30":2,"31":1},"f":{"0":93,"1":9},"b":{"0":[35,58],"1":[1,57],"2":[50,7],"3":[50,44],"4":[1],"5":[6,2],"6":[1],"7":[6,1],"8":[2],"9":[1]}} +,"/Users/zane/playground/standard-error-set/src/common-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/common-error.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":63}},"3":{"start":{"line":3,"column":63},"end":{"line":3,"column":null}},"4":{"start":{"line":19,"column":17},"end":{"line":19,"column":null}},"5":{"start":{"line":33,"column":79},"end":{"line":33,"column":77}},"6":{"start":{"line":33,"column":77},"end":{"line":33,"column":23}},"7":{"start":{"line":33,"column":23},"end":{"line":33,"column":52}},"8":{"start":{"line":33,"column":58},"end":{"line":33,"column":57}},"9":{"start":{"line":33,"column":70},"end":{"line":33,"column":75}},"10":{"start":{"line":34,"column":4},"end":{"line":34,"column":null}},"11":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"12":{"start":{"line":38,"column":4},"end":{"line":42,"column":null}},"13":{"start":{"line":38,"column":4},"end":{"line":38,"column":9}},"14":{"start":{"line":38,"column":28},"end":{"line":38,"column":54}},"15":{"start":{"line":38,"column":24},"end":{"line":38,"column":28}},"16":{"start":{"line":39,"column":6},"end":{"line":41,"column":null}},"17":{"start":{"line":40,"column":8},"end":{"line":40,"column":null}},"18":{"start":{"line":44,"column":4},"end":{"line":44,"column":null}},"19":{"start":{"line":45,"column":4},"end":{"line":45,"column":null}},"20":{"start":{"line":45,"column":54},"end":{"line":45,"column":null}},"21":{"start":{"line":46,"column":3},"end":{"line":46,"column":null}}},"fnMap":{"0":{"name":"_callSuper","decl":{"start":{"line":3,"column":63},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":63},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_4)","decl":{"start":{"line":19,"column":17},"end":{"line":19,"column":34}},"loc":{"start":{"line":19,"column":17},"end":{"line":46,"column":null}}},"2":{"name":"CommonError","decl":{"start":{"line":33,"column":2},"end":{"line":33,"column":16}},"loc":{"start":{"line":33,"column":79},"end":{"line":46,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":63},"end":{"line":3,"column":null}},"type":"cond-expr","locations":[{"start":{"line":3,"column":63},"end":{"line":3,"column":null}},{"start":{"line":3,"column":63},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":33,"column":79},"end":{"line":33,"column":77}},"type":"cond-expr","locations":[{"start":{"line":33,"column":79},"end":{"line":33,"column":null}},{"start":{"line":33,"column":75},"end":{"line":33,"column":77}}]},"2":{"loc":{"start":{"line":33,"column":79},"end":{"line":33,"column":null}},"type":"binary-expr","locations":[{"start":{"line":33,"column":79},"end":{"line":33,"column":null}},{"start":{"line":33,"column":79},"end":{"line":33,"column":null}}]},"3":{"loc":{"start":{"line":33,"column":23},"end":{"line":33,"column":52}},"type":"cond-expr","locations":[{"start":{"line":33,"column":26},"end":{"line":33,"column":50}},{"start":{"line":33,"column":50},"end":{"line":33,"column":52}}]},"4":{"loc":{"start":{"line":38,"column":40},"end":{"line":38,"column":53}},"type":"binary-expr","locations":[{"start":{"line":38,"column":40},"end":{"line":38,"column":47}},{"start":{"line":38,"column":51},"end":{"line":38,"column":53}}]},"5":{"loc":{"start":{"line":39,"column":6},"end":{"line":41,"column":null}},"type":"if","locations":[{"start":{"line":39,"column":6},"end":{"line":41,"column":null}}]},"6":{"loc":{"start":{"line":44,"column":18},"end":{"line":44,"column":59}},"type":"binary-expr","locations":[{"start":{"line":44,"column":18},"end":{"line":44,"column":24}},{"start":{"line":44,"column":28},"end":{"line":44,"column":59}}]}},"s":{"0":27,"1":27,"2":27,"3":469,"4":27,"5":182,"6":182,"7":182,"8":182,"9":364,"10":182,"11":182,"12":182,"13":182,"14":182,"15":822,"16":822,"17":822,"18":182,"19":182,"20":182,"21":54},"f":{"0":390,"1":27,"2":182},"b":{"0":[364,0],"1":[181,1],"2":[182,181],"3":[3,179],"4":[182,0],"5":[822],"6":[182,139]}} +,"/Users/zane/playground/standard-error-set/src/connection-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/connection-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":59}},"4":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"5":{"start":{"line":7,"column":15},"end":{"line":7,"column":32}},"6":{"start":{"line":16,"column":21},"end":{"line":16,"column":null}},"7":{"start":{"line":37,"column":50},"end":{"line":37,"column":48}},"8":{"start":{"line":37,"column":48},"end":{"line":37,"column":20}},"9":{"start":{"line":37,"column":20},"end":{"line":37,"column":34}},"10":{"start":{"line":37,"column":41},"end":{"line":37,"column":46}},"11":{"start":{"line":38,"column":4},"end":{"line":38,"column":28}},"12":{"start":{"line":39,"column":4},"end":{"line":39,"column":null}},"13":{"start":{"line":39,"column":65},"end":{"line":40,"column":null}},"14":{"start":{"line":41,"column":3},"end":{"line":41,"column":null}},"15":{"start":{"line":44,"column":0},"end":{"line":44,"column":null}},"16":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},"17":{"start":{"line":48,"column":24},"end":{"line":52,"column":1}},"18":{"start":{"line":48,"column":31},"end":{"line":48,"column":30}},"19":{"start":{"line":48,"column":38},"end":{"line":48,"column":37}},"20":{"start":{"line":48,"column":46},"end":{"line":48,"column":45}},"21":{"start":{"line":49,"column":2},"end":{"line":49,"column":null}},"22":{"start":{"line":51,"column":2},"end":{"line":51,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":21},"end":{"line":16,"column":38}},"loc":{"start":{"line":16,"column":21},"end":{"line":41,"column":null}}},"2":{"name":"ConnectionError","decl":{"start":{"line":37,"column":2},"end":{"line":37,"column":16}},"loc":{"start":{"line":37,"column":50},"end":{"line":41,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":48,"column":6},"end":{"line":48,"column":21}},"loc":{"start":{"line":48,"column":53},"end":{"line":52,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"binary-expr","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"2":{"loc":{"start":{"line":37,"column":50},"end":{"line":37,"column":48}},"type":"cond-expr","locations":[{"start":{"line":37,"column":50},"end":{"line":37,"column":null}},{"start":{"line":37,"column":46},"end":{"line":37,"column":48}}]},"3":{"loc":{"start":{"line":37,"column":50},"end":{"line":37,"column":null}},"type":"binary-expr","locations":[{"start":{"line":37,"column":50},"end":{"line":37,"column":null}},{"start":{"line":37,"column":50},"end":{"line":37,"column":null}}]},"4":{"loc":{"start":{"line":37,"column":20},"end":{"line":37,"column":34}},"type":"cond-expr","locations":[{"start":{"line":37,"column":23},"end":{"line":37,"column":29}},{"start":{"line":37,"column":29},"end":{"line":37,"column":34}}]},"5":{"loc":{"start":{"line":39,"column":22},"end":{"line":39,"column":65}},"type":"binary-expr","locations":[{"start":{"line":39,"column":22},"end":{"line":39,"column":37}},{"start":{"line":39,"column":41},"end":{"line":39,"column":65}}]},"6":{"loc":{"start":{"line":49,"column":10},"end":{"line":49,"column":74}},"type":"binary-expr","locations":[{"start":{"line":49,"column":10},"end":{"line":49,"column":15}},{"start":{"line":49,"column":19},"end":{"line":49,"column":40}},{"start":{"line":49,"column":44},"end":{"line":49,"column":74}}]},"7":{"loc":{"start":{"line":51,"column":23},"end":{"line":51,"column":63}},"type":"cond-expr","locations":[{"start":{"line":51,"column":46},"end":{"line":51,"column":48}},{"start":{"line":51,"column":48},"end":{"line":51,"column":63}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":141,"5":3,"6":3,"7":9,"8":9,"9":9,"10":18,"11":9,"12":9,"13":9,"14":6,"15":3,"16":3,"17":3,"18":9,"19":9,"20":9,"21":9,"22":9},"f":{"0":64,"1":3,"2":9,"3":9},"b":{"0":[9],"1":[45,9],"2":[9,0],"3":[9,9],"4":[9,0],"5":[9,9],"6":[9,9,0],"7":[9,0]}} +,"/Users/zane/playground/standard-error-set/src/constraint-violation-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/constraint-violation-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":41}},"5":{"start":{"line":13,"column":30},"end":{"line":13,"column":null}},"6":{"start":{"line":33,"column":102},"end":{"line":33,"column":100}},"7":{"start":{"line":33,"column":100},"end":{"line":33,"column":20}},"8":{"start":{"line":33,"column":20},"end":{"line":33,"column":31}},"9":{"start":{"line":33,"column":29},"end":{"line":33,"column":45}},"10":{"start":{"line":33,"column":45},"end":{"line":33,"column":62}},"11":{"start":{"line":33,"column":60},"end":{"line":33,"column":76}},"12":{"start":{"line":33,"column":76},"end":{"line":33,"column":86}},"13":{"start":{"line":33,"column":93},"end":{"line":33,"column":98}},"14":{"start":{"line":34,"column":4},"end":{"line":34,"column":null}},"15":{"start":{"line":34,"column":114},"end":{"line":35,"column":null}},"16":{"start":{"line":36,"column":3},"end":{"line":36,"column":null}},"17":{"start":{"line":39,"column":0},"end":{"line":39,"column":null}},"18":{"start":{"line":41,"column":0},"end":{"line":41,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":13,"column":30},"end":{"line":13,"column":47}},"loc":{"start":{"line":13,"column":30},"end":{"line":36,"column":null}}},"2":{"name":"ConstraintViolationError","decl":{"start":{"line":33,"column":2},"end":{"line":33,"column":16}},"loc":{"start":{"line":33,"column":102},"end":{"line":36,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":33,"column":102},"end":{"line":33,"column":100}},"type":"cond-expr","locations":[{"start":{"line":33,"column":102},"end":{"line":33,"column":null}},{"start":{"line":33,"column":98},"end":{"line":33,"column":100}}]},"3":{"loc":{"start":{"line":33,"column":102},"end":{"line":33,"column":null}},"type":"binary-expr","locations":[{"start":{"line":33,"column":102},"end":{"line":33,"column":null}},{"start":{"line":33,"column":102},"end":{"line":33,"column":null}}]},"4":{"loc":{"start":{"line":33,"column":20},"end":{"line":33,"column":31}},"type":"cond-expr","locations":[{"start":{"line":33,"column":23},"end":{"line":33,"column":29}},{"start":{"line":33,"column":29},"end":{"line":33,"column":31}}]},"5":{"loc":{"start":{"line":33,"column":45},"end":{"line":33,"column":62}},"type":"cond-expr","locations":[{"start":{"line":33,"column":48},"end":{"line":33,"column":60}},{"start":{"line":33,"column":60},"end":{"line":33,"column":62}}]},"6":{"loc":{"start":{"line":33,"column":76},"end":{"line":33,"column":86}},"type":"cond-expr","locations":[{"start":{"line":33,"column":79},"end":{"line":33,"column":81}},{"start":{"line":33,"column":81},"end":{"line":33,"column":86}}]},"7":{"loc":{"start":{"line":34,"column":22},"end":{"line":34,"column":114}},"type":"binary-expr","locations":[{"start":{"line":34,"column":22},"end":{"line":34,"column":37}},{"start":{"line":34,"column":41},"end":{"line":34,"column":114}}]}},"s":{"0":3,"1":3,"2":3,"3":204,"4":3,"5":3,"6":8,"7":8,"8":8,"9":8,"10":8,"11":8,"12":8,"13":16,"14":8,"15":8,"16":6,"17":3,"18":3},"f":{"0":71,"1":3,"2":8},"b":{"0":[16],"1":[64,16],"2":[8,0],"3":[8,8],"4":[0,8],"5":[0,8],"6":[2,6],"7":[8,8]}} +,"/Users/zane/playground/standard-error-set/src/data-service-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/data-service-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":33}},"5":{"start":{"line":18,"column":22},"end":{"line":18,"column":null}},"6":{"start":{"line":35,"column":68},"end":{"line":35,"column":66}},"7":{"start":{"line":35,"column":66},"end":{"line":35,"column":20}},"8":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"9":{"start":{"line":35,"column":29},"end":{"line":35,"column":38}},"10":{"start":{"line":35,"column":38},"end":{"line":35,"column":52}},"11":{"start":{"line":35,"column":59},"end":{"line":35,"column":64}},"12":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"13":{"start":{"line":36,"column":107},"end":{"line":37,"column":null}},"14":{"start":{"line":38,"column":3},"end":{"line":38,"column":null}},"15":{"start":{"line":41,"column":0},"end":{"line":41,"column":null}},"16":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":18,"column":22},"end":{"line":18,"column":39}},"loc":{"start":{"line":18,"column":22},"end":{"line":38,"column":null}}},"2":{"name":"DataServiceError","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":16}},"loc":{"start":{"line":35,"column":68},"end":{"line":38,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":35,"column":68},"end":{"line":35,"column":66}},"type":"cond-expr","locations":[{"start":{"line":35,"column":68},"end":{"line":35,"column":null}},{"start":{"line":35,"column":64},"end":{"line":35,"column":66}}]},"3":{"loc":{"start":{"line":35,"column":68},"end":{"line":35,"column":null}},"type":"binary-expr","locations":[{"start":{"line":35,"column":68},"end":{"line":35,"column":null}},{"start":{"line":35,"column":68},"end":{"line":35,"column":null}}]},"4":{"loc":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"type":"cond-expr","locations":[{"start":{"line":35,"column":23},"end":{"line":35,"column":29}},{"start":{"line":35,"column":29},"end":{"line":35,"column":31}}]},"5":{"loc":{"start":{"line":35,"column":38},"end":{"line":35,"column":52}},"type":"cond-expr","locations":[{"start":{"line":35,"column":41},"end":{"line":35,"column":47}},{"start":{"line":35,"column":47},"end":{"line":35,"column":52}}]},"6":{"loc":{"start":{"line":36,"column":22},"end":{"line":36,"column":107}},"type":"binary-expr","locations":[{"start":{"line":36,"column":22},"end":{"line":36,"column":37}},{"start":{"line":36,"column":41},"end":{"line":36,"column":107}}]}},"s":{"0":5,"1":5,"2":5,"3":263,"4":5,"5":5,"6":15,"7":15,"8":15,"9":15,"10":15,"11":30,"12":15,"13":15,"14":10,"15":5,"16":5},"f":{"0":100,"1":5,"2":15},"b":{"0":[19],"1":[87,19],"2":[14,1],"3":[15,15],"4":[5,10],"5":[8,7],"6":[15,4]}} +,"/Users/zane/playground/standard-error-set/src/database-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/database-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":30}},"4":{"start":{"line":13,"column":19},"end":{"line":13,"column":null}},"5":{"start":{"line":34,"column":95},"end":{"line":34,"column":93}},"6":{"start":{"line":34,"column":93},"end":{"line":34,"column":20}},"7":{"start":{"line":34,"column":20},"end":{"line":34,"column":31}},"8":{"start":{"line":34,"column":29},"end":{"line":34,"column":40}},"9":{"start":{"line":34,"column":40},"end":{"line":34,"column":55}},"10":{"start":{"line":34,"column":53},"end":{"line":34,"column":61}},"11":{"start":{"line":34,"column":61},"end":{"line":34,"column":79}},"12":{"start":{"line":34,"column":86},"end":{"line":34,"column":91}},"13":{"start":{"line":35,"column":4},"end":{"line":35,"column":null}},"14":{"start":{"line":35,"column":91},"end":{"line":36,"column":null}},"15":{"start":{"line":37,"column":3},"end":{"line":37,"column":null}},"16":{"start":{"line":40,"column":0},"end":{"line":40,"column":null}},"17":{"start":{"line":42,"column":0},"end":{"line":42,"column":null}},"18":{"start":{"line":44,"column":24},"end":{"line":59,"column":1}},"19":{"start":{"line":44,"column":33},"end":{"line":44,"column":32}},"20":{"start":{"line":44,"column":44},"end":{"line":44,"column":43}},"21":{"start":{"line":44,"column":51},"end":{"line":44,"column":50}},"22":{"start":{"line":44,"column":59},"end":{"line":44,"column":58}},"23":{"start":{"line":45,"column":13},"end":{"line":45,"column":40}},"24":{"start":{"line":46,"column":2},"end":{"line":51,"column":null}},"25":{"start":{"line":47,"column":4},"end":{"line":47,"column":null}},"26":{"start":{"line":50,"column":4},"end":{"line":50,"column":null}},"27":{"start":{"line":52,"column":2},"end":{"line":52,"column":null}},"28":{"start":{"line":53,"column":2},"end":{"line":55,"column":null}},"29":{"start":{"line":54,"column":4},"end":{"line":54,"column":null}},"30":{"start":{"line":56,"column":2},"end":{"line":56,"column":null}},"31":{"start":{"line":58,"column":2},"end":{"line":58,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":13,"column":19},"end":{"line":13,"column":36}},"loc":{"start":{"line":13,"column":19},"end":{"line":37,"column":null}}},"2":{"name":"DatabaseError","decl":{"start":{"line":34,"column":2},"end":{"line":34,"column":16}},"loc":{"start":{"line":34,"column":95},"end":{"line":37,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":44,"column":6},"end":{"line":44,"column":21}},"loc":{"start":{"line":44,"column":66},"end":{"line":59,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":34,"column":95},"end":{"line":34,"column":93}},"type":"cond-expr","locations":[{"start":{"line":34,"column":95},"end":{"line":34,"column":null}},{"start":{"line":34,"column":91},"end":{"line":34,"column":93}}]},"3":{"loc":{"start":{"line":34,"column":95},"end":{"line":34,"column":null}},"type":"binary-expr","locations":[{"start":{"line":34,"column":95},"end":{"line":34,"column":null}},{"start":{"line":34,"column":95},"end":{"line":34,"column":null}}]},"4":{"loc":{"start":{"line":34,"column":20},"end":{"line":34,"column":31}},"type":"cond-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":29}},{"start":{"line":34,"column":29},"end":{"line":34,"column":31}}]},"5":{"loc":{"start":{"line":34,"column":40},"end":{"line":34,"column":55}},"type":"cond-expr","locations":[{"start":{"line":34,"column":43},"end":{"line":34,"column":53}},{"start":{"line":34,"column":53},"end":{"line":34,"column":55}}]},"6":{"loc":{"start":{"line":34,"column":61},"end":{"line":34,"column":79}},"type":"cond-expr","locations":[{"start":{"line":34,"column":64},"end":{"line":34,"column":74}},{"start":{"line":34,"column":74},"end":{"line":34,"column":79}}]},"7":{"loc":{"start":{"line":35,"column":22},"end":{"line":35,"column":91}},"type":"binary-expr","locations":[{"start":{"line":35,"column":22},"end":{"line":35,"column":37}},{"start":{"line":35,"column":41},"end":{"line":35,"column":91}}]},"8":{"loc":{"start":{"line":46,"column":2},"end":{"line":51,"column":null}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":51,"column":null}},{"start":{"line":49,"column":7},"end":{"line":51,"column":null}}]},"9":{"loc":{"start":{"line":53,"column":2},"end":{"line":55,"column":null}},"type":"if","locations":[{"start":{"line":53,"column":2},"end":{"line":55,"column":null}}]}},"s":{"0":4,"1":4,"2":282,"3":4,"4":4,"5":12,"6":12,"7":12,"8":12,"9":12,"10":12,"11":12,"12":24,"13":12,"14":12,"15":8,"16":4,"17":4,"18":4,"19":10,"20":10,"21":10,"22":10,"23":10,"24":10,"25":4,"26":6,"27":10,"28":10,"29":2,"30":10,"31":10},"f":{"0":98,"1":4,"2":12,"3":10},"b":{"0":[22],"1":[90,22],"2":[12,0],"3":[12,12],"4":[0,12],"5":[0,12],"6":[6,6],"7":[12,10],"8":[4,6],"9":[2]}} +,"/Users/zane/playground/standard-error-set/src/directory-not-found-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/directory-not-found-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":59}},"4":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"5":{"start":{"line":7,"column":15},"end":{"line":7,"column":39}},"6":{"start":{"line":18,"column":28},"end":{"line":18,"column":null}},"7":{"start":{"line":33,"column":50},"end":{"line":33,"column":48}},"8":{"start":{"line":33,"column":48},"end":{"line":33,"column":20}},"9":{"start":{"line":33,"column":20},"end":{"line":33,"column":34}},"10":{"start":{"line":33,"column":41},"end":{"line":33,"column":46}},"11":{"start":{"line":34,"column":21},"end":{"line":34,"column":47}},"12":{"start":{"line":35,"column":4},"end":{"line":35,"column":null}},"13":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"14":{"start":{"line":36,"column":51},"end":{"line":38,"column":null}},"15":{"start":{"line":39,"column":3},"end":{"line":39,"column":null}},"16":{"start":{"line":42,"column":0},"end":{"line":42,"column":null}},"17":{"start":{"line":44,"column":0},"end":{"line":44,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},"loc":{"start":{"line":18,"column":28},"end":{"line":39,"column":null}}},"2":{"name":"DirectoryNotFoundError","decl":{"start":{"line":33,"column":2},"end":{"line":33,"column":16}},"loc":{"start":{"line":33,"column":50},"end":{"line":39,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"binary-expr","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"2":{"loc":{"start":{"line":33,"column":50},"end":{"line":33,"column":48}},"type":"cond-expr","locations":[{"start":{"line":33,"column":50},"end":{"line":33,"column":null}},{"start":{"line":33,"column":46},"end":{"line":33,"column":48}}]},"3":{"loc":{"start":{"line":33,"column":50},"end":{"line":33,"column":null}},"type":"binary-expr","locations":[{"start":{"line":33,"column":50},"end":{"line":33,"column":null}},{"start":{"line":33,"column":50},"end":{"line":33,"column":null}}]},"4":{"loc":{"start":{"line":33,"column":20},"end":{"line":33,"column":34}},"type":"cond-expr","locations":[{"start":{"line":33,"column":23},"end":{"line":33,"column":29}},{"start":{"line":33,"column":29},"end":{"line":33,"column":34}}]},"5":{"loc":{"start":{"line":35,"column":22},"end":{"line":35,"column":78}},"type":"binary-expr","locations":[{"start":{"line":35,"column":22},"end":{"line":35,"column":37}},{"start":{"line":35,"column":41},"end":{"line":35,"column":78}}]},"6":{"loc":{"start":{"line":36,"column":23},"end":{"line":36,"column":51}},"type":"binary-expr","locations":[{"start":{"line":36,"column":23},"end":{"line":36,"column":39}},{"start":{"line":36,"column":43},"end":{"line":36,"column":51}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":35,"5":3,"6":3,"7":2,"8":2,"9":2,"10":4,"11":2,"12":2,"13":2,"14":2,"15":6,"16":3,"17":3},"f":{"0":14,"1":3,"2":2},"b":{"0":[2],"1":[10,2],"2":[1,1],"3":[2,2],"4":[2,0],"5":[2,2],"6":[2,2]}} +,"/Users/zane/playground/standard-error-set/src/end-of-stream-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/end-of-stream-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":33}},"5":{"start":{"line":15,"column":22},"end":{"line":15,"column":null}},"6":{"start":{"line":34,"column":70},"end":{"line":34,"column":68}},"7":{"start":{"line":34,"column":68},"end":{"line":34,"column":20}},"8":{"start":{"line":34,"column":20},"end":{"line":34,"column":31}},"9":{"start":{"line":34,"column":29},"end":{"line":34,"column":37}},"10":{"start":{"line":34,"column":37},"end":{"line":34,"column":54}},"11":{"start":{"line":34,"column":61},"end":{"line":34,"column":66}},"12":{"start":{"line":35,"column":4},"end":{"line":35,"column":null}},"13":{"start":{"line":35,"column":107},"end":{"line":36,"column":null}},"14":{"start":{"line":37,"column":3},"end":{"line":37,"column":null}},"15":{"start":{"line":40,"column":0},"end":{"line":40,"column":null}},"16":{"start":{"line":42,"column":0},"end":{"line":42,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":15,"column":22},"end":{"line":15,"column":39}},"loc":{"start":{"line":15,"column":22},"end":{"line":37,"column":null}}},"2":{"name":"EndOfStreamError","decl":{"start":{"line":34,"column":2},"end":{"line":34,"column":16}},"loc":{"start":{"line":34,"column":70},"end":{"line":37,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":34,"column":70},"end":{"line":34,"column":68}},"type":"cond-expr","locations":[{"start":{"line":34,"column":70},"end":{"line":34,"column":null}},{"start":{"line":34,"column":66},"end":{"line":34,"column":68}}]},"3":{"loc":{"start":{"line":34,"column":70},"end":{"line":34,"column":null}},"type":"binary-expr","locations":[{"start":{"line":34,"column":70},"end":{"line":34,"column":null}},{"start":{"line":34,"column":70},"end":{"line":34,"column":null}}]},"4":{"loc":{"start":{"line":34,"column":20},"end":{"line":34,"column":31}},"type":"cond-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":29}},{"start":{"line":34,"column":29},"end":{"line":34,"column":31}}]},"5":{"loc":{"start":{"line":34,"column":37},"end":{"line":34,"column":54}},"type":"cond-expr","locations":[{"start":{"line":34,"column":40},"end":{"line":34,"column":49}},{"start":{"line":34,"column":49},"end":{"line":34,"column":54}}]},"6":{"loc":{"start":{"line":35,"column":22},"end":{"line":35,"column":107}},"type":"binary-expr","locations":[{"start":{"line":35,"column":22},"end":{"line":35,"column":37}},{"start":{"line":35,"column":41},"end":{"line":35,"column":107}}]}},"s":{"0":3,"1":3,"2":3,"3":144,"4":3,"5":3,"6":6,"7":6,"8":6,"9":6,"10":6,"11":12,"12":6,"13":6,"14":6,"15":3,"16":3},"f":{"0":51,"1":3,"2":6},"b":{"0":[11],"1":[45,11],"2":[5,1],"3":[6,6],"4":[6,0],"5":[4,2],"6":[6,5]}} +,"/Users/zane/playground/standard-error-set/src/external-service-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/external-service-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":37}},"5":{"start":{"line":18,"column":26},"end":{"line":18,"column":null}},"6":{"start":{"line":35,"column":64},"end":{"line":35,"column":62}},"7":{"start":{"line":35,"column":62},"end":{"line":35,"column":20}},"8":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"9":{"start":{"line":35,"column":29},"end":{"line":35,"column":38}},"10":{"start":{"line":35,"column":38},"end":{"line":35,"column":48}},"11":{"start":{"line":35,"column":55},"end":{"line":35,"column":60}},"12":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"13":{"start":{"line":36,"column":107},"end":{"line":37,"column":null}},"14":{"start":{"line":38,"column":3},"end":{"line":38,"column":null}},"15":{"start":{"line":41,"column":0},"end":{"line":41,"column":null}},"16":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":18,"column":26},"end":{"line":18,"column":43}},"loc":{"start":{"line":18,"column":26},"end":{"line":38,"column":null}}},"2":{"name":"ExternalServiceError","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":16}},"loc":{"start":{"line":35,"column":64},"end":{"line":38,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":35,"column":64},"end":{"line":35,"column":62}},"type":"cond-expr","locations":[{"start":{"line":35,"column":64},"end":{"line":35,"column":null}},{"start":{"line":35,"column":60},"end":{"line":35,"column":62}}]},"3":{"loc":{"start":{"line":35,"column":64},"end":{"line":35,"column":null}},"type":"binary-expr","locations":[{"start":{"line":35,"column":64},"end":{"line":35,"column":null}},{"start":{"line":35,"column":64},"end":{"line":35,"column":null}}]},"4":{"loc":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"type":"cond-expr","locations":[{"start":{"line":35,"column":23},"end":{"line":35,"column":29}},{"start":{"line":35,"column":29},"end":{"line":35,"column":31}}]},"5":{"loc":{"start":{"line":35,"column":38},"end":{"line":35,"column":48}},"type":"cond-expr","locations":[{"start":{"line":35,"column":41},"end":{"line":35,"column":43}},{"start":{"line":35,"column":43},"end":{"line":35,"column":48}}]},"6":{"loc":{"start":{"line":36,"column":22},"end":{"line":36,"column":107}},"type":"binary-expr","locations":[{"start":{"line":36,"column":22},"end":{"line":36,"column":37}},{"start":{"line":36,"column":41},"end":{"line":36,"column":107}}]}},"s":{"0":6,"1":6,"2":6,"3":360,"4":6,"5":6,"6":24,"7":24,"8":24,"9":24,"10":24,"11":48,"12":24,"13":24,"14":12,"15":6,"16":6},"f":{"0":154,"1":6,"2":24},"b":{"0":[24],"1":[120,24],"2":[24,0],"3":[24,24],"4":[0,24],"5":[9,15],"6":[24,0]}} +,"/Users/zane/playground/standard-error-set/src/file-load-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/file-load-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":59}},"4":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"5":{"start":{"line":7,"column":15},"end":{"line":7,"column":30}},"6":{"start":{"line":16,"column":19},"end":{"line":16,"column":null}},"7":{"start":{"line":40,"column":70},"end":{"line":40,"column":68}},"8":{"start":{"line":40,"column":68},"end":{"line":40,"column":20}},"9":{"start":{"line":40,"column":20},"end":{"line":40,"column":31}},"10":{"start":{"line":40,"column":29},"end":{"line":40,"column":37}},"11":{"start":{"line":40,"column":37},"end":{"line":40,"column":54}},"12":{"start":{"line":40,"column":61},"end":{"line":40,"column":66}},"13":{"start":{"line":41,"column":4},"end":{"line":41,"column":null}},"14":{"start":{"line":42,"column":4},"end":{"line":42,"column":null}},"15":{"start":{"line":42,"column":93},"end":{"line":43,"column":null}},"16":{"start":{"line":44,"column":3},"end":{"line":44,"column":null}},"17":{"start":{"line":47,"column":0},"end":{"line":47,"column":null}},"18":{"start":{"line":49,"column":0},"end":{"line":49,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":19},"end":{"line":16,"column":36}},"loc":{"start":{"line":16,"column":19},"end":{"line":44,"column":null}}},"2":{"name":"FileLoadError","decl":{"start":{"line":40,"column":2},"end":{"line":40,"column":16}},"loc":{"start":{"line":40,"column":70},"end":{"line":44,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},"type":"binary-expr","locations":[{"start":{"line":5,"column":59},"end":{"line":5,"column":null}},{"start":{"line":5,"column":59},"end":{"line":5,"column":null}}]},"2":{"loc":{"start":{"line":40,"column":70},"end":{"line":40,"column":68}},"type":"cond-expr","locations":[{"start":{"line":40,"column":70},"end":{"line":40,"column":null}},{"start":{"line":40,"column":66},"end":{"line":40,"column":68}}]},"3":{"loc":{"start":{"line":40,"column":70},"end":{"line":40,"column":null}},"type":"binary-expr","locations":[{"start":{"line":40,"column":70},"end":{"line":40,"column":null}},{"start":{"line":40,"column":70},"end":{"line":40,"column":null}}]},"4":{"loc":{"start":{"line":40,"column":20},"end":{"line":40,"column":31}},"type":"cond-expr","locations":[{"start":{"line":40,"column":23},"end":{"line":40,"column":29}},{"start":{"line":40,"column":29},"end":{"line":40,"column":31}}]},"5":{"loc":{"start":{"line":40,"column":37},"end":{"line":40,"column":54}},"type":"cond-expr","locations":[{"start":{"line":40,"column":40},"end":{"line":40,"column":49}},{"start":{"line":40,"column":49},"end":{"line":40,"column":54}}]},"6":{"loc":{"start":{"line":41,"column":21},"end":{"line":41,"column":75}},"type":"binary-expr","locations":[{"start":{"line":41,"column":21},"end":{"line":41,"column":35}},{"start":{"line":41,"column":39},"end":{"line":41,"column":75}}]},"7":{"loc":{"start":{"line":42,"column":22},"end":{"line":42,"column":93}},"type":"binary-expr","locations":[{"start":{"line":42,"column":22},"end":{"line":42,"column":37}},{"start":{"line":42,"column":41},"end":{"line":42,"column":93}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":225,"5":3,"6":3,"7":6,"8":6,"9":6,"10":6,"11":6,"12":12,"13":6,"14":6,"15":6,"16":6,"17":3,"18":3},"f":{"0":84,"1":3,"2":6},"b":{"0":[17],"1":[63,17],"2":[5,1],"3":[6,6],"4":[6,0],"5":[5,1],"6":[6,6],"7":[6,5]}} +,"/Users/zane/playground/standard-error-set/src/file-not-found-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/file-not-found-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":50}},"4":{"start":{"line":5,"column":50},"end":{"line":5,"column":null}},"5":{"start":{"line":7,"column":15},"end":{"line":7,"column":34}},"6":{"start":{"line":18,"column":23},"end":{"line":18,"column":null}},"7":{"start":{"line":40,"column":50},"end":{"line":40,"column":48}},"8":{"start":{"line":40,"column":48},"end":{"line":40,"column":20}},"9":{"start":{"line":40,"column":20},"end":{"line":40,"column":34}},"10":{"start":{"line":40,"column":41},"end":{"line":40,"column":46}},"11":{"start":{"line":41,"column":21},"end":{"line":41,"column":42}},"12":{"start":{"line":42,"column":4},"end":{"line":42,"column":null}},"13":{"start":{"line":43,"column":4},"end":{"line":43,"column":null}},"14":{"start":{"line":43,"column":78},"end":{"line":45,"column":null}},"15":{"start":{"line":46,"column":3},"end":{"line":46,"column":null}},"16":{"start":{"line":49,"column":0},"end":{"line":49,"column":null}},"17":{"start":{"line":51,"column":0},"end":{"line":51,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":5,"column":50},"end":{"line":5,"column":null}},"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":18,"column":23},"end":{"line":18,"column":40}},"loc":{"start":{"line":18,"column":23},"end":{"line":46,"column":null}}},"2":{"name":"FileNotFoundError","decl":{"start":{"line":40,"column":2},"end":{"line":40,"column":16}},"loc":{"start":{"line":40,"column":50},"end":{"line":46,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":null}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":null}},{"start":{"line":5,"column":50},"end":{"line":5,"column":null}}]},"2":{"loc":{"start":{"line":40,"column":50},"end":{"line":40,"column":48}},"type":"cond-expr","locations":[{"start":{"line":40,"column":50},"end":{"line":40,"column":null}},{"start":{"line":40,"column":46},"end":{"line":40,"column":48}}]},"3":{"loc":{"start":{"line":40,"column":50},"end":{"line":40,"column":null}},"type":"binary-expr","locations":[{"start":{"line":40,"column":50},"end":{"line":40,"column":null}},{"start":{"line":40,"column":50},"end":{"line":40,"column":null}}]},"4":{"loc":{"start":{"line":40,"column":20},"end":{"line":40,"column":34}},"type":"cond-expr","locations":[{"start":{"line":40,"column":23},"end":{"line":40,"column":29}},{"start":{"line":40,"column":29},"end":{"line":40,"column":34}}]},"5":{"loc":{"start":{"line":42,"column":23},"end":{"line":42,"column":51}},"type":"binary-expr","locations":[{"start":{"line":42,"column":23},"end":{"line":42,"column":39}},{"start":{"line":42,"column":43},"end":{"line":42,"column":51}}]},"6":{"loc":{"start":{"line":43,"column":22},"end":{"line":43,"column":78}},"type":"binary-expr","locations":[{"start":{"line":43,"column":22},"end":{"line":43,"column":37}},{"start":{"line":43,"column":41},"end":{"line":43,"column":78}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":100,"5":4,"6":4,"7":6,"8":6,"9":6,"10":12,"11":6,"12":6,"13":6,"14":6,"15":8,"16":4,"17":4},"f":{"0":44,"1":4,"2":6},"b":{"0":[6],"1":[30,6],"2":[4,2],"3":[6,6],"4":[6,0],"5":[6,6],"6":[6,6]}} +,"/Users/zane/playground/standard-error-set/src/io-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/io-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":24}},"5":{"start":{"line":16,"column":13},"end":{"line":16,"column":null}},"6":{"start":{"line":35,"column":50},"end":{"line":35,"column":48}},"7":{"start":{"line":35,"column":48},"end":{"line":35,"column":20}},"8":{"start":{"line":35,"column":20},"end":{"line":35,"column":34}},"9":{"start":{"line":35,"column":41},"end":{"line":35,"column":46}},"10":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"11":{"start":{"line":36,"column":81},"end":{"line":37,"column":null}},"12":{"start":{"line":38,"column":3},"end":{"line":38,"column":null}},"13":{"start":{"line":41,"column":0},"end":{"line":41,"column":null}},"14":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":13},"end":{"line":16,"column":30}},"loc":{"start":{"line":16,"column":13},"end":{"line":38,"column":null}}},"2":{"name":"IoError","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":16}},"loc":{"start":{"line":35,"column":50},"end":{"line":38,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":35,"column":50},"end":{"line":35,"column":48}},"type":"cond-expr","locations":[{"start":{"line":35,"column":50},"end":{"line":35,"column":null}},{"start":{"line":35,"column":46},"end":{"line":35,"column":48}}]},"3":{"loc":{"start":{"line":35,"column":50},"end":{"line":35,"column":null}},"type":"binary-expr","locations":[{"start":{"line":35,"column":50},"end":{"line":35,"column":null}},{"start":{"line":35,"column":50},"end":{"line":35,"column":null}}]},"4":{"loc":{"start":{"line":35,"column":20},"end":{"line":35,"column":34}},"type":"cond-expr","locations":[{"start":{"line":35,"column":23},"end":{"line":35,"column":29}},{"start":{"line":35,"column":29},"end":{"line":35,"column":34}}]},"5":{"loc":{"start":{"line":36,"column":22},"end":{"line":36,"column":81}},"type":"binary-expr","locations":[{"start":{"line":36,"column":22},"end":{"line":36,"column":37}},{"start":{"line":36,"column":41},"end":{"line":36,"column":81}}]}},"s":{"0":4,"1":4,"2":4,"3":197,"4":4,"5":4,"6":12,"7":12,"8":12,"9":24,"10":12,"11":12,"12":8,"13":4,"14":4},"f":{"0":93,"1":4,"2":12},"b":{"0":[12],"1":[60,12],"2":[12,0],"3":[12,12],"4":[0,12],"5":[12,0]}} +,"/Users/zane/playground/standard-error-set/src/local-rollback-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/local-rollback-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":35}},"4":{"start":{"line":11,"column":24},"end":{"line":11,"column":null}},"5":{"start":{"line":32,"column":82},"end":{"line":32,"column":80}},"6":{"start":{"line":32,"column":80},"end":{"line":32,"column":20}},"7":{"start":{"line":32,"column":20},"end":{"line":32,"column":31}},"8":{"start":{"line":32,"column":29},"end":{"line":32,"column":40}},"9":{"start":{"line":32,"column":40},"end":{"line":32,"column":66}},"10":{"start":{"line":32,"column":73},"end":{"line":32,"column":78}},"11":{"start":{"line":32,"column":73},"end":{"line":33,"column":null}},"12":{"start":{"line":34,"column":3},"end":{"line":34,"column":null}},"13":{"start":{"line":37,"column":0},"end":{"line":37,"column":null}},"14":{"start":{"line":39,"column":0},"end":{"line":39,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":11,"column":24},"end":{"line":11,"column":41}},"loc":{"start":{"line":11,"column":24},"end":{"line":34,"column":null}}},"2":{"name":"LocalRollbackError","decl":{"start":{"line":32,"column":2},"end":{"line":32,"column":16}},"loc":{"start":{"line":32,"column":82},"end":{"line":34,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":32,"column":82},"end":{"line":32,"column":80}},"type":"cond-expr","locations":[{"start":{"line":32,"column":82},"end":{"line":32,"column":null}},{"start":{"line":32,"column":78},"end":{"line":32,"column":80}}]},"3":{"loc":{"start":{"line":32,"column":82},"end":{"line":32,"column":null}},"type":"binary-expr","locations":[{"start":{"line":32,"column":82},"end":{"line":32,"column":null}},{"start":{"line":32,"column":82},"end":{"line":32,"column":null}}]},"4":{"loc":{"start":{"line":32,"column":20},"end":{"line":32,"column":31}},"type":"cond-expr","locations":[{"start":{"line":32,"column":23},"end":{"line":32,"column":29}},{"start":{"line":32,"column":29},"end":{"line":32,"column":31}}]},"5":{"loc":{"start":{"line":32,"column":40},"end":{"line":32,"column":66}},"type":"cond-expr","locations":[{"start":{"line":32,"column":43},"end":{"line":32,"column":61}},{"start":{"line":32,"column":61},"end":{"line":32,"column":66}}]}},"s":{"0":3,"1":3,"2":87,"3":3,"4":3,"5":6,"6":6,"7":6,"8":6,"9":6,"10":12,"11":6,"12":6,"13":3,"14":3},"f":{"0":34,"1":3,"2":6},"b":{"0":[6],"1":[30,6],"2":[5,1],"3":[6,6],"4":[6,0],"5":[6,0]}} +,"/Users/zane/playground/standard-error-set/src/local-transaction-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/local-transaction-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":38}},"4":{"start":{"line":11,"column":27},"end":{"line":11,"column":null}},"5":{"start":{"line":33,"column":85},"end":{"line":33,"column":83}},"6":{"start":{"line":33,"column":83},"end":{"line":33,"column":20}},"7":{"start":{"line":33,"column":20},"end":{"line":33,"column":31}},"8":{"start":{"line":33,"column":29},"end":{"line":33,"column":40}},"9":{"start":{"line":33,"column":40},"end":{"line":33,"column":69}},"10":{"start":{"line":33,"column":76},"end":{"line":33,"column":81}},"11":{"start":{"line":33,"column":76},"end":{"line":34,"column":null}},"12":{"start":{"line":35,"column":3},"end":{"line":35,"column":null}},"13":{"start":{"line":38,"column":0},"end":{"line":38,"column":null}},"14":{"start":{"line":40,"column":0},"end":{"line":40,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":11,"column":27},"end":{"line":11,"column":44}},"loc":{"start":{"line":11,"column":27},"end":{"line":35,"column":null}}},"2":{"name":"LocalTransactionError","decl":{"start":{"line":33,"column":2},"end":{"line":33,"column":16}},"loc":{"start":{"line":33,"column":85},"end":{"line":35,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":33,"column":85},"end":{"line":33,"column":83}},"type":"cond-expr","locations":[{"start":{"line":33,"column":85},"end":{"line":33,"column":null}},{"start":{"line":33,"column":81},"end":{"line":33,"column":83}}]},"3":{"loc":{"start":{"line":33,"column":85},"end":{"line":33,"column":null}},"type":"binary-expr","locations":[{"start":{"line":33,"column":85},"end":{"line":33,"column":null}},{"start":{"line":33,"column":85},"end":{"line":33,"column":null}}]},"4":{"loc":{"start":{"line":33,"column":20},"end":{"line":33,"column":31}},"type":"cond-expr","locations":[{"start":{"line":33,"column":23},"end":{"line":33,"column":29}},{"start":{"line":33,"column":29},"end":{"line":33,"column":31}}]},"5":{"loc":{"start":{"line":33,"column":40},"end":{"line":33,"column":69}},"type":"cond-expr","locations":[{"start":{"line":33,"column":43},"end":{"line":33,"column":64}},{"start":{"line":33,"column":64},"end":{"line":33,"column":69}}]}},"s":{"0":3,"1":3,"2":87,"3":3,"4":3,"5":6,"6":6,"7":6,"8":6,"9":6,"10":12,"11":6,"12":6,"13":3,"14":3},"f":{"0":34,"1":3,"2":6},"b":{"0":[6],"1":[30,6],"2":[5,1],"3":[6,6],"4":[6,0],"5":[6,0]}} +,"/Users/zane/playground/standard-error-set/src/map-error-to-http-status.mjs": {"path":"/Users/zane/playground/standard-error-set/src/map-error-to-http-status.mjs","statementMap":{"0":{"start":{"line":1,"column":16},"end":{"line":1,"column":18}},"1":{"start":{"line":3,"column":23},"end":{"line":10,"column":1}},"2":{"start":{"line":12,"column":22},"end":{"line":12,"column":24}},"3":{"start":{"line":32,"column":26},"end":{"line":70,"column":1}},"4":{"start":{"line":33,"column":2},"end":{"line":39,"column":null}},"5":{"start":{"line":34,"column":4},"end":{"line":36,"column":null}},"6":{"start":{"line":35,"column":6},"end":{"line":35,"column":null}},"7":{"start":{"line":38,"column":4},"end":{"line":38,"column":null}},"8":{"start":{"line":41,"column":13},"end":{"line":41,"column":21}},"9":{"start":{"line":42,"column":2},"end":{"line":54,"column":null}},"10":{"start":{"line":44,"column":4},"end":{"line":44,"column":null}},"11":{"start":{"line":46,"column":7},"end":{"line":54,"column":null}},"12":{"start":{"line":48,"column":4},"end":{"line":48,"column":null}},"13":{"start":{"line":50,"column":7},"end":{"line":54,"column":null}},"14":{"start":{"line":51,"column":4},"end":{"line":51,"column":43}},"15":{"start":{"line":53,"column":4},"end":{"line":53,"column":null}},"16":{"start":{"line":57,"column":2},"end":{"line":69,"column":null}},"17":{"start":{"line":58,"column":17},"end":{"line":58,"column":60}},"18":{"start":{"line":59,"column":21},"end":{"line":59,"column":34}},"19":{"start":{"line":60,"column":4},"end":{"line":63,"column":null}},"20":{"start":{"line":61,"column":6},"end":{"line":61,"column":null}},"21":{"start":{"line":62,"column":6},"end":{"line":62,"column":null}},"22":{"start":{"line":65,"column":4},"end":{"line":65,"column":null}},"23":{"start":{"line":68,"column":4},"end":{"line":68,"column":null}},"24":{"start":{"line":72,"column":20},"end":{"line":74,"column":1}},"25":{"start":{"line":73,"column":2},"end":{"line":73,"column":null}}},"fnMap":{"0":{"name":"mapErrorToHttpStatus","decl":{"start":{"line":32,"column":6},"end":{"line":32,"column":26}},"loc":{"start":{"line":32,"column":51},"end":{"line":70,"column":1}}},"1":{"name":"registerParent","decl":{"start":{"line":72,"column":6},"end":{"line":72,"column":20}},"loc":{"start":{"line":72,"column":50},"end":{"line":74,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":33,"column":2},"end":{"line":39,"column":null}},"type":"if","locations":[{"start":{"line":33,"column":2},"end":{"line":39,"column":null}}]},"1":{"loc":{"start":{"line":42,"column":2},"end":{"line":54,"column":null}},"type":"if","locations":[{"start":{"line":42,"column":2},"end":{"line":54,"column":null}},{"start":{"line":46,"column":7},"end":{"line":54,"column":null}}]},"2":{"loc":{"start":{"line":46,"column":7},"end":{"line":54,"column":null}},"type":"if","locations":[{"start":{"line":46,"column":7},"end":{"line":54,"column":null}},{"start":{"line":50,"column":7},"end":{"line":54,"column":null}}]},"3":{"loc":{"start":{"line":50,"column":7},"end":{"line":54,"column":null}},"type":"if","locations":[{"start":{"line":50,"column":7},"end":{"line":54,"column":null}}]},"4":{"loc":{"start":{"line":57,"column":2},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":57,"column":2},"end":{"line":69,"column":null}},{"start":{"line":67,"column":7},"end":{"line":69,"column":null}}]},"5":{"loc":{"start":{"line":58,"column":17},"end":{"line":58,"column":60}},"type":"binary-expr","locations":[{"start":{"line":58,"column":17},"end":{"line":58,"column":36}},{"start":{"line":58,"column":40},"end":{"line":58,"column":60}}]},"6":{"loc":{"start":{"line":60,"column":11},"end":{"line":60,"column":59}},"type":"binary-expr","locations":[{"start":{"line":60,"column":11},"end":{"line":60,"column":31}},{"start":{"line":60,"column":35},"end":{"line":60,"column":59}}]},"7":{"loc":{"start":{"line":61,"column":15},"end":{"line":61,"column":70}},"type":"binary-expr","locations":[{"start":{"line":61,"column":15},"end":{"line":61,"column":40}},{"start":{"line":61,"column":44},"end":{"line":61,"column":70}}]}},"s":{"0":27,"1":27,"2":27,"3":27,"4":245,"5":41,"6":6,"7":41,"8":204,"9":204,"10":1,"11":203,"12":6,"13":197,"14":1,"15":1,"16":203,"17":197,"18":197,"19":197,"20":210,"21":210,"22":197,"23":6,"24":27,"25":121},"f":{"0":245,"1":121},"b":{"0":[41],"1":[1,203],"2":[6,197],"3":[1],"4":[197,6],"5":[197,179],"6":[407,213],"7":[210,208]}} +,"/Users/zane/playground/standard-error-set/src/map-http-status-to-name.mjs": {"path":"/Users/zane/playground/standard-error-set/src/map-http-status-to-name.mjs","statementMap":{"0":{"start":{"line":4,"column":24},"end":{"line":48,"column":1}},"1":{"start":{"line":50,"column":23},"end":{"line":50,"column":25}},"2":{"start":{"line":66,"column":25},"end":{"line":81,"column":1}},"3":{"start":{"line":67,"column":2},"end":{"line":80,"column":null}},"4":{"start":{"line":68,"column":4},"end":{"line":70,"column":null}},"5":{"start":{"line":69,"column":6},"end":{"line":69,"column":null}},"6":{"start":{"line":72,"column":7},"end":{"line":80,"column":null}},"7":{"start":{"line":73,"column":4},"end":{"line":73,"column":null}},"8":{"start":{"line":75,"column":7},"end":{"line":80,"column":null}},"9":{"start":{"line":76,"column":4},"end":{"line":76,"column":null}},"10":{"start":{"line":79,"column":4},"end":{"line":79,"column":null}}},"fnMap":{"0":{"name":"mapHttpStatusToName","decl":{"start":{"line":66,"column":6},"end":{"line":66,"column":25}},"loc":{"start":{"line":66,"column":46},"end":{"line":81,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":67,"column":2},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":2},"end":{"line":80,"column":null}},{"start":{"line":72,"column":7},"end":{"line":80,"column":null}}]},"1":{"loc":{"start":{"line":72,"column":7},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":72,"column":7},"end":{"line":80,"column":null}},{"start":{"line":75,"column":7},"end":{"line":80,"column":null}}]},"2":{"loc":{"start":{"line":75,"column":7},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":75,"column":7},"end":{"line":80,"column":null}},{"start":{"line":78,"column":7},"end":{"line":80,"column":null}}]},"3":{"loc":{"start":{"line":76,"column":11},"end":{"line":76,"column":76}},"type":"binary-expr","locations":[{"start":{"line":76,"column":11},"end":{"line":76,"column":33}},{"start":{"line":76,"column":37},"end":{"line":76,"column":60}},{"start":{"line":76,"column":64},"end":{"line":76,"column":76}}]}},"s":{"0":27,"1":27,"2":27,"3":196,"4":9,"5":4,"6":187,"7":1,"8":186,"9":184,"10":2},"f":{"0":196},"b":{"0":[9,187],"1":[1,186],"2":[184,2],"3":[184,180,0]}} +,"/Users/zane/playground/standard-error-set/src/mask-no-access-errors.mjs": {"path":"/Users/zane/playground/standard-error-set/src/mask-no-access-errors.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"4":{"start":{"line":16,"column":24},"end":{"line":21,"column":1}},"5":{"start":{"line":17,"column":2},"end":{"line":17,"column":null}},"6":{"start":{"line":19,"column":2},"end":{"line":19,"column":null}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":null}}},"fnMap":{"0":{"name":"maskNoAccessErrors","decl":{"start":{"line":16,"column":6},"end":{"line":16,"column":24}},"loc":{"start":{"line":16,"column":33},"end":{"line":21,"column":1}}}},"branchMap":{},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":1,"6":1,"7":1},"f":{"0":1},"b":{}} +,"/Users/zane/playground/standard-error-set/src/no-access-directory-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/no-access-directory-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":39}},"5":{"start":{"line":22,"column":28},"end":{"line":22,"column":null}},"6":{"start":{"line":34,"column":50},"end":{"line":34,"column":48}},"7":{"start":{"line":34,"column":48},"end":{"line":34,"column":20}},"8":{"start":{"line":34,"column":20},"end":{"line":34,"column":34}},"9":{"start":{"line":34,"column":41},"end":{"line":34,"column":46}},"10":{"start":{"line":35,"column":4},"end":{"line":35,"column":null}},"11":{"start":{"line":35,"column":69},"end":{"line":37,"column":null}},"12":{"start":{"line":38,"column":3},"end":{"line":38,"column":null}},"13":{"start":{"line":41,"column":0},"end":{"line":41,"column":null}},"14":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":22,"column":28},"end":{"line":22,"column":45}},"loc":{"start":{"line":22,"column":28},"end":{"line":38,"column":null}}},"2":{"name":"NoAccessDirectoryError","decl":{"start":{"line":34,"column":2},"end":{"line":34,"column":16}},"loc":{"start":{"line":34,"column":50},"end":{"line":38,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":34,"column":50},"end":{"line":34,"column":48}},"type":"cond-expr","locations":[{"start":{"line":34,"column":50},"end":{"line":34,"column":null}},{"start":{"line":34,"column":46},"end":{"line":34,"column":48}}]},"3":{"loc":{"start":{"line":34,"column":50},"end":{"line":34,"column":null}},"type":"binary-expr","locations":[{"start":{"line":34,"column":50},"end":{"line":34,"column":null}},{"start":{"line":34,"column":50},"end":{"line":34,"column":null}}]},"4":{"loc":{"start":{"line":34,"column":20},"end":{"line":34,"column":34}},"type":"cond-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":29}},{"start":{"line":34,"column":29},"end":{"line":34,"column":34}}]},"5":{"loc":{"start":{"line":35,"column":23},"end":{"line":35,"column":69}},"type":"binary-expr","locations":[{"start":{"line":35,"column":23},"end":{"line":35,"column":39}},{"start":{"line":35,"column":43},"end":{"line":35,"column":69}}]}},"s":{"0":3,"1":3,"2":3,"3":60,"4":3,"5":3,"6":4,"7":4,"8":4,"9":8,"10":4,"11":4,"12":6,"13":3,"14":3},"f":{"0":23,"1":3,"2":4},"b":{"0":[4],"1":[20,4],"2":[2,2],"3":[4,4],"4":[4,0],"5":[4,4]}} +,"/Users/zane/playground/standard-error-set/src/no-access-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/no-access-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":81}},"3":{"start":{"line":4,"column":81},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":30}},"5":{"start":{"line":24,"column":19},"end":{"line":24,"column":null}},"6":{"start":{"line":35,"column":58},"end":{"line":35,"column":56}},"7":{"start":{"line":35,"column":56},"end":{"line":35,"column":20}},"8":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"9":{"start":{"line":35,"column":37},"end":{"line":35,"column":36}},"10":{"start":{"line":35,"column":49},"end":{"line":35,"column":54}},"11":{"start":{"line":36,"column":4},"end":{"line":36,"column":null}},"12":{"start":{"line":37,"column":4},"end":{"line":37,"column":null}},"13":{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},"14":{"start":{"line":39,"column":6},"end":{"line":39,"column":null}},"15":{"start":{"line":40,"column":5},"end":{"line":42,"column":null}},"16":{"start":{"line":43,"column":3},"end":{"line":43,"column":null}},"17":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},"18":{"start":{"line":48,"column":0},"end":{"line":48,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":81},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":81},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":24,"column":19},"end":{"line":24,"column":36}},"loc":{"start":{"line":24,"column":19},"end":{"line":43,"column":null}}},"2":{"name":"NoAccessError","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":16}},"loc":{"start":{"line":35,"column":58},"end":{"line":43,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":81},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":81},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":81},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":81},"end":{"line":4,"column":null}},{"start":{"line":4,"column":81},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":35,"column":58},"end":{"line":35,"column":56}},"type":"cond-expr","locations":[{"start":{"line":35,"column":58},"end":{"line":35,"column":null}},{"start":{"line":35,"column":54},"end":{"line":35,"column":56}}]},"3":{"loc":{"start":{"line":35,"column":58},"end":{"line":35,"column":null}},"type":"binary-expr","locations":[{"start":{"line":35,"column":58},"end":{"line":35,"column":null}},{"start":{"line":35,"column":58},"end":{"line":35,"column":null}}]},"4":{"loc":{"start":{"line":35,"column":20},"end":{"line":35,"column":31}},"type":"cond-expr","locations":[{"start":{"line":35,"column":23},"end":{"line":35,"column":29}},{"start":{"line":35,"column":29},"end":{"line":35,"column":31}}]},"5":{"loc":{"start":{"line":36,"column":13},"end":{"line":36,"column":51}},"type":"binary-expr","locations":[{"start":{"line":36,"column":13},"end":{"line":36,"column":19}},{"start":{"line":36,"column":23},"end":{"line":36,"column":51}}]},"6":{"loc":{"start":{"line":37,"column":22},"end":{"line":37,"column":88}},"type":"binary-expr","locations":[{"start":{"line":37,"column":22},"end":{"line":37,"column":37}},{"start":{"line":37,"column":41},"end":{"line":37,"column":88}}]},"7":{"loc":{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},"type":"if","locations":[{"start":{"line":38,"column":4},"end":{"line":40,"column":5}}]},"8":{"loc":{"start":{"line":38,"column":8},"end":{"line":38,"column":52}},"type":"binary-expr","locations":[{"start":{"line":38,"column":8},"end":{"line":38,"column":22}},{"start":{"line":38,"column":26},"end":{"line":38,"column":52}}]}},"s":{"0":5,"1":5,"2":5,"3":492,"4":5,"5":5,"6":18,"7":18,"8":18,"9":18,"10":36,"11":18,"12":18,"13":18,"14":14,"15":18,"16":10,"17":5,"18":5},"f":{"0":193,"1":5,"2":18},"b":{"0":[36],"1":[144,36],"2":[15,3],"3":[18,18],"4":[8,10],"5":[18,18],"6":[18,18],"7":[14],"8":[18,14]}} +,"/Users/zane/playground/standard-error-set/src/no-access-file-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/no-access-file-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":34}},"5":{"start":{"line":22,"column":23},"end":{"line":22,"column":null}},"6":{"start":{"line":38,"column":50},"end":{"line":38,"column":48}},"7":{"start":{"line":38,"column":48},"end":{"line":38,"column":20}},"8":{"start":{"line":38,"column":20},"end":{"line":38,"column":34}},"9":{"start":{"line":38,"column":41},"end":{"line":38,"column":46}},"10":{"start":{"line":39,"column":21},"end":{"line":39,"column":42}},"11":{"start":{"line":40,"column":4},"end":{"line":40,"column":null}},"12":{"start":{"line":40,"column":51},"end":{"line":42,"column":null}},"13":{"start":{"line":43,"column":3},"end":{"line":43,"column":null}},"14":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},"15":{"start":{"line":48,"column":0},"end":{"line":48,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":22,"column":23},"end":{"line":22,"column":40}},"loc":{"start":{"line":22,"column":23},"end":{"line":43,"column":null}}},"2":{"name":"NoAccessFileError","decl":{"start":{"line":38,"column":2},"end":{"line":38,"column":16}},"loc":{"start":{"line":38,"column":50},"end":{"line":43,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":38,"column":50},"end":{"line":38,"column":48}},"type":"cond-expr","locations":[{"start":{"line":38,"column":50},"end":{"line":38,"column":null}},{"start":{"line":38,"column":46},"end":{"line":38,"column":48}}]},"3":{"loc":{"start":{"line":38,"column":50},"end":{"line":38,"column":null}},"type":"binary-expr","locations":[{"start":{"line":38,"column":50},"end":{"line":38,"column":null}},{"start":{"line":38,"column":50},"end":{"line":38,"column":null}}]},"4":{"loc":{"start":{"line":38,"column":20},"end":{"line":38,"column":34}},"type":"cond-expr","locations":[{"start":{"line":38,"column":23},"end":{"line":38,"column":29}},{"start":{"line":38,"column":29},"end":{"line":38,"column":34}}]},"5":{"loc":{"start":{"line":40,"column":23},"end":{"line":40,"column":51}},"type":"binary-expr","locations":[{"start":{"line":40,"column":23},"end":{"line":40,"column":39}},{"start":{"line":40,"column":43},"end":{"line":40,"column":51}}]}},"s":{"0":3,"1":3,"2":3,"3":90,"4":3,"5":3,"6":6,"7":6,"8":6,"9":12,"10":6,"11":6,"12":6,"13":6,"14":3,"15":3},"f":{"0":37,"1":3,"2":6},"b":{"0":[6],"1":[30,6],"2":[4,2],"3":[6,6],"4":[6,0],"5":[6,6]}} +,"/Users/zane/playground/standard-error-set/src/not-found-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/not-found-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":30}},"5":{"start":{"line":16,"column":19},"end":{"line":16,"column":null}},"6":{"start":{"line":27,"column":67},"end":{"line":27,"column":65}},"7":{"start":{"line":27,"column":65},"end":{"line":27,"column":20}},"8":{"start":{"line":27,"column":20},"end":{"line":27,"column":31}},"9":{"start":{"line":27,"column":29},"end":{"line":27,"column":35}},"10":{"start":{"line":27,"column":35},"end":{"line":27,"column":51}},"11":{"start":{"line":27,"column":58},"end":{"line":27,"column":63}},"12":{"start":{"line":28,"column":4},"end":{"line":28,"column":null}},"13":{"start":{"line":28,"column":73},"end":{"line":29,"column":null}},"14":{"start":{"line":30,"column":3},"end":{"line":30,"column":null}},"15":{"start":{"line":33,"column":0},"end":{"line":33,"column":null}},"16":{"start":{"line":35,"column":0},"end":{"line":35,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":19},"end":{"line":16,"column":36}},"loc":{"start":{"line":16,"column":19},"end":{"line":30,"column":null}}},"2":{"name":"NotFoundError","decl":{"start":{"line":27,"column":2},"end":{"line":27,"column":16}},"loc":{"start":{"line":27,"column":67},"end":{"line":30,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":27,"column":67},"end":{"line":27,"column":65}},"type":"cond-expr","locations":[{"start":{"line":27,"column":67},"end":{"line":27,"column":null}},{"start":{"line":27,"column":63},"end":{"line":27,"column":65}}]},"3":{"loc":{"start":{"line":27,"column":67},"end":{"line":27,"column":null}},"type":"binary-expr","locations":[{"start":{"line":27,"column":67},"end":{"line":27,"column":null}},{"start":{"line":27,"column":67},"end":{"line":27,"column":null}}]},"4":{"loc":{"start":{"line":27,"column":20},"end":{"line":27,"column":31}},"type":"cond-expr","locations":[{"start":{"line":27,"column":23},"end":{"line":27,"column":29}},{"start":{"line":27,"column":29},"end":{"line":27,"column":31}}]},"5":{"loc":{"start":{"line":27,"column":35},"end":{"line":27,"column":51}},"type":"cond-expr","locations":[{"start":{"line":27,"column":38},"end":{"line":27,"column":46}},{"start":{"line":27,"column":46},"end":{"line":27,"column":51}}]},"6":{"loc":{"start":{"line":28,"column":22},"end":{"line":28,"column":73}},"type":"binary-expr","locations":[{"start":{"line":28,"column":22},"end":{"line":28,"column":37}},{"start":{"line":28,"column":41},"end":{"line":28,"column":73}}]}},"s":{"0":5,"1":5,"2":5,"3":174,"4":5,"5":5,"6":11,"7":11,"8":11,"9":11,"10":11,"11":22,"12":11,"13":11,"14":10,"15":5,"16":5},"f":{"0":75,"1":5,"2":11},"b":{"0":[11],"1":[55,11],"2":[10,1],"3":[11,11],"4":[3,8],"5":[10,1],"6":[11,3]}} +,"/Users/zane/playground/standard-error-set/src/not-implemented-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/not-implemented-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":36}},"4":{"start":{"line":15,"column":25},"end":{"line":15,"column":null}},"5":{"start":{"line":30,"column":50},"end":{"line":30,"column":48}},"6":{"start":{"line":30,"column":48},"end":{"line":30,"column":20}},"7":{"start":{"line":30,"column":20},"end":{"line":30,"column":34}},"8":{"start":{"line":30,"column":41},"end":{"line":30,"column":46}},"9":{"start":{"line":31,"column":4},"end":{"line":31,"column":null}},"10":{"start":{"line":31,"column":65},"end":{"line":32,"column":null}},"11":{"start":{"line":33,"column":3},"end":{"line":33,"column":null}},"12":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}},"13":{"start":{"line":38,"column":0},"end":{"line":38,"column":null}},"14":{"start":{"line":40,"column":24},"end":{"line":47,"column":1}},"15":{"start":{"line":40,"column":33},"end":{"line":40,"column":32}},"16":{"start":{"line":41,"column":2},"end":{"line":46,"column":null}},"17":{"start":{"line":42,"column":4},"end":{"line":42,"column":null}},"18":{"start":{"line":45,"column":4},"end":{"line":45,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":15,"column":25},"end":{"line":15,"column":42}},"loc":{"start":{"line":15,"column":25},"end":{"line":33,"column":null}}},"2":{"name":"NotImplementedError","decl":{"start":{"line":30,"column":2},"end":{"line":30,"column":16}},"loc":{"start":{"line":30,"column":50},"end":{"line":33,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":40,"column":6},"end":{"line":40,"column":21}},"loc":{"start":{"line":40,"column":40},"end":{"line":47,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":30,"column":50},"end":{"line":30,"column":48}},"type":"cond-expr","locations":[{"start":{"line":30,"column":50},"end":{"line":30,"column":null}},{"start":{"line":30,"column":46},"end":{"line":30,"column":48}}]},"3":{"loc":{"start":{"line":30,"column":50},"end":{"line":30,"column":null}},"type":"binary-expr","locations":[{"start":{"line":30,"column":50},"end":{"line":30,"column":null}},{"start":{"line":30,"column":50},"end":{"line":30,"column":null}}]},"4":{"loc":{"start":{"line":30,"column":20},"end":{"line":30,"column":34}},"type":"cond-expr","locations":[{"start":{"line":30,"column":23},"end":{"line":30,"column":29}},{"start":{"line":30,"column":29},"end":{"line":30,"column":34}}]},"5":{"loc":{"start":{"line":31,"column":22},"end":{"line":31,"column":65}},"type":"binary-expr","locations":[{"start":{"line":31,"column":22},"end":{"line":31,"column":37}},{"start":{"line":31,"column":41},"end":{"line":31,"column":65}}]},"6":{"loc":{"start":{"line":41,"column":2},"end":{"line":46,"column":null}},"type":"if","locations":[{"start":{"line":41,"column":2},"end":{"line":46,"column":null}},{"start":{"line":44,"column":7},"end":{"line":46,"column":null}}]}},"s":{"0":3,"1":3,"2":48,"3":3,"4":3,"5":3,"6":3,"7":3,"8":6,"9":3,"10":3,"11":6,"12":3,"13":3,"14":3,"15":2,"16":2,"17":1,"18":1},"f":{"0":19,"1":3,"2":3,"3":2},"b":{"0":[3],"1":[15,3],"2":[2,1],"3":[3,3],"4":[3,0],"5":[3,2],"6":[1,1]}} +,"/Users/zane/playground/standard-error-set/src/not-supported-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/not-supported-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":34}},"4":{"start":{"line":17,"column":23},"end":{"line":17,"column":null}},"5":{"start":{"line":42,"column":50},"end":{"line":42,"column":48}},"6":{"start":{"line":42,"column":48},"end":{"line":42,"column":20}},"7":{"start":{"line":42,"column":20},"end":{"line":42,"column":34}},"8":{"start":{"line":42,"column":41},"end":{"line":42,"column":46}},"9":{"start":{"line":43,"column":4},"end":{"line":43,"column":null}},"10":{"start":{"line":43,"column":65},"end":{"line":44,"column":null}},"11":{"start":{"line":45,"column":3},"end":{"line":45,"column":null}},"12":{"start":{"line":48,"column":0},"end":{"line":48,"column":null}},"13":{"start":{"line":50,"column":0},"end":{"line":50,"column":null}},"14":{"start":{"line":52,"column":24},"end":{"line":61,"column":1}},"15":{"start":{"line":52,"column":31},"end":{"line":52,"column":30}},"16":{"start":{"line":52,"column":38},"end":{"line":52,"column":37}},"17":{"start":{"line":52,"column":46},"end":{"line":52,"column":45}},"18":{"start":{"line":53,"column":16},"end":{"line":53,"column":69}},"19":{"start":{"line":54,"column":2},"end":{"line":54,"column":null}},"20":{"start":{"line":55,"column":2},"end":{"line":55,"column":null}},"21":{"start":{"line":56,"column":2},"end":{"line":58,"column":null}},"22":{"start":{"line":57,"column":4},"end":{"line":57,"column":null}},"23":{"start":{"line":60,"column":2},"end":{"line":60,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":17,"column":23},"end":{"line":17,"column":40}},"loc":{"start":{"line":17,"column":23},"end":{"line":45,"column":null}}},"2":{"name":"NotSupportedError","decl":{"start":{"line":42,"column":2},"end":{"line":42,"column":16}},"loc":{"start":{"line":42,"column":50},"end":{"line":45,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":52,"column":6},"end":{"line":52,"column":21}},"loc":{"start":{"line":52,"column":53},"end":{"line":61,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":42,"column":50},"end":{"line":42,"column":48}},"type":"cond-expr","locations":[{"start":{"line":42,"column":50},"end":{"line":42,"column":null}},{"start":{"line":42,"column":46},"end":{"line":42,"column":48}}]},"3":{"loc":{"start":{"line":42,"column":50},"end":{"line":42,"column":null}},"type":"binary-expr","locations":[{"start":{"line":42,"column":50},"end":{"line":42,"column":null}},{"start":{"line":42,"column":50},"end":{"line":42,"column":null}}]},"4":{"loc":{"start":{"line":42,"column":20},"end":{"line":42,"column":34}},"type":"cond-expr","locations":[{"start":{"line":42,"column":23},"end":{"line":42,"column":29}},{"start":{"line":42,"column":29},"end":{"line":42,"column":34}}]},"5":{"loc":{"start":{"line":43,"column":22},"end":{"line":43,"column":65}},"type":"binary-expr","locations":[{"start":{"line":43,"column":22},"end":{"line":43,"column":37}},{"start":{"line":43,"column":41},"end":{"line":43,"column":65}}]},"6":{"loc":{"start":{"line":53,"column":16},"end":{"line":53,"column":69}},"type":"cond-expr","locations":[{"start":{"line":53,"column":39},"end":{"line":53,"column":52}},{"start":{"line":53,"column":52},"end":{"line":53,"column":69}}]},"7":{"loc":{"start":{"line":55,"column":13},"end":{"line":55,"column":71}},"type":"cond-expr","locations":[{"start":{"line":55,"column":35},"end":{"line":55,"column":57}},{"start":{"line":55,"column":57},"end":{"line":55,"column":71}}]},"8":{"loc":{"start":{"line":56,"column":2},"end":{"line":58,"column":null}},"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":58,"column":null}}]}},"s":{"0":3,"1":3,"2":78,"3":3,"4":3,"5":5,"6":5,"7":5,"8":10,"9":5,"10":5,"11":6,"12":3,"13":3,"14":3,"15":4,"16":4,"17":4,"18":4,"19":4,"20":4,"21":4,"22":1,"23":4},"f":{"0":33,"1":3,"2":5,"3":4},"b":{"0":[5],"1":[25,5],"2":[4,1],"3":[5,5],"4":[5,0],"5":[5,4],"6":[2,2],"7":[2,2],"8":[1]}} +,"/Users/zane/playground/standard-error-set/src/operation-not-permitted-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/operation-not-permitted-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":43}},"4":{"start":{"line":19,"column":32},"end":{"line":19,"column":null}},"5":{"start":{"line":38,"column":94},"end":{"line":38,"column":92}},"6":{"start":{"line":38,"column":92},"end":{"line":38,"column":20}},"7":{"start":{"line":38,"column":20},"end":{"line":38,"column":31}},"8":{"start":{"line":38,"column":37},"end":{"line":38,"column":36}},"9":{"start":{"line":38,"column":37},"end":{"line":38,"column":44}},"10":{"start":{"line":38,"column":44},"end":{"line":38,"column":67}},"11":{"start":{"line":38,"column":73},"end":{"line":38,"column":72}},"12":{"start":{"line":38,"column":85},"end":{"line":38,"column":90}},"13":{"start":{"line":39,"column":4},"end":{"line":41,"column":5}},"14":{"start":{"line":40,"column":6},"end":{"line":40,"column":null}},"15":{"start":{"line":41,"column":5},"end":{"line":42,"column":null}},"16":{"start":{"line":43,"column":3},"end":{"line":43,"column":null}},"17":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},"18":{"start":{"line":48,"column":0},"end":{"line":48,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":19,"column":32},"end":{"line":19,"column":49}},"loc":{"start":{"line":19,"column":32},"end":{"line":43,"column":null}}},"2":{"name":"OperationNotPermittedError","decl":{"start":{"line":38,"column":2},"end":{"line":38,"column":16}},"loc":{"start":{"line":38,"column":94},"end":{"line":43,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":38,"column":94},"end":{"line":38,"column":92}},"type":"cond-expr","locations":[{"start":{"line":38,"column":94},"end":{"line":38,"column":null}},{"start":{"line":38,"column":90},"end":{"line":38,"column":92}}]},"3":{"loc":{"start":{"line":38,"column":94},"end":{"line":38,"column":null}},"type":"binary-expr","locations":[{"start":{"line":38,"column":94},"end":{"line":38,"column":null}},{"start":{"line":38,"column":94},"end":{"line":38,"column":null}}]},"4":{"loc":{"start":{"line":38,"column":20},"end":{"line":38,"column":31}},"type":"cond-expr","locations":[{"start":{"line":38,"column":23},"end":{"line":38,"column":29}},{"start":{"line":38,"column":29},"end":{"line":38,"column":31}}]},"5":{"loc":{"start":{"line":38,"column":44},"end":{"line":38,"column":67}},"type":"cond-expr","locations":[{"start":{"line":38,"column":47},"end":{"line":38,"column":65}},{"start":{"line":38,"column":65},"end":{"line":38,"column":67}}]},"6":{"loc":{"start":{"line":39,"column":4},"end":{"line":41,"column":5}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":41,"column":5}}]},"7":{"loc":{"start":{"line":39,"column":8},"end":{"line":39,"column":52}},"type":"binary-expr","locations":[{"start":{"line":39,"column":8},"end":{"line":39,"column":28}},{"start":{"line":39,"column":32},"end":{"line":39,"column":52}}]}},"s":{"0":3,"1":3,"2":81,"3":3,"4":3,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":6,"12":12,"13":6,"14":1,"15":6,"16":6,"17":3,"18":3},"f":{"0":28,"1":3,"2":6},"b":{"0":[6],"1":[30,6],"2":[5,1],"3":[6,6],"4":[6,0],"5":[5,1],"6":[1],"7":[6,4]}} +,"/Users/zane/playground/standard-error-set/src/rollback-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/rollback-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":30}},"5":{"start":{"line":20,"column":19},"end":{"line":20,"column":null}},"6":{"start":{"line":37,"column":68},"end":{"line":37,"column":66}},"7":{"start":{"line":37,"column":66},"end":{"line":37,"column":20}},"8":{"start":{"line":37,"column":20},"end":{"line":37,"column":31}},"9":{"start":{"line":37,"column":29},"end":{"line":37,"column":38}},"10":{"start":{"line":37,"column":38},"end":{"line":37,"column":52}},"11":{"start":{"line":37,"column":59},"end":{"line":37,"column":64}},"12":{"start":{"line":38,"column":4},"end":{"line":38,"column":null}},"13":{"start":{"line":38,"column":110},"end":{"line":39,"column":null}},"14":{"start":{"line":40,"column":3},"end":{"line":40,"column":null}},"15":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}},"16":{"start":{"line":45,"column":0},"end":{"line":45,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":20,"column":19},"end":{"line":20,"column":36}},"loc":{"start":{"line":20,"column":19},"end":{"line":40,"column":null}}},"2":{"name":"RollbackError","decl":{"start":{"line":37,"column":2},"end":{"line":37,"column":16}},"loc":{"start":{"line":37,"column":68},"end":{"line":40,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":37,"column":68},"end":{"line":37,"column":66}},"type":"cond-expr","locations":[{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},{"start":{"line":37,"column":64},"end":{"line":37,"column":66}}]},"3":{"loc":{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},"type":"binary-expr","locations":[{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},{"start":{"line":37,"column":68},"end":{"line":37,"column":null}}]},"4":{"loc":{"start":{"line":37,"column":20},"end":{"line":37,"column":31}},"type":"cond-expr","locations":[{"start":{"line":37,"column":23},"end":{"line":37,"column":29}},{"start":{"line":37,"column":29},"end":{"line":37,"column":31}}]},"5":{"loc":{"start":{"line":37,"column":38},"end":{"line":37,"column":52}},"type":"cond-expr","locations":[{"start":{"line":37,"column":41},"end":{"line":37,"column":47}},{"start":{"line":37,"column":47},"end":{"line":37,"column":52}}]},"6":{"loc":{"start":{"line":38,"column":22},"end":{"line":38,"column":110}},"type":"binary-expr","locations":[{"start":{"line":38,"column":22},"end":{"line":38,"column":37}},{"start":{"line":38,"column":41},"end":{"line":38,"column":110}}]}},"s":{"0":3,"1":3,"2":3,"3":117,"4":3,"5":3,"6":5,"7":5,"8":5,"9":5,"10":5,"11":10,"12":5,"13":5,"14":6,"15":3,"16":3},"f":{"0":40,"1":3,"2":5},"b":{"0":[9],"1":[37,9],"2":[4,1],"3":[5,5],"4":[5,0],"5":[3,2],"6":[5,4]}} +,"/Users/zane/playground/standard-error-set/src/system-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/system-error.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":59}},"2":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":28}},"4":{"start":{"line":9,"column":17},"end":{"line":9,"column":null}},"5":{"start":{"line":25,"column":50},"end":{"line":25,"column":48}},"6":{"start":{"line":25,"column":48},"end":{"line":25,"column":20}},"7":{"start":{"line":25,"column":20},"end":{"line":25,"column":34}},"8":{"start":{"line":25,"column":41},"end":{"line":25,"column":46}},"9":{"start":{"line":26,"column":4},"end":{"line":26,"column":null}},"10":{"start":{"line":26,"column":65},"end":{"line":27,"column":null}},"11":{"start":{"line":28,"column":3},"end":{"line":28,"column":null}},"12":{"start":{"line":31,"column":0},"end":{"line":31,"column":null}},"13":{"start":{"line":33,"column":0},"end":{"line":33,"column":null}},"14":{"start":{"line":35,"column":24},"end":{"line":36,"column":51}},"15":{"start":{"line":35,"column":21},"end":{"line":35,"column":35}},"16":{"start":{"line":35,"column":35},"end":{"line":35,"column":null}},"17":{"start":{"line":35,"column":47},"end":{"line":36,"column":51}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":9,"column":17},"end":{"line":9,"column":34}},"loc":{"start":{"line":9,"column":17},"end":{"line":28,"column":null}}},"2":{"name":"SystemError","decl":{"start":{"line":25,"column":2},"end":{"line":25,"column":16}},"loc":{"start":{"line":25,"column":50},"end":{"line":28,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":35,"column":6},"end":{"line":35,"column":21}},"loc":{"start":{"line":35,"column":21},"end":{"line":36,"column":51}}}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"type":"if","locations":[{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}]},"1":{"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"type":"binary-expr","locations":[{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}]},"2":{"loc":{"start":{"line":25,"column":50},"end":{"line":25,"column":48}},"type":"cond-expr","locations":[{"start":{"line":25,"column":50},"end":{"line":25,"column":null}},{"start":{"line":25,"column":46},"end":{"line":25,"column":48}}]},"3":{"loc":{"start":{"line":25,"column":50},"end":{"line":25,"column":null}},"type":"binary-expr","locations":[{"start":{"line":25,"column":50},"end":{"line":25,"column":null}},{"start":{"line":25,"column":50},"end":{"line":25,"column":null}}]},"4":{"loc":{"start":{"line":25,"column":20},"end":{"line":25,"column":34}},"type":"cond-expr","locations":[{"start":{"line":25,"column":23},"end":{"line":25,"column":29}},{"start":{"line":25,"column":29},"end":{"line":25,"column":34}}]},"5":{"loc":{"start":{"line":26,"column":22},"end":{"line":26,"column":65}},"type":"binary-expr","locations":[{"start":{"line":26,"column":22},"end":{"line":26,"column":37}},{"start":{"line":26,"column":41},"end":{"line":26,"column":65}}]},"6":{"loc":{"start":{"line":35,"column":35},"end":{"line":35,"column":null}},"type":"cond-expr","locations":[{"start":{"line":35,"column":38},"end":{"line":35,"column":47}},{"start":{"line":35,"column":47},"end":{"line":35,"column":null}}]}},"s":{"0":3,"1":3,"2":66,"3":3,"4":3,"5":4,"6":4,"7":4,"8":8,"9":4,"10":4,"11":6,"12":3,"13":3,"14":3,"15":4,"16":4,"17":4},"f":{"0":29,"1":3,"2":4,"3":4},"b":{"0":[4],"1":[20,4],"2":[4,0],"3":[4,4],"4":[4,0],"5":[4,4],"6":[4,0]}} +,"/Users/zane/playground/standard-error-set/src/timeout-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/timeout-error.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":59}},"2":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":29}},"4":{"start":{"line":9,"column":18},"end":{"line":9,"column":null}},"5":{"start":{"line":22,"column":50},"end":{"line":22,"column":48}},"6":{"start":{"line":22,"column":48},"end":{"line":22,"column":20}},"7":{"start":{"line":22,"column":20},"end":{"line":22,"column":34}},"8":{"start":{"line":22,"column":41},"end":{"line":22,"column":46}},"9":{"start":{"line":23,"column":4},"end":{"line":23,"column":null}},"10":{"start":{"line":23,"column":65},"end":{"line":24,"column":null}},"11":{"start":{"line":25,"column":3},"end":{"line":25,"column":null}},"12":{"start":{"line":28,"column":0},"end":{"line":28,"column":null}},"13":{"start":{"line":30,"column":0},"end":{"line":30,"column":null}},"14":{"start":{"line":32,"column":24},"end":{"line":33,"column":34}},"15":{"start":{"line":32,"column":21},"end":{"line":32,"column":35}},"16":{"start":{"line":32,"column":35},"end":{"line":32,"column":null}},"17":{"start":{"line":32,"column":47},"end":{"line":33,"column":34}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":9,"column":18},"end":{"line":9,"column":35}},"loc":{"start":{"line":9,"column":18},"end":{"line":25,"column":null}}},"2":{"name":"TimeoutError","decl":{"start":{"line":22,"column":2},"end":{"line":22,"column":16}},"loc":{"start":{"line":22,"column":50},"end":{"line":25,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":32,"column":6},"end":{"line":32,"column":21}},"loc":{"start":{"line":32,"column":21},"end":{"line":33,"column":34}}}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"type":"if","locations":[{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}]},"1":{"loc":{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},"type":"binary-expr","locations":[{"start":{"line":2,"column":59},"end":{"line":2,"column":null}},{"start":{"line":2,"column":59},"end":{"line":2,"column":null}}]},"2":{"loc":{"start":{"line":22,"column":50},"end":{"line":22,"column":48}},"type":"cond-expr","locations":[{"start":{"line":22,"column":50},"end":{"line":22,"column":null}},{"start":{"line":22,"column":46},"end":{"line":22,"column":48}}]},"3":{"loc":{"start":{"line":22,"column":50},"end":{"line":22,"column":null}},"type":"binary-expr","locations":[{"start":{"line":22,"column":50},"end":{"line":22,"column":null}},{"start":{"line":22,"column":50},"end":{"line":22,"column":null}}]},"4":{"loc":{"start":{"line":22,"column":20},"end":{"line":22,"column":34}},"type":"cond-expr","locations":[{"start":{"line":22,"column":23},"end":{"line":22,"column":29}},{"start":{"line":22,"column":29},"end":{"line":22,"column":34}}]},"5":{"loc":{"start":{"line":23,"column":22},"end":{"line":23,"column":65}},"type":"binary-expr","locations":[{"start":{"line":23,"column":22},"end":{"line":23,"column":37}},{"start":{"line":23,"column":41},"end":{"line":23,"column":65}}]},"6":{"loc":{"start":{"line":32,"column":35},"end":{"line":32,"column":null}},"type":"cond-expr","locations":[{"start":{"line":32,"column":38},"end":{"line":32,"column":47}},{"start":{"line":32,"column":47},"end":{"line":32,"column":null}}]}},"s":{"0":3,"1":3,"2":48,"3":3,"4":3,"5":3,"6":3,"7":3,"8":6,"9":3,"10":3,"11":6,"12":3,"13":3,"14":3,"15":2,"16":2,"17":2},"f":{"0":19,"1":3,"2":3,"3":2},"b":{"0":[3],"1":[15,3],"2":[2,1],"3":[3,3],"4":[3,0],"5":[3,2],"6":[1,1]}} +,"/Users/zane/playground/standard-error-set/src/transaction-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/transaction-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"3":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"4":{"start":{"line":6,"column":15},"end":{"line":6,"column":33}},"5":{"start":{"line":20,"column":22},"end":{"line":20,"column":null}},"6":{"start":{"line":37,"column":68},"end":{"line":37,"column":66}},"7":{"start":{"line":37,"column":66},"end":{"line":37,"column":20}},"8":{"start":{"line":37,"column":20},"end":{"line":37,"column":31}},"9":{"start":{"line":37,"column":29},"end":{"line":37,"column":38}},"10":{"start":{"line":37,"column":38},"end":{"line":37,"column":52}},"11":{"start":{"line":37,"column":59},"end":{"line":37,"column":64}},"12":{"start":{"line":38,"column":4},"end":{"line":38,"column":null}},"13":{"start":{"line":38,"column":113},"end":{"line":39,"column":null}},"14":{"start":{"line":40,"column":3},"end":{"line":40,"column":null}},"15":{"start":{"line":43,"column":0},"end":{"line":43,"column":null}},"16":{"start":{"line":45,"column":0},"end":{"line":45,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":20,"column":22},"end":{"line":20,"column":39}},"loc":{"start":{"line":20,"column":22},"end":{"line":40,"column":null}}},"2":{"name":"TransactionError","decl":{"start":{"line":37,"column":2},"end":{"line":37,"column":16}},"loc":{"start":{"line":37,"column":68},"end":{"line":40,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"1":{"loc":{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},"type":"binary-expr","locations":[{"start":{"line":4,"column":59},"end":{"line":4,"column":null}},{"start":{"line":4,"column":59},"end":{"line":4,"column":null}}]},"2":{"loc":{"start":{"line":37,"column":68},"end":{"line":37,"column":66}},"type":"cond-expr","locations":[{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},{"start":{"line":37,"column":64},"end":{"line":37,"column":66}}]},"3":{"loc":{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},"type":"binary-expr","locations":[{"start":{"line":37,"column":68},"end":{"line":37,"column":null}},{"start":{"line":37,"column":68},"end":{"line":37,"column":null}}]},"4":{"loc":{"start":{"line":37,"column":20},"end":{"line":37,"column":31}},"type":"cond-expr","locations":[{"start":{"line":37,"column":23},"end":{"line":37,"column":29}},{"start":{"line":37,"column":29},"end":{"line":37,"column":31}}]},"5":{"loc":{"start":{"line":37,"column":38},"end":{"line":37,"column":52}},"type":"cond-expr","locations":[{"start":{"line":37,"column":41},"end":{"line":37,"column":47}},{"start":{"line":37,"column":47},"end":{"line":37,"column":52}}]},"6":{"loc":{"start":{"line":38,"column":22},"end":{"line":38,"column":113}},"type":"binary-expr","locations":[{"start":{"line":38,"column":22},"end":{"line":38,"column":37}},{"start":{"line":38,"column":41},"end":{"line":38,"column":113}}]}},"s":{"0":3,"1":3,"2":3,"3":117,"4":3,"5":3,"6":5,"7":5,"8":5,"9":5,"10":5,"11":10,"12":5,"13":5,"14":6,"15":3,"16":3},"f":{"0":40,"1":3,"2":5},"b":{"0":[9],"1":[37,9],"2":[4,1],"3":[5,5],"4":[5,0],"5":[3,2],"6":[5,4]}} +,"/Users/zane/playground/standard-error-set/src/unavailable-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/unavailable-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":33}},"4":{"start":{"line":14,"column":22},"end":{"line":14,"column":null}},"5":{"start":{"line":36,"column":50},"end":{"line":36,"column":48}},"6":{"start":{"line":36,"column":48},"end":{"line":36,"column":20}},"7":{"start":{"line":36,"column":20},"end":{"line":36,"column":34}},"8":{"start":{"line":36,"column":41},"end":{"line":36,"column":46}},"9":{"start":{"line":37,"column":4},"end":{"line":37,"column":null}},"10":{"start":{"line":37,"column":65},"end":{"line":38,"column":null}},"11":{"start":{"line":39,"column":3},"end":{"line":39,"column":null}},"12":{"start":{"line":42,"column":0},"end":{"line":42,"column":null}},"13":{"start":{"line":44,"column":0},"end":{"line":44,"column":null}},"14":{"start":{"line":46,"column":24},"end":{"line":52,"column":1}},"15":{"start":{"line":46,"column":39},"end":{"line":46,"column":38}},"16":{"start":{"line":46,"column":39},"end":{"line":46,"column":46}},"17":{"start":{"line":46,"column":46},"end":{"line":46,"column":74}},"18":{"start":{"line":46,"column":72},"end":{"line":46,"column":80}},"19":{"start":{"line":46,"column":80},"end":{"line":46,"column":107}},"20":{"start":{"line":47,"column":16},"end":{"line":47,"column":109}},"21":{"start":{"line":48,"column":2},"end":{"line":48,"column":null}},"22":{"start":{"line":49,"column":2},"end":{"line":49,"column":null}},"23":{"start":{"line":51,"column":2},"end":{"line":51,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":39}},"loc":{"start":{"line":14,"column":22},"end":{"line":39,"column":null}}},"2":{"name":"UnavailableError","decl":{"start":{"line":36,"column":2},"end":{"line":36,"column":16}},"loc":{"start":{"line":36,"column":50},"end":{"line":39,"column":3}}},"3":{"name":"generateMessage","decl":{"start":{"line":46,"column":6},"end":{"line":46,"column":21}},"loc":{"start":{"line":46,"column":107},"end":{"line":52,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":36,"column":50},"end":{"line":36,"column":48}},"type":"cond-expr","locations":[{"start":{"line":36,"column":50},"end":{"line":36,"column":null}},{"start":{"line":36,"column":46},"end":{"line":36,"column":48}}]},"3":{"loc":{"start":{"line":36,"column":50},"end":{"line":36,"column":null}},"type":"binary-expr","locations":[{"start":{"line":36,"column":50},"end":{"line":36,"column":null}},{"start":{"line":36,"column":50},"end":{"line":36,"column":null}}]},"4":{"loc":{"start":{"line":36,"column":20},"end":{"line":36,"column":34}},"type":"cond-expr","locations":[{"start":{"line":36,"column":23},"end":{"line":36,"column":29}},{"start":{"line":36,"column":29},"end":{"line":36,"column":34}}]},"5":{"loc":{"start":{"line":37,"column":22},"end":{"line":37,"column":65}},"type":"binary-expr","locations":[{"start":{"line":37,"column":22},"end":{"line":37,"column":37}},{"start":{"line":37,"column":41},"end":{"line":37,"column":65}}]},"6":{"loc":{"start":{"line":46,"column":46},"end":{"line":46,"column":74}},"type":"cond-expr","locations":[{"start":{"line":46,"column":49},"end":{"line":46,"column":72}},{"start":{"line":46,"column":72},"end":{"line":46,"column":74}}]},"7":{"loc":{"start":{"line":46,"column":80},"end":{"line":46,"column":107}},"type":"cond-expr","locations":[{"start":{"line":46,"column":83},"end":{"line":46,"column":100}},{"start":{"line":46,"column":100},"end":{"line":46,"column":107}}]},"8":{"loc":{"start":{"line":47,"column":16},"end":{"line":47,"column":109}},"type":"cond-expr","locations":[{"start":{"line":47,"column":39},"end":{"line":47,"column":52}},{"start":{"line":47,"column":52},"end":{"line":47,"column":109}}]},"9":{"loc":{"start":{"line":49,"column":13},"end":{"line":49,"column":78}},"type":"cond-expr","locations":[{"start":{"line":49,"column":42},"end":{"line":49,"column":45}},{"start":{"line":49,"column":45},"end":{"line":49,"column":78}}]}},"s":{"0":3,"1":3,"2":107,"3":3,"4":3,"5":7,"6":7,"7":7,"8":14,"9":7,"10":7,"11":6,"12":3,"13":3,"14":3,"15":7,"16":7,"17":7,"18":7,"19":7,"20":7,"21":7,"22":7,"23":7},"f":{"0":46,"1":3,"2":7,"3":7},"b":{"0":[7],"1":[35,7],"2":[6,1],"3":[7,7],"4":[7,0],"5":[7,7],"6":[5,2],"7":[5,2],"8":[0,7],"9":[5,2]}} +,"/Users/zane/playground/standard-error-set/src/unique-constraint-violation-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/unique-constraint-violation-error.mjs","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"2":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"3":{"start":{"line":5,"column":15},"end":{"line":5,"column":47}},"4":{"start":{"line":10,"column":36},"end":{"line":10,"column":null}},"5":{"start":{"line":29,"column":77},"end":{"line":29,"column":75}},"6":{"start":{"line":29,"column":75},"end":{"line":29,"column":20}},"7":{"start":{"line":29,"column":20},"end":{"line":29,"column":31}},"8":{"start":{"line":29,"column":29},"end":{"line":29,"column":45}},"9":{"start":{"line":29,"column":45},"end":{"line":29,"column":61}},"10":{"start":{"line":29,"column":68},"end":{"line":29,"column":73}},"11":{"start":{"line":29,"column":68},"end":{"line":30,"column":null}},"12":{"start":{"line":31,"column":3},"end":{"line":31,"column":null}},"13":{"start":{"line":34,"column":0},"end":{"line":34,"column":null}},"14":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":10,"column":36},"end":{"line":10,"column":53}},"loc":{"start":{"line":10,"column":36},"end":{"line":31,"column":null}}},"2":{"name":"UniqueConstraintViolationError","decl":{"start":{"line":29,"column":2},"end":{"line":29,"column":16}},"loc":{"start":{"line":29,"column":77},"end":{"line":31,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},"type":"binary-expr","locations":[{"start":{"line":3,"column":59},"end":{"line":3,"column":null}},{"start":{"line":3,"column":59},"end":{"line":3,"column":null}}]},"2":{"loc":{"start":{"line":29,"column":77},"end":{"line":29,"column":75}},"type":"cond-expr","locations":[{"start":{"line":29,"column":77},"end":{"line":29,"column":null}},{"start":{"line":29,"column":73},"end":{"line":29,"column":75}}]},"3":{"loc":{"start":{"line":29,"column":77},"end":{"line":29,"column":null}},"type":"binary-expr","locations":[{"start":{"line":29,"column":77},"end":{"line":29,"column":null}},{"start":{"line":29,"column":77},"end":{"line":29,"column":null}}]},"4":{"loc":{"start":{"line":29,"column":20},"end":{"line":29,"column":31}},"type":"cond-expr","locations":[{"start":{"line":29,"column":23},"end":{"line":29,"column":29}},{"start":{"line":29,"column":29},"end":{"line":29,"column":31}}]},"5":{"loc":{"start":{"line":29,"column":45},"end":{"line":29,"column":61}},"type":"cond-expr","locations":[{"start":{"line":29,"column":48},"end":{"line":29,"column":56}},{"start":{"line":29,"column":56},"end":{"line":29,"column":61}}]}},"s":{"0":3,"1":3,"2":115,"3":3,"4":3,"5":8,"6":8,"7":8,"8":8,"9":8,"10":16,"11":8,"12":6,"13":3,"14":3},"f":{"0":46,"1":3,"2":8},"b":{"0":[8],"1":[40,8],"2":[7,1],"3":[8,8],"4":[8,0],"5":[8,0]}} +,"/Users/zane/playground/standard-error-set/src/wrap-error.mjs": {"path":"/Users/zane/playground/standard-error-set/src/wrap-error.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":null}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":null}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":null}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":null}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":null}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":56}},"10":{"start":{"line":10,"column":56},"end":{"line":10,"column":null}},"11":{"start":{"line":47,"column":15},"end":{"line":88,"column":1}},"12":{"start":{"line":47,"column":33},"end":{"line":47,"column":38}},"13":{"start":{"line":48,"column":19},"end":{"line":48,"column":14}},"14":{"start":{"line":50,"column":33},"end":{"line":50,"column":112}},"15":{"start":{"line":51,"column":2},"end":{"line":53,"column":null}},"16":{"start":{"line":52,"column":4},"end":{"line":52,"column":null}},"17":{"start":{"line":55,"column":28},"end":{"line":55,"column":97}},"18":{"start":{"line":57,"column":2},"end":{"line":87,"column":null}},"19":{"start":{"line":59,"column":4},"end":{"line":59,"column":null}},"20":{"start":{"line":61,"column":7},"end":{"line":87,"column":null}},"21":{"start":{"line":62,"column":4},"end":{"line":62,"column":null}},"22":{"start":{"line":64,"column":7},"end":{"line":87,"column":null}},"23":{"start":{"line":65,"column":4},"end":{"line":65,"column":null}},"24":{"start":{"line":67,"column":7},"end":{"line":87,"column":null}},"25":{"start":{"line":68,"column":21},"end":{"line":68,"column":62}},"26":{"start":{"line":70,"column":4},"end":{"line":70,"column":null}},"27":{"start":{"line":72,"column":7},"end":{"line":87,"column":null}},"28":{"start":{"line":73,"column":21},"end":{"line":73,"column":65}},"29":{"start":{"line":75,"column":4},"end":{"line":75,"column":null}},"30":{"start":{"line":77,"column":7},"end":{"line":87,"column":null}},"31":{"start":{"line":78,"column":21},"end":{"line":78,"column":59}},"32":{"start":{"line":80,"column":4},"end":{"line":80,"column":null}},"33":{"start":{"line":82,"column":7},"end":{"line":87,"column":null}},"34":{"start":{"line":83,"column":4},"end":{"line":83,"column":null}},"35":{"start":{"line":86,"column":4},"end":{"line":86,"column":null}}},"fnMap":{"0":{"name":"ownKeys","decl":{"start":{"line":10,"column":56},"end":{"line":10,"column":null}},"loc":{"start":{"line":10,"column":56},"end":{"line":10,"column":null}}},"1":{"name":"wrapError","decl":{"start":{"line":47,"column":6},"end":{"line":47,"column":15}},"loc":{"start":{"line":47,"column":43},"end":{"line":88,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":10,"column":56},"end":{"line":10,"column":null}},"type":"if","locations":[{"start":{"line":10,"column":56},"end":{"line":10,"column":null}}]},"1":{"loc":{"start":{"line":10,"column":56},"end":{"line":10,"column":null}},"type":"binary-expr","locations":[{"start":{"line":10,"column":56},"end":{"line":10,"column":null}},{"start":{"line":10,"column":56},"end":{"line":10,"column":null}}]},"2":{"loc":{"start":{"line":47,"column":33},"end":{"line":47,"column":38}},"type":"cond-expr","locations":[{"start":{"line":47,"column":33},"end":{"line":47,"column":36}},{"start":{"line":47,"column":36},"end":{"line":47,"column":38}}]},"3":{"loc":{"start":{"line":47,"column":33},"end":{"line":47,"column":36}},"type":"binary-expr","locations":[{"start":{"line":47,"column":33},"end":{"line":47,"column":36}},{"start":{"line":47,"column":33},"end":{"line":47,"column":36}}]},"4":{"loc":{"start":{"line":50,"column":33},"end":{"line":50,"column":112}},"type":"binary-expr","locations":[{"start":{"line":50,"column":33},"end":{"line":50,"column":63}},{"start":{"line":50,"column":67},"end":{"line":50,"column":112}}]},"5":{"loc":{"start":{"line":51,"column":2},"end":{"line":53,"column":null}},"type":"if","locations":[{"start":{"line":51,"column":2},"end":{"line":53,"column":null}}]},"6":{"loc":{"start":{"line":51,"column":6},"end":{"line":51,"column":63}},"type":"binary-expr","locations":[{"start":{"line":51,"column":6},"end":{"line":51,"column":37}},{"start":{"line":51,"column":41},"end":{"line":51,"column":63}}]},"7":{"loc":{"start":{"line":55,"column":28},"end":{"line":55,"column":97}},"type":"binary-expr","locations":[{"start":{"line":55,"column":28},"end":{"line":55,"column":53}},{"start":{"line":55,"column":57},"end":{"line":55,"column":97}}]},"8":{"loc":{"start":{"line":57,"column":2},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":57,"column":2},"end":{"line":87,"column":null}},{"start":{"line":61,"column":7},"end":{"line":87,"column":null}}]},"9":{"loc":{"start":{"line":61,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":61,"column":7},"end":{"line":87,"column":null}},{"start":{"line":64,"column":7},"end":{"line":87,"column":null}}]},"10":{"loc":{"start":{"line":61,"column":11},"end":{"line":61,"column":49}},"type":"binary-expr","locations":[{"start":{"line":61,"column":11},"end":{"line":61,"column":29}},{"start":{"line":61,"column":33},"end":{"line":61,"column":49}}]},"11":{"loc":{"start":{"line":64,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":64,"column":7},"end":{"line":87,"column":null}},{"start":{"line":67,"column":7},"end":{"line":87,"column":null}}]},"12":{"loc":{"start":{"line":67,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":7},"end":{"line":87,"column":null}},{"start":{"line":72,"column":7},"end":{"line":87,"column":null}}]},"13":{"loc":{"start":{"line":68,"column":21},"end":{"line":68,"column":62}},"type":"binary-expr","locations":[{"start":{"line":68,"column":21},"end":{"line":68,"column":38}},{"start":{"line":68,"column":42},"end":{"line":68,"column":62}}]},"14":{"loc":{"start":{"line":72,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":72,"column":7},"end":{"line":87,"column":null}},{"start":{"line":77,"column":7},"end":{"line":87,"column":null}}]},"15":{"loc":{"start":{"line":73,"column":21},"end":{"line":73,"column":65}},"type":"binary-expr","locations":[{"start":{"line":73,"column":21},"end":{"line":73,"column":38}},{"start":{"line":73,"column":42},"end":{"line":73,"column":65}}]},"16":{"loc":{"start":{"line":77,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":77,"column":7},"end":{"line":87,"column":null}},{"start":{"line":82,"column":7},"end":{"line":87,"column":null}}]},"17":{"loc":{"start":{"line":78,"column":21},"end":{"line":78,"column":59}},"type":"binary-expr","locations":[{"start":{"line":78,"column":21},"end":{"line":78,"column":38}},{"start":{"line":78,"column":42},"end":{"line":78,"column":59}}]},"18":{"loc":{"start":{"line":82,"column":7},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":82,"column":7},"end":{"line":87,"column":null}},{"start":{"line":85,"column":7},"end":{"line":87,"column":null}}]},"19":{"loc":{"start":{"line":82,"column":11},"end":{"line":82,"column":74}},"type":"binary-expr","locations":[{"start":{"line":82,"column":11},"end":{"line":82,"column":42}},{"start":{"line":82,"column":46},"end":{"line":82,"column":74}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":3,"6":3,"7":3,"8":3,"9":3,"10":210,"11":3,"12":27,"13":27,"14":27,"15":27,"16":6,"17":21,"18":21,"19":9,"20":12,"21":2,"22":10,"23":1,"24":9,"25":1,"26":1,"27":8,"28":1,"29":1,"30":7,"31":1,"32":1,"33":6,"34":4,"35":2},"f":{"0":42,"1":27},"b":{"0":[21],"1":[63,21],"2":[3,24],"3":[27,3],"4":[27,24],"5":[6],"6":[27,6],"7":[21,21],"8":[9,12],"9":[2,10],"10":[12,11],"11":[1,9],"12":[1,8],"13":[1,1],"14":[1,7],"15":[1,1],"16":[1,6],"17":[1,1],"18":[4,2],"19":[6,4]}} +,"/Users/zane/playground/standard-error-set/src/lib/connection-codes.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/connection-codes.mjs","statementMap":{"0":{"start":{"line":1,"column":21},"end":{"line":11,"column":1}}},"fnMap":{},"branchMap":{},"s":{"0":3},"f":{},"b":{}} +,"/Users/zane/playground/standard-error-set/src/lib/describe-directory.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/describe-directory.mjs","statementMap":{"0":{"start":{"line":1,"column":23},"end":{"line":1,"column":101}},"1":{"start":{"line":1,"column":36},"end":{"line":1,"column":35}},"2":{"start":{"line":1,"column":36},"end":{"line":1,"column":101}}},"fnMap":{"0":{"name":"describeDirectory","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":23}},"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":101}}}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":55},"end":{"line":1,"column":99}},"type":"cond-expr","locations":[{"start":{"line":1,"column":79},"end":{"line":1,"column":81}},{"start":{"line":1,"column":81},"end":{"line":1,"column":99}}]}},"s":{"0":3,"1":6,"2":6},"f":{"0":6},"b":{"0":[3,3]}} +,"/Users/zane/playground/standard-error-set/src/lib/describe-file.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/describe-file.mjs","statementMap":{"0":{"start":{"line":1,"column":18},"end":{"line":17,"column":1}},"1":{"start":{"line":1,"column":31},"end":{"line":1,"column":30}},"2":{"start":{"line":1,"column":41},"end":{"line":1,"column":40}},"3":{"start":{"line":2,"column":13},"end":{"line":2,"column":19}},"4":{"start":{"line":3,"column":2},"end":{"line":14,"column":3}},"5":{"start":{"line":6,"column":16},"end":{"line":6,"column":51}},"6":{"start":{"line":7,"column":4},"end":{"line":7,"column":null}},"7":{"start":{"line":9,"column":7},"end":{"line":14,"column":3}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":null}},"9":{"start":{"line":12,"column":7},"end":{"line":14,"column":3}},"10":{"start":{"line":13,"column":4},"end":{"line":13,"column":null}},"11":{"start":{"line":16,"column":2},"end":{"line":16,"column":null}}},"fnMap":{"0":{"name":"describeFile","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":18}},"loc":{"start":{"line":1,"column":48},"end":{"line":17,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":2},"end":{"line":14,"column":3}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":14,"column":3}},{"start":{"line":9,"column":7},"end":{"line":14,"column":3}}]},"1":{"loc":{"start":{"line":3,"column":6},"end":{"line":3,"column":53}},"type":"binary-expr","locations":[{"start":{"line":3,"column":6},"end":{"line":3,"column":28}},{"start":{"line":3,"column":32},"end":{"line":3,"column":53}}]},"2":{"loc":{"start":{"line":6,"column":16},"end":{"line":6,"column":51}},"type":"cond-expr","locations":[{"start":{"line":6,"column":41},"end":{"line":6,"column":45}},{"start":{"line":6,"column":48},"end":{"line":6,"column":51}}]},"3":{"loc":{"start":{"line":7,"column":12},"end":{"line":7,"column":97}},"type":"cond-expr","locations":[{"start":{"line":7,"column":33},"end":{"line":7,"column":70}},{"start":{"line":7,"column":59},"end":{"line":7,"column":97}}]},"4":{"loc":{"start":{"line":9,"column":7},"end":{"line":14,"column":3}},"type":"if","locations":[{"start":{"line":9,"column":7},"end":{"line":14,"column":3}},{"start":{"line":12,"column":7},"end":{"line":14,"column":3}}]},"5":{"loc":{"start":{"line":12,"column":7},"end":{"line":14,"column":3}},"type":"if","locations":[{"start":{"line":12,"column":7},"end":{"line":14,"column":3}}]}},"s":{"0":5,"1":18,"2":18,"3":18,"4":18,"5":5,"6":5,"7":13,"8":5,"9":8,"10":1,"11":18},"f":{"0":18},"b":{"0":[5,13],"1":[18,10],"2":[0,5],"3":[0,5],"4":[5,8],"5":[1]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-auth-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-auth-message.mjs","statementMap":{"0":{"start":{"line":1,"column":25},"end":{"line":9,"column":1}},"1":{"start":{"line":1,"column":37},"end":{"line":1,"column":36}},"2":{"start":{"line":1,"column":44},"end":{"line":1,"column":43}},"3":{"start":{"line":1,"column":52},"end":{"line":1,"column":51}},"4":{"start":{"line":2,"column":16},"end":{"line":2,"column":64}},"5":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"6":{"start":{"line":4,"column":4},"end":{"line":4,"column":null}},"7":{"start":{"line":6,"column":2},"end":{"line":6,"column":null}},"8":{"start":{"line":8,"column":2},"end":{"line":8,"column":null}}},"fnMap":{"0":{"name":"generateAuthMessage","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":25}},"loc":{"start":{"line":1,"column":59},"end":{"line":9,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":5,"column":null}}]}},"s":{"0":8,"1":9,"2":9,"3":9,"4":9,"5":9,"6":3,"7":9,"8":9},"f":{"0":9},"b":{"0":[3]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-constraint-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-constraint-message.mjs","statementMap":{"0":{"start":{"line":1,"column":31},"end":{"line":26,"column":1}},"1":{"start":{"line":1,"column":51},"end":{"line":1,"column":50}},"2":{"start":{"line":1,"column":63},"end":{"line":1,"column":62}},"3":{"start":{"line":1,"column":79},"end":{"line":1,"column":78}},"4":{"start":{"line":2,"column":16},"end":{"line":2,"column":80}},"5":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"6":{"start":{"line":4,"column":4},"end":{"line":4,"column":null}},"7":{"start":{"line":6,"column":2},"end":{"line":19,"column":null}},"8":{"start":{"line":7,"column":4},"end":{"line":7,"column":null}},"9":{"start":{"line":7,"column":29},"end":{"line":8,"column":48}},"10":{"start":{"line":8,"column":46},"end":{"line":16,"column":null}},"11":{"start":{"line":8,"column":4},"end":{"line":16,"column":5}},"12":{"start":{"line":8,"column":28},"end":{"line":8,"column":32}},"13":{"start":{"line":9,"column":6},"end":{"line":15,"column":null}},"14":{"start":{"line":10,"column":8},"end":{"line":10,"column":null}},"15":{"start":{"line":10,"column":20},"end":{"line":10,"column":22}},"16":{"start":{"line":10,"column":27},"end":{"line":10,"column":31}},"17":{"start":{"line":11,"column":8},"end":{"line":11,"column":null}},"18":{"start":{"line":14,"column":8},"end":{"line":14,"column":null}},"19":{"start":{"line":16,"column":5},"end":{"line":16,"column":null}},"20":{"start":{"line":17,"column":4},"end":{"line":17,"column":null}},"21":{"start":{"line":18,"column":4},"end":{"line":18,"column":null}},"22":{"start":{"line":20,"column":2},"end":{"line":22,"column":null}},"23":{"start":{"line":21,"column":4},"end":{"line":21,"column":null}},"24":{"start":{"line":23,"column":2},"end":{"line":23,"column":null}},"25":{"start":{"line":25,"column":2},"end":{"line":25,"column":null}}},"fnMap":{"0":{"name":"generateConstraintMessage","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":31}},"loc":{"start":{"line":1,"column":86},"end":{"line":26,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":6,"column":2},"end":{"line":19,"column":null}},"type":"if","locations":[{"start":{"line":6,"column":2},"end":{"line":19,"column":null}}]},"2":{"loc":{"start":{"line":9,"column":6},"end":{"line":15,"column":null}},"type":"if","locations":[{"start":{"line":9,"column":6},"end":{"line":15,"column":null}},{"start":{"line":13,"column":11},"end":{"line":15,"column":null}}]},"3":{"loc":{"start":{"line":9,"column":10},"end":{"line":9,"column":68}},"type":"binary-expr","locations":[{"start":{"line":9,"column":10},"end":{"line":9,"column":38}},{"start":{"line":9,"column":42},"end":{"line":9,"column":68}}]},"4":{"loc":{"start":{"line":20,"column":2},"end":{"line":22,"column":null}},"type":"if","locations":[{"start":{"line":20,"column":2},"end":{"line":22,"column":null}}]}},"s":{"0":3,"1":8,"2":8,"3":8,"4":8,"5":8,"6":8,"7":8,"8":6,"9":6,"10":6,"11":6,"12":8,"13":8,"14":2,"15":2,"16":2,"17":2,"18":6,"19":6,"20":6,"21":6,"22":8,"23":3,"24":8,"25":8},"f":{"0":8},"b":{"0":[8],"1":[6],"2":[2,6],"3":[8,2],"4":[3]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-external-service-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-external-service-message.mjs","statementMap":{"0":{"start":{"line":1,"column":36},"end":{"line":9,"column":1}},"1":{"start":{"line":1,"column":58},"end":{"line":1,"column":57}},"2":{"start":{"line":1,"column":67},"end":{"line":1,"column":66}},"3":{"start":{"line":2,"column":13},"end":{"line":2,"column":89}},"4":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"5":{"start":{"line":4,"column":4},"end":{"line":4,"column":null}},"6":{"start":{"line":6,"column":2},"end":{"line":6,"column":null}},"7":{"start":{"line":8,"column":2},"end":{"line":8,"column":null}}},"fnMap":{"0":{"name":"generateExternalServiceMessage","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":36}},"loc":{"start":{"line":1,"column":74},"end":{"line":9,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":29},"end":{"line":2,"column":46}},"type":"binary-expr","locations":[{"start":{"line":2,"column":29},"end":{"line":2,"column":38}},{"start":{"line":2,"column":42},"end":{"line":2,"column":46}}]},"1":{"loc":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":5,"column":null}}]}},"s":{"0":6,"1":12,"2":12,"3":12,"4":12,"5":6,"6":12,"7":12},"f":{"0":12},"b":{"0":[12,4],"1":[6]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-io-error-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-io-error-message.mjs","statementMap":{"0":{"start":{"line":1,"column":28},"end":{"line":12,"column":1}},"1":{"start":{"line":1,"column":41},"end":{"line":1,"column":51}},"2":{"start":{"line":1,"column":51},"end":{"line":1,"column":55}},"3":{"start":{"line":1,"column":61},"end":{"line":1,"column":60}},"4":{"start":{"line":1,"column":68},"end":{"line":1,"column":67}},"5":{"start":{"line":1,"column":76},"end":{"line":1,"column":75}},"6":{"start":{"line":2,"column":13},"end":{"line":2,"column":56}},"7":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"8":{"start":{"line":4,"column":4},"end":{"line":4,"column":null}},"9":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"10":{"start":{"line":7,"column":4},"end":{"line":7,"column":null}},"11":{"start":{"line":9,"column":2},"end":{"line":9,"column":null}},"12":{"start":{"line":11,"column":2},"end":{"line":11,"column":null}}},"fnMap":{"0":{"name":"generateIoErrorMessage","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":28}},"loc":{"start":{"line":1,"column":83},"end":{"line":12,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":41},"end":{"line":1,"column":51}},"type":"cond-expr","locations":[{"start":{"line":1,"column":41},"end":{"line":1,"column":44}},{"start":{"line":1,"column":44},"end":{"line":1,"column":51}}]},"1":{"loc":{"start":{"line":1,"column":41},"end":{"line":1,"column":44}},"type":"binary-expr","locations":[{"start":{"line":1,"column":41},"end":{"line":1,"column":44}},{"start":{"line":1,"column":41},"end":{"line":1,"column":44}}]},"2":{"loc":{"start":{"line":1,"column":51},"end":{"line":1,"column":55}},"type":"cond-expr","locations":[{"start":{"line":1,"column":51},"end":{"line":1,"column":55}},{"start":{"line":1,"column":51},"end":{"line":1,"column":55}}]},"3":{"loc":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":5,"column":null}}]},"4":{"loc":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"type":"if","locations":[{"start":{"line":6,"column":2},"end":{"line":8,"column":null}}]}},"s":{"0":4,"1":10,"2":10,"3":10,"4":10,"5":10,"6":10,"7":10,"8":8,"9":10,"10":2,"11":10,"12":10},"f":{"0":10},"b":{"0":[10,0],"1":[10,10],"2":[10,0],"3":[8],"4":[2]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-no-access-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-no-access-message.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":3,"column":29},"end":{"line":10,"column":1}},"2":{"start":{"line":3,"column":43},"end":{"line":3,"column":42}},"3":{"start":{"line":3,"column":51},"end":{"line":3,"column":50}},"4":{"start":{"line":4,"column":2},"end":{"line":9,"column":null}},"5":{"start":{"line":5,"column":4},"end":{"line":5,"column":null}},"6":{"start":{"line":8,"column":4},"end":{"line":8,"column":null}}},"fnMap":{"0":{"name":"generateNoAccessMessage","decl":{"start":{"line":3,"column":6},"end":{"line":3,"column":29}},"loc":{"start":{"line":3,"column":58},"end":{"line":10,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":2},"end":{"line":9,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":9,"column":null}},{"start":{"line":7,"column":7},"end":{"line":9,"column":null}}]},"1":{"loc":{"start":{"line":8,"column":21},"end":{"line":8,"column":68}},"type":"cond-expr","locations":[{"start":{"line":8,"column":46},"end":{"line":8,"column":48}},{"start":{"line":8,"column":48},"end":{"line":8,"column":68}}]}},"s":{"0":5,"1":5,"2":18,"3":18,"4":18,"5":14,"6":4},"f":{"0":18},"b":{"0":[14,4],"1":[3,1]}} +,"/Users/zane/playground/standard-error-set/src/lib/generate-not-found-message.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/generate-not-found-message.mjs","statementMap":{"0":{"start":{"line":11,"column":29},"end":{"line":15,"column":1}},"1":{"start":{"line":11,"column":63},"end":{"line":11,"column":43}},"2":{"start":{"line":11,"column":43},"end":{"line":11,"column":63}},"3":{"start":{"line":12,"column":2},"end":{"line":12,"column":null}},"4":{"start":{"line":14,"column":2},"end":{"line":14,"column":null}}},"fnMap":{"0":{"name":"generateNotFoundMessage","decl":{"start":{"line":11,"column":6},"end":{"line":11,"column":29}},"loc":{"start":{"line":11,"column":63},"end":{"line":15,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":11,"column":43},"end":{"line":11,"column":63}},"type":"cond-expr","locations":[{"start":{"line":11,"column":46},"end":{"line":11,"column":56}},{"start":{"line":11,"column":56},"end":{"line":11,"column":63}}]}},"s":{"0":6,"1":25,"2":25,"3":25,"4":25},"f":{"0":25},"b":{"0":[4,21]}} +,"/Users/zane/playground/standard-error-set/src/lib/hoist-error-code.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/hoist-error-code.mjs","statementMap":{"0":{"start":{"line":1,"column":20},"end":{"line":6,"column":1}},"1":{"start":{"line":2,"column":39},"end":{"line":2,"column":15}},"2":{"start":{"line":2,"column":39},"end":{"line":2,"column":21}},"3":{"start":{"line":2,"column":39},"end":{"line":2,"column":34}},"4":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"5":{"start":{"line":4,"column":4},"end":{"line":4,"column":null}}},"fnMap":{"0":{"name":"hoistErrorCode","decl":{"start":{"line":1,"column":6},"end":{"line":1,"column":20}},"loc":{"start":{"line":1,"column":36},"end":{"line":6,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":2},"end":{"line":5,"column":null}},"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":5,"column":null}}]},"1":{"loc":{"start":{"line":3,"column":6},"end":{"line":3,"column":48}},"type":"binary-expr","locations":[{"start":{"line":3,"column":6},"end":{"line":3,"column":24}},{"start":{"line":3,"column":28},"end":{"line":3,"column":48}}]},"2":{"loc":{"start":{"line":4,"column":19},"end":{"line":4,"column":30}},"type":"cond-expr","locations":[{"start":{"line":4,"column":24},"end":{"line":4,"column":26}},{"start":{"line":4,"column":19},"end":{"line":4,"column":30}}]},"3":{"loc":{"start":{"line":4,"column":19},"end":{"line":4,"column":26}},"type":"binary-expr","locations":[{"start":{"line":4,"column":19},"end":{"line":4,"column":26}},{"start":{"line":4,"column":19},"end":{"line":4,"column":26}}]}},"s":{"0":27,"1":191,"2":191,"3":191,"4":191,"5":145},"f":{"0":191},"b":{"0":[145],"1":[191,145],"2":[112,33],"3":[145,145]}} +,"/Users/zane/playground/standard-error-set/src/lib/valid-error-names.mjs": {"path":"/Users/zane/playground/standard-error-set/src/lib/valid-error-names.mjs","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}},"1":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},"2":{"start":{"line":3,"column":24},"end":{"line":9,"column":null}},"3":{"start":{"line":12,"column":23},"end":{"line":12,"column":93}},"4":{"start":{"line":12,"column":56},"end":{"line":12,"column":93}},"5":{"start":{"line":14,"column":21},"end":{"line":18,"column":6}},"6":{"start":{"line":15,"column":2},"end":{"line":15,"column":null}},"7":{"start":{"line":17,"column":2},"end":{"line":17,"column":null}}},"fnMap":{"0":{"name":"_getRequireWildcardCache","decl":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":12,"column":51},"end":{"line":12,"column":52}},"loc":{"start":{"line":12,"column":56},"end":{"line":12,"column":93}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":14,"column":46},"end":{"line":14,"column":47}},"loc":{"start":{"line":14,"column":66},"end":{"line":18,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},"type":"if","locations":[{"start":{"line":1,"column":35},"end":{"line":1,"column":null}}]},"1":{"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},"type":"cond-expr","locations":[{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},{"start":{"line":1,"column":35},"end":{"line":1,"column":null}}]},"2":{"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},"type":"binary-expr","locations":[{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},{"start":{"line":1,"column":35},"end":{"line":1,"column":null}},{"start":{"line":1,"column":35},"end":{"line":1,"column":null}}]}},"s":{"0":1,"1":2,"2":1,"3":1,"4":39,"5":1,"6":33,"7":33},"f":{"0":1,"1":39,"2":33},"b":{"0":[1],"1":[0,0],"2":[1,1,1]}} +} diff --git a/qa/coverage/favicon.png b/qa/coverage/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..c1525b811a167671e9de1fa78aab9f5c0b61cef7 GIT binary patch literal 445 zcmV;u0Yd(XP))rP{nL}Ln%S7`m{0DjX9TLF* zFCb$4Oi7vyLOydb!7n&^ItCzb-%BoB`=x@N2jll2Nj`kauio%aw_@fe&*}LqlFT43 z8doAAe))z_%=P%v^@JHp3Hjhj^6*Kr_h|g_Gr?ZAa&y>wxHE99Gk>A)2MplWz2xdG zy8VD2J|Uf#EAw*bo5O*PO_}X2Tob{%bUoO2G~T`@%S6qPyc}VkhV}UifBuRk>%5v( z)x7B{I~z*k<7dv#5tC+m{km(D087J4O%+<<;K|qwefb6@GSX45wCK}Sn*> + + + + Code coverage report for All files + + + + + + + + + +
+
+

All files

+
+ +
+ 100% + Statements + 882/882 +
+ + +
+ 90.36% + Branches + 544/602 +
+ + +
+ 100% + Functions + 130/130 +
+ + +
+ 100% + Lines + 588/588 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
src +
+
100%784/78490.56%499/551100%118/118100%520/520
src/lib +
+
100%98/9888.23%45/51100%12/12100%68/68
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/prettify.css b/qa/coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/qa/coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/qa/coverage/prettify.js b/qa/coverage/prettify.js new file mode 100644 index 0000000..b322523 --- /dev/null +++ b/qa/coverage/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/qa/coverage/sort-arrow-sprite.png b/qa/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed68316eb3f65dec9063332d2f69bf3093bbfab GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qh}Z>jv*C{$p!i!8j}?a+@3A= zIAGwzjijN=FBi!|L1t?LM;Q;gkwn>2cAy-KV{dn nf0J1DIvEHQu*n~6U}x}qyky7vi4|9XhBJ7&`njxgN@xNA8m%nc literal 0 HcmV?d00001 diff --git a/qa/coverage/sorter.js b/qa/coverage/sorter.js new file mode 100644 index 0000000..2bb296a --- /dev/null +++ b/qa/coverage/sorter.js @@ -0,0 +1,196 @@ +/* eslint-disable */ +var addSorting = (function() { + 'use strict'; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { + return document.querySelector('.coverage-summary'); + } + // returns the thead element of the summary table + function getTableHeader() { + return getTable().querySelector('thead tr'); + } + // returns the tbody element of the summary table + function getTableBody() { + return getTable().querySelector('tbody'); + } + // returns the th element for nth column + function getNthColumn(n) { + return getTableHeader().querySelectorAll('th')[n]; + } + + function onFilterInput() { + const searchValue = document.getElementById('fileSearch').value; + const rows = document.getElementsByTagName('tbody')[0].children; + for (let i = 0; i < rows.length; i++) { + const row = rows[i]; + if ( + row.textContent + .toLowerCase() + .includes(searchValue.toLowerCase()) + ) { + row.style.display = ''; + } else { + row.style.display = 'none'; + } + } + } + + // loads the search box + function addSearchBox() { + var template = document.getElementById('filterTemplate'); + var templateClone = template.content.cloneNode(true); + templateClone.getElementById('fileSearch').oninput = onFilterInput; + template.parentElement.appendChild(templateClone); + } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = + colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSearchBox(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/qa/coverage/src/argument-invalid-error.mjs.html b/qa/coverage/src/argument-invalid-error.mjs.html new file mode 100644 index 0000000..72f60ac --- /dev/null +++ b/qa/coverage/src/argument-invalid-error.mjs.html @@ -0,0 +1,334 @@ + + + + + + Code coverage report for src/argument-invalid-error.mjs + + + + + + + + + +
+
+

All files / src argument-invalid-error.mjs

+
+ +
+ 100% + Statements + 41/41 +
+ + +
+ 96.29% + Branches + 26/27 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 26/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84  +9x +1455x +  +9x +  +  +  +  +  +  +  +  +  +  +  +9x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +112x +56x +  +18x +  +  +9x +  +9x +  +51x +51x +51x +9x +  +51x +18x +  +51x +51x +21x +  +51x +13x +1x +  +  +12x +12x +12x +  +  +  +  +51x +  +51x +  +  +  + 
/* globals ArgumentMissingError ArgumentOutOfRangeError ArgumentTypeError mapErrorToHttpStatus */
+import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ArgumentInvalidError'
+ 
+/**
+ * Indicates an invalid, typically user supplied argument. By default, this error and any sub-types map to an HTTP
+ * status of 400 ("Bad Request"). If the status codes are relevant, remember to {@linkplain mapErrorToHttpStatus |
+ * change the error to HTTP status mapping} or pass in the `status` option when creating the error.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ArgumentMissingError} - For when the argument is required, but missing or empty.
+ * - {@link ArgumentOutOfRangeError} - For when the argument is of the proper type, but outside the acceptable range.
+ * - {@link ArgumentTypeError} - Indicates an argument is an incorrect type.
+ */
+const ArgumentInvalidError = class extends CommonError {
+  /**
+   * The {@link ArgumentInvalidError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.endpointType = 'command'] - The type of "endpoint" consuming the argument.
+   * @param {string|undefined} [options.packageName = undefined] - The package name.
+   * @param {string|undefined} [options.endpointName = undefined] - The endpoint name.
+   * @param {string|undefined} [options.argumentName = undefined] - The argument name.
+   * @param {*} [options.argumentValue] - The argument value. Because this is value is ignored when `undefined`,
+   *   consider using the string 'undefined' if it's important to display the value.
+   * @param {string} [options.issue = 'is invalid'] - The issue with the argument.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ArgumentInvalidError() // "Function argument is invalid."
+   * "Function 'my-package#foo()' argument  is invalid."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo'})
+   * "Function argument 'bar' cannot be parsed."
+   * new ArgumentInvalidError({ argumentName: 'bar', issue: 'cannot be parsed'})
+   * "Function 'my-package#foo()' argument 'bar' with value '100' is invalid."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo', argumentName: 'bar', argumentValue: 100 })
+   * // v "Function argument 'bar' is invalid."
+   * new ArgumentInvalidError({ endpointType: 'function', argumentName: 'bar' })
+   */
+  constructor({ name = myName, endpointType = 'command', issue = 'is invalid', ...options } = {}) {
+    options.message = options.message || generateMessage({ endpointType, issue, ...options })
+    super({ name, endpointType, issue, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ArgumentInvalidError).name)
+ 
+ArgumentInvalidError.typeName = myName
+ 
+const generateMessage = ({ endpointType, packageName, endpointName, argumentName, argumentValue, issue }) => {
+  let message = endpointType.charAt(0).toUpperCase() + endpointType.slice(1) + ' '
+  if (packageName !== undefined) {
+    message += endpointName === undefined ? `in package '${packageName}' ` : `'${packageName}#`
+  }
+  if (endpointName !== undefined) {
+    message += `${packageName === undefined ? "'" : ''}${endpointName}()' `
+  }
+  message += 'argument '
+  if (argumentName !== undefined) {
+    message += `'${argumentName}' `
+  }
+  if (argumentValue !== undefined) {
+    if (typeof argumentValue === 'function') {
+      message += 'of type function or class '
+    }
+    else {
+      try {
+        const valueString = argumentValue = typeof argumentValue === 'object' ? JSON.stringify(argumentValue) : argumentValue
+        message += `with value '${valueString}' `
+      }
+      catch (e) {}
+    }
+  }
+  message += `${issue}.`
+ 
+  return message
+}
+ 
+export { ArgumentInvalidError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/argument-missing-error.mjs.html b/qa/coverage/src/argument-missing-error.mjs.html new file mode 100644 index 0000000..2be0377 --- /dev/null +++ b/qa/coverage/src/argument-missing-error.mjs.html @@ -0,0 +1,241 @@ + + + + + + Code coverage report for src/argument-missing-error.mjs + + + + + + + + + +
+
+

All files / src argument-missing-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 90.9% + Branches + 10/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53  +3x +100x +  +3x +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +14x +  +6x +  +  +3x +  +3x +  +  + 
/* globals ArgumentOutOfRangeError ArgumentTypeError CommonError */ // in the docs
+import { ArgumentInvalidError } from './argument-invalid-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ArgumentMissingError'
+ 
+/**
+ * An {@link ArgumentInvalidError} sub-type indicating a (typically user supplied) argument is missing or empty (
+ * typically `null`, `undefined`, or ''). Refer to {@link ArgumentInvalidError} for handling of internal argument
+ * errors.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ArgumentInvalidError} - General argument error when no more specific error fits.
+ * - {@link ArgumentOutOfRangeError} - Indicates an argument is of the correct type, but outside the acceptable range.
+ * - {@link ArgumentTypeError} - Indicates an argument is an incorrect type.
+ */
+const ArgumentMissingError = class extends ArgumentInvalidError {
+  /**
+   * The {@link ArgumentMissingError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.endpointType = 'command'] - The type of "endpoint" consuming the argument.
+   * @param {string|undefined} [options.packageName = undefined] - The package name.
+   * @param {string|undefined} [options.endpointName = undefined] - The endpoint name.
+   * @param {string|undefined} [options.argumentName = undefined] - The argument name.
+   * @param {*} [options.argumentValue] - The argument value. Because this is value is ignored when `undefined`,
+   *   consider using the string 'undefined' if it's important to display the value.
+   * @param {string} [options.issue = 'is missing or empty'] - The issue with the argument. You can pass in a more
+   *   specific explanation if you like.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ArgumentInvalidError() // "Function argument is missing or empty."
+   * //  "Function 'my-package#foo()' argument is missing or empty."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo'})
+   * //  "Function 'my-package#foo()' argument with value 'undefined' is missing or empty."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo', argumentName: 'bar', argumentValue: 'undefined' })
+   * // v "Function argument 'bar' is missing or empty."
+   * new ArgumentInvalidError({ endpointType: 'function', argumentName: 'bar' })
+   */
+  constructor({ name = myName, issue = 'is missing or empty', ...options } = {}) {
+    super({ name, issue, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ArgumentMissingError).name)
+ 
+ArgumentMissingError.typeName = myName
+ 
+export { ArgumentMissingError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/argument-out-of-range-error.mjs.html b/qa/coverage/src/argument-out-of-range-error.mjs.html new file mode 100644 index 0000000..553e758 --- /dev/null +++ b/qa/coverage/src/argument-out-of-range-error.mjs.html @@ -0,0 +1,349 @@ + + + + + + Code coverage report for src/argument-out-of-range-error.mjs + + + + + + + + + +
+
+

All files / src argument-out-of-range-error.mjs

+
+ +
+ 100% + Statements + 37/37 +
+ + +
+ 88.88% + Branches + 24/27 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 26/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89  +4x +192x +  +4x +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +26x +13x +13x +8x +  +  +4x +  +4x +  +13x +13x +13x +13x +  +13x +1x +  +12x +1x +  +  +13x +1x +  +  +13x +2x +  +11x +1x +  +  +13x +  +  +13x +  +  +  + 
/* globals ArgumentMissingError ArgumentTypeError CommonError */ // used in docs
+import { ArgumentInvalidError } from './argument-invalid-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ArgumentOutOfRangeError'
+ 
+/**
+ * An {@link ArgumentInvalidError} sub-type indicating a (typically user supplied) argument is of the correct time, but
+ * outside the  acceptable range. Refer to {@link ArgumentInvalidError} for handling of internal argument errors.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ArgumentInvalidError} - General argument error when no more specific error fits.
+ * - {@link ArgumentMissingError} - For when the argument is required, but missing or empty.
+ * - {@link ArgumentTypeError} - Indicates an argument is an incorrect type.
+ */
+const ArgumentOutOfRangeError = class extends ArgumentInvalidError {
+  /**
+   * The {@link ArgumentOutOfRangeError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.endpointType = 'command'] - The type of "endpoint" consuming the argument.
+   * @param {string|undefined} [options.packageName = undefined] - The package name.
+   * @param {string|undefined} [options.endpointName = undefined] - The endpoint name.
+   * @param {string|undefined} [options.argumentName = undefined] - The argument name.
+   * @param {*} [options.argumentValue] - The argument value. Because this is value is ignored when `undefined`,
+   *   consider using the string 'undefined' if it's important to display the value.
+   * @param {string|number|undefined} [options.max = undefined] - The maximum value; the value must be less than or
+   *   equal to this.
+   * @param {string|number|undefined} [options.maxBoundary = undefined] - The upper value boundary; the value must be
+   *   less than this. This value will be ignored if `max` is set.
+   * @param {string|number|undefined} [options.min = undefined] - The minimum; the value must be greater than or equal
+   *   to this.
+   * @param {string|number|undefined} [options.minBoundary = undefined] - The lower value boundary; the value must be
+   *   greater than this. This value will be ignored if `min` is set.
+   * @param {string} [options.issue = 'is out of range'] - The issue with the argument.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ArgumentOutOfRangeError() // "Function argument is out of range."
+   * //  "Function 'foo()' argument is out of range. Value must be greater than or equal to 24."
+   * new ArgumentOutOfRangeError({ endpointName: 'foo', argumentValue: 12, min: 24 })
+   * //  "Function argument 'bar' with value '100' is out of range. Value must be greater than or equal to 'C' and less than 'D'."
+   * new ArgumentInvalidError({ argumentName: 'bar', argumentValue: 'Bob', min: 'C', maxBoundary: 'D' })
+   * // v "Function argument 'bar' is out of range."
+   * new ArgumentInvalidError({ endpointType: 'function', argumentName: 'bar' })
+   */
+  constructor({ name = myName, issue = 'is out of range', ...options } = {}) {
+    super({ name, issue, ...options })
+    this.message += agumentMessage(options)
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ArgumentOutOfRangeError).name)
+ 
+ArgumentOutOfRangeError.typeName = myName
+ 
+const agumentMessage = ({ max, maxBoundary, min, minBoundary }) => {
+  let message = ''
+  if (max === undefined || maxBoundary !== undefined || min === undefined || minBoundary !== undefined) {
+    message += ' Value must be'
+ 
+    if (min !== undefined) {
+      message += ` greater than or equal to '${min}'`
+    }
+    else if (minBoundary !== undefined) {
+      message += ` greater than '${minBoundary}'`
+    }
+ 
+    if ((max !== undefined || maxBoundary !== undefined) && (min !== undefined || minBoundary !== undefined)) {
+      message += ' and'
+    }
+ 
+    if (max !== undefined) {
+      message += ` less than or equal to '${max}'`
+    }
+    else if (maxBoundary !== undefined) {
+      message += ` less than '${maxBoundary}'`
+    }
+ 
+    message += '.'
+  }
+ 
+  return message
+}
+ 
+export { ArgumentOutOfRangeError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/argument-type-error.mjs.html b/qa/coverage/src/argument-type-error.mjs.html new file mode 100644 index 0000000..8ff7b1f --- /dev/null +++ b/qa/coverage/src/argument-type-error.mjs.html @@ -0,0 +1,301 @@ + + + + + + Code coverage report for src/argument-type-error.mjs + + + + + + + + + +
+
+

All files / src argument-type-error.mjs

+
+ +
+ 100% + Statements + 30/30 +
+ + +
+ 93.33% + Branches + 14/15 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 21/21 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73  +4x +159x +  +4x +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +22x +11x +11x +8x +  +  +4x +  +4x +  +11x +11x +11x +2x +  +11x +2x +1x +  +2x +  +  +11x +3x +  +  +11x +  +  +  + 
/* globals ArgumentMissingError ArgumentOutOfRangeError CommonError */ // in the docs
+import { ArgumentInvalidError } from './argument-invalid-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ArgumentTypeError'
+ 
+/**
+ * An {@link ArgumentInvalidError} sub-type indicating a (typically user supplied) argument is not the correct type.
+ * Refer to {@link ArgumentInvalidError} for handling of internal argument errors.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ArgumentInvalidError} - General argument error when no more specific error fits.
+ * - {@link ArgumentMissingError} - Indicates the argument is missing or empty.
+ * - {@link ArgumentOutOfRangeError} - Indicates an argument is of the correct type, but outside the acceptable range.
+ */
+const ArgumentTypeError = class extends ArgumentInvalidError {
+  /**
+   * The {@link ArgumentTypeError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.endpointType = 'command'] - The type of "endpoint" consuming the argument.
+   * @param {string|undefined} [options.packageName = undefined] - The package name.
+   * @param {string|undefined} [options.endpointName = undefined] - The endpoint name.
+   * @param {string|undefined} [options.argumentName = undefined] - The argument name.
+   * @param {*} [options.argumentValue = undefined] - The value of the argument; though we recommend to leave this
+   *   undefined. The value is generally not important since the type is incorrect.
+   * @param {string|undefined} [options.expectedType = undefined] - The expected type of the argument.
+   * @param {string|undefined} [options.receivedType = undefined] - The actual type of the argument.
+   * @param {string} [options.issue = 'is wrong type'] - The issue with the argument.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ArgumentInvalidError() // "Function argument is wrong type."
+   * //  "Function 'my-package#foo()' argument is wrong type."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo'})
+   * //  "Function 'my-package#foo()' argument with value 'undefined' is wrong type."
+   * new ArgumentInvalidError({ packageName: 'my-package', endpointName: 'foo', argumentName: 'bar', argumentValue: 'undefined' })
+   * // v "Function argument 'bar' is wrong type."
+   * new ArgumentInvalidError({ endpointType: 'function', argumentName: 'bar' })
+   */
+  constructor({ name = myName, issue = 'is wrong type', ...options } = {}) {
+    super({ name, issue, ...options })
+    this.message += augmentMessage(options)
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ArgumentTypeError).name)
+ 
+ArgumentTypeError.typeName = myName
+ 
+const augmentMessage = ({ expectedType, receivedType }) => {
+  let typeMessage = ''
+  if (expectedType !== undefined) {
+    typeMessage = `expected type '${expectedType}'`
+  }
+  if (receivedType !== undefined) {
+    if (expectedType) {
+      typeMessage += ', but '
+    }
+    typeMessage += `received type '${receivedType}'`
+  }
+ 
+  if (typeMessage !== '') {
+    typeMessage += ' ' + typeMessage.charAt(0).toUpperCase() + typeMessage.slice(1) + '.'
+  }
+ 
+  return typeMessage
+}
+ 
+export { ArgumentTypeError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/auth-error.mjs.html b/qa/coverage/src/auth-error.mjs.html new file mode 100644 index 0000000..b2c4592 --- /dev/null +++ b/qa/coverage/src/auth-error.mjs.html @@ -0,0 +1,199 @@ + + + + + + Code coverage report for src/auth-error.mjs + + + + + + + + + +
+
+

All files / src auth-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 86.66% + Branches + 13/15 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39  +8x +8x +633x +  +8x +  +  +  +  +  +  +  +  +  +  +8x +  +  +  +  +  +  +  +  +  +  +68x +34x +  +16x +  +  +8x +  +8x +  +  + 
/* globals AuthenticationRequiredError BadCredentialsError NoAccessError OperationNotPermittedError */
+import { CommonError } from './common-error'
+import { generateAuthMessage } from './lib/generate-auth-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'AuthError'
+ 
+/**
+ * A generic error indicating a problem with user authentication or authorization. `AuthError` should generally not be
+ * used directly, but instead is intended as a base class for auth related errors allowing consumers to check for auth
+ * related errors broadly (`e.g., instanceof AuthError`). Generally, will want to use one of the following:
+ * - {@link AuthenticationRequiredError}
+ * - {@link BadCredentialsError}
+ * - {@link NoAccessError}
+ * - {@link OperationNotPermittedError}
+ */
+const AuthError = class extends CommonError {
+  /**
+   * {@AuthError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.action = 'action'] - A short description of the action.
+   * @param {string|undefined} [options.target = undefined] - The name or short description of the target.
+   * @param {string} [options.issue = 'is not authorized'] - The auth issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   */
+  constructor({ name = myName, action = 'action', issue = 'is not authorized', ...options } = {}) {
+    options.message = options.message || generateAuthMessage({ action, issue, ...options })
+    super({ name, action, issue, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(AuthError).name)
+ 
+AuthError.typeName = myName
+ 
+export { AuthError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/authentication-required-error.mjs.html b/qa/coverage/src/authentication-required-error.mjs.html new file mode 100644 index 0000000..fe0c444 --- /dev/null +++ b/qa/coverage/src/authentication-required-error.mjs.html @@ -0,0 +1,193 @@ + + + + + + Code coverage report for src/authentication-required-error.mjs + + + + + + + + + +
+
+

All files / src authentication-required-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37  +3x +70x +  +3x +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError */ // ref in docs
+import { AuthError } from './auth-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'AuthenticationRequiredError'
+ 
+/**
+ * An {@link AuthError} sub-class indicating that an operation requires an authenticated user and the current us not
+ * authenticated.
+ */
+const AuthenticationRequiredError = class extends AuthError {
+  /**
+   * {@link AuthenticationRequiredError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.action = 'action'] - A short description of the action.
+   * @param {string|undefined} [options.target = undefined] - A short description of the action target.
+   * @param {string} [options.issue = 'requires authorization'] - The auth issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new AuthenticationRequiredError() // "Action requires authentication."
+   * new AuthenticationRequiredError({ action : 'endpoint access' }) // "Endpoint access requires authentication."
+   * // v "Updating the customer database requires authentication."
+   * new AuthenticationRequiredError({ action : 'updating', target : 'customer database' })
+   */
+  constructor({ name = myName, action = 'action', issue = 'requires authentication', ...options } = {}) {
+    super({ name, action, issue, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(AuthenticationRequiredError).name)
+ 
+AuthenticationRequiredError.typeName = myName
+ 
+export { AuthenticationRequiredError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/authorization-conditions-not-met-error.mjs.html b/qa/coverage/src/authorization-conditions-not-met-error.mjs.html new file mode 100644 index 0000000..b3541ad --- /dev/null +++ b/qa/coverage/src/authorization-conditions-not-met-error.mjs.html @@ -0,0 +1,292 @@ + + + + + + Code coverage report for src/authorization-conditions-not-met-error.mjs + + + + + + + + + +
+
+

All files / src authorization-conditions-not-met-error.mjs

+
+ +
+ 100% + Statements + 27/27 +
+ + +
+ 93.33% + Branches + 14/15 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 17/17 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70  +3x +127x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +5x +  +6x +  +  +3x +  +3x +  +5x +5x +5x +2x +  +5x +5x +1x +  +  +5x +  +  +  + 
/* globals AuthenticationRequiredError CommonError NoAccessError OperationNotPermittedError */ // used in the docs
+import { AuthError } from './auth-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'AuthorizationConditionsNotMetError'
+ 
+/**
+ * An {@link AuthError} indicating that the user is authorized to perform some action under some circumstances, but
+ * additional conditions must be met. The blocking or necessary conditions should be described if possible.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link AuthenticationRequiredError} - Use this when the resource requires authenticated access and the user is not
+ *   currently authenticated.
+ * - {@link NoAccessError} - Use this when the user is accessing a resource the user has no authorizations to.
+ * - {@link OperationNotPermittedError} - Use this when user is attempting an operation for which they have no
+ *   authorization.
+ */
+const AuthorizationConditionsNotMetError = class extends AuthError {
+  /**
+   * Constructor for the {@link AuthorizationConditionsNotMetError}.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.action = undefined] - A description of the action being taken. This should
+   *   identify the target resource/entity where appropriate. E.g., 'accessing the database' or 'updating customer
+   *   data'.
+   * @param {string|undefined} [options.hint = undefined] - A description of what the user might do to remedy the
+   *   situation. This should be a complete sentence. E.g., 'You may contact customer service and request a quota
+   *   increase.', or 'Try again in a few minutes.'
+   * @param {string} [options.issue = 'current conditions prevent this action'] - A description of the problem. E.g.,
+   *   'the user is over request quota', or 'this operation is only allowed between 0900 and 1700'.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new AuthorizationConditionsNotMet() // "While generally authorized, current conditions prevent this action."
+   * // v "While generally authorized to access customer data, current conditions prevent this action."
+   * new AuthorizationConditionsNotMet({ action: 'access customer data' })
+   * // v "While generally authorized, user is over rate quota."
+   * new AuthorizationConditionsNotMet({ issue: 'user is over rate quota' })
+   * // v "While generally authorized to access customer data, user is over rate quota."
+   * new AuthorizationConditionsNotMet({ action: 'access customer data', issue: 'user is over rate quota' })
+   * // v "While generally authorized, current conditions prevent this action. Try again in a few minutes."
+   * new AuthorizationConditionsNotMet({ hint: 'Try again in a few minutes.' })
+   */
+  constructor({ name = myName, issue = 'current conditions prevent this action', ...options } = {}) {
+    options.message = options.message || generateMessage({ issue, ...options })
+    super({ name, issue, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(AuthorizationConditionsNotMetError).name)
+ 
+AuthorizationConditionsNotMetError.typeName = myName
+ 
+const generateMessage = ({ action, hint, issue }) => {
+  let message = 'While generally authorized'
+  if (action !== undefined) {
+    message += ` to ${action}`
+  }
+  message += `, ${issue}.`
+  if (hint !== undefined) {
+    message += ' ' + hint
+  }
+ 
+  return message
+}
+ 
+export { AuthorizationConditionsNotMetError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/common-error-settings.mjs.html b/qa/coverage/src/common-error-settings.mjs.html new file mode 100644 index 0000000..d9a2b90 --- /dev/null +++ b/qa/coverage/src/common-error-settings.mjs.html @@ -0,0 +1,322 @@ + + + + + + Code coverage report for src/common-error-settings.mjs + + + + + + + + + +
+
+

All files / src common-error-settings.mjs

+
+ +
+ 100% + Statements + 32/32 +
+ + +
+ 100% + Branches + 16/16 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 27/27 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80  +4x +4x +  +4x +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +93x +35x +6x +  +  +58x +2x +2x +  +  +1x +  +57x +50x +  +  +7x +4x +  +  +  +4x +9x +1x +  +  +  +  +  +  +8x +6x +1x +  +  +  +  +  +  +2x +2x +2x +2x +1x +  +  +  +  +  +  +  +  +  + 
/* globals wrapError */
+import { ArgumentInvalidError } from './argument-invalid-error'
+import { CommonError } from './common-error'
+ 
+const defaultSettings = {
+  noInstanceHidingOnWrap : false,
+  wrapUserErrorType      : undefined,
+}
+ 
+const customSettings = {}
+ 
+/**
+ * Used to retrieve and manage options used in {@link wrapError}.
+ * - To retrieve a setting, call `commonErrorSettings(option)` (where `option` is a `string`).
+ * - To add/override a single setting, call `commonErrorSettings(option, value)`.
+ * - To bulk add/override settings, call `commonErrorSettings(/mappings)` (where `mappings is an `Object`).
+ * - To reset the custom settings to default, call `commonErrorSettings()`.
+ *
+ * Currently, we support two settings (see {@link wrapError} for details):
+ * - `noInstanceHidingOnWrap` - Controls whether or not errors that are not class `Error` are wrapped or not.
+ * - `wrapUserErrorType` - Controls the resulting class when wrapping errors associated with bad user input.
+ * @param {string|object} option - Then name of the setting, or bulk settings `Object`.
+ * @param {boolean | Function | undefined} value - The value of the setting.
+ * @returns {boolean | Function | undefined} - The value of the indicated `option` or undefined.
+ */
+const commonErrorSettings = (option, value) => {
+  if (option === undefined) {
+    for (const prop in customSettings) {
+      delete customSettings[prop]
+    }
+  }
+  else if (typeof option === 'object') {
+    for (const [newOpt, newVal] of Object.entries(option)) {
+      verifyArguments(newOpt, newVal)
+    }
+ 
+    Object.assign(customSettings, option)
+  }
+  else if (value === undefined) {
+    return customSettings[option] || defaultSettings[option]
+  }
+  else {
+    verifyArguments(option, value)
+    customSettings[option] = value
+  }
+}
+ 
+const verifyArguments = (option, value) => {
+  if (!(option in defaultSettings)) {
+    throw new ArgumentInvalidError({
+      argumentName  : 'option',
+      argumentValue : option,
+      issue         : `is not a valid common error setting; should be one of '${Object.keys(defaultSettings).join("', '")}'`,
+    })
+  }
+ 
+  if (typeof defaultSettings[option] === 'boolean') {
+    if (!(value === true || value === false)) {
+      throw new ArgumentInvalidError({
+        argumentName  : 'value',
+        argumentValue : value,
+        issue         : `must be literal 'true' or 'false' for option '${option}'`,
+      })
+    }
+  }
+  else if (value !== undefined) {
+    const ErrorClass = value
+    const testError = new ErrorClass()
+    if (!(testError instanceof CommonError)) {
+      throw new ArgumentInvalidError({
+        argumentName  : 'value',
+        argumentValue : value,
+        issue         : `must be literal 'undefined' or 'CommonError' class or sub-class for option '${option}'`,
+      })
+    }
+  }
+}
+ 
+export { commonErrorSettings }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/common-error.mjs.html b/qa/coverage/src/common-error.mjs.html new file mode 100644 index 0000000..a919db6 --- /dev/null +++ b/qa/coverage/src/common-error.mjs.html @@ -0,0 +1,232 @@ + + + + + + Code coverage report for src/common-error.mjs + + + + + + + + + +
+
+

All files / src common-error.mjs

+
+ +
+ 100% + Statements + 22/22 +
+ + +
+ 84.61% + Branches + 11/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 13/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +5027x +27x +469x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +27x +  +  +  +  +  +  +  +  +  +  +  +  +  +364x +182x +  +182x +  +822x +822x +822x +  +  +  +182x +182x +54x +  +  +  + 
import { hoistErrorCode } from './lib/hoist-error-code'
+import { mapErrorToHttpStatus } from './map-error-to-http-status'
+import { mapHttpStatusToName } from './map-http-status-to-name'
+ 
+/**
+ * A base class for common errors. To create a common error of your own, extend this class.
+ * ```js
+ * const myName = 'MyError'
+ *
+ * export const MyError = class extends CommonError {
+ *   constructor(foo, options) {
+ *     const message = `You hit ${foo}!`
+ *     super(name, message, options)
+ *   }
+ * }
+ * MyError.typeName = myName
+ * ```
+ */
+const CommonError = class extends Error {
+  /**
+   * {@CommonError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} options.name - The name of error. In general, this should match the final class name.
+   * @param {string} [options.message = 'An error has occurred.'] - The error message.
+   * @param {string|undefined} [options.code = undefined] - The error code.
+   * @param {number|undefined} [options.status = undefined] - The HTTP status associated with the error. If undefined,
+   *   this will be automatically set according to the [@link mapErrorToHttpStatus | configured error mappings].
+   * @param {object|undefined} [options.options = undefined] - The options to pass to the `Error` super-constructor.
+   * @example
+   * new CommonError() // "An error has occurred."
+   * new CommonError({ message : 'Oh no! An error!' }) // "Oh no! An error!"
+   */
+  constructor({ message = 'An error has occurred.', status, ...options } = {}) {
+    super(message, options)
+ 
+    hoistErrorCode(options)
+ 
+    for (const parameter of Object.keys(options || {})) {
+      if (!['message', 'status', 'statusName', 'prototype'].includes(parameter)) {
+        this[parameter] = options[parameter]
+      }
+    }
+ 
+    this.status = status || mapErrorToHttpStatus(this.name)
+    this.statusName = mapHttpStatusToName(this.status)
+  }
+}
+ 
+export { CommonError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/connection-error.mjs.html b/qa/coverage/src/connection-error.mjs.html new file mode 100644 index 0000000..409a53c --- /dev/null +++ b/qa/coverage/src/connection-error.mjs.html @@ -0,0 +1,247 @@ + + + + + + Code coverage report for src/connection-error.mjs + + + + + + + + + +
+
+

All files / src connection-error.mjs

+
+ +
+ 100% + Statements + 23/23 +
+ + +
+ 75% + Branches + 12/16 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 15/15 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55  +3x +3x +3x +141x +  +3x +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +18x +9x +9x +  +6x +  +  +3x +  +3x +  +9x +9x +  +9x +  +  +  + 
/* globals CommonError */
+import { ExternalServiceError } from './external-service-error'
+import { connectionCodes } from './lib/connection-codes'
+import { hoistErrorCode } from './lib/hoist-error-code'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ConnectionError'
+ 
+/**
+ * An {@link ExternalServiceError} sub-type indicating a problem with a connection, including making a connection. The
+ * standard instance `message` is determined by the `code` instance field, which indicates the specific nature of the
+ * connection error. Recall that due to [error code hoisting](#error-code-hoisting), the `code` of the `cause` `Error`
+ * will set the `ConnectionError` `code` (unless the constructor options `code` is set or `noHoistCode` is `true`) and
+ * the hoisted `code` will determine the standard message (unless the `message` option is defined).
+ */
+const ConnectionError = class extends ExternalServiceError {
+  /**
+   * Constructor for the {@link ConnectionError} class.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.issue = _variaus_] - Typically left `undefined` and determined automatically according to
+   *   the error `code`. Describes the specific issue.
+   * @param {string|undefined} [options.target = undefined] - The name or description of the connection target.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ConnectionError() // "Connection has experienced an unknown error."
+   * // v "Connection to host 'foo.com' has experienced an unknown error."
+   * new ConnectionError({ target: "to host 'foo.com'" })
+   * // v "Connection to host 'foo.com' is blocked by system firewall."
+   * new ConnectionError({ target: "to host 'foo.com'", issue: 'is blocked by system firewall' })
+   * new ConnectionError({ code: 'ECONNRESET' }) // "Connection has been reset."
+   * const cause = new Error()
+   * const cause.code = 'ECONNRESET'
+   * const connError = new ConnectionError({ cause }) // also "Connection has been reset."
+   */
+  constructor({ name = myName, ...options } = {}) {
+    hoistErrorCode(options) // hoist the code prior to generating message
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ConnectionError).name)
+ 
+ConnectionError.typeName = myName
+ 
+const generateMessage = ({ code, issue, target }) => {
+  issue = issue || connectionCodes[code] || 'experienced an unknown error'
+ 
+  return `Connection ${target === undefined ? '' : `${target} `}${issue}.`
+}
+ 
+export { ConnectionError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/constraint-violation-error.mjs.html b/qa/coverage/src/constraint-violation-error.mjs.html new file mode 100644 index 0000000..22761ce --- /dev/null +++ b/qa/coverage/src/constraint-violation-error.mjs.html @@ -0,0 +1,214 @@ + + + + + + Code coverage report for src/constraint-violation-error.mjs + + + + + + + + + +
+
+

All files / src constraint-violation-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 80% + Branches + 12/15 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44  +3x +3x +204x +  +3x +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +16x +8x +  +6x +  +  +3x +  +3x +  +  + 
/* globals ArgumentInvalidError */
+import { CommonError } from './common-error'
+import { generateConstraintMessage } from './lib/generate-constraint-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ConstraintViolationError'
+ 
+/**
+ * Indicates the requested operation is well formed and the data otherwise correct, but it violates a data constraint.
+ * `ConstraintViolationError` is distinguished from {@link ArgumentInvalidError} in that argument errors are evaluated
+ * at the function level, while constraint violations result from database constraints.
+ */
+const ConstraintViolationError = class extends CommonError {
+  /**
+   * {@link ConstraintViolationError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.constraintType = 'constraint'] - The constraint type.
+   * @param {string|undefined} [options.entityType = undefined] - The "type" of entity. E.g., 'user'.
+   * @param {string[]|Array.<Array.string>} [options.fieldAndValues = []] - An array of either field names and/or
+   *   arrays of field name + field value. You may mix and match, e.g., `['field1', ['field2', 'value2']`.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ConstraintViolationError() // "Constraint violated."
+   * new ConstraintViolationError({ constraintType: 'foreign key' }) // "Foreign key constraint violated."
+   * new ConstraintViolationError({ entityType : 'user' }) // "Constraint on entity type 'user' violated."
+   * // v "Enumeration constraint on fields <email> on entity type 'user' violated."
+   * new ConstraintViolationError({ constraintType : 'enumeration', entityType : 'user', fieldAndValues : ['email'] })
+   * // v "Constraint on fields <email(john@foo.com)> on entity type 'user' violated."
+   * new ConstraintViolationError({ entityType : 'user', fieldAndValues : [['email', 'john@foo.com']] })
+   */
+  constructor({ name = myName, constraintType = 'constraint', fieldAndValues = [], ...options } = {}) {
+    options.message = options.message || generateConstraintMessage({ constraintType, fieldAndValues, ...options })
+    super({ name, constraintType, fieldAndValues, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ConstraintViolationError).name)
+ 
+ConstraintViolationError.typeName = myName
+ 
+export { ConstraintViolationError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/data-service-error.mjs.html b/qa/coverage/src/data-service-error.mjs.html new file mode 100644 index 0000000..4511153 --- /dev/null +++ b/qa/coverage/src/data-service-error.mjs.html @@ -0,0 +1,220 @@ + + + + + + Code coverage report for src/data-service-error.mjs + + + + + + + + + +
+
+

All files / src data-service-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 100% + Branches + 13/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46  +5x +5x +263x +  +5x +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +30x +15x +  +10x +  +  +5x +  +5x +  +  + 
/* globals CommonError ConnectionError ConstraintViolationError RollbackError TransactionError UniqueConstraintViolationError */ // used in docs
+import { ExternalServiceError } from './external-service-error'
+import { generateExternalServiceMessage } from './lib/generate-external-service-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'DataServiceError'
+ 
+/**
+ * An {@link ExternalServiceError} sub-type indicating a problem related to a data service specifically.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ConnectionError}
+ * - {@link ConstraintViolationError}
+ * - {@link RollbackError}
+ * - {@link TransactionError}
+ * - {@link UniqueConstraintViolationError}
+ */
+const DataServiceError = class extends ExternalServiceError {
+  /**
+   * {@link DataServiceError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.service = 'data'] - The name or short description of the service.
+   * @param {string|undefined} [options.issue = undefined] - A description of the issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new DataServiceError() // There was an error with a remote data service.
+   * new DataServiceError({ service : 'database' }) // The was an error with the remote database service.
+   * // v "There was an error with a remote data service; service is not rot responding."
+   * new DataServiceError({ issue : 'is not responding' })
+   * // v "There was an error with the remote database service; service is not responding."
+   * new DataServiceError({ service : 'database', issue : 'is not responding' })
+   */
+  constructor({ name = myName, service = 'data', ...options } = {}) {
+    options.message = options.message || generateExternalServiceMessage(undefined, { service, ...options })
+    super({ name, service, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(DataServiceError).name)
+ 
+DataServiceError.typeName = myName
+ 
+export { DataServiceError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/database-error.mjs.html b/qa/coverage/src/database-error.mjs.html new file mode 100644 index 0000000..0c2af35 --- /dev/null +++ b/qa/coverage/src/database-error.mjs.html @@ -0,0 +1,268 @@ + + + + + + Code coverage report for src/database-error.mjs + + + + + + + + + +
+
+

All files / src database-error.mjs

+
+ +
+ 100% + Statements + 32/32 +
+ + +
+ 83.33% + Branches + 15/18 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 19/19 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62  +4x +282x +  +4x +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +24x +12x +  +8x +  +  +4x +  +4x +  +10x +10x +10x +4x +  +  +6x +  +10x +10x +2x +  +10x +  +10x +  +  +  + 
/* globals RollbackError TransactionError */ // used in docs
+import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'DatabaseError'
+ 
+/**
+ * Indicates a problem within a database system implementation.
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link RollbackError}
+ * - {@link TransactionError}
+ */
+const DatabaseError = class extends CommonError {
+  /**
+   * {@link DatabaseError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.action = undefined] - A description of the action being taken. E.g., 'closing',
+   *   'creating', etc.
+   * @param {string} [options.errorType = 'an error'] - A description of the error type.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string} [options.target = 'target'] - The name or description of the target resource.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new DatabaseError() // "There an error in the database."
+   * new DatabaseError({ action : 'syncing' }) // "There was an error syncing the database."
+   * new DatabaseError({ target : 'customer database' }) // "There was an error in the customer database."
+   * // v "There was an error creating the customer database."
+   * new DatabaseError({ action: 'creating', target : 'customer database' })
+   * // v "There was an error in the customer database; virtual socket closed."
+   * new DatabaseError({ issue : 'virtual socket closed', target : 'customer database' })
+   */
+  constructor({ name = myName, errorType = 'an error', target = 'database', ...options } = {}) {
+    options.message = options.message || generateMessage({ errorType, target, ...options })
+    super({ name, errorType, target, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(DatabaseError).name)
+ 
+DatabaseError.typeName = myName
+ 
+const generateMessage = ({ action, errorType, issue, target }) => {
+  let message = `There was ${errorType}`
+  if (action !== undefined) {
+    message += ' ' + action
+  }
+  else {
+    message += ' in'
+  }
+  message += ` the ${target}`
+  if (issue !== undefined) {
+    message += `; ${issue}`
+  }
+  message += '.'
+ 
+  return message
+}
+ 
+export { DatabaseError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/directory-not-found-error.mjs.html b/qa/coverage/src/directory-not-found-error.mjs.html new file mode 100644 index 0000000..6271fe7 --- /dev/null +++ b/qa/coverage/src/directory-not-found-error.mjs.html @@ -0,0 +1,223 @@ + + + + + + Code coverage report for src/directory-not-found-error.mjs + + + + + + + + + +
+
+

All files / src directory-not-found-error.mjs

+
+ +
+ 100% + Statements + 18/18 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 13/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47  +3x +3x +3x +35x +  +3x +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +2x +2x +2x +  +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError FileNotFoundError */
+import { describeDirectory } from './lib/describe-directory'
+import { generateNotFoundMessage } from './lib/generate-not-found-message'
+import { NotFoundError } from './not-found-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'DirectoryNotFoundError'
+ 
+/**
+ * A {@link NotFoundError} sub-type indicating there is no file at the requested location. If both `dirPath` and
+ * `fileName` are specified, `DirectoryNotFound` tries to be smart about joining them and will try and guess the proper
+ * path separator and whether it needs to be appended or not.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link FileNotFoundError}
+ * - {@link NotFoundError}
+ */
+const DirectoryNotFoundError = class extends NotFoundError {
+  /**
+   * {@link DirectoryNotFoundError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.dirPath = undefined] - The directory (not including the file itself) where the
+   *   file is located.
+   * @param {string|undefined} [options.resource = undefined] - Should usually be left undefined. If set, then the
+   *   value will override `dirPath` and be used to generate the standard message if `message` option not set.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new DirectoryNotFound() // "Directory not found."
+   * new DirectoryNotFound({ dirPath: '/my-dir' }) // "Directory '/my-dir' not found."
+   */
+  constructor({ name = myName, ...options } = {}) {
+    const resource = describeDirectory(options)
+    options.message = options.message || generateNotFoundMessage({ resource })
+    options.resource = options.resource || resource
+ 
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(DirectoryNotFoundError).name)
+ 
+DirectoryNotFoundError.typeName = myName
+ 
+export { DirectoryNotFoundError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/end-of-stream-error.mjs.html b/qa/coverage/src/end-of-stream-error.mjs.html new file mode 100644 index 0000000..31ea5d5 --- /dev/null +++ b/qa/coverage/src/end-of-stream-error.mjs.html @@ -0,0 +1,217 @@ + + + + + + Code coverage report for src/end-of-stream-error.mjs + + + + + + + + + +
+
+

All files / src end-of-stream-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45  +3x +3x +144x +  +3x +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +6x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError */ // used in docs
+import { IoError } from './io-error'
+import { generateIoErrorMessage } from './lib/generate-io-error-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'EndOfStreamError'
+ 
+/**
+ * An {@link IoError} sub-type indicating an attempt to read beyond the of a stream.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link EndOfStreamError}
+ * - {@link IoError}
+ */
+const EndOfStreamError = class extends IoError {
+  /**
+   * {@link EndOfStreamError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.action = 'reading'] - A description of the action being taken; default to 'reading'.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string|undefined} [options.target = undefined] - The name or description of the target resource.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new EndOfStreamError() // "There was an end-of-stream error."
+   * new EndOfStreamError({ action : 'streaming' }) // "There was an end-of-stream error streaming."
+   * new EndOfStreamError({ target : 'serial port' }) // "There was an end-of-stream error reading the serial port."
+   * // v "There was an end-of-stream error streaming the serial port."
+   * new EndOfStreamError({ action: 'streaming', target : 'serial port' })
+   * // v "There was an end-of-stream error reading the serial port; virtual socket closed."
+   * new EndOfStreamError({ issue : 'virtual socket closed', target : 'serial port' })
+   */
+  constructor({ name = myName, action = 'reading', ...options } = {}) {
+    options.message = options.message || generateIoErrorMessage('an end-of-stream', { action, ...options })
+    super({ name, action, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(EndOfStreamError).name)
+ 
+EndOfStreamError.typeName = myName
+ 
+export { EndOfStreamError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/external-service-error.mjs.html b/qa/coverage/src/external-service-error.mjs.html new file mode 100644 index 0000000..c059c0d --- /dev/null +++ b/qa/coverage/src/external-service-error.mjs.html @@ -0,0 +1,220 @@ + + + + + + Code coverage report for src/external-service-error.mjs + + + + + + + + + +
+
+

All files / src external-service-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 76.92% + Branches + 10/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46  +6x +6x +360x +  +6x +  +  +  +  +  +  +  +  +  +  +  +6x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +48x +24x +  +12x +  +  +6x +  +6x +  +  + 
/* globals ConstraintViolationError DataServiceError RollbackError TransactionError UniqueConstraintViolationError */
+import { CommonError } from './common-error'
+import { generateExternalServiceMessage } from './lib/generate-external-service-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'ExternalServiceError'
+ 
+/**
+ * Indicates an error related to an external service.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ConstraintViolationError}
+ * - {@link DataServiceError}
+ * - {@link RollbackError}
+ * - {@link TransactionError}
+ * - {@link UniqueConstraintViolationError}
+ */
+const ExternalServiceError = class extends CommonError {
+  /**
+   * {@link ExternalServiceError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.service = ''] - The name or short description of the service.
+   * @param {string|undefined} [options.issue = undefined] - A description of the issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new ExternalServiceError() // There was an error with a remote service.
+   * new ExternalServiceError({ service : 'Foo API' }) // The was an error with the Foo API remote service.
+   * // v "A remote service is not responding."
+   * new ExternalServiceError({ issue : 'is not responding' })
+   * // v "The remote service Foo API is not responding."
+   * new ExternalServiceError({ service : 'Foo API', issue : 'is not responding' })
+   */
+  constructor({ name = myName, service = '', ...options } = {}) {
+    options.message = options.message || generateExternalServiceMessage(undefined, { service, ...options })
+    super({ name, service, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(ExternalServiceError).name)
+ 
+ExternalServiceError.typeName = myName
+ 
+export { ExternalServiceError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/file-load-error.mjs.html b/qa/coverage/src/file-load-error.mjs.html new file mode 100644 index 0000000..2102413 --- /dev/null +++ b/qa/coverage/src/file-load-error.mjs.html @@ -0,0 +1,238 @@ + + + + + + Code coverage report for src/file-load-error.mjs + + + + + + + + + +
+
+

All files / src file-load-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 93.33% + Branches + 14/15 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 12/12 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52  +3x +3x +3x +225x +  +3x +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +6x +6x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError */
+import { describeFile } from './lib/describe-file'
+import { IoError } from './io-error'
+import { generateIoErrorMessage } from './lib/generate-io-error-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'FileLoadError'
+ 
+/**
+ * An {@link IoError} indicating a file is present, and can be read, but there is a problem loading it.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link IoError}
+ * - {@link FileLoadError}
+ */
+const FileLoadError = class extends IoError {
+  /**
+   * {@link FileLoadError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.action = 'loading'] - A description of the action being taken. Default to 'loading'.
+   * @param {string|undefined} [options.dirPath = undefined] - The directory (not including the file itself) where the
+   *   file is located.
+   * @param {string|undefined} [options.fileName = undefined] - The name of the file itself. May be a full path (in
+   *   which case `dirPath` should be left undefined) or just the file name, in which case it is combined with
+   *   `dirPath`, if present, to create the standard error message.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string|undefined} [options.target = undefined] - The name or description of the target resource. Should
+   *   generally be left in preference for setting `fileName` and/or `filePath`.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new FileLoadError() // "There was an error loading the file."
+   * new FileLoadError({ action : 'reading' }) // "There was an error reading the file."
+   * new FileLoadError({ fileName : 'foo.txt' }) // "There an error loading the file 'foo.txt'."
+   * new FileLoadError({ dirPath : '/bar', fileName: 'foo.txt' }) // "There an error loading the file '/bar/foo.txt'."
+   * // v "There an error loading the file in directory '/bar'; virtual socket closed."
+   * new FileLoadError({ issue : 'virtual socket closed', dirPath : '/bar' })
+   */
+  constructor({ name = myName, action = 'loading', ...options } = {}) {
+    options.target = options.target || describeFile({ action, ...options })
+    options.message = options.message || generateIoErrorMessage('an', { action, ...options })
+    super({ name, action, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(FileLoadError).name)
+ 
+FileLoadError.typeName = myName
+ 
+export { FileLoadError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/file-not-found-error.mjs.html b/qa/coverage/src/file-not-found-error.mjs.html new file mode 100644 index 0000000..017a647 --- /dev/null +++ b/qa/coverage/src/file-not-found-error.mjs.html @@ -0,0 +1,244 @@ + + + + + + Code coverage report for src/file-not-found-error.mjs + + + + + + + + + +
+
+

All files / src file-not-found-error.mjs

+
+ +
+ 100% + Statements + 18/18 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 13/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54  +4x +4x +4x +100x +  +4x +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +6x +6x +6x +  +  +8x +  +  +4x +  +4x +  +  + 
/* globals CommonError DirectoryNotFoundError */ // used in docs
+import { generateNotFoundMessage } from './lib/generate-not-found-message'
+import { NotFoundError } from './not-found-error'
+import { registerParent } from './map-error-to-http-status'
+import { describeFile } from './lib/describe-file'
+ 
+const myName = 'FileNotFoundError'
+ 
+/**
+ * A {@link NotFoundError} sub-type indicating there is no file at the requested location. If both `dirPath` and
+ * `fileName` are specified, `FileNotFound` tries to be smart about joining them and will try and guess the proper path
+ * separator and whether it needs to be appended or not.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link DirectoryNotFoundError}
+ * - {@link NotFoundError}
+ */
+const FileNotFoundError = class extends NotFoundError {
+  /**
+   * {@link FileNotFoundError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.dirPath = undefined] - The directory (not including the file itself) where the
+   *   file is located.
+   * @param {string|undefined} [options.fileName = undefined] - The name of the file itself. May be a full path (in
+   *   which case `dirPath` should be left undefined) or just the file name, in which case it is combined with
+   *   `dirPath`, if present, to create the standard error message.
+   * @param {string|undefined} [options.resource = undefined] - Should usually be left undefined. If set, then the
+   *   value will override `fileName` and `dirPath` and be used to generate the standard message if `message` option
+   *   not set.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new FileNotFound() // "File not found."
+   * new FileNotFound({ fileName: 'foo.txt' }) // "File 'foo.txt' not found."
+   * new FileNotFound({ dirPath: '/tmp', fileName: 'foo.txt'}) // "File '/tmp/foo.txt' not found."
+   * new FileNotFound({ dirPath: '/tmp/', fileName: 'foo.txt'}) // "File '/tmp/foo.txt' not found."
+   * new FileNotFound({ dirPath: '/this-is-weird' }) // "File in directory '/this-is-weird' not found."
+   */
+  constructor({ name = myName, ...options } = {}) {
+    const resource = describeFile(options)
+    options.resource = options.resource || resource
+    options.message = options.message || generateNotFoundMessage({ resource })
+ 
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(FileNotFoundError).name)
+ 
+FileNotFoundError.typeName = myName
+ 
+export { FileNotFoundError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/index.html b/qa/coverage/src/index.html new file mode 100644 index 0000000..c1b1f4c --- /dev/null +++ b/qa/coverage/src/index.html @@ -0,0 +1,671 @@ + + + + + + Code coverage report for src + + + + + + + + + +
+
+

All files src

+
+ +
+ 100% + Statements + 784/784 +
+ + +
+ 90.56% + Branches + 499/551 +
+ + +
+ 100% + Functions + 118/118 +
+ + +
+ 100% + Lines + 520/520 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
argument-invalid-error.mjs +
+
100%41/4196.29%26/27100%4/4100%26/26
argument-missing-error.mjs +
+
100%15/1590.9%10/11100%3/3100%8/8
argument-out-of-range-error.mjs +
+
100%37/3788.88%24/27100%4/4100%26/26
argument-type-error.mjs +
+
100%30/3093.33%14/15100%4/4100%21/21
auth-error.mjs +
+
100%19/1986.66%13/15100%3/3100%10/10
authentication-required-error.mjs +
+
100%17/1792.3%12/13100%3/3100%8/8
authorization-conditions-not-met-error.mjs +
+
100%27/2793.33%14/15100%4/4100%17/17
common-error-settings.mjs +
+
100%32/32100%16/16100%2/2100%27/27
common-error.mjs +
+
100%22/2284.61%11/13100%3/3100%13/13
connection-error.mjs +
+
100%23/2375%12/16100%4/4100%15/15
constraint-violation-error.mjs +
+
100%19/1980%12/15100%3/3100%10/10
data-service-error.mjs +
+
100%17/17100%13/13100%3/3100%10/10
database-error.mjs +
+
100%32/3283.33%15/18100%4/4100%19/19
directory-not-found-error.mjs +
+
100%18/1892.3%12/13100%3/3100%13/13
end-of-stream-error.mjs +
+
100%17/1792.3%12/13100%3/3100%10/10
external-service-error.mjs +
+
100%17/1776.92%10/13100%3/3100%10/10
file-load-error.mjs +
+
100%19/1993.33%14/15100%3/3100%12/12
file-not-found-error.mjs +
+
100%18/1892.3%12/13100%3/3100%13/13
io-error.mjs +
+
100%15/1572.72%8/11100%3/3100%10/10
local-rollback-error.mjs +
+
100%15/1581.81%9/11100%3/3100%8/8
local-transaction-error.mjs +
+
100%15/1581.81%9/11100%3/3100%8/8
map-error-to-http-status.mjs +
+
100%26/26100%14/14100%2/2100%26/26
map-http-status-to-name.mjs +
+
100%11/1188.88%8/9100%1/1100%11/11
mask-no-access-errors.mjs +
+
100%8/8100%0/0100%1/1100%8/8
no-access-directory-error.mjs +
+
100%15/1590.9%10/11100%3/3100%10/10
no-access-error.mjs +
+
100%19/19100%16/16100%3/3100%14/14
no-access-file-error.mjs +
+
100%16/1690.9%10/11100%3/3100%11/11
not-found-error.mjs +
+
100%17/17100%13/13100%3/3100%10/10
not-implemented-error.mjs +
+
100%19/1992.3%12/13100%4/4100%13/13
not-supported-error.mjs +
+
100%24/2493.75%15/16100%4/4100%16/16
operation-not-permitted-error.mjs +
+
100%19/1992.85%13/14100%3/3100%11/11
rollback-error.mjs +
+
100%17/1792.3%12/13100%3/3100%10/10
system-error.mjs +
+
100%18/1876.92%10/13100%4/4100%10/10
timeout-error.mjs +
+
100%18/1892.3%12/13100%4/4100%10/10
transaction-error.mjs +
+
100%17/1792.3%12/13100%3/3100%10/10
unavailable-error.mjs +
+
100%24/2489.47%17/19100%4/4100%14/14
unique-constraint-violation-error.mjs +
+
100%15/1581.81%9/11100%3/3100%8/8
wrap-error.mjs +
+
100%36/36100%38/38100%2/2100%34/34
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/io-error.mjs.html b/qa/coverage/src/io-error.mjs.html new file mode 100644 index 0000000..223d248 --- /dev/null +++ b/qa/coverage/src/io-error.mjs.html @@ -0,0 +1,220 @@ + + + + + + Code coverage report for src/io-error.mjs + + + + + + + + + +
+
+

All files / src io-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 72.72% + Branches + 8/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46  +4x +4x +197x +  +4x +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +24x +12x +  +8x +  +  +4x +  +4x +  +  + 
/* globals EndOfStreamError FileLoadError */ // used in docs
+import { CommonError } from './common-error'
+import { generateIoErrorMessage } from './lib/generate-io-error-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'IoError'
+ 
+/**
+ * A generic local I/O error _not_ involving a missing resource. Note that `IoError`s are specifically locally and
+ * external service, or remote connections errors are therefore not I/O errors.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link EndOfStreamError}
+ * - {@link FileLoadError}
+ */
+const IoError = class extends CommonError {
+  /**
+   * {@link IoError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.action = undefined] - A description of the action being taken. E.g., 'reading'
+   *   or 'writing'. Defaults to 'accessing'.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string|undefined} [options.target = undefined] - The name or description of the target resource.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new IoError() // "There was an IO error."
+   * new IoError({ action : 'reading' }) // "There was an IO error while reading."
+   * new IoError({ target : 'serial port' }) // "There an IO error while accessing the serial port."
+   * new IoError({ action: 'reading', target : 'serial port' }) // "There an IO error while reading the serial port."
+   * // v "There an IO error while accessing the serial port; virtual socket closed."
+   * new IoError({ issue : 'virtual socket closed', target : 'serial port' })
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateIoErrorMessage('an IO', options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(IoError).name)
+ 
+IoError.typeName = myName
+ 
+export { IoError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/connection-codes.mjs.html b/qa/coverage/src/lib/connection-codes.mjs.html new file mode 100644 index 0000000..5c0366f --- /dev/null +++ b/qa/coverage/src/lib/connection-codes.mjs.html @@ -0,0 +1,124 @@ + + + + + + Code coverage report for src/lib/connection-codes.mjs + + + + + + + + + +
+
+

All files / src/lib connection-codes.mjs

+
+ +
+ 100% + Statements + 1/1 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 1/1 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +143x +  +  +  +  +  +  +  +  +  +  +  +  + 
const connectionCodes = {
+  ECONNRESET    : 'has been reset',
+  ENOTFOUND     : 'host not found; check for typos',
+  ETIMEDOUT     : 'request timed out',
+  ECONNREFUSED  : 'refused; check port and ensure target service is running',
+  ERRADDRINUSE  : 'port already bound; verify port and check for duplicate or conflicting service',
+  EADDRNOTAVAIL : 'address not available; verify binding IP address correct and exists or try binding to 0.0.0.0',
+  ECONNABORTED  : "connection prematurely aborted; this is possibly due to 'result.end()' being called before 'result.sendFile()' could complete",
+  EHOSTUNREACH  : 'host unreachable; check local routing configuration and target and intermediate firewalls',
+  EAI_AGAIN     : 'host name cannot be resolved due to temporary DNS resolution issue; verify internet connection is stable and check DNS resolution settings (/etc/resolv.conf and /etc/hosts)',
+}
+ 
+export { connectionCodes }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/describe-directory.mjs.html b/qa/coverage/src/lib/describe-directory.mjs.html new file mode 100644 index 0000000..b5ba11d --- /dev/null +++ b/qa/coverage/src/lib/describe-directory.mjs.html @@ -0,0 +1,94 @@ + + + + + + Code coverage report for src/lib/describe-directory.mjs + + + + + + + + + +
+
+

All files / src/lib describe-directory.mjs

+
+ +
+ 100% + Statements + 3/3 +
+ + +
+ 100% + Branches + 2/2 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 1/1 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +46x +  +  + 
const describeDirectory = ({ dirPath }) => `directory${dirPath === undefined ? '' : ` '${dirPath}'`}`
+ 
+export { describeDirectory }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/describe-file.mjs.html b/qa/coverage/src/lib/describe-file.mjs.html new file mode 100644 index 0000000..dfc35e1 --- /dev/null +++ b/qa/coverage/src/lib/describe-file.mjs.html @@ -0,0 +1,142 @@ + + + + + + Code coverage report for src/lib/describe-file.mjs + + + + + + + + + +
+
+

All files / src/lib describe-file.mjs

+
+ +
+ 100% + Statements + 12/12 +
+ + +
+ 81.81% + Branches + 9/11 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +2018x +18x +18x +  +  +5x +5x +  +13x +5x +  +8x +1x +  +  +18x +  +  +  + 
const describeFile = ({ dirPath, fileName }) => {
+  let desc = 'file'
+  if (fileName !== undefined && dirPath !== undefined) {
+    // this is not super robust and fails with a relative path that's just 'a-dir', but we want to avoid bloating the
+    // package with anything fancier.
+    const sep = dirPath.includes('\\') ? '\\' : '/'
+    desc += dirPath.endsWith(sep) ? ` '${dirPath}${fileName}'` : ` '${dirPath}${sep}${fileName}'`
+  }
+  else if (fileName !== undefined) {
+    desc += ` '${fileName}'`
+  }
+  else if (dirPath !== undefined) {
+    desc = `file in directory '${dirPath}'`
+  } // else
+ 
+  return desc
+}
+ 
+export { describeFile }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-auth-message.mjs.html b/qa/coverage/src/lib/generate-auth-message.mjs.html new file mode 100644 index 0000000..156b534 --- /dev/null +++ b/qa/coverage/src/lib/generate-auth-message.mjs.html @@ -0,0 +1,118 @@ + + + + + + Code coverage report for src/lib/generate-auth-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-auth-message.mjs

+
+ +
+ 100% + Statements + 9/9 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 6/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +129x +9x +9x +3x +  +9x +  +9x +  +  +  + 
const generateAuthMessage = ({ action, issue, target }) => {
+  let message = action.charAt(0).toUpperCase() + action.slice(1)
+  if (target !== undefined) {
+    message += ` the ${target}`
+  }
+  message += ` ${issue}.`
+ 
+  return message
+}
+ 
+export { generateAuthMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-constraint-message.mjs.html b/qa/coverage/src/lib/generate-constraint-message.mjs.html new file mode 100644 index 0000000..e0bb5ce --- /dev/null +++ b/qa/coverage/src/lib/generate-constraint-message.mjs.html @@ -0,0 +1,169 @@ + + + + + + Code coverage report for src/lib/generate-constraint-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-constraint-message.mjs

+
+ +
+ 100% + Statements + 26/26 +
+ + +
+ 100% + Branches + 7/7 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 18/18 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +298x +8x +8x +8x +  +8x +6x +8x +8x +2x +2x +  +  +6x +  +6x +6x +6x +  +8x +3x +  +8x +  +8x +  +  +  + 
const generateConstraintMessage = ({ constraintType, entityType, fieldAndValues }) => {
+  let message = constraintType.charAt(0).toUpperCase() + constraintType.slice(1)
+  if (!constraintType.endsWith('constraint')) {
+    message += ' constraint'
+  }
+  if (fieldAndValues.length > 0) {
+    message += ' on fields <'
+    for (const fieldAndValue of fieldAndValues) {
+      if (Array.isArray(fieldAndValue) && fieldAndValue.length === 2) {
+        const [field, value] = fieldAndValue
+        message += `${field}(${value}),`
+      }
+      else {
+        message += `${fieldAndValue/* is just field */},`
+      }
+    }
+    message = message.slice(0, -1)
+    message += '>'
+  }
+  if (entityType !== undefined) {
+    message += ` on entity type '${entityType}'`
+  }
+  message += ' violated.'
+ 
+  return message
+}
+ 
+export { generateConstraintMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-external-service-message.mjs.html b/qa/coverage/src/lib/generate-external-service-message.mjs.html new file mode 100644 index 0000000..d2956ed --- /dev/null +++ b/qa/coverage/src/lib/generate-external-service-message.mjs.html @@ -0,0 +1,118 @@ + + + + + + Code coverage report for src/lib/generate-external-service-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-external-service-message.mjs

+
+ +
+ 100% + Statements + 8/8 +
+ + +
+ 100% + Branches + 3/3 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 6/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +1212x +12x +12x +6x +  +12x +  +12x +  +  +  + 
const generateExternalServiceMessage = (errorType, { issue, service }) => {
+  let message = `There was ${errorType || 'an'} error with the remote ${service} service`
+  if (issue !== undefined) {
+    message += `; service ${issue}`
+  }
+  message += '.'
+ 
+  return message
+}
+ 
+export { generateExternalServiceMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-io-error-message.mjs.html b/qa/coverage/src/lib/generate-io-error-message.mjs.html new file mode 100644 index 0000000..d3c9261 --- /dev/null +++ b/qa/coverage/src/lib/generate-io-error-message.mjs.html @@ -0,0 +1,127 @@ + + + + + + Code coverage report for src/lib/generate-io-error-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-io-error-message.mjs

+
+ +
+ 100% + Statements + 13/13 +
+ + +
+ 75% + Branches + 6/8 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +1510x +10x +10x +8x +  +10x +2x +  +10x +  +10x +  +  +  + 
const generateIoErrorMessage = (errorType = 'an IO', { action, issue, target }) => {
+  let message = `There was ${errorType} error ${action}`
+  if (target !== undefined) {
+    message += ` the ${target}`
+  }
+  if (issue !== undefined) {
+    message += `; ${issue}`
+  }
+  message += '.'
+ 
+  return message
+}
+ 
+export { generateIoErrorMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-no-access-message.mjs.html b/qa/coverage/src/lib/generate-no-access-message.mjs.html new file mode 100644 index 0000000..a5d473e --- /dev/null +++ b/qa/coverage/src/lib/generate-no-access-message.mjs.html @@ -0,0 +1,121 @@ + + + + + + Code coverage report for src/lib/generate-no-access-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-no-access-message.mjs

+
+ +
+ 100% + Statements + 7/7 +
+ + +
+ 100% + Branches + 4/4 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 5/5 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +135x +  +18x +18x +14x +  +  +4x +  +  +  +  + 
import { generateNotFoundMessage } from './generate-not-found-message'
+ 
+const generateNoAccessMessage = ({ resource, status }) => {
+  if (status === 404) {
+    return generateNotFoundMessage({ resource })
+  }
+  else {
+    return `Access ${resource === undefined ? '' : `to ${resource} `}is denied.`
+  }
+}
+ 
+export { generateNoAccessMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/generate-not-found-message.mjs.html b/qa/coverage/src/lib/generate-not-found-message.mjs.html new file mode 100644 index 0000000..7d87295 --- /dev/null +++ b/qa/coverage/src/lib/generate-not-found-message.mjs.html @@ -0,0 +1,136 @@ + + + + + + Code coverage report for src/lib/generate-not-found-message.mjs + + + + + + + + + +
+
+

All files / src/lib generate-not-found-message.mjs

+
+ +
+ 100% + Statements + 5/5 +
+ + +
+ 100% + Branches + 2/2 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 3/3 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18  +  +  +  +  +  +  +  +  +  +25x +25x +  +25x +  +  +  + 
/* globals NotFoundError NoAccessError */ // used in docs
+/**
+ * Generates an error message for a 'not found' resource. This is a library function (rather than an in-Class helper)
+ * because we want to make sure the message stays coordinated between "true" {@link NotFoundError}s and 'hidden' {@link
+ * NoAccessError}s.
+ * @param {object|undefined} options - The message options.
+ * @param {object|undefined} [options.resource = undefined] - The name or short description of the missing resource.
+ * @returns {string} The 'X not found' message.
+ * @private
+ */
+const generateNotFoundMessage = ({ resource = 'resource' }) => {
+  resource = resource.charAt(0).toUpperCase() + resource.slice(1)
+ 
+  return `${resource} not found.`
+}
+ 
+export { generateNotFoundMessage }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/hoist-error-code.mjs.html b/qa/coverage/src/lib/hoist-error-code.mjs.html new file mode 100644 index 0000000..cb1bfe5 --- /dev/null +++ b/qa/coverage/src/lib/hoist-error-code.mjs.html @@ -0,0 +1,109 @@ + + + + + + Code coverage report for src/lib/hoist-error-code.mjs + + + + + + + + + +
+
+

All files / src/lib hoist-error-code.mjs

+
+ +
+ 100% + Statements + 6/6 +
+ + +
+ 100% + Branches + 7/7 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 4/4 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +927x +191x +191x +145x +  +  +  +  + 
const hoistErrorCode = (options) => {
+  const { cause, code, noHoistCode } = options
+  if (code === undefined && noHoistCode !== true) {
+    options.code = cause?.code
+  }
+}
+ 
+export { hoistErrorCode }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/index.html b/qa/coverage/src/lib/index.html new file mode 100644 index 0000000..63ac445 --- /dev/null +++ b/qa/coverage/src/lib/index.html @@ -0,0 +1,266 @@ + + + + + + Code coverage report for src/lib + + + + + + + + + +
+
+

All files src/lib

+
+ +
+ 100% + Statements + 98/98 +
+ + +
+ 88.23% + Branches + 45/51 +
+ + +
+ 100% + Functions + 12/12 +
+ + +
+ 100% + Lines + 68/68 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
connection-codes.mjs +
+
100%1/1100%0/0100%0/0100%1/1
describe-directory.mjs +
+
100%3/3100%2/2100%1/1100%1/1
describe-file.mjs +
+
100%12/1281.81%9/11100%1/1100%10/10
generate-auth-message.mjs +
+
100%9/9100%1/1100%1/1100%6/6
generate-constraint-message.mjs +
+
100%26/26100%7/7100%1/1100%18/18
generate-external-service-message.mjs +
+
100%8/8100%3/3100%1/1100%6/6
generate-io-error-message.mjs +
+
100%13/1375%6/8100%1/1100%8/8
generate-no-access-message.mjs +
+
100%7/7100%4/4100%1/1100%5/5
generate-not-found-message.mjs +
+
100%5/5100%2/2100%1/1100%3/3
hoist-error-code.mjs +
+
100%6/6100%7/7100%1/1100%4/4
valid-error-names.mjs +
+
100%8/866.66%4/6100%3/3100%6/6
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/lib/valid-error-names.mjs.html b/qa/coverage/src/lib/valid-error-names.mjs.html new file mode 100644 index 0000000..68d9f62 --- /dev/null +++ b/qa/coverage/src/lib/valid-error-names.mjs.html @@ -0,0 +1,145 @@ + + + + + + Code coverage report for src/lib/valid-error-names.mjs + + + + + + + + + +
+
+

All files / src/lib valid-error-names.mjs

+
+ +
+ 100% + Statements + 8/8 +
+ + +
+ 66.66% + Branches + 4/6 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 6/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +212x +  +1x +  +  +  +  +  +  +  +  +39x +  +1x +33x +  +33x +  +  +  + 
import * as exports from '../index'
+ 
+const nonErrorExports = [
+  'commonErrorSettings',
+  'maskNoAccessErrors',
+  'mapErrorToHttpStatus',
+  'mapHttpStatusToName',
+  'registerParent',
+  'wrapError',
+]
+ 
+const exportedErrors = Object.keys(exports).filter((name) => !nonErrorExports.includes(name))
+ 
+const validErrorNames = exportedErrors.reduce((acc, errorName) => {
+  acc[errorName] = true
+ 
+  return acc
+}, {})
+ 
+export { validErrorNames }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/local-rollback-error.mjs.html b/qa/coverage/src/local-rollback-error.mjs.html new file mode 100644 index 0000000..bf3ef22 --- /dev/null +++ b/qa/coverage/src/local-rollback-error.mjs.html @@ -0,0 +1,208 @@ + + + + + + Code coverage report for src/local-rollback-error.mjs + + + + + + + + + +
+
+

All files / src local-rollback-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 81.81% + Branches + 9/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42  +3x +87x +  +3x +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError RollbackError */ // used in docs
+import { DatabaseError } from './database-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'LocalRollbackError'
+ 
+/**
+ * An {@link DatabaseError} sub-type relating to a failed rollback within a database. Use {@link RollbackError} on the
+ * client side to indicate a failed rollback in an external data service.
+ */
+const LocalRollbackError = class extends DatabaseError {
+  /**
+   * {@link LocalRollbackError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.action = undefined] - A description of the action being taken. E.g., 'closing',
+   *   'creating', etc.
+   * @param {string} [options.errorType = 'a rollback error'] - A description of the error type.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string} [options.target = 'database'] - The name or description of the target resource.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new LocalRollbackError() // "There an error in the database."
+   * new LocalRollbackError({ action : 'updating' }) // "There was a rollback error updating the database."
+   * new LocalRollbackError({ target : 'customer database' }) // "There was a rollback error in the customer database."
+   * // v "There was a rollback error updating the customer database."
+   * new LocalRollbackError({ action: 'updating', target : 'customer database' })
+   * // v "There was a rollback error in the customer database; virtual socket closed."
+   * new LocalRollbackError({ issue : 'virtual socket closed', target : 'customer database' })
+   */
+  constructor({ name = myName, errorType = 'a rollback error', ...options } = {}) {
+    super({ name, errorType, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(LocalRollbackError).name)
+ 
+LocalRollbackError.typeName = myName
+ 
+export { LocalRollbackError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/local-transaction-error.mjs.html b/qa/coverage/src/local-transaction-error.mjs.html new file mode 100644 index 0000000..b9bff0b --- /dev/null +++ b/qa/coverage/src/local-transaction-error.mjs.html @@ -0,0 +1,211 @@ + + + + + + Code coverage report for src/local-transaction-error.mjs + + + + + + + + + +
+
+

All files / src local-transaction-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 81.81% + Branches + 9/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43  +3x +87x +  +3x +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError TransactionError */ // used in docs
+import { DatabaseError } from './database-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'LocalTransactionError'
+ 
+/**
+ * An {@link DatabaseError} indicating a problem creating or otherwise involving a transaction within a database system
+ * itself. Use {@link TransactionError} for transaction errors related to transactions in an external database service.
+ */
+const LocalTransactionError = class extends DatabaseError {
+  /**
+   * {@link LocalTransactionError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.action = undefined] - A description of the action being taken. E.g., 'closing',
+   *   'creating', etc.
+   * @param {string} [options.errorType = 'an error'] - A description of the error type.
+   * @param {string|undefined} [options.issue = undefined] - Describes the specific issue.
+   * @param {string} [options.target = 'database'] - The name or description of the target resource.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new LocalTransactionError() // "There was a transaction error."
+   * new LocalTransactionError({ action : 'closing' }) // "There was an error closing the transaction."
+   * // v "There was a transaction error on the customer database."
+   * new LocalTransactionError({ target : 'customer database' })
+   * // v "There was an error closing the transaction on the customer database."
+   * new LocalTransactionError({ action: 'creating', target : 'customer database' })
+   * // v "There was a transaction error on the customer database; virtual socket closed."
+   * new LocalTransactionError({ issue : 'virtual socket closed', target : 'customer database' })
+   */
+  constructor({ name = myName, errorType = 'a transaction error', ...options } = {}) {
+    super({ name, errorType, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(LocalTransactionError).name)
+ 
+LocalTransactionError.typeName = myName
+ 
+export { LocalTransactionError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/map-error-to-http-status.mjs.html b/qa/coverage/src/map-error-to-http-status.mjs.html new file mode 100644 index 0000000..91a6c4b --- /dev/null +++ b/qa/coverage/src/map-error-to-http-status.mjs.html @@ -0,0 +1,313 @@ + + + + + + Code coverage report for src/map-error-to-http-status.mjs + + + + + + + + + +
+
+

All files / src map-error-to-http-status.mjs

+
+ +
+ 100% + Statements + 26/26 +
+ + +
+ 100% + Branches + 14/14 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 26/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +7727x +  +27x +  +  +  +  +  +  +  +  +27x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +27x +245x +41x +6x +  +  +41x +  +  +204x +204x +  +1x +  +203x +  +6x +  +197x +1x +  +1x +  +  +  +203x +197x +197x +197x +210x +210x +  +  +197x +  +  +6x +  +  +  +27x +121x +  +  +  + 
const parents = {}
+ 
+const defaultMapping = {
+  CommonError              : 500,
+  AuthError                : 403, // note 401 (Unauthorized) is actually specifically for HTTP authorization and
+  // not a general authorization status
+  ConstraintViolationError : 409,
+  ArgumentInvalidError     : 400,
+  NotFoundError            : 404,
+}
+ 
+const customMapping = {}
+ 
+// There's a bug where the linting really wants shorthand, but the parser can't deal with it. Also, CommonError is
+// defined, we just don't see it when parsing this file on it's own.
+/* eslint-disable jsdoc/check-types, jsdoc/no-undefined-types */
+/**
+ * Used to translate and manage translation of error names to HTTP status codes. You can use this function to add your
+ * own mappings, which may be useful when dealing with non-common error errors.
+ * - To retrieve a status, call `mapErrorToHttpStatus(errorRef)`.
+ * - To add/override a status mapping, call `mapErrorToHttpStatus(errorRef, status)`.
+ * - To bulk add/override status mappings, call `mapErrorToHttpStatus(mappingObject)` where `mappingObject` is an
+ *   `Object<string,true>`.
+ * - To reset the custom mappings to the default mappings, call `mapErrorToHttpStatus()` with no arguments.
+ * @param {string|Error|CommonError.constructor|Object<string,true>} errorRef - The name, instance, or class
+ *   (`instanceof ${linkplain CommonError)`) of the error to either retrieve or set status for, or `Object<
+ *   string,true>` `for bulk add/override of the custom mappings.
+ * @param {number} status - An integer value to map the error to.
+ * @returns {number|undefined} - Returns an integer if retrieving an error to status mapping, otherwise return
+ *   undefined.
+ */
+const mapErrorToHttpStatus = (errorRef, status) => { /* eslint-enable jsdoc/check-types */
+  if (errorRef === undefined) { // reset customMapping to default
+    for (const prop in customMapping) {
+      delete customMapping[prop]
+    }
+ 
+    return
+  }
+ 
+  let name = errorRef // we just leave it if it's a string
+  if (errorRef instanceof Error) {
+    // TODO: we should probably throw an error if there is no 'name' field; we'll want to rework so we can add the underlying Error that gets us here as a 'cause' of the new Error (if any)
+    name = errorRef.name
+  }
+  else if (typeof errorRef === 'function') { // classes are functions
+    // TODO: we should probably throw an error if there is no 'typeName' field; we'll want to rework so we can add the underlying Error that gets us here as a 'cause' of the new Error (if any)
+    name = errorRef.typeName
+  }
+  else if (typeof errorRef === 'object') { // do this here, because if it's an instanceof Error, we skip this
+    Object.assign(customMapping, errorRef) // bulk update customMappings
+ 
+    return
+  }
+ 
+  // it's either a regular retrieve or single value add/override
+  if (status === undefined) { // return customMapping value
+    let status = customMapping[name] || defaultMapping[name]
+    let parentName = parents[name]
+    while (status === undefined && parentName !== undefined) {
+      status = customMapping[parentName] || defaultMapping[parentName]
+      parentName = parents[parentName]
+    }
+ 
+    return status
+  }
+  else { // both errorRef and status are defined, set individual customMapping
+    customMapping[name] = status
+  }
+}
+ 
+const registerParent = (childName, parentName) => {
+  parents[childName] = parentName
+}
+ 
+export { mapErrorToHttpStatus, registerParent }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/map-http-status-to-name.mjs.html b/qa/coverage/src/map-http-status-to-name.mjs.html new file mode 100644 index 0000000..efaf6c1 --- /dev/null +++ b/qa/coverage/src/map-http-status-to-name.mjs.html @@ -0,0 +1,334 @@ + + + + + + Code coverage report for src/map-http-status-to-name.mjs + + + + + + + + + +
+
+

All files / src map-http-status-to-name.mjs

+
+ +
+ 100% + Statements + 11/11 +
+ + +
+ 88.88% + Branches + 8/9 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 11/11 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84  +  +  +27x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +27x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +27x +196x +9x +4x +  +  +187x +1x +  +186x +184x +  +  +2x +  +  +  +  + 
// We considered using something like 'http-status' (https://www.npmjs.com/package/http-status), but it would add a
+// bunch of unnecessary codes. I.e., errors don't need 1xx, 2xx, or 3xx codes since those represent non-error statuses.
+ 
+const defaultMappings = {
+  400 : 'Bad Request',
+  401 : 'Unauthorized',
+  402 : 'Payment Required',
+  403 : 'Forbidden',
+  404 : 'Not Found',
+  405 : 'Method Not Allowed',
+  406 : 'Not Acceptable',
+  407 : 'Proxy Authentication Required',
+  408 : 'Request Timeout',
+  409 : 'Conflict',
+  410 : 'Gone',
+  411 : 'Length Required',
+  412 : 'Precondition Failed',
+  413 : 'Content Too Large',
+  414 : 'URI Too Long',
+  415 : 'Unsupported Media Type',
+  416 : 'Range Not Satisfiable',
+  417 : 'Expectation Failed',
+  418 : '(Unused)',
+  421 : 'Misdirected Request',
+  422 : 'Unprocessable Content',
+  423 : 'Locked',
+  424 : 'Failed Dependency',
+  425 : 'Too Early',
+  426 : 'Upgrade Required',
+  428 : 'Precondition Required',
+  429 : 'Too Many Requests',
+  431 : 'Request Header Fields Too Large',
+  440 : 'Login Time Out', // extended code from IIS
+  444 : 'No Response', // extended code from Nginx
+  451 : 'Unavailable For Legal Reasons',
+  500 : 'Internal Server Error',
+  501 : 'Not Implemented',
+  502 : 'Bad Gateway',
+  503 : 'Service Unavailable',
+  504 : 'Gateway Timeout',
+  505 : 'HTTP Version Not Supported',
+  506 : 'Variant Also Negotiates',
+  507 : 'Insufficient Storage',
+  508 : 'Loop Detected',
+  510 : 'Not Extended', // OBSOLETE
+  511 : 'Network Authentication Required',
+  540 : 'Unknown Error', // extended code from Cloudflair
+}
+ 
+const customMappings = {}
+ 
+/* eslint-disable jsdoc/check-types */
+/**
+ * Used to translate and manage mappings from HTTP status codes to names. Supports all current status defined by the [
+ * IANA](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml), as well as common extensions
+ * returned by IIS, NginX, and Cloudflare.
+ * - To retrieve a status name, call `mapHttpStatusToName(status)` (where `status` is a `string`).
+ * - To add/override a single custom mapping, call `mapHttpStatusToName(status, name)`.
+ * - To bulk add/override custom mappings, call `mapHttpStatusToName(/mappings)` (where `mappings is an `Object`).
+ * - To reset the custom mappings to default, call `mapHttpStatusToName()`.
+ * @param {number|Object<number,string>} status - Either the status to retrieve or set mapping for, or an
+ *   `Object<number,string>` to bulk update mappings.
+ * @param {string} name - The name to map a status onto.
+ * @returns {string|undefined} - The status name, if known.
+ */
+const mapHttpStatusToName = (status, name) => { /* eslint-enable jsdoc/check-types */
+  if (status === undefined) {
+    for (const prop in customMappings) {
+      delete customMappings[prop]
+    }
+  }
+  else if (typeof status === 'object') {
+    Object.assign(customMappings, status)
+  }
+  else if (name === undefined) {
+    return customMappings[status] || defaultMappings[status] || 'Unassigned'
+  }
+  else {
+    customMappings[status] = name
+  }
+}
+ 
+export { mapHttpStatusToName }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/mask-no-access-errors.mjs.html b/qa/coverage/src/mask-no-access-errors.mjs.html new file mode 100644 index 0000000..5adaad2 --- /dev/null +++ b/qa/coverage/src/mask-no-access-errors.mjs.html @@ -0,0 +1,154 @@ + + + + + + Code coverage report for src/mask-no-access-errors.mjs + + + + + + + + + +
+
+

All files / src mask-no-access-errors.mjs

+
+ +
+ 100% + Statements + 8/8 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +243x +3x +3x +3x +  +  +  +  +  +  +  +  +  +  +  +3x +1x +  +1x +1x +  +  +  + 
import { mapErrorToHttpStatus } from './map-error-to-http-status'
+import { NoAccessDirectoryError } from './no-access-directory-error'
+import { NoAccessError } from './no-access-error'
+import { NoAccessFileError } from './no-access-file-error'
+ 
+/**
+ * Remaps {@link NoAccessError}s (and all children) to a 404 (Not Found) status and changes the generated message. This
+ * will effectively remap and custom mappings of {@link NoAccessError} or it's children that may be in place. This  is a
+ * common practice in secure systems where it is undesirable to give attackers any information about a resource they
+ * don't have access to. I.e., if a user tries to access a resource they are not permitted to access, an unmasked {@link
+ * NoAccessError} would divulge the existence of a resource. Note, this does not change the class of the error itself,
+ * so and developers _should_ continue to use {@link NoAccessError}s where the problem is actually access. In
+ * production systems, the [presentation of errors to the users](#presenting-errors-to-users) should not indicate the
+ * underlying type.
+ */
+const maskNoAccessErrors = () => {
+  mapErrorToHttpStatus(NoAccessError, 404)
+  // remove any custom mappings on the children
+  mapErrorToHttpStatus(NoAccessDirectoryError, undefined)
+  mapErrorToHttpStatus(NoAccessFileError, undefined)
+}
+ 
+export { maskNoAccessErrors }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/no-access-directory-error.mjs.html b/qa/coverage/src/no-access-directory-error.mjs.html new file mode 100644 index 0000000..cf6f6d1 --- /dev/null +++ b/qa/coverage/src/no-access-directory-error.mjs.html @@ -0,0 +1,220 @@ + + + + + + Code coverage report for src/no-access-directory-error.mjs + + + + + + + + + +
+
+

All files / src no-access-directory-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 90.9% + Branches + 10/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46  +3x +3x +60x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +8x +4x +  +  +6x +  +  +3x +  +3x +  +  + 
/* globals AuthenticationRequiredError AuthorizationConditionsNotMetError CommonError maskNoAccessErrors NoAccessFileError OperationNotPermittedError */
+import { NoAccessError } from './no-access-error'
+import { describeDirectory } from './lib/describe-directory'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NoAccessDirectoryError'
+ 
+/**
+ * An {@link NoAccessError} indicating a user lacks the rights to access a particular directory. Note, in high security
+ * systems, it is often desirable to tell the user a resource was 'not found', even when the problem is really an
+ * access issue, use and see {@link maskNoAccessErrors} to deal with this situation.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link AuthenticationRequiredError} - Use this when the resource requires authenticated access and the user is not
+ *   currently authenticated.
+ * - {@link AuthorizationConditionsNotMetError} - Use this when the user is authorized to access the directory under
+ *   some conditions.
+ * - {@link NoAccessError}
+ * - {@link NoAccessFileError}
+ * - {@link OperationNotPermittedError}
+ */
+const NoAccessDirectoryError = class extends NoAccessError {
+  /**
+   * {@link NoAccessDirectoryError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.dirPath = undefined] - The directory (not including the file itself) where the
+   *   file is located.
+   * @param {string|undefined} [options.resource = undefined] - Should usually be left undefined. If set, then the
+   *   value will override `dirPath` and be used to generate the standard message if `message` option not set.}
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.resource = options.resource || describeDirectory(options)
+ 
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NoAccessDirectoryError).name)
+ 
+NoAccessDirectoryError.typeName = myName
+ 
+export { NoAccessDirectoryError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/no-access-error.mjs.html b/qa/coverage/src/no-access-error.mjs.html new file mode 100644 index 0000000..a1cdfa4 --- /dev/null +++ b/qa/coverage/src/no-access-error.mjs.html @@ -0,0 +1,235 @@ + + + + + + Code coverage report for src/no-access-error.mjs + + + + + + + + + +
+
+

All files / src no-access-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 100% + Branches + 16/16 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 14/14 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51  +5x +5x +492x +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +36x +18x +18x +18x +14x +18x +  +  +10x +  +  +5x +  +5x +  +  + 
/* globals AuthenticationRequiredError AuthorizationConditionsNotMetError CommonError NoAccessDirectoryError maskNoAccessErrors NoAccessFileError OperationNotPermittedError */ // used in docs
+import { AuthError } from './auth-error'
+import { generateNoAccessMessage } from './lib/generate-no-access-message'
+import { mapErrorToHttpStatus, registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NoAccessError'
+ 
+/**
+ * An {@link AuthError} indicating a user lacks the rights to access a particular resource. This error is most
+ * appropriate when trying to read or write something. If the user is attempting to perform an operation, consider the
+ * {@OperationNotPermittedError}. Note, in high security systems, it is often desirable to tell the user a resource was
+ * 'not found', even when the problem is really an access issue, use and see {@link maskNoAccessErrors} to deal with
+ * this situation.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link AuthenticationRequiredError} - Use this when the resource requires authenticated access and the user is not
+ *   currently authenticated.
+ * - {@link AuthorizationConditionsNotMetError} - Use this when the user is authorized to access the resource under
+ *   some conditions.
+ * - {@link NoAccessDirectoryError}
+ * - {@link NoAccessFileError}
+ * - {@link OperationNotPermittedError}
+ */
+const NoAccessError = class extends AuthError {
+  /**
+   * {@link NoAccessError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.resource = undefined] - A description of the resource attempting to be accessed.
+   * @param {number} [options.status = (404 | 409)] - The HTTP status of the error. Should generally be left undefined
+   *   so as to be automatically determined according to [@link mapErrorToHttpStatus | configured error mapping].
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   */
+  constructor({ name = myName, status, ...options } = {}) {
+    status = status || mapErrorToHttpStatus(myName)
+    options.message = options.message || generateNoAccessMessage({ status, ...options })
+    if (status === 404 && options.code === undefined) {
+      options.code = 'ENOENT'
+    }
+ 
+    super({ name, status, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NoAccessError).name)
+ 
+NoAccessError.typeName = myName
+ 
+export { NoAccessError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/no-access-file-error.mjs.html b/qa/coverage/src/no-access-file-error.mjs.html new file mode 100644 index 0000000..d0f3794 --- /dev/null +++ b/qa/coverage/src/no-access-file-error.mjs.html @@ -0,0 +1,235 @@ + + + + + + Code coverage report for src/no-access-file-error.mjs + + + + + + + + + +
+
+

All files / src no-access-file-error.mjs

+
+ +
+ 100% + Statements + 16/16 +
+ + +
+ 90.9% + Branches + 10/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 11/11 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51  +3x +3x +90x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +6x +6x +  +  +6x +  +  +3x +  +3x +  +  + 
/* globals AuthenticationRequiredError AuthorizationConditionsNotMetError CommonError maskNoAccessErrors NoAccessDirectoryError OperationNotPermittedError */
+import { NoAccessError } from './no-access-error'
+import { describeFile } from './lib/describe-file'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NoAccessFileError'
+ 
+/**
+ * An {@link NoAccessError} indicating a user lacks the rights to access a particular file. Note, in high security
+ * systems, it is often desirable to tell the user a resource was 'not found', even when the problem is really an
+ * access issue, use and see {@link maskNoAccessErrors} to deal with this situation.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link AuthenticationRequiredError} - Use this when the resource requires authenticated access and the user is not
+ *   currently authenticated.
+ * - {@link AuthorizationConditionsNotMetError} - Use this when the user is authorized to access the file under some
+ *   conditions.
+ * - {@link NoAccessDirectoryError}
+ * - {@link NoAccessError}
+ * - {@link OperationNotPermittedError}
+ */
+const NoAccessFileError = class extends NoAccessError {
+  /**
+   * {@link NoAccessFileError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.dirPath = undefined] - The directory (not including the file itself) where the
+   *   file is located.
+   * @param {string|undefined} [options.fileName = undefined] - The name of the file itself. May be a full path (in
+   *   which case `dirPath` should be left undefined) or just the file name, in which case it is combined with
+   *   `dirPath`, if present, to create the standard error message.
+   * @param {string|undefined} [options.resource = undefined] - Should usually be left undefined. If set, then the
+   *   value will override `fileName` and `dirPath` and be used to generate the standard message if `message` option
+   *   not set.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   */
+  constructor({ name = myName, ...options } = {}) {
+    const resource = describeFile(options)
+    options.resource = options.resource || resource
+ 
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NoAccessFileError).name)
+ 
+NoAccessFileError.typeName = myName
+ 
+export { NoAccessFileError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/not-found-error.mjs.html b/qa/coverage/src/not-found-error.mjs.html new file mode 100644 index 0000000..a6e35a1 --- /dev/null +++ b/qa/coverage/src/not-found-error.mjs.html @@ -0,0 +1,196 @@ + + + + + + Code coverage report for src/not-found-error.mjs + + + + + + + + + +
+
+

All files / src not-found-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 100% + Branches + 13/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38  +5x +5x +174x +  +5x +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +22x +11x +  +10x +  +  +5x +  +5x +  +  + 
/* globals DirectoryNotFoundError FileNotFoundError */ // used in docs
+import { CommonError } from './common-error'
+import { generateNotFoundMessage } from './lib/generate-not-found-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NotFoundError'
+ 
+/**
+ * An error indicating a resource or entity cannot be found. This error is used with local and remote resources/entities
+ * where the fundamental issue is the named thing not being present.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link DirectoryNotFoundError}
+ * - {@link FileNotFoundError}
+ */
+const NotFoundError = class extends CommonError {
+  /**
+   * {@link NotFoundError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.resource = undefined] - The name or short description of the missing resource.
+   * @param {string} [options.code = 'ENOENT'] - The code to use with the error. Should generally be left to the
+   *   default.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   */
+  constructor({ name = myName, code = 'ENOENT', ...options } = {}) {
+    options.message = options.message || generateNotFoundMessage(options)
+    super({ name, code, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NotFoundError).name)
+ 
+NotFoundError.typeName = myName
+ 
+export { NotFoundError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/not-implemented-error.mjs.html b/qa/coverage/src/not-implemented-error.mjs.html new file mode 100644 index 0000000..49d672f --- /dev/null +++ b/qa/coverage/src/not-implemented-error.mjs.html @@ -0,0 +1,232 @@ + + + + + + Code coverage report for src/not-implemented-error.mjs + + + + + + + + + +
+
+

All files / src not-implemented-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 13/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50  +3x +48x +  +3x +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +6x +3x +  +6x +  +  +3x +  +3x +  +3x +2x +1x +  +  +1x +  +  +  +  + 
/* global NotSupportedError UnavailableError */ // used in docs
+import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NotImplementedError'
+ 
+/**
+ * An error indicating the requested operation is not currently implemented.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link NotSupportedError} - Use this when the target is implemented, but does not support some feature or
+ *   condition captured in the request.
+ * - {@link UnavailableError} - Use this when a resource exists, but is temporarily unavailable for some reason.
+ */
+const NotImplementedError = class extends CommonError {
+  /**
+   * {@link NotImplementedError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.target = undefined] - The name of the function, endpoint, service, etc. which
+   *   the user is trying to invoke.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new NotImplementedError() // "Action not currently implemented."
+   * new NotImplementedError({ target: '/some/url/endpoint'}) // "'/some/url/endpoint' is not currently implemented."
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NotImplementedError).name)
+ 
+NotImplementedError.typeName = myName
+ 
+const generateMessage = ({ target }) => {
+  if (target === undefined) {
+    return 'Action not currently implemented.'
+  }
+  else {
+    return `'${target}' is not currently implemented.`
+  }
+}
+ 
+export { NotImplementedError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/not-supported-error.mjs.html b/qa/coverage/src/not-supported-error.mjs.html new file mode 100644 index 0000000..cfed6e3 --- /dev/null +++ b/qa/coverage/src/not-supported-error.mjs.html @@ -0,0 +1,274 @@ + + + + + + Code coverage report for src/not-supported-error.mjs + + + + + + + + + +
+
+

All files / src not-supported-error.mjs

+
+ +
+ 100% + Statements + 24/24 +
+ + +
+ 93.75% + Branches + 15/16 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 16/16 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64  +3x +78x +  +3x +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +5x +  +6x +  +  +3x +  +3x +  +4x +4x +4x +4x +4x +1x +  +  +4x +  +  +  + 
/* global NotImplementedError UnavailableError */ // used in docs
+import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'NotSupportedError'
+ 
+/**
+ * An error indicating that the resource exists, but does not support some aspect of the request as is. This is most
+ * typically used when implementing a specification, but where some feature of the specification is not implemented.
+ * E.g., let's say a specification says requests can use JSON or YAML, but we only implement JSON support. If we get a
+ * request with a YAML payload, we could throw a `NotSUpportedError`.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link NotImplementedError} - Use this when the target is not implemented at all.
+ * - {@link UnavailableError} - Use this when the target is implemented, but temporarily unavailable for some reason.
+ */
+const NotSupportedError = class extends CommonError {
+  /**
+   * {@link NotSupportedError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.issue = undefined] - A short description of the thing which is not supported.
+   *   E.g., 'YAML request payloads' or 'asynchronous execution'.
+   * @param {string|undefined} [options.hint = undefined] - A short hint to the user as to how they might resolve or
+   *   workaround the issue. This should be a complete sentence. E.g., 'Encode request in JSON.' or 'Try synchronous
+   *   execution.'
+   * @param {string|undefined} [options.target = undefined] - The name of the function, endpoint, service, etc. which
+   *   the user is trying to invoke. E.g., '/some/url/endpoint' or 'myFunction()'
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new NotSupportedError() // "The target does not currently support a requested feature."
+   * // v "'/some/endpoint' does not currently support a requested feature."
+   * new NotSupportedError({ target: '/some/endpoint'})
+   * // v "'myFunc()' does not currently support RFC 3339 style dates."
+   * new NotSupportedError({ target: 'myFunc()', issue: 'RFC 3339 style dates' })
+   * // v "The target does not currently support YAML payloads. Send request in JSON."
+   * new NotSupportedError({ issue: 'YAML payloads', hint : 'Send request in JSON.' })
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(NotSupportedError).name)
+ 
+NotSupportedError.typeName = myName
+ 
+const generateMessage = ({ hint, issue, target }) => {
+  let message = target === undefined ? 'The target ' : `'${target}' `
+  message += 'does not currently support '
+  message += issue === undefined ? 'a requested feature.' : `${issue}.`
+  if (hint !== undefined) {
+    message += ' ' + hint
+  }
+ 
+  return message
+}
+ 
+export { NotSupportedError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/operation-not-permitted-error.mjs.html b/qa/coverage/src/operation-not-permitted-error.mjs.html new file mode 100644 index 0000000..dd9eadf --- /dev/null +++ b/qa/coverage/src/operation-not-permitted-error.mjs.html @@ -0,0 +1,235 @@ + + + + + + Code coverage report for src/operation-not-permitted-error.mjs + + + + + + + + + +
+
+

All files / src operation-not-permitted-error.mjs

+
+ +
+ 100% + Statements + 19/19 +
+ + +
+ 92.85% + Branches + 13/14 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 11/11 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51  +3x +81x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +12x +6x +1x +6x +  +6x +  +  +3x +  +3x +  +  + 
/* global AuthenticationError AuthorizationConditionsNotMetError BadCredentialsError AuthorizationConditionsNotMetError CommonError NoAccessError */ // used in docs
+import { AuthError } from './auth-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'OperationNotPermittedError'
+ 
+/**
+ * An {@link AuthError} indicating the user lacks authorization to perform some operation. This is most appropriate
+ * when the user is trying to _do_ something. If the user is attempting to "access" a resource, the {@link
+ * NoAccessError} or it's children may be better suited. Consider whether any of the following errors might be more
+ * precise or better suited:
+ * - {@link AuthenticationError}
+ * - {@link AuthorizationConditionsNotMetError} - Use this when the user is authorized to perform the operation under
+ *   some conditions.
+ * - {@link BadCredentialsError}
+ * - {@link AuthorizationConditionsNotMetError}
+ * - {@link NoAccessError}
+ */
+const OperationNotPermittedError = class extends AuthError {
+  /**
+   * {@link OperationNotPermittedError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.action = 'action'] - A short description of the action.
+   * @param {string|undefined} [options.target = undefined] - The name or short description of the target.
+   * @param {string} [options.issue = 'is not permitted'] - The auth issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new OperationNotPermittedError() // "Action is not permitted."
+   * new OperationNotPermittedError({ action = 'database update' }) // "Database update is not permitted."
+   * // v "Accessing the customer database is not permitted."
+   * new OperationNotPermittedError({ target = 'customer database' })
+   * // v "Updating the customer database is not permitted."
+   * new OperationNotPermittedError({ action = 'updating', target = 'customer database '})
+   * new OperationNotPermittedError({ issue = 'is not authorized' }) // Action is not authorized.
+   */
+  constructor({ name = myName, action, issue = 'is not permitted', target, ...options } = {}) {
+    if (action === undefined && target !== undefined) {
+      action = 'accessing'
+    }
+    super({ name, action, issue, target, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(OperationNotPermittedError).name)
+ 
+OperationNotPermittedError.typeName = myName
+ 
+export { OperationNotPermittedError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/rollback-error.mjs.html b/qa/coverage/src/rollback-error.mjs.html new file mode 100644 index 0000000..44aea3a --- /dev/null +++ b/qa/coverage/src/rollback-error.mjs.html @@ -0,0 +1,226 @@ + + + + + + Code coverage report for src/rollback-error.mjs + + + + + + + + + +
+
+

All files / src rollback-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48  +3x +3x +117x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +5x +  +6x +  +  +3x +  +3x +  +  + 
/* global CommonError ConnectionError ConstraintViolationError LocalRollbackError TransactionError UniqueConstraintViolationError */ // used in documentation
+import { DataServiceError } from './data-service-error'
+import { generateExternalServiceMessage } from './lib/generate-external-service-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'RollbackError'
+ 
+/**
+ * A {@link DataServiceError} relating to a failed rollback attempt on an external data service. Use {@link
+ * LocalRollbackError} within a database implementation itself.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ConnectionError}
+ * - {@link ConstraintViolationError}
+ * - {@link DataServiceError}
+ * - {@link LocalRollbackError}
+ * - {@link TransactionError}
+ * - {@link UniqueConstraintViolationError}
+ */
+const RollbackError = class extends DataServiceError {
+  /**
+   * {@link RollbackError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.service = 'data'] - The name or short description of the service.
+   * @param {string|undefined} [options.issue = undefined] - A description of the issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new RollbackError() // There was a rollback error with the remote data service.
+   * new RollbackError({ service : 'database' }) // There was a rollback error with the remote database service.
+   * // v "There was a rollback error with the remote data service; service is not responding."
+   * new RollbackError({ issue : 'is not responding' })
+   * // v "There was a rollback error with the database remote data service; service is not rot responding."
+   * new RollbackError({ service : 'database', issue : 'is not responding' })
+   */
+  constructor({ name = myName, service = 'data', ...options } = {}) {
+    options.message = options.message || generateExternalServiceMessage('a rollback', { service, ...options })
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(RollbackError).name)
+ 
+RollbackError.typeName = myName
+ 
+export { RollbackError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/system-error.mjs.html b/qa/coverage/src/system-error.mjs.html new file mode 100644 index 0000000..dc505c9 --- /dev/null +++ b/qa/coverage/src/system-error.mjs.html @@ -0,0 +1,199 @@ + + + + + + Code coverage report for src/system-error.mjs + + + + + + + + + +
+
+

All files / src system-error.mjs

+
+ +
+ 100% + Statements + 18/18 +
+ + +
+ 76.92% + Branches + 10/13 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +393x +66x +  +3x +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +8x +4x +  +6x +  +  +3x +  +3x +  +4x +  +  +  + 
import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'SystemError'
+ 
+/**
+ * An error indicating a system error. When used to wrap native system errors (like `ReferenceError`, `SyntaxError`, etc.), be sure to set the `cause` option.
+ */
+const SystemError = class extends CommonError {
+  /**
+   * {@link SystemError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.resource = undefined] - The name or short description of the resource which has
+   *   run out of memory.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new SystemError() // "The process has experienced a System."
+   * // v "The application has experienced a stack overflow."
+   * new SystemError({ resource: 'application'})
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(SystemError).name)
+ 
+SystemError.typeName = myName
+ 
+const generateMessage = ({ resource = 'process' }) =>
+  `The ${resource} has experienced a system error.`
+ 
+export { SystemError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/timeout-error.mjs.html b/qa/coverage/src/timeout-error.mjs.html new file mode 100644 index 0000000..25846e9 --- /dev/null +++ b/qa/coverage/src/timeout-error.mjs.html @@ -0,0 +1,190 @@ + + + + + + Code coverage report for src/timeout-error.mjs + + + + + + + + + +
+
+

All files / src timeout-error.mjs

+
+ +
+ 100% + Statements + 18/18 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +363x +48x +  +3x +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +6x +3x +  +6x +  +  +3x +  +3x +  +3x +  +  +  + 
import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'TimeoutError'
+ 
+/**
+ * Indicates an operation is taking too much time.
+ */
+const TimeoutError = class extends CommonError {
+  /**
+   * {@link TimeoutError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.resource = undefined] - The name or short description of the thing which is
+   *   timing out.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * // new TimeoutError() // "The process has timed out."
+   * // new TimeoutError({ resource : 'user session' }) // "The user session has timed out."
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(TimeoutError).name)
+ 
+TimeoutError.typeName = myName
+ 
+const generateMessage = ({ resource = 'process' }) =>
+  `The ${resource} has timed out.`
+ 
+export { TimeoutError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/transaction-error.mjs.html b/qa/coverage/src/transaction-error.mjs.html new file mode 100644 index 0000000..ecb3683 --- /dev/null +++ b/qa/coverage/src/transaction-error.mjs.html @@ -0,0 +1,226 @@ + + + + + + Code coverage report for src/transaction-error.mjs + + + + + + + + + +
+
+

All files / src transaction-error.mjs

+
+ +
+ 100% + Statements + 17/17 +
+ + +
+ 92.3% + Branches + 12/13 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48  +3x +3x +117x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +5x +  +6x +  +  +3x +  +3x +  +  + 
/* global CommonError ConnectionError ConstraintViolationError LocalTransactionError RollbackError UniqueConstraintViolationError */ // used in documentation
+import { DataServiceError } from './data-service-error'
+import { generateExternalServiceMessage } from './lib/generate-external-service-message'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'TransactionError'
+ 
+/**
+ * A {@link DataServiceError} sub-type indicating a problem with creating or working with a transaction. Note, this
+ * error is specifically for problems arising with an external data service; use {@link LocalTransactionError} for
+ * error or otherwise involving a transaction within a database system itself.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link ConnectionError}
+ * - {@link ConstraintViolationError}
+ * - {@link DataServiceError}
+ * - {@link RollbackError}
+ * - {@link UniqueConstraintViolationError}
+ */
+const TransactionError = class extends DataServiceError {
+  /**
+   * {@link TransactionError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string|undefined} [options.service = undefined] - The name or short description of the service.
+   * @param {string|undefined} [options.issue = undefined] - A description of the issue.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new TransactionError() // There was a transaction error with the remote data service.
+   * new TransactionError({ service : 'database' }) // There was a transaction error with the remote database service.
+   * // v "There was a transaction error with the remote data service; service is not responding."
+   * new TransactionError({ issue : 'is not responding' })
+   * // v "There was a transaction error with the remote database service; service is not responding."
+   * new TransactionError({ service : 'database', issue : 'is not responding' })
+   */
+  constructor({ name = myName, service = 'data', ...options } = {}) {
+    options.message = options.message || generateExternalServiceMessage('a transaction', { service, ...options })
+    super({ name, service, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(TransactionError).name)
+ 
+TransactionError.typeName = myName
+ 
+export { TransactionError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/unavailable-error.mjs.html b/qa/coverage/src/unavailable-error.mjs.html new file mode 100644 index 0000000..e01c443 --- /dev/null +++ b/qa/coverage/src/unavailable-error.mjs.html @@ -0,0 +1,247 @@ + + + + + + Code coverage report for src/unavailable-error.mjs + + + + + + + + + +
+
+

All files / src unavailable-error.mjs

+
+ +
+ 100% + Statements + 24/24 +
+ + +
+ 89.47% + Branches + 17/19 +
+ + +
+ 100% + Functions + 4/4 +
+ + +
+ 100% + Lines + 14/14 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55  +3x +107x +  +3x +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +14x +7x +  +6x +  +  +3x +  +3x +  +7x +7x +7x +7x +  +7x +  +  +  + 
/* global NotImplementedError NotSupportedError */ // used in docs
+import { CommonError } from './common-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'UnavailableError'
+ 
+/**
+ * An error indicating that the resource exists, but is not currently available. This represents a temporary condition.
+ *
+ * Consider whether any of the following errors might be more precise or better suited:
+ * - {@link NotImplementedError} - Use this when the target is not implemented at all.
+ * - {@link NotSupportedError} - Use this when the target is implemented, but doesn't support some requested feature.
+ */
+const UnavailableError = class extends CommonError {
+  /**
+   * {@link UnavailableError} constructor.
+   *
+   * See the [common parameters](#common-parameters) note for additional parameters.
+   * @param {object} [options = undefined] - The constructor options.
+   * @param {string} [options.expectedTime = {}] - A short description as to when the resource might be
+   *   available. E.g., 'after 1400' or 'in two hours'.
+   * @param {string} [options.issue = 'currently unavailable'] -
+   * @param {string} [options.target = 'target resource'] - The name of the function, endpoint, service, etc. which the
+   *   user is trying to invoke. E.g., '/some/url/endpoint' or 'myFunction()'
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new UnavailableError() // "Target resource is currently unavailable.
+   * new UnavailableError({ target: '/some/endpoint'}) // "/some/endpoint is not currently available."
+   * // v "Customer DB is offline for maintenance."
+   * new UnavailableError({ target: 'customer DB', issue: 'offline for maintenance' })
+   * // v "/some/endpoint is not currently available; try again after 12:00 Saturday.'
+   * new UnavailableError({ target: '/some/endpoint', expectedTime: 'after 12:00 Saturday' })
+   */
+  constructor({ name = myName, ...options } = {}) {
+    options.message = options.message || generateMessage(options)
+    super({ name, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(UnavailableError).name)
+ 
+UnavailableError.typeName = myName
+ 
+const generateMessage = ({ expectedTime, issue = 'currently unavailable', target = 'target resource' }) => {
+  let message = target === undefined ? 'The target ' : `${target.charAt(0).toUpperCase() + target.slice(1)} `
+  message += `is ${issue}`
+  message += expectedTime === undefined ? '.' : `; try again ${expectedTime}.`
+ 
+  return message
+}
+ 
+export { UnavailableError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/unique-constraint-violation-error.mjs.html b/qa/coverage/src/unique-constraint-violation-error.mjs.html new file mode 100644 index 0000000..e38f6a5 --- /dev/null +++ b/qa/coverage/src/unique-constraint-violation-error.mjs.html @@ -0,0 +1,199 @@ + + + + + + Code coverage report for src/unique-constraint-violation-error.mjs + + + + + + + + + +
+
+

All files / src unique-constraint-violation-error.mjs

+
+ +
+ 100% + Statements + 15/15 +
+ + +
+ 81.81% + Branches + 9/11 +
+ + +
+ 100% + Functions + 3/3 +
+ + +
+ 100% + Lines + 8/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39  +3x +115x +  +3x +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +16x +  +6x +  +  +3x +  +3x +  +  + 
/* globals CommonError */
+import { ConstraintViolationError } from './constraint-violation-error'
+import { registerParent } from './map-error-to-http-status'
+ 
+const myName = 'UniqueConstraintViolationError'
+ 
+/**
+ * A {@link ConstraintViolationError} sub-type indicating violation of a unique constraint, such as login ID.
+ */
+const UniqueConstraintViolationError = class extends ConstraintViolationError {
+  /**
+   * {@link UniqueConstraintViolationError} constructor.
+   * @param {object} [options = {}] - Constructor options.
+   * @param {string} [options.constraintType = 'unique constraint'] - The constraint type.
+   * @param {string|undefined} [options.entityType = undefined] - The "type" of entity (e.g., 'user'; optional).
+   * @param {string[]|Array.<Array.string>} [options.fieldAndValues = []] - An array of either field names and/or
+   *   arrays of field name + field value (optional). You may mix and match, e.g., `['field1', ['field2', 'value2']`.
+   * @param {string} options.name - @hidden Used internally to set the name; falls through to {@link CommonError}
+   *   constructor.`
+   * @param {object} [options.options = {}] - @hidden The remainder of the options to to pass to super-constructor.
+   * @example
+   * new UniqueConstraintViolationError() // "Unique constraint violated."
+   * new UniqueConstraintViolationError({ entityType : 'user' }) // "Unique constraint on entity type 'user' violated."
+   * // v "Unique constraint on fields <email>."
+   * new UniqueConstraintViolationError({ entityType : 'user', fieldAndValues : ['email'] })
+   * // v "Unique constraint on fields <email(john@foo.com)> on entity type 'user' violated."
+   * new UniqueConstraintViolationError({ entityType : 'user', fieldAndValues : [['email', 'john@foo.com']] })
+   */
+  constructor({ name = myName, constraintType = 'unique', ...options } = {}) {
+    super({ name, constraintType, ...options })
+  }
+}
+ 
+registerParent(myName, Object.getPrototypeOf(UniqueConstraintViolationError).name)
+ 
+UniqueConstraintViolationError.typeName = myName
+ 
+export { UniqueConstraintViolationError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/coverage/src/wrap-error.mjs.html b/qa/coverage/src/wrap-error.mjs.html new file mode 100644 index 0000000..a1c7fcf --- /dev/null +++ b/qa/coverage/src/wrap-error.mjs.html @@ -0,0 +1,355 @@ + + + + + + Code coverage report for src/wrap-error.mjs + + + + + + + + + +
+
+

All files / src wrap-error.mjs

+
+ +
+ 100% + Statements + 36/36 +
+ + +
+ 100% + Branches + 38/38 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 34/34 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +913x +3x +3x +3x +3x +3x +3x +3x +3x +210x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +27x +27x +  +27x +27x +6x +  +  +21x +  +21x +  +9x +  +12x +2x +  +10x +1x +  +9x +1x +  +1x +  +8x +1x +  +1x +  +7x +1x +  +1x +  +6x +4x +  +  +2x +  +  +  +  + 
import { ArgumentInvalidError } from './argument-invalid-error'
+import { ArgumentOutOfRangeError } from './argument-out-of-range-error'
+import { ArgumentTypeError } from './argument-type-error'
+import { CommonError } from './common-error'
+import { ConnectionError } from './connection-error'
+import { NoAccessError } from './no-access-error'
+import { NotFoundError } from './not-found-error'
+import { SystemError } from './system-error'
+import { commonErrorSettings } from './common-error-settings'
+import { connectionCodes } from './lib/connection-codes'
+ 
+/**
+ * Wraps an `Error` in a {@link CommonError}. The `error` parameter will be set as the `cause` field of the new
+ * `CommonError` instance (unless `cause` is specifically set in the `options`).
+ *
+ * The wrapping logic is as follows:
+ * - If the `noInstanceHidingOnWrap` is `true` and the `error` class is anything but `Error`
+ *   (`error.name !== 'Error'`), then results in the original error.
+ * - If the `error` `code` indicates a connection error, results in a {@link ConnectionError}.
+ * - If the `error` `code` is 'EACCESS' or 'EPERM', results in a {@link NoAccessError}.
+ * - If the `error` `code` is 'ENOENT', results in a {@link NotFoundError}.
+ * - If the `error` is an instance of `URIError` and the `wrapUserErrorType` option is `undefined`, results in a
+ *   {@ArgumentInvalidError}.
+ * - If the `error` is an instance of `RangeError` and the `wrapUserErrorType` option is `undefined`, results in a
+ *   {@link ArgumentOutOfRangeError}.
+ * - If the `error` is an instance of `TypeError` and the `wrapUserErrorType` option is `undefined`, results in a
+ *   {@link ArgumentTypeError}.
+ * - If the `error` in an instance of `ReferenceError` or `SyntaxError`, results in a {@SystemError}.
+ * - Otherwise, results in a {@link CommonError}.
+ *
+ * Note, there is no special handling for `EvalError` (which [is no longer in
+ * use](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError)) or `CommonError`
+ * (which is
+ * [non-standard](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError)).
+ * @param {Error} error - The `Error` to be wrapped.
+ * @param {object|undefined} options - The options controlling some wrapping and also passed to the wrapping
+ *   `CommonError`constructor.
+ * @param {boolean} options.noInstanceHidingOnWrap - If true, then if the `error` class is anything but `Error`, the
+ *   original `error` will be return as is. If `undefined`, then the logic will refer to the {@link
+ *   commonErrorSettings} `noInstanceHidingOnWrap` option value.
+ * @param {Function} options.wrapUserErrorType - If set, then `URIError`, `RangeError`, and `TypeError` will be wrapped
+ *   in a new error of that `Class`. Otherwise, the logic will refer to the {@link commonErrorSettings}
+ *   `wrapUserErrorType`, which if undefined will result in the appropriate {@ArgumentInvalidError} analog.
+ * @returns {Array.<Error, boolean>} - An array containing either the original `Error` or the new wrapping `CommonError`
+ *   and a boolean indicating whether the `error` was wrapped (`true`) or not (`false`).
+ */
+const wrapError = (error, options = {}) => {
+  const { code } = error
+ 
+  const noInstanceHidingOnWrap = options.noInstanceHidingOnWrap || commonErrorSettings('noInstanceHidingOnWrap')
+  if (noInstanceHidingOnWrap === true && error.name !== 'Error') {
+    return [error, false]
+  }
+ 
+  const wrapUserErrorType = options.wrapUserErrorType || commonErrorSettings('wrapUserErrorType')
+ 
+  if (code in connectionCodes) {
+    // cause and code come first in case the user wants to override them in the options
+    return [new ConnectionError({ cause : error, code, ...options }), true]
+  }
+  else if (code === 'EACCESS' || code === 'EPERM') {
+    return [new NoAccessError({ cause : error, code, ...options }), true]
+  }
+  else if (code === 'ENOENT') {
+    return [new NotFoundError({ cause : error, code, ...options }), true]
+  }
+  else if (error instanceof URIError) {
+    const WrapType = wrapUserErrorType || ArgumentInvalidError
+ 
+    return [new WrapType({ cause : error, code, ...options }), true]
+  }
+  else if (error instanceof RangeError) {
+    const WrapType = wrapUserErrorType || ArgumentOutOfRangeError
+ 
+    return [new WrapType({ cause : error, code, ...options }), true]
+  }
+  else if (error instanceof TypeError) {
+    const WrapType = wrapUserErrorType || ArgumentTypeError
+ 
+    return [new WrapType({ cause : error, code, ...options }), true]
+  }
+  else if (error instanceof ReferenceError || error instanceof SyntaxError) {
+    return [new SystemError({ cause : error, code, ...options }), true]
+  }
+  else {
+    return [new CommonError({ cause : error, code, ...options }), true]
+  }
+}
+ 
+export { wrapError }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/qa/lint.txt b/qa/lint.txt new file mode 100644 index 0000000..74ef74c --- /dev/null +++ b/qa/lint.txt @@ -0,0 +1 @@ +Test git rev: 3d048c9bd92291ba05086c8f98167261fe3a6d22 diff --git a/qa/unit-test.txt b/qa/unit-test.txt new file mode 100644 index 0000000..99e3faf --- /dev/null +++ b/qa/unit-test.txt @@ -0,0 +1,90 @@ +Test git rev: 3d048c9bd92291ba05086c8f98167261fe3a6d22 +PASS test/argument-invalid-error.test.js +PASS test/all-errors-exported.test.js +PASS test/map-error-to-http-status.test.js +PASS test/wrap-error.test.js +PASS test/unique-constraint-violation.test.js +PASS test/mask-no-access-errors.test.js +PASS test/argument-out-of-range-error.test.js +PASS test/argument-type-error.test.js +PASS test/local-transaction-error.test.js +PASS test/unavailable-error.test.js +PASS test/rollback-error.test.js +PASS test/transaction-error.test.js +PASS test/operation-not-permitted.test.js +PASS test/local-rollback-error.test.js +PASS test/file-load-error.test.js +PASS test/end-of-stream-error.test.js +PASS test/authentication-required-error.test.js +PASS test/not-implemented-error.test.js +PASS test/no-access-error.test.js +PASS test/map-http-status-to-name.test.js +PASS test/data-service-error.test.js +PASS test/common-error-settings.test.js +PASS test/authorization-conditions-not-met.test.js +PASS test/argument-missing-error.test.js +PASS test/timeout-error.test.js +PASS test/not-supported-error.test.js +PASS test/file-not-found-error.test.js +---------------------------------------------|---------|----------|---------|---------|------------------- +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +---------------------------------------------|---------|----------|---------|---------|------------------- +All files | 100 | 90.36 | 100 | 100 | + src | 100 | 90.56 | 100 | 100 | + argument-invalid-error.mjs | 100 | 96.29 | 100 | 100 | 72 + argument-missing-error.mjs | 100 | 90.9 | 100 | 100 | 43 + argument-out-of-range-error.mjs | 100 | 88.88 | 100 | 100 | 49-61 + argument-type-error.mjs | 100 | 93.33 | 100 | 100 | 43 + auth-error.mjs | 100 | 86.66 | 100 | 100 | 28 + authentication-required-error.mjs | 100 | 92.3 | 100 | 100 | 27 + authorization-conditions-not-met-error.mjs | 100 | 93.33 | 100 | 100 | 46 + common-error-settings.mjs | 100 | 100 | 100 | 100 | + common-error.mjs | 100 | 84.61 | 100 | 100 | 3,38 + connection-error.mjs | 100 | 75 | 100 | 100 | 37,49-51 + constraint-violation-error.mjs | 100 | 80 | 100 | 100 | 33 + data-service-error.mjs | 100 | 100 | 100 | 100 | + database-error.mjs | 100 | 83.33 | 100 | 100 | 34 + directory-not-found-error.mjs | 100 | 92.3 | 100 | 100 | 33 + end-of-stream-error.mjs | 100 | 92.3 | 100 | 100 | 34 + external-service-error.mjs | 100 | 76.92 | 100 | 100 | 35-36 + file-load-error.mjs | 100 | 93.33 | 100 | 100 | 40 + file-not-found-error.mjs | 100 | 92.3 | 100 | 100 | 40 + io-error.mjs | 100 | 72.72 | 100 | 100 | 35-36 + local-rollback-error.mjs | 100 | 81.81 | 100 | 100 | 32 + local-transaction-error.mjs | 100 | 81.81 | 100 | 100 | 33 + map-error-to-http-status.mjs | 100 | 100 | 100 | 100 | + map-http-status-to-name.mjs | 100 | 88.88 | 100 | 100 | 76 + mask-no-access-errors.mjs | 100 | 100 | 100 | 100 | + no-access-directory-error.mjs | 100 | 90.9 | 100 | 100 | 34 + no-access-error.mjs | 100 | 100 | 100 | 100 | + no-access-file-error.mjs | 100 | 90.9 | 100 | 100 | 38 + not-found-error.mjs | 100 | 100 | 100 | 100 | + not-implemented-error.mjs | 100 | 92.3 | 100 | 100 | 30 + not-supported-error.mjs | 100 | 93.75 | 100 | 100 | 42 + operation-not-permitted-error.mjs | 100 | 92.85 | 100 | 100 | 38 + rollback-error.mjs | 100 | 92.3 | 100 | 100 | 37 + system-error.mjs | 100 | 76.92 | 100 | 100 | 25,35 + timeout-error.mjs | 100 | 92.3 | 100 | 100 | 22 + transaction-error.mjs | 100 | 92.3 | 100 | 100 | 37 + unavailable-error.mjs | 100 | 89.47 | 100 | 100 | 36,47 + unique-constraint-violation-error.mjs | 100 | 81.81 | 100 | 100 | 29 + wrap-error.mjs | 100 | 100 | 100 | 100 | + src/lib | 100 | 88.23 | 100 | 100 | + connection-codes.mjs | 100 | 100 | 100 | 100 | + describe-directory.mjs | 100 | 100 | 100 | 100 | + describe-file.mjs | 100 | 81.81 | 100 | 100 | 6-7 + generate-auth-message.mjs | 100 | 100 | 100 | 100 | + generate-constraint-message.mjs | 100 | 100 | 100 | 100 | + generate-external-service-message.mjs | 100 | 100 | 100 | 100 | + generate-io-error-message.mjs | 100 | 75 | 100 | 100 | 1 + generate-no-access-message.mjs | 100 | 100 | 100 | 100 | + generate-not-found-message.mjs | 100 | 100 | 100 | 100 | + hoist-error-code.mjs | 100 | 100 | 100 | 100 | + valid-error-names.mjs | 100 | 66.66 | 100 | 100 | 1 +---------------------------------------------|---------|----------|---------|---------|------------------- + +Test Suites: 27 passed, 27 total +Tests: 224 passed, 224 total +Snapshots: 0 total +Time: 0.834 s, estimated 1 s +Ran all test suites.