waibu 2.0.1 → 2.1.1

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.
Files changed (79) hide show
  1. package/.github/FUNDING.yml +0 -0
  2. package/.github/workflows/repo-lockdown.yml +0 -0
  3. package/.jsdoc.conf.json +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +0 -0
  6. package/config-prod.json +0 -0
  7. package/docs/Waibu.html +1 -1
  8. package/docs/data/search.json +0 -0
  9. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  10. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  11. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  12. package/docs/global.html +0 -0
  13. package/docs/index.html +0 -0
  14. package/docs/index.js.html +7 -5
  15. package/docs/scripts/core.js +0 -0
  16. package/docs/scripts/core.min.js +0 -0
  17. package/docs/scripts/resize.js +0 -0
  18. package/docs/scripts/search.js +0 -0
  19. package/docs/scripts/search.min.js +0 -0
  20. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -0
  21. package/docs/scripts/third-party/fuse.js +0 -0
  22. package/docs/scripts/third-party/hljs-line-num-original.js +0 -0
  23. package/docs/scripts/third-party/hljs-line-num.js +0 -0
  24. package/docs/scripts/third-party/hljs-original.js +0 -0
  25. package/docs/scripts/third-party/hljs.js +0 -0
  26. package/docs/scripts/third-party/popper.js +0 -0
  27. package/docs/scripts/third-party/tippy.js +0 -0
  28. package/docs/scripts/third-party/tocbot.js +0 -0
  29. package/docs/scripts/third-party/tocbot.min.js +0 -0
  30. package/docs/static/bitcoin.jpeg +0 -0
  31. package/docs/static/home.md +0 -0
  32. package/docs/static/logo-ecosystem.png +0 -0
  33. package/docs/static/logo.png +0 -0
  34. package/docs/styles/clean-jsdoc-theme-base.css +0 -0
  35. package/docs/styles/clean-jsdoc-theme-dark.css +0 -0
  36. package/docs/styles/clean-jsdoc-theme-light.css +0 -0
  37. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -0
  38. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -0
  39. package/docs/styles/clean-jsdoc-theme.min.css +0 -0
  40. package/extend/bajo/hook/waibu@on-close.js +0 -0
  41. package/extend/bajo/hook/waibu@on-ready.js +0 -0
  42. package/extend/bajo/hook/waibu@on-request.js +0 -0
  43. package/extend/bajo/hook/waibu@on-response.js +0 -0
  44. package/extend/bajo/hook/waibu@on-route.js +0 -0
  45. package/extend/bajo/intl/en-US.json +0 -0
  46. package/extend/bajo/intl/id.json +0 -0
  47. package/extend/bajoTemplate/layout/email.html +0 -0
  48. package/extend/bajoTemplate/layout/email.id.html +0 -0
  49. package/index.js +7 -19
  50. package/lib/app-hook.js +0 -0
  51. package/lib/app.js +0 -0
  52. package/lib/build-locals.js +17 -6
  53. package/lib/collect-route-path-handlers.js +0 -0
  54. package/lib/handle-download.js +0 -0
  55. package/lib/handle-forward.js +0 -0
  56. package/lib/handle-redirect.js +0 -0
  57. package/lib/handle-xml-body.js +0 -0
  58. package/lib/home.js +0 -0
  59. package/lib/print-routes.js +0 -0
  60. package/lib/webapp-scope/attach-intl.js +0 -0
  61. package/lib/webapp-scope/error-handler.js +0 -0
  62. package/lib/webapp-scope/handle-compress.js +0 -0
  63. package/lib/webapp-scope/handle-cors.js +0 -0
  64. package/lib/webapp-scope/handle-helmet.js +0 -0
  65. package/lib/webapp-scope/handle-multipart-body.js +0 -0
  66. package/lib/webapp-scope/handle-rate-limit.js +0 -0
  67. package/lib/webapp-scope/is-route-disabled.js +0 -0
  68. package/lib/webapp-scope/merge-route-hooks.js +1 -1
  69. package/lib/webapp-scope/rerouted-path.js +0 -0
  70. package/lib/webapp-scope/route-hook.js +1 -1
  71. package/logo.png +0 -0
  72. package/package.json +18 -14
  73. package/wiki/CHANGES.md +16 -0
  74. package/wiki/CONFIG.md +0 -0
  75. package/wiki/CONTRIBUTING.md +0 -0
  76. package/wiki/DEV-GUIDE.md +0 -0
  77. package/wiki/ECOSYSTEM.md +0 -0
  78. package/wiki/GETTING-STARTED.md +0 -0
  79. package/wiki/USER-GUIDE.md +0 -0
File without changes
File without changes
package/.jsdoc.conf.json CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/config-prod.json CHANGED
File without changes
package/docs/Waibu.html CHANGED
@@ -1,3 +1,3 @@
1
1
  <!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Class: Waibu</title><!--[if lt IE 9]>
2
2
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3
- <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="light"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">Waibu API</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Waibu.html">Waibu</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#factory">factory</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/waibu" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/waibu" target="">Github</a></div><div class="navbar-item"><a id="" href="https://waibu.bajo.app/" target="">Waibu</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Waibu-title" class="has-anchor">Waibu</h1><div class="class-description"><p>Waibu Web Framework plugin for Bajo. This is the main foundation of all web apps attached to the system through a route prefix. Those web apps are then build as childrens with its own fastify's context.</p><p>There are currently 3 web apps available:</p><ul><li><a href="https://github.com/ardhi/waibu-static">waibu-static</a> for static content delivery</li><li><a href="https://github.com/ardhi/waibu-rest-api">waibu-rest-api</a> for rest api setup</li><li>and <a href="https://github.com/ardhi/waibu-mpa">waibu-mpa</a> for normal multi-page application</li></ul><p>You should write your code as the extension of above web apps. Not to this main app. Unless, of course, if you want to write custom web apps with its own context.</p></div></header><article><div class="container-overview"><h2 id="constructor" class="has-anchor">Constructor</h2><h3 class="name has-anchor" id="Waibu"><span class="type-signature"></span>new Waibu<span class="signature">()</span></h3><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line49">line 49</a></li></ul></dd></div></dl></div><h2 id="members" class="subsection-title has-anchor">Members</h2><h3 class="name has-anchor" id="config"><span class="type-signature"></span>config<span class="type-signature"> :Object</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line90">line 90</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>config</li></ul></dd></div></dl><h3 class="name has-anchor" id="findRoute"><span class="type-signature"></span>findRoute<span class="type-signature"></span></h3><div class="description"><p>Find route by route name</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line229">line 229</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="routeDir"><span class="type-signature"></span>routeDir<span class="type-signature"></span></h3><div class="description"><p>Get route directory by plugin's name</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line432">line 432</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".alias"><span class="type-signature">(static, constant) </span>alias<span class="type-signature"> :string</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">'w'</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".dependencies"><span class="type-signature">(static, constant) </span>dependencies<span class="type-signature"> :Array.&lt;string></span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Array.&lt;string></span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">['bajo-extra']</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line70">line 70</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".escapeChars"><span class="type-signature">(static, constant) </span>escapeChars<span class="type-signature"> :TEscapeChars</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">TEscapeChars</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line76">line 76</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".hookTypes"><span class="type-signature">(static, constant) </span>hookTypes<span class="type-signature"> :Array.&lt;string></span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Array.&lt;string></span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">['onRequest', 'onResponse', 'preParsing', 'preValidation', 'preHandler', 'preSerialization', 'onSend', 'onTimeout', 'onError']</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line55">line 55</a></li></ul></dd></div></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="escape"><span class="type-signature"></span>escape<span class="signature">(text)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Escape text</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>text</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line256">line 256</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="exit"><span class="type-signature">(async) </span>exit<span class="signature">()</span></h3><div class="description"><p>Exit handler</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line219">line 219</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="fetch"><span class="type-signature">(async) </span>fetch<span class="signature">(url, opts<span class="signature-attributes">opt</span>, extra<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Fetch something from url. A wrapper of bajo-extra's fetchUrl which support bajo's ns based url.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>url</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Also support ns based url</p></td></tr><tr><td class="name"><code>opts</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>node's fetch options</p></td></tr><tr><td class="name"><code>extra</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>See <a href="https://ardhi.github.io/bajo-extra">bajo-extra</a></p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line276">line 276</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getIp"><span class="type-signature"></span>getIp<span class="signature">(req)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get visitor IP from fastify's request object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>request object</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line299">line 299</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getOrigin"><span class="type-signature"></span>getOrigin<span class="signature">(req)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get origin of fastify's request object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line313">line 313</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getPluginByPrefix"><span class="type-signature"></span>getPluginByPrefix<span class="signature">(prefix)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Get plugin by prefix</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>prefix</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line327">line 327</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getPluginPrefix"><span class="type-signature"></span>getPluginPrefix<span class="signature">(name, webApp<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get plugin's prefix by name</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Plugin's name</p></td></tr><tr><td class="name"><code>webApp</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">waibuMpa</td><td class="description last"><p>Web app to use</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line344">line 344</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getRoutes"><span class="type-signature"></span>getRoutes<span class="signature">(grouped<span class="signature-attributes">opt</span>, lite<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h3><div class="description"><p>Get all available routes</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>grouped</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Returns as groups of urls and methods</p></td></tr><tr><td class="name"><code>lite</code></td><td class="type"><span class="param-type">*</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Retuns only urls and methods</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line362">line 362</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getUploadedFiles"><span class="type-signature"></span>getUploadedFiles<span class="signature">(reqId, fileUrl<span class="signature-attributes">opt</span>, returnDir)</span><span class="type-signature"> &rarr; {Object|Array}</span></h3><div class="description"><p>Get uploaded files by request ID</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>reqId</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Request ID</p></td></tr><tr><td class="name"><code>fileUrl</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>If <code>true</code>, files returned as file url format (<code>file:///...</code>)</p></td></tr><tr><td class="name"><code>returnDir</code></td><td class="type"><span class="param-type">*</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>If <code>true</code>, also return its directory</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line383">line 383</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><ul><li>Returns object if <code>returnDir</code> is <code>true</code>, array of files otherwise</li></ul></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span> |<wbr> <span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="init"><span class="type-signature">(async) </span>init<span class="signature">()</span></h3><div class="description"><p>Initialize plugin</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line167">line 167</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="isIntlPath"><span class="type-signature"></span>isIntlPath<span class="signature">(ns)</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Is namespace's path contains language detector token?</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>ns</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Plugin name</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line400">line 400</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="parseFilter"><span class="type-signature"></span>parseFilter<span class="signature">(req)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Parse filter found from Fastify's request based on keys set in config object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Request object</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line416">line 416</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="routePath"><span class="type-signature"></span>routePath<span class="signature">(name, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get route path by route's name:</p><ul><li>If it is a <code>mailto:</code> or <code>tel:</code> url, it returns as is</li><li>If it is a ns based name, it will be parsed first</li></ul></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"></td></tr><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Options object</p><h6>Properties</h6><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>base</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">waibu</td><td class="description last"><p>Base namespace</p></td></tr><tr><td class="name"><code>guessHost</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default"></td><td class="description last"><p>If true, guest host if host is not set</p></td></tr><tr><td class="name"><code>query</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Query string's object. If provided, it will be added to returned value</p></td></tr><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Parameter object. If provided, it will be merged to returned value</p></td></tr></tbody></table></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line458">line 458</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="sendMail"><span class="type-signature">(async) </span>sendMail<span class="signature">(tpl, params<span class="signature-attributes">opt</span>)</span></h3><div class="description"><p>Method to send mail through Masohi Messaging System. It is a thin wrapper for <a href="https://github.com/ardhi/masohi-mail">masohi-mail</a> send method.</p><p>If masohi is not loaded, nothing is delivered.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>tpl</code></td><td class="type"><span class="param-type">string</span> |<wbr> <span class="param-type">Array</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Mail's template to use. If a string is given, the same template will be used for html &amp; plaintext versions. Otherwise, the first template will be used for html mail, and the second one is for it's plaintext version</p></td></tr><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p><a href="https://github.com/ardhi/masohi-mail">masohi-mail</a>'s params object.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line503">line 503</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong></div><h3 class="name has-anchor" id="start"><span class="type-signature">(async) </span>start<span class="signature">()</span></h3><div class="description"><p>Start plugin</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line178">line 178</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="unescape"><span class="type-signature"></span>unescape<span class="signature">(text)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Unescape text using TEscapeChars rules</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>text</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Text to unescape</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line550">line 550</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="unescapeBlock"><span class="type-signature"></span>unescapeBlock<span class="signature">(content, start, end, startReplacer, endReplacer)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Recursively unescape block of texts</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>content</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Source content</p></td></tr><tr><td class="name"><code>start</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Block's start</p></td></tr><tr><td class="name"><code>end</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Block's end</p></td></tr><tr><td class="name"><code>startReplacer</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Token to use as block's start replacer</p></td></tr><tr><td class="name"><code>endReplacer</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Token to use as block's end replacer</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line532">line 532</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2><h3 class="name has-anchor" id=".TEscapeChars">TEscapeChars</h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object</span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>&lt;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;lt;</td><td class="description last"></td></tr><tr><td class="name"><code>&gt;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;gt;</td><td class="description last"></td></tr><tr><td class="name"><code>&quot;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;quot;</td><td class="description last"></td></tr><tr><td class="name"><code>&apos;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;apos;</td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line15">line 15</a></li></ul></dd></div></dl></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">Waibu API</a><div class="mobile-nav-links"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/waibu" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/waibu" target="">Github</a></div><div class="navbar-item"><a id="" href="https://waibu.bajo.app/" target="">Waibu</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Waibu.html">Waibu</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#factory">factory</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>
3
+ <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="light"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">Waibu API</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Waibu.html">Waibu</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#factory">factory</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/waibu" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/waibu" target="">Github</a></div><div class="navbar-item"><a id="" href="https://waibu.bajo.app/" target="">Waibu</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Waibu-title" class="has-anchor">Waibu</h1><div class="class-description"><p>Waibu Web Framework plugin for Bajo. This is the main foundation of all web apps attached to the system through a route prefix. Those web apps are then build as childrens with its own fastify's context.</p><p>There are currently 3 web apps available:</p><ul><li><a href="https://github.com/ardhi/waibu-static">waibu-static</a> for static content delivery</li><li><a href="https://github.com/ardhi/waibu-rest-api">waibu-rest-api</a> for rest api setup</li><li>and <a href="https://github.com/ardhi/waibu-mpa">waibu-mpa</a> for normal multi-page application</li></ul><p>You should write your code as the extension of above web apps. Not to this main app. Unless, of course, if you want to write custom web apps with its own context.</p></div></header><article><div class="container-overview"><h2 id="constructor" class="has-anchor">Constructor</h2><h3 class="name has-anchor" id="Waibu"><span class="type-signature"></span>new Waibu<span class="signature">()</span></h3><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line49">line 49</a></li></ul></dd></div></dl></div><h2 id="members" class="subsection-title has-anchor">Members</h2><h3 class="name has-anchor" id="config"><span class="type-signature"></span>config<span class="type-signature"> :Object</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line90">line 90</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>config</li></ul></dd></div></dl><h3 class="name has-anchor" id="findRoute"><span class="type-signature"></span>findRoute<span class="type-signature"></span></h3><div class="description"><p>Find route by route name</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line230">line 230</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="routeDir"><span class="type-signature"></span>routeDir<span class="type-signature"></span></h3><div class="description"><p>Get route directory by plugin's name</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line434">line 434</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".alias"><span class="type-signature">(static, constant) </span>alias<span class="type-signature"> :string</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">'w'</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".dependencies"><span class="type-signature">(static, constant) </span>dependencies<span class="type-signature"> :Array.&lt;string></span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Array.&lt;string></span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">['bajo-extra']</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line70">line 70</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".escapeChars"><span class="type-signature">(static, constant) </span>escapeChars<span class="type-signature"> :TEscapeChars</span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">TEscapeChars</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line76">line 76</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".hookTypes"><span class="type-signature">(static, constant) </span>hookTypes<span class="type-signature"> :Array.&lt;string></span></h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Array.&lt;string></span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">['onRequest', 'onResponse', 'preParsing', 'preValidation', 'preHandler', 'preSerialization', 'onSend', 'onTimeout', 'onError']</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line55">line 55</a></li></ul></dd></div></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="escape"><span class="type-signature"></span>escape<span class="signature">(text)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Escape text</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>text</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line257">line 257</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="exit"><span class="type-signature">(async) </span>exit<span class="signature">()</span></h3><div class="description"><p>Exit handler</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line220">line 220</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="fetch"><span class="type-signature">(async) </span>fetch<span class="signature">(url, opts<span class="signature-attributes">opt</span>, extra<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Fetch something from url. A wrapper of bajo-extra's fetchUrl which support bajo's ns based url.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>url</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Also support ns based url</p></td></tr><tr><td class="name"><code>opts</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>node's fetch options</p></td></tr><tr><td class="name"><code>extra</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>See <a href="https://ardhi.github.io/bajo-extra">bajo-extra</a></p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line277">line 277</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getIp"><span class="type-signature"></span>getIp<span class="signature">(req)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get visitor IP from fastify's request object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>request object</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line300">line 300</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getOrigin"><span class="type-signature"></span>getOrigin<span class="signature">(req)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get origin of fastify's request object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line314">line 314</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getPluginByPrefix"><span class="type-signature"></span>getPluginByPrefix<span class="signature">(prefix)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Get plugin by prefix</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>prefix</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line328">line 328</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getPluginPrefix"><span class="type-signature"></span>getPluginPrefix<span class="signature">(name, webApp<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get plugin's prefix by name</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Plugin's name</p></td></tr><tr><td class="name"><code>webApp</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">waibuMpa</td><td class="description last"><p>Web app to use</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line345">line 345</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getRoutes"><span class="type-signature"></span>getRoutes<span class="signature">(grouped<span class="signature-attributes">opt</span>, lite<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h3><div class="description"><p>Get all available routes</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>grouped</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Returns as groups of urls and methods</p></td></tr><tr><td class="name"><code>lite</code></td><td class="type"><span class="param-type">*</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Retuns only urls and methods</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line363">line 363</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getUploadedFiles"><span class="type-signature"></span>getUploadedFiles<span class="signature">(reqId, fileUrl<span class="signature-attributes">opt</span>, returnDir)</span><span class="type-signature"> &rarr; {Object|Array}</span></h3><div class="description"><p>Get uploaded files by request ID</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>reqId</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Request ID</p></td></tr><tr><td class="name"><code>fileUrl</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>If <code>true</code>, files returned as file url format (<code>file:///...</code>)</p></td></tr><tr><td class="name"><code>returnDir</code></td><td class="type"><span class="param-type">*</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>If <code>true</code>, also return its directory</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line384">line 384</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><ul><li>Returns object if <code>returnDir</code> is <code>true</code>, array of files otherwise</li></ul></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span> |<wbr> <span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="init"><span class="type-signature">(async) </span>init<span class="signature">()</span></h3><div class="description"><p>Initialize plugin</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line167">line 167</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="isIntlPath"><span class="type-signature"></span>isIntlPath<span class="signature">(ns)</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Is namespace's path contains language detector token?</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>ns</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Plugin name</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line402">line 402</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="parseFilter"><span class="type-signature"></span>parseFilter<span class="signature">(req)</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Parse filter found from Fastify's request based on keys set in config object</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>req</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Request object</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line418">line 418</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="routePath"><span class="type-signature"></span>routePath<span class="signature">(name, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get route path by route's name:</p><ul><li>If it is a <code>mailto:</code> or <code>tel:</code> url, it returns as is</li><li>If it is a ns based name, it will be parsed first</li></ul></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"></td></tr><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Options object</p><h6>Properties</h6><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>base</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">waibu</td><td class="description last"><p>Base namespace</p></td></tr><tr><td class="name"><code>guessHost</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default"></td><td class="description last"><p>If true, guest host if host is not set</p></td></tr><tr><td class="name"><code>query</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Query string's object. If provided, it will be added to returned value</p></td></tr><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p>Parameter object. If provided, it will be merged to returned value</p></td></tr></tbody></table></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line460">line 460</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="sendMail"><span class="type-signature">(async) </span>sendMail<span class="signature">(tpl, params<span class="signature-attributes">opt</span>)</span></h3><div class="description"><p>Method to send mail through Masohi Messaging System. It is a thin wrapper for <a href="https://github.com/ardhi/masohi-mail">masohi-mail</a> send method.</p><p>If masohi is not loaded, nothing is delivered.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>tpl</code></td><td class="type"><span class="param-type">string</span> |<wbr> <span class="param-type">Array</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Mail's template to use. If a string is given, the same template will be used for html &amp; plaintext versions. Otherwise, the first template will be used for html mail, and the second one is for it's plaintext version</p></td></tr><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="default">{}</td><td class="description last"><p><a href="https://github.com/ardhi/masohi-mail">masohi-mail</a>'s params object.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line505">line 505</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong></div><h3 class="name has-anchor" id="start"><span class="type-signature">(async) </span>start<span class="signature">()</span></h3><div class="description"><p>Start plugin</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line178">line 178</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="unescape"><span class="type-signature"></span>unescape<span class="signature">(text)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Unescape text using TEscapeChars rules</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>text</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Text to unescape</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line552">line 552</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="unescapeBlock"><span class="type-signature"></span>unescapeBlock<span class="signature">(content, start, end, startReplacer, endReplacer)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Recursively unescape block of texts</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>content</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Source content</p></td></tr><tr><td class="name"><code>start</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Block's start</p></td></tr><tr><td class="name"><code>end</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Block's end</p></td></tr><tr><td class="name"><code>startReplacer</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Token to use as block's start replacer</p></td></tr><tr><td class="name"><code>endReplacer</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Token to use as block's end replacer</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line534">line 534</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2><h3 class="name has-anchor" id=".TEscapeChars">TEscapeChars</h3><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object</span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>&lt;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;lt;</td><td class="description last"></td></tr><tr><td class="name"><code>&gt;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;gt;</td><td class="description last"></td></tr><tr><td class="name"><code>&quot;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;quot;</td><td class="description last"></td></tr><tr><td class="name"><code>&apos;</code></td><td class="type"><span class="param-type">string</span></td><td class="default">&amp;apos;</td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="index.js.html">index.js</a>, <a href="index.js.html#line15">line 15</a></li></ul></dd></div></dl></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">Waibu API</a><div class="mobile-nav-links"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/waibu" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/waibu" target="">Github</a></div><div class="navbar-item"><a id="" href="https://waibu.bajo.app/" target="">Waibu</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Waibu.html">Waibu</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#factory">factory</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>
File without changes
File without changes
File without changes
File without changes
package/docs/global.html CHANGED
File without changes
package/docs/index.html CHANGED
File without changes
@@ -48,7 +48,7 @@ async function factory (pkgName) {
48
48
  *
49
49
  * @class
50
50
  */
51
- class Waibu extends this.app.pluginClass.base {
51
+ class Waibu extends this.app.baseClass.Base {
52
52
  /**
53
53
  * @constant {string[]}
54
54
  * @default ['onRequest', 'onResponse', 'preParsing', 'preValidation', 'preHandler', 'preSerialization', 'onSend', 'onTimeout', 'onError']
@@ -93,7 +93,7 @@ async function factory (pkgName) {
93
93
  home: undefined,
94
94
  server: {
95
95
  host: '127.0.0.1',
96
- port: 7771
96
+ port: 17845
97
97
  },
98
98
  factory: {
99
99
  trustProxy: true,
@@ -178,7 +178,8 @@ async function factory (pkgName) {
178
178
  * @async
179
179
  */
180
180
  start = async () => {
181
- const { generateId, runHook } = this.app.bajo
181
+ const { runHook } = this.app.bajo
182
+ const { generateId } = this.app.lib.aneka
182
183
  const cfg = this.getConfig()
183
184
  if (this.app.bajoLogger) {
184
185
  cfg.factory.loggerInstance = this.app.bajoLogger.instance.child(
@@ -383,7 +384,8 @@ async function factory (pkgName) {
383
384
  * @returns {(Object|Array)} - Returns object if ```returnDir``` is ```true```, array of files otherwise
384
385
  */
385
386
  getUploadedFiles = async (reqId, fileUrl = false, returnDir = false) => {
386
- const { getPluginDataDir, resolvePath } = this.app.bajo
387
+ const { getPluginDataDir } = this.app.bajo
388
+ const { resolvePath } = this.app.lib.aneka
387
389
  const { fastGlob } = this.app.lib
388
390
  const dir = `${getPluginDataDir(this.ns)}/upload/${reqId}`
389
391
  const result = await fastGlob(`${dir}/*`)
@@ -506,7 +508,7 @@ async function factory (pkgName) {
506
508
  conn = conn ?? 'masohiMail:default'
507
509
  if (!this.app.masohi || !this.app.masohiMail) return
508
510
  const { get, isString } = this.app.lib._
509
- const { generateId } = this.app.bajo
511
+ const { generateId } = this.app.lib.aneka
510
512
  const { render } = this.app.bajoTemplate
511
513
  if (isString(tpl)) tpl = [tpl]
512
514
  const locals = await buildLocals.call(this, { tpl, params: data, opts: options })
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/index.js CHANGED
@@ -46,7 +46,7 @@ async function factory (pkgName) {
46
46
  *
47
47
  * @class
48
48
  */
49
- class Waibu extends this.app.pluginClass.base {
49
+ class Waibu extends this.app.baseClass.Base {
50
50
  /**
51
51
  * @constant {string[]}
52
52
  * @default ['onRequest', 'onResponse', 'preParsing', 'preValidation', 'preHandler', 'preSerialization', 'onSend', 'onTimeout', 'onError']
@@ -55,20 +55,6 @@ async function factory (pkgName) {
55
55
  static hookTypes = ['onRequest', 'onResponse', 'preParsing', 'preValidation', 'preHandler',
56
56
  'preSerialization', 'onSend', 'onTimeout', 'onError']
57
57
 
58
- /**
59
- * @constant {string}
60
- * @memberof Waibu
61
- * @default 'w'
62
- */
63
- static alias = 'w'
64
-
65
- /**
66
- * @constant {string[]}
67
- * @default ['bajo-extra']
68
- * @memberof Waibu
69
- */
70
- static dependencies = ['bajo-extra']
71
-
72
58
  /**
73
59
  * @constant {TEscapeChars}
74
60
  * @memberof Waibu
@@ -91,7 +77,7 @@ async function factory (pkgName) {
91
77
  home: undefined,
92
78
  server: {
93
79
  host: '127.0.0.1',
94
- port: 7771
80
+ port: 17845
95
81
  },
96
82
  factory: {
97
83
  trustProxy: true,
@@ -176,7 +162,8 @@ async function factory (pkgName) {
176
162
  * @async
177
163
  */
178
164
  start = async () => {
179
- const { generateId, runHook } = this.app.bajo
165
+ const { runHook } = this.app.bajo
166
+ const { generateId } = this.app.lib.aneka
180
167
  const cfg = this.getConfig()
181
168
  if (this.app.bajoLogger) {
182
169
  cfg.factory.loggerInstance = this.app.bajoLogger.instance.child(
@@ -381,7 +368,8 @@ async function factory (pkgName) {
381
368
  * @returns {(Object|Array)} - Returns object if ```returnDir``` is ```true```, array of files otherwise
382
369
  */
383
370
  getUploadedFiles = async (reqId, fileUrl = false, returnDir = false) => {
384
- const { getPluginDataDir, resolvePath } = this.app.bajo
371
+ const { getPluginDataDir } = this.app.bajo
372
+ const { resolvePath } = this.app.lib.aneka
385
373
  const { fastGlob } = this.app.lib
386
374
  const dir = `${getPluginDataDir(this.ns)}/upload/${reqId}`
387
375
  const result = await fastGlob(`${dir}/*`)
@@ -504,7 +492,7 @@ async function factory (pkgName) {
504
492
  conn = conn ?? 'masohiMail:default'
505
493
  if (!this.app.masohi || !this.app.masohiMail) return
506
494
  const { get, isString } = this.app.lib._
507
- const { generateId } = this.app.bajo
495
+ const { generateId } = this.app.lib.aneka
508
496
  const { render } = this.app.bajoTemplate
509
497
  if (isString(tpl)) tpl = [tpl]
510
498
  const locals = await buildLocals.call(this, { tpl, params: data, opts: options })
package/lib/app-hook.js CHANGED
File without changes
package/lib/app.js CHANGED
File without changes
@@ -1,3 +1,5 @@
1
+ const errs = {}
2
+
1
3
  async function buildHomesMenu (req) {
2
4
  const { callHandler } = this.app.bajo
3
5
  const { get, find, orderBy } = this.app.lib._
@@ -49,17 +51,18 @@ async function buildPagesMenu (req) {
49
51
  }
50
52
  return orderBy(all, ['level', 'title'])
51
53
  }
54
+
52
55
  async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
53
56
  const { runHook } = this.app.bajo
54
- const { set, merge, pick, get, isEmpty, find } = this.app.lib._
57
+ const { set, merge, pick, get, isEmpty, find, pullAt } = this.app.lib._
55
58
  const { req, reply } = opts
56
-
57
59
  const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : ''
58
60
  params.page = merge(params.page ?? {}, { ns: req.ns, appTitle })
61
+ params.sidebar = params.sidebar ?? []
59
62
 
60
63
  const { site, user, lang, darkMode } = req
61
- const theme = pick(find(this.themes, { name: req.theme }) ?? {}, ['name', 'framework'])
62
- const iconset = pick(find(this.iconsets, { name: req.iconset }) ?? {}, ['name'])
64
+ const theme = pick(find(this.themes, { name: opts.theme ?? req.theme }) ?? {}, ['name', 'framework'])
65
+ const iconset = pick(find(this.iconsets, { name: opts.iconset ?? req.iconset }) ?? {}, ['name'])
63
66
  const routeOpts = get(req, 'routeOptions.config', {})
64
67
  const _meta = { theme, iconset, site, user, lang, darkMode, routeOpts }
65
68
  _meta.site = _meta.site ?? {}
@@ -72,6 +75,11 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
72
75
  _meta.hostHeader = req.headers.host
73
76
  _meta.statusCode = 200
74
77
  _meta.isAdmin = _meta.user && find(_meta.user.teams, { alias: 'administrator' })
78
+ const pulled = []
79
+ for (const k in errs) {
80
+ if (Date.now() - errs[k] > 5000) pulled.push(k)
81
+ }
82
+ pullAt(errs, pulled)
75
83
  if (params.error) {
76
84
  if (params.error.statusCode) _meta.statusCode = params.error.statusCode
77
85
  _meta.errorMessage = params.error.message
@@ -79,8 +87,11 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
79
87
  params.page.ns = params.error.ns
80
88
  params.page.appTitle = this.app.waibuMpa.getAppTitle(params.error.ns)
81
89
  }
82
- this.log.error('error%s', params.error.message)
83
- if (this.app.bajo.config.env === 'dev') console.log(params.error)
90
+ if (!errs[req.id]) {
91
+ this.log.error('error%s', params.error.message)
92
+ if (this.app.bajo.config.env === 'dev') console.log(params.error)
93
+ }
94
+ errs[req.id] = Date.now()
84
95
  }
85
96
  if (reply && req.session && req.flash && !opts.partial) _meta.flash = reply.flash()
86
97
  set(params, 'menu.homes', await buildHomesMenu.call(this, req))
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/home.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  async function mergeRouteHooks (def, withHandler = true) {
2
2
  const { last, isFunction } = this.app.lib._
3
- const { hookTypes } = this.app.pluginClass.waibu
3
+ const { hookTypes } = this.app.baseClass.Waibu
4
4
  const hooks = [...hookTypes]
5
5
  const me = this
6
6
  if (withHandler) hooks.push('handler')
File without changes
@@ -1,7 +1,7 @@
1
1
  async function routeHook (ns) {
2
2
  const ctx = this.app[ns].instance
3
3
  const { runHook } = this.app.bajo
4
- const { hookTypes } = this.app.pluginClass.waibu
4
+ const { hookTypes } = this.app.baseClass.Waibu
5
5
  for (const hook of hookTypes) {
6
6
  ctx.addHook(hook, async function (...args) {
7
7
  args.push(this)
package/logo.png CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,11 @@
9
9
  },
10
10
  "type": "module",
11
11
  "bajo": {
12
- "type": "plugin"
12
+ "type": "plugin",
13
+ "alias": "w",
14
+ "dependencies": [
15
+ "bajo-extra"
16
+ ]
13
17
  },
14
18
  "repository": {
15
19
  "type": "git",
@@ -31,23 +35,23 @@
31
35
  },
32
36
  "homepage": "https://github.com/ardhi/waibu#readme",
33
37
  "dependencies": {
34
- "@fastify/accepts": "^5.0.2",
35
- "@fastify/compress": "^8.0.1",
38
+ "@fastify/accepts": "^5.0.4",
39
+ "@fastify/compress": "^8.3.1",
36
40
  "@fastify/cookie": "^11.0.2",
37
- "@fastify/cors": "^10.0.2",
41
+ "@fastify/cors": "^11.2.0",
38
42
  "@fastify/flash": "^6.0.3",
39
43
  "@fastify/formbody": "^8.0.2",
40
- "@fastify/helmet": "^13.0.1",
41
- "@fastify/multipart": "^9.0.2",
42
- "@fastify/rate-limit": "^10.2.2",
43
- "@fastify/reply-from": "^12.0.1",
44
- "@fastify/sensible": "^6.0.2",
45
- "@fastify/session": "^11.1.0",
44
+ "@fastify/helmet": "^13.0.2",
45
+ "@fastify/multipart": "^9.3.0",
46
+ "@fastify/rate-limit": "^10.3.0",
47
+ "@fastify/reply-from": "^12.5.0",
48
+ "@fastify/sensible": "^6.0.4",
49
+ "@fastify/session": "^11.1.1",
46
50
  "@fastify/under-pressure": "^9.0.3",
47
- "fastify": "^5.2.1",
51
+ "fastify": "^5.6.2",
48
52
  "fastify-no-icon": "^7.0.0",
49
- "query-string": "^9.1.1",
50
- "waibu-fastify-static": "^1.1.0"
53
+ "query-string": "^9.3.1",
54
+ "waibu-fastify-static": "^2.0.0"
51
55
  },
52
56
  "devDependencies": {
53
57
  "clean-jsdoc-theme": "^4.3.0",
@@ -0,0 +1,16 @@
1
+ # Changes
2
+
3
+ ## 2025-12-28
4
+
5
+ - [2.1.0] Ported to ```bajo@2.2.x``` specs
6
+ - [2.1.0] Upgrade to ```fastify@5.6.2```
7
+ - [2.1.0] Upgrade to ```query-string@9.3.1```
8
+ - [2.1.0] Upgrade to ```@fastify/accepts@5.0.4```
9
+ - [2.1.0] Upgrade to ```@fastify/compress@8.3.1```
10
+ - [2.1.0] Upgrade to ```@fastify/cors@11.2.0```
11
+ - [2.1.0] Upgrade to ```@fastify/helmet@13.0.2```
12
+ - [2.1.0] Upgrade to ```@fastify/multipart@9.3.0```
13
+ - [2.1.0] Upgrade to ```@fastify/rate-limit@10.3.0```
14
+ - [2.1.0] Upgrade to ```@fastify/reply-from@12.5.0```
15
+ - [2.1.0] Upgrade to ```@fastify/sensible@6.0.4```
16
+ - [2.1.0] Upgrade to ```@fastify/session@11.1.1```
package/wiki/CONFIG.md CHANGED
File without changes
File without changes
package/wiki/DEV-GUIDE.md CHANGED
File without changes
package/wiki/ECOSYSTEM.md CHANGED
File without changes
File without changes
File without changes