{"_id":"@apollosoftwarexyz/cinnamon-youch","_rev":"1-be5379ab22ca778ea5e1c357937f9dde","name":"@apollosoftwarexyz/cinnamon-youch","dist-tags":{"latest":"3.2.0"},"versions":{"3.1.2":{"name":"@apollosoftwarexyz/cinnamon-youch","version":"3.1.2","description":"A fork of the Youch pretty error reporting library for Cinnamon","main":"src/Youch.js","types":"./index.d.ts","directories":{"example":"examples"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","build":"node bin/compile.js","test":"npm run build && node test/youch.spec.js && node test/youch.spec.mjs","lint":"standard","lint:fix":"standard --fix"},"author":{"name":"Apollo Software Limited, amanvirk"},"license":"MIT","devDependencies":{"concat":"^1.0.3","japa":"^4.0.0","standard":"^16.0.4","supertest":"^6.2.2","uglify-js":"^3.15.3"},"dependencies":{"cookie":"^0.4.2","mustache":"^4.2.0","stacktracey":"^2.1.8"},"repository":{"type":"git","url":"git+https://github.com/poppinss/youch.git"},"keywords":["errors","error-reporting","whoops"],"bugs":{"url":"https://github.com/poppinss/youch/issues"},"standard":{"ignore":["static"]},"homepage":"https://github.com/poppinss/youch#readme","gitHead":"b660c2b2b85685fab47072c30b54ce3da7e8d0af","_id":"@apollosoftwarexyz/cinnamon-youch@3.1.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-2rBgvINNiMKKwT3QYrM0R82T4SAvqI010AVKhHn86/oYSIYIoBB+0V7pRwuzELB5aw0S4/xNEIUjd0++9e7lYQ==","shasum":"5656d535582a9372cac988972e1b863a7108b141","tarball":"https://registry.npmjs.org/@apollosoftwarexyz/cinnamon-youch/-/cinnamon-youch-3.1.2.tgz","fileCount":6,"unpackedSize":89413,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCo3bjenUEwGQ/qz9LXmz2AyZEiGKNOBvS3gBjrHc05AiEAni9FU6dPaMtgoHYWRBlZy8z0fPRkhZoSPyEwL/F0rc4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiS8+0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUoRAAjrR8gQjYn1BPm3cnKIe/ZO75ZbkspOjLC+YqG7p4/ehIsNjW\r\nUv1pfxxj1ul3OX5GCFf5f34yia8J99ZhMyEzlWD5GGxxXwjtFbqRWdeV1cBl\r\nEoNbWqWsckjZ+poKiqIpxifsgK3JJgG5XKq9jaG4mWk2Z7CiL25XTNWyBa9q\r\nBm8fW5t4Nva+fKvNgg0lKn7FwUeGu3aOKYQlUX9zHS5lalHeSt4Wlrg/KPv/\r\nxxMdgT8e5Q4eDolU3e7vtLI6zvvY5tZlalhs9BuGwVi0uaqsLnA9NNyisw8y\r\njtwuGFO9RvQISWsJyp1tmKZABrqYof1+h3MUtIO040sbshVR2HRi9EbdGAUC\r\n/lDmbVMiMif0aI9IDe9UvrOfel+pVwA7GemMP2YPvRuHgKwnlM45ZziWXEQF\r\nbKBOD71FDaD/CjMXZc/4xiWhYQuUA83hKWnRLXQiVrONETdOS2JxBc7Mr+1x\r\nc74bJnkPV/HNeusYwhIs3Ynl7iVTSI/EwVoHLy2U0jBUCQTzTb72eHvR3wTY\r\na+Q8QA5tq7DDSvhXKXkpQVj4Yu8lQ7AY+NOEsbJF5uYOajBl62h24b50tZHy\r\n6qiuXDO4BB/jcpqlGgYj9nGbyc/JAOzmZ02KaHnu8s1DtAOVOL4M3Q+WBWWs\r\nnpELFD/6OTGtUL2o89q2JF9HXqcViqpQ45M=\r\n=p62Q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"samjakob","email":"me@samjakob.com"},"maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cinnamon-youch_3.1.2_1649135540033_0.21676807454988212"},"_hasShrinkwrap":false},"3.2.0":{"name":"@apollosoftwarexyz/cinnamon-youch","version":"3.2.0","description":"A fork of the Youch pretty error reporting library for Cinnamon","main":"src/Youch.js","types":"./index.d.ts","directories":{"example":"examples"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","build":"node bin/compile.js","test":"npm run build && node test/youch.spec.js && node test/youch.spec.mjs","lint":"standard","lint:fix":"standard --fix"},"author":{"name":"Apollo Software Limited, amanvirk"},"license":"MIT","devDependencies":{"concat":"^1.0.3","japa":"^4.0.0","standard":"^16.0.4","supertest":"^6.2.2","uglify-js":"^3.15.3"},"dependencies":{"cookie":"^0.4.2","mustache":"^4.2.0","stacktracey":"^2.1.8"},"repository":{"type":"git","url":"git+https://github.com/poppinss/youch.git"},"keywords":["errors","error-reporting","whoops"],"bugs":{"url":"https://github.com/poppinss/youch/issues"},"standard":{"ignore":["static"]},"homepage":"https://github.com/poppinss/youch#readme","gitHead":"83846521a829dfc054fe824b05060830d1f4cd59","_id":"@apollosoftwarexyz/cinnamon-youch@3.2.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-Cxql9G/2QfE0Vg7VTAkYdzdQEudYJkxmEvJwjN91F+EbNl5Bglp2Qjo55KdKZxGHXfulav+466VJANGvxSq3vA==","shasum":"baa9eecb1a3214679c43dd79b2b1af08817a0901","tarball":"https://registry.npmjs.org/@apollosoftwarexyz/cinnamon-youch/-/cinnamon-youch-3.2.0.tgz","fileCount":6,"unpackedSize":90177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEF3qa12NoerpuzkarA3O4YmEXRE8H0e/7HZ9RpCNOYGAiAzIjNzZR3wNBI+SCgRLu+5fCwYE2neGGyzY1hG5jFtmA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiS95gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppRQ//erCweRi/WvPewXW370D6rquufafJduzQdZuECR74jbEP0Lqs\r\nfEJo67H1cDdq9489UFYhuBpX1XxXzsRCeQOYsBrPM7shabmOEig012jyISKR\r\nHgT9eUeliv8WlHxcPmajUdEpTdFOcG4f4nYiXUvq+714HWZfN3KnAuG+wGMh\r\nRd5oxoNlJm7iiIH+yaWVGUeF5Gi4ezOU/h2oduZ9G+i7wzT79w+Yu049RDC/\r\nBV04fpp12ty2+wsN78tfEgl+ApeXUS0t1/s2IWME7dgti/ifb+hKxIkGLzqh\r\nJPao82i27+t0bSBmjZ+cZ9/J+2ir65Q4f5FuwsYLE4BPaigmzMtsTxfAF6Dr\r\nW0Tfh0NeLwY7Yqbda5LRsgvE99q9SQMhxv3jaaoK+HifzfcXHvCyxJcWx6Yv\r\nMLpE1NyzDmY0u7EG6DQ13sHDREW3lVeL5VJRpn+DXSix6Sjx9eb+zz6Mkzun\r\ndU2G2fdtLxNqewAjYXU0i33/XMimHvEjudZvbjEMJaSiOm5QUmcQlmbphWOT\r\nLGQ3ggFGz9EdQ8/kbJhd83LVek0nBCSO+uZyAAkh107OrdohEmPNgiym0Vjq\r\nopuBhjm6iF/r4hIYkcC/JVKys7nO/XPigHHSaf8qsKS6PgZMTPprqUAJiPm2\r\nyiHBDf79PZud6kgUriB8DBQnbADpXqoiVyU=\r\n=or+N\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"samjakob","email":"me@samjakob.com"},"maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cinnamon-youch_3.2.0_1649139296493_0.7784538228297782"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-05T05:12:19.940Z","3.1.2":"2022-04-05T05:12:20.171Z","modified":"2022-04-05T06:14:56.764Z","3.2.0":"2022-04-05T06:14:56.695Z"},"maintainers":[{"name":"samjakob","email":"me@samjakob.com"}],"description":"A fork of the Youch pretty error reporting library for Cinnamon","homepage":"https://github.com/poppinss/youch#readme","keywords":["errors","error-reporting","whoops"],"repository":{"type":"git","url":"git+https://github.com/poppinss/youch.git"},"author":{"name":"Apollo Software Limited, amanvirk"},"bugs":{"url":"https://github.com/poppinss/youch/issues"},"license":"MIT","readme":"# Youch!\n> Pretty error reporting for Node.js :rocket:\n\n<br />\n\n<p>\n  <a href=\"youch.jpeg\">\n    <img src=\"youch.jpeg\" />\n  </a>\n</p>\n\n<br />\n\n---\n\n<br />\n\n[![NPM Version][npm-image]][npm-url]\n[![Tests][gh-workflow-image]][gh-workflow-url]\n[![Downloads Stats][npm-downloads-image]][npm-url]\n\nYouch is inspired by [Whoops](https://filp.github.io/whoops) but with a modern design. Reading stack trace of the console slows you down from active development. Instead **Youch** print those errors in structured HTML to the browser.\n\n## Features\n1. HTML reporter\n2. JSON reporter, if request accepts a json instead of text/html.\n3. Sorted frames of error stack.\n4. Support for ESM.\n\n> Checkout [youch terminal](https://github.com/poppinss/youch-terminal) to beautify errors on terminal.\n\n## Installation\n```bash\nnpm i --save youch\n```\n\n## Basic Usage\nYouch is used by [AdonisJs](http://adonisjs.com), but it can be used by express or raw HTTP server as well.\n\n```javascript\nconst Youch = require('youch')\nconst http = require('http')\n\nhttp.createServer(async function (req, res) {\n\n  // PERFORM SOME ACTION\n  if (error) {\n    const youch = new Youch(error, req)\n    const html = await youch.toHTML()\n\n    res.writeHead(200, {'content-type': 'text/html'})\n    res.write(html)\n    res.end()\n  }\n\n}).listen(8000)\n```\n\n## Adding helpful links\nEverytime an error occurs, we can help users we letting search for the error on Google, over even on the Github repo of our project. \n\nYouch let you define clickable links to redirect the user to a website with the error message.\n\n```js\nconst youch = new Youch(error)\n\nawait youch\n  .addLink(({ message }) => {\n    const url = `https://stackoverflow.com/search?q=${encodeURIComponent(`[adonis.js] ${message}`)}`\n    \n    return `<a href=\"${url}\" target=\"_blank\" title=\"Search on stackoverflow\">Search stackoverflow</a>`\n  })\n  .toHTML()\n``` \n\nAlso you can make use of [Font awesome brands icons](https://fontawesome.com/icons?d=gallery&s=brands&m=free) to display icons. \n\n**If you will use fontawesome icons, then Youch will automatically load the CSS files from the font awesome CDN for you.**\n\n```js\nconst youch = new Youch(error)\n\nawait youch\n  .addLink(({ message }) => {\n    const url = `https://stackoverflow.com/search?q=${encodeURIComponent(`[adonis.js] ${message}`)}`\n    return `<a href=\"${url}\" target=\"_blank\" title=\"Search on stackoverflow\"><i class=\"fab fa-stack-overflow\"></i></a>`\n  })\n  .toHTML()\n```\n\n## Toggle show all frames checkbox\nWhen rendering HTML you can call the `toggleShowAllFrames` method to check/uncheck the show all frames checkbox.\n\nBy default, the checkbox is not checked and calling this method once will toggle the state.\n\n```js\nconst youch = new Youch(error)\n\nawait youch\n  .toggleShowAllFrames()\n  .toHTML()\n```\n\n## Get stack as JSON\nYou can also the error stack frames as JSON by calling the `.toJSON` method.\n\n```js\nconst youch = new Youch(error, {})\nconst jsonResponse = await youch.toJSON()\n```\n\nFollowing is the shape of the `toJSON` return data type.\n\n```ts\ntype JsonResponse = {\n  error: {\n    message: string;\n    name: string;\n    status: number;\n    frames: {\n      file: string,\n      filePath: string,\n      line: number,\n      column: number,\n      callee: string,\n      calleeShort: string,\n      context: {\n        start: number,\n        pre: string,\n        line: string,\n        post: string,\n      },\n      isModule: boolean,\n      isNative: boolean,\n      isApp: boolean\n    }[];\n  };\n}\n```\n\n## Release History\nCheckout [CHANGELOG.md](CHANGELOG.md) file for release history.\n\n## Meta\nCheckout [LICENSE.md](LICENSE.md) for license information\nHarminder Virk (Aman) - [https://github.com/thetutlage](https://github.com/thetutlage)\n\n[gh-workflow-image]: https://img.shields.io/github/workflow/status/poppinss/youch/test?style=for-the-badge\n[gh-workflow-url]: https://github.com/poppinss/youch/actions/workflows/test.yml \"Github action\"\n\n[npm-image]: https://img.shields.io/npm/v/youch.svg?style=for-the-badge&logo=npm\n[npm-url]: https://npmjs.org/package/youch 'npm'\n\n[npm-downloads-image]: https://img.shields.io/npm/dm/youch.svg?style=for-the-badge\n","readmeFilename":"README.md"}