@openmrs/esm-error-handling 5.0.3-pre.826 → 5.0.3-pre.829
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
[35m@openmrs/esm-error-handling:build[0m: cache hit, replaying output [
|
|
2
|
-
[35m@openmrs/esm-error-handling:build: [0masset [1m[32mopenmrs-esm-error-handling.js[39m[22m 1.
|
|
1
|
+
[35m@openmrs/esm-error-handling:build[0m: cache hit, replaying output [2m0dd6c751c9188dbd[0m
|
|
2
|
+
[35m@openmrs/esm-error-handling:build: [0masset [1m[32mopenmrs-esm-error-handling.js[39m[22m 1.87 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (name: main) 1 related asset
|
|
3
3
|
[35m@openmrs/esm-error-handling:build: [0mruntime modules 670 bytes 3 modules
|
|
4
|
-
[35m@openmrs/esm-error-handling:build: [0mbuilt modules
|
|
5
|
-
[35m@openmrs/esm-error-handling:build: [0m [1m./src/index.ts[39m[22m
|
|
4
|
+
[35m@openmrs/esm-error-handling:build: [0mbuilt modules 2.08 KiB [1m[33m[built][39m[22m
|
|
5
|
+
[35m@openmrs/esm-error-handling:build: [0m [1m./src/index.ts[39m[22m 2.04 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
6
6
|
[35m@openmrs/esm-error-handling:build: [0m [1mexternal "@openmrs/esm-globals"[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
7
|
-
[35m@openmrs/esm-error-handling:build: [0mwebpack 5.88.0 compiled [1m[32msuccessfully[39m[22m in
|
|
7
|
+
[35m@openmrs/esm-error-handling:build: [0mwebpack 5.88.0 compiled [1m[32msuccessfully[39m[22m in 13301 ms
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["@openmrs/esm-globals"],(function(r,e){var o={};return{setters:[function(r){o.dispatchNotificationShown=r.dispatchNotificationShown}],execute:function(){r((()=>{"use strict";var r={728:r=>{r.exports=o}},e={};function
|
|
1
|
+
System.register(["@openmrs/esm-globals"],(function(r,e){var o={};return{setters:[function(r){o.dispatchNotificationShown=r.dispatchNotificationShown}],execute:function(){r((()=>{"use strict";var r={728:r=>{r.exports=o}},e={};function n(o){var t=e[o];if(void 0!==t)return t.exports;var i=e[o]={exports:{}};return r[o](i,i.exports,n),i.exports}n.d=(r,e)=>{for(var o in e)n.o(e,o)&&!n.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},n.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),n.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var t={};return(()=>{n.r(t),n.d(t,{createErrorHandler:()=>o,reportError:()=>e});var r=n(728);function e(r){var e=i(r);setTimeout((function(){throw e}))}function o(){var r=Error();return function(o){i(o).stack+="\nAsync stacktrace:\n".concat(r.stack),e(o)}}function i(r){var e,o,n;if(o=r,null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](o):o instanceof n)return r;if(null===r)return Error("'null' was thrown as an error");if("object"==typeof r){try{e="Object thrown as error: ".concat(JSON.stringify(r))}catch(o){e="Object thrown as error with the following properties: ".concat(Object.keys(r))}return Error(e)}return void 0===r?Error("'undefined' was thrown as an error"):Error(r.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,r.dispatchNotificationShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var o;console.error("Unhandled rejection: ",e.reason),(0,r.dispatchNotificationShown)({description:null!==(o=e.reason)&&void 0!==o?o:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}})(),t})())}}}));
|
|
2
2
|
//# sourceMappingURL=openmrs-esm-error-handling.js.map
|
|
@@ -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A,EAAgB,iDAClBH,KAAM,QACNC,MAAO,SAEX,C","sources":["webpack://@openmrs/esm-error-handling/external system \"@openmrs/esm-globals\"","webpack://@openmrs/esm-error-handling/webpack/bootstrap","webpack://@openmrs/esm-error-handling/webpack/runtime/define property getters","webpack://@openmrs/esm-error-handling/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-error-handling/webpack/runtime/make namespace object","webpack://@openmrs/esm-error-handling/./src/index.ts"],"sourcesContent":["module.exports = __WEBPACK_EXTERNAL_MODULE__728__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/** @module @category Error Handling */\nimport { dispatchNotificationShown } from \"@openmrs/esm-globals\";\n\nwindow.onerror = function (error) {\n console.error(\"Unexpected error: \", error);\n dispatchNotificationShown({\n description: error ?? \"Oops! An unexpected error occurred.\",\n kind: \"error\",\n title: \"Error\",\n });\n return false;\n};\n\nwindow.onunhandledrejection = function (event) {\n console.error(\"Unhandled rejection: \", event.reason);\n dispatchNotificationShown({\n description:\n event.reason ?? \"Oops! An unhandled promise rejection occurred.\",\n kind: \"error\",\n title: \"Error\",\n });\n};\n\nexport function reportError(err) {\n const error = ensureErrorObject(err);\n setTimeout(() => {\n throw error;\n });\n}\n\nexport function createErrorHandler() {\n const outgoingErr = Error();\n return (incomingErr) => {\n const finalErr = ensureErrorObject(incomingErr);\n finalErr.stack += `\\nAsync stacktrace:\\n${outgoingErr.stack}`;\n reportError(incomingErr);\n };\n}\n\nfunction ensureErrorObject(thing: any) {\n let message;\n\n if (thing instanceof Error) {\n return thing;\n } else if (thing === null) {\n return Error(`'null' was thrown as an error`);\n } else if (typeof thing === \"object\") {\n try {\n message = `Object thrown as error: ${JSON.stringify(thing)}`;\n } catch (e) {\n message = `Object thrown as error with the following properties: ${Object.keys(\n thing\n )}`;\n }\n return Error(message);\n } else if (thing === undefined) {\n return Error(`'undefined' was thrown as an error`);\n } else {\n return Error(thing.toString());\n }\n}\n"],"names":["module","exports","__WEBPACK_EXTERNAL_MODULE__728__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","reportError","err","error","ensureErrorObject","setTimeout","createErrorHandler","outgoingErr","Error","incomingErr","stack","thing","message","JSON","stringify","e","keys","toString","window","onerror","console","dispatchNotificationShown","description","kind","title","onunhandledrejection","event","reason"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-error-handling",
|
|
3
|
-
"version": "5.0.3-pre.
|
|
3
|
+
"version": "5.0.3-pre.829",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "An ES module to help with error handling",
|
|
6
6
|
"browser": "dist/openmrs-esm-error-handling.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@openmrs/esm-globals": "4.x"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@openmrs/esm-globals": "^5.0.3-pre.
|
|
43
|
+
"@openmrs/esm-globals": "^5.0.3-pre.829"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "9bab50b6efe1f74e6964adbce112fc0c8a67f2e6"
|
|
46
46
|
}
|