bajo 2.18.0 → 2.20.0

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 (74) hide show
  1. package/.github/workflows/test.yml +37 -0
  2. package/class/_helper.js +23 -7
  3. package/class/app.js +64 -47
  4. package/class/bajo.js +182 -138
  5. package/class/base.js +3 -3
  6. package/class/cache.js +60 -0
  7. package/class/err.js +14 -11
  8. package/class/log.js +41 -40
  9. package/class/plugin.js +35 -36
  10. package/class/print.js +54 -51
  11. package/class/tools.js +3 -4
  12. package/docs/App.html +7 -7
  13. package/docs/Bajo.html +2 -2
  14. package/docs/Base.html +1 -1
  15. package/docs/Cache.html +3 -0
  16. package/docs/Err.html +2 -2
  17. package/docs/Log.html +2 -2
  18. package/docs/Plugin.html +1 -1
  19. package/docs/Print.html +1 -1
  20. package/docs/Tools.html +3 -0
  21. package/docs/class__helper.js.html +694 -0
  22. package/docs/class_app.js.html +307 -149
  23. package/docs/class_bajo.js.html +316 -464
  24. package/docs/class_base.js.html +35 -32
  25. package/docs/class_cache.js.html +150 -0
  26. package/docs/class_err.js.html +144 -0
  27. package/docs/class_log.js.html +270 -0
  28. package/docs/class_plugin.js.html +98 -71
  29. package/docs/class_print.js.html +261 -0
  30. package/docs/class_tools.js.html +44 -0
  31. package/docs/data/search.json +1 -1
  32. package/docs/global.html +1 -4
  33. package/docs/index.html +1 -1
  34. package/docs/index.js.html +21 -14
  35. package/docs/lib_find-deep.js.html +27 -0
  36. package/docs/lib_formats.js.html +19 -19
  37. package/docs/lib_freeze.js.html +19 -0
  38. package/docs/lib_import-module.js.html +16 -14
  39. package/docs/lib_index.js.html +9 -0
  40. package/docs/lib_log-levels.js.html +2 -2
  41. package/docs/module-Helper.html +3 -0
  42. package/docs/module-Lib.html +3 -8
  43. package/docs/scripts/core.js +477 -476
  44. package/docs/scripts/resize.js +36 -36
  45. package/docs/scripts/search.js +105 -105
  46. package/docs/scripts/third-party/fuse.js +1 -1
  47. package/docs/scripts/third-party/hljs-line-num-original.js +285 -282
  48. package/docs/scripts/third-party/hljs-line-num.js +1 -1
  49. package/docs/scripts/third-party/hljs-original.js +1202 -1195
  50. package/docs/scripts/third-party/hljs.js +1 -1
  51. package/docs/scripts/third-party/popper.js +1 -1
  52. package/docs/scripts/third-party/tippy.js +1 -1
  53. package/docs/scripts/third-party/tocbot.js +509 -508
  54. package/index.js +8 -11
  55. package/lib/find-deep.js +3 -3
  56. package/lib/formats.js +17 -17
  57. package/lib/freeze.js +3 -3
  58. package/lib/import-module.js +8 -8
  59. package/package.json +3 -2
  60. package/test/app.test.js +183 -0
  61. package/test/bajo.test.js +125 -0
  62. package/test/base.test.js +74 -107
  63. package/test/cache.test.js +94 -0
  64. package/test/e2e.test.js +137 -0
  65. package/test/err.test.js +73 -0
  66. package/test/helper.test.js +39 -0
  67. package/test/import-module.test.js +138 -0
  68. package/test/integration.test.js +218 -0
  69. package/test/log.test.js +119 -0
  70. package/test/plugin.test.js +116 -0
  71. package/test/print.test.js +100 -0
  72. package/test/tools.test.js +38 -0
  73. package/wiki/CHANGES.md +12 -0
  74. package/.mocharc.json +0 -4
@@ -1 +1 @@
1
- {"list":[{"title":"App","link":"<a href=\"App.html\">App</a>"},{"title":"App#addPlugin","link":"<a href=\"App.html#addPlugin\">addPlugin</a>","description":"<p>Add and save plugin and it's class definition (if provided)</p>"},{"title":"App#applet","link":"<a href=\"App.html#applet\">applet</a>","description":"<p>If app runs in applet mode, this will be the applet's name</p>"},{"title":"App#applets","link":"<a href=\"App.html#applets\">applets</a>","description":"<p>Applets</p>"},{"title":"App#args","link":"<a href=\"App.html#args\">args</a>","description":"<p>Program arguments</p>\n<pre class=\"prettyprint source\"><code>$ node index.js arg1 arg2\n...\nconsole.log(this.args) // it should print: ['arg1', 'arg2']\n</code></pre>"},{"title":"App#argv","link":"<a href=\"App.html#argv\">argv</a>","description":"<p>Program options.</p>\n<ul>\n<li>Dash (<code>-</code>) breaks the string into object keys</li>\n<li>While colon (<code>:</code>) is used as namespace separator. If no namespace found, it is saved under <code>_</code> key.</li>\n</ul>\n<p>Values are parsed automatically. See {@link https://github.com/ladjs/dotenv-parse-variables|dotenv-parse-variables}\nfor details.</p>\n<pre class=\"prettyprint source\"><code>$ node index.js --my-name-first=John --my-name-last=Doe --my-birthDay=secret --nameSpace:path-subPath=true\n...\n// {\n// _: {\n// my: {\n// name: { first: 'John', last: 'Doe' },\n// birthDay: 'secret'\n// }\n// },\n// nameSpace: { path: { subPath: true } }\n// }\n</code></pre>"},{"title":"App#boot","link":"<a href=\"App.html#boot\">boot</a>","description":"<p>Boot process:</p>\n<ul>\n<li>Parsing {@link module:Lib.parseArgsArgv|program arguments, options} and {@link module:Lib.parseEnv|environment values}</li>\n<li>Create {@link Bajo|Bajo} instance &amp; initialize it</li>\n<li>{@link module:Helper/Bajo.runAsApplet|Run in applet mode} if <code>-a</code> or <code>--applet</code> is given</li>\n</ul>\n<p>After boot process is completed, event <code>bajo:afterBootComplete</code> is emitted.</p>\n<p>If app mode is <code>applet</code>, it runs your choosen applet instead.</p>"},{"title":"App#configHandlers","link":"<a href=\"App.html#configHandlers\">configHandlers</a>","description":"<p>Config handlers.</p>\n<p>By default, there are two built-in handlers available: <code>.js</code>\nand <code>.json</code>. Use plugins to add more, e.g {@link https://github.com/ardhi/bajo-config|bajo-config}\nlets you to use <code>.yaml/.yml</code> and <code>.toml</code></p>"},{"title":"App#dump","link":"<a href=\"App.html#dump\">dump</a>","description":"<p>Dumping variable on screen. Like <code>console.log</code> but with max 10 depth.</p>"},{"title":"App#envVars","link":"<a href=\"App.html#envVars\">envVars</a>","description":"<p>Environment variables. Support dotenv (<code>.env</code>) file too!</p>\n<ul>\n<li>Underscore (<code>_</code>) translates key to camel-cased one</li>\n<li>Double underscores (<code>__</code>) breaks the key into object keys</li>\n<li>While dot (<code>.</code>) is used as namespace separator. If no namespace found, it is saved under <code>_</code> key.</li>\n</ul>\n<p>Values are also parsed automatically using {@link https://github.com/ladjs/dotenv-parse-variables|dotenv-parse-variables}.</p>\n<p>Example:</p>\n<ul>\n<li><code>MY_KEY=secret</code> → <code>{ _: { myKey: 'secret' } }</code></li>\n<li><code>MY_KEY__SUB_KEY=supersecret</code> → <code>{ _: { myKey: { subKey: 'supersecret' } } }</code></li>\n<li><code>MY_NS.MY_NAME=John</code> → <code>{ myNs: { myName: 'John' } }</code></li>\n</ul>"},{"title":"App#exit","link":"<a href=\"App.html#exit\">exit</a>","description":"<p>Terminate the app and back to console</p>"},{"title":"App#getAllNs","link":"<a href=\"App.html#getAllNs\">getAllNs</a>","description":"<p>Get all loaded plugin namesspaces</p>"},{"title":"App#getConfigFormats","link":"<a href=\"App.html#getConfigFormats\">getConfigFormats</a>","description":"<p>Helper method to list all supported config formats</p>"},{"title":"App#lib","link":"<a href=\"App.html#lib\">lib</a>","description":"<p>Gives you direct access to the most commonly used 3rd party library in a Bajo based app.\nNo manual import necessary, always available, anywhere, anytime!</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { camelCase, kebabCase } = this.app.lib._\nconsole.log(camelCase('Elit commodo sit et aliqua'))\n</code></pre>"},{"title":"App#loadIntl","link":"<a href=\"App.html#loadIntl\">loadIntl</a>","description":"<p>Load internationalization &amp; languages files for particular plugin</p>"},{"title":"App#log","link":"<a href=\"App.html#log\">log</a>","description":"<p>Instance of system log</p>"},{"title":"App#pluginClass","link":"<a href=\"App.html#pluginClass\">pluginClass</a>","description":"<p>All plugin's class definitions are saved here as key-value pairs with plugin name as its key.\nThe special key <code>base</code> is for {@link Base}'s class so anytime you want to\ncreate your own plugin, just use something like this:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>class MyPlugin extends this.app.pluginClass.base {\n ... your class\n}</code></pre>"},{"title":"App#pluginPkgs","link":"<a href=\"App.html#pluginPkgs\">pluginPkgs</a>","description":"<p>List of all loaded plugin's package names</p>"},{"title":"App#runAt","link":"<a href=\"App.html#runAt\">runAt</a>","description":"<p>Date/time when your app start</p>"},{"title":"App#t","link":"<a href=\"App.html#t\">t</a>","description":"<p>Translate text and interpolate with given <code>args</code>.</p>\n<p>There is a shortcut to this method attached on all plugins. You'll normally call that shorcut\ninstead of this method, because it is bound to plugin's name already</p>\n<pre class=\"prettyprint source lang-javascript\"><code>... within your main plugin\nconst translated = this.app.t('main', 'My cute cat is %s', 'purring')\n// or\nconst translated = this.t('My cute cat is %s', 'purring')\n</code></pre>"},{"title":"App.envs","link":"<a href=\"App.html#.envs\">envs</a>","description":"<p>App environments</p>"},{"title":"App.mainNs","link":"<a href=\"App.html#.mainNs\">mainNs</a>","description":"<p>Your main namespace. And yes, you suppose to NOT CHANGE this</p>"},{"title":"Bajo","link":"<a href=\"Bajo.html\">Bajo</a>"},{"title":"Bajo#breakNsPath","link":"<a href=\"Bajo.html#breakNsPath\">breakNsPath</a>","description":"<p>Break name to its namespace &amp; path infos</p>"},{"title":"Bajo#buildCollections","link":"<a href=\"Bajo.html#buildCollections\">buildCollections</a>","description":"<p>Method to transform config's array or object into an array of collection.</p>"},{"title":"Bajo#buildNsPath","link":"<a href=\"Bajo.html#buildNsPath\">buildNsPath</a>","description":"<p>Build ns/path pairs</p>"},{"title":"Bajo#callHandler","link":"<a href=\"Bajo.html#callHandler\">callHandler</a>","description":"<p>Calling any plugin's method by its name:</p>\n<ul>\n<li>If name is a string, the corresponding plugin's method will be called with passed args as its parameters</li>\n<li>If name is a plugin instance, this will be used as the scope instead. The first args is now the handler name and the rest are its parameters</li>\n<li>If name is a function, this function will be run under scope with the remaining args</li>\n<li>If name is an object and has <code>handler</code> key in it, this function handler will be instead</li>\n</ul>"},{"title":"Bajo#config","link":"<a href=\"Bajo.html#config\">config</a>","description":"<p>Config object</p>"},{"title":"Bajo#eachPlugins","link":"<a href=\"Bajo.html#eachPlugins\">eachPlugins</a>","description":"<p>This function iterates through all loaded plugins and call the provided handler scoped as the running plugin.\nAnd an object with the following key serves as its parameter:</p>\n<ul>\n<li><code>file</code>: file matched the glob pattern</li>\n<li><code>dir</code>: plugin's base directory</li>\n</ul>"},{"title":"Bajo#findDeep","link":"<a href=\"Bajo.html#findDeep\">findDeep</a>","description":"<p>Find item deep in paths</p>"},{"title":"Bajo#format","link":"<a href=\"Bajo.html#format\">format</a>","description":"<p>Format value</p>"},{"title":"Bajo#formatByType","link":"<a href=\"Bajo.html#formatByType\">formatByType</a>","description":"<p>Format value by type</p>"},{"title":"Bajo#freeze","link":"<a href=\"Bajo.html#freeze\">freeze</a>","description":"<p>Freeze object</p>"},{"title":"Bajo#generateId","link":"<a href=\"Bajo.html#generateId\">generateId</a>","description":"<p>Generate unique random characters that can be used as ID. Use {@link https://github.com/ai/nanoid|nanoid} under the hood</p>"},{"title":"Bajo#getGlobalModuleDir","link":"<a href=\"Bajo.html#getGlobalModuleDir\">getGlobalModuleDir</a>","description":"<p>Get NPM global module directory</p>"},{"title":"Bajo#getMethod","link":"<a href=\"Bajo.html#getMethod\">getMethod</a>","description":"<p>Get class method by name</p>"},{"title":"Bajo#getModuleDir","link":"<a href=\"Bajo.html#getModuleDir\">getModuleDir</a>","description":"<p>Get module directory, locally and globally</p>"},{"title":"Bajo#getPlugin","link":"<a href=\"Bajo.html#getPlugin\">getPlugin</a>","description":"<p>Get plugin by name</p>"},{"title":"Bajo#getPluginDataDir","link":"<a href=\"Bajo.html#getPluginDataDir\">getPluginDataDir</a>","description":"<p>Get plugin data directory</p>"},{"title":"Bajo#getPluginFile","link":"<a href=\"Bajo.html#getPluginFile\">getPluginFile</a>","description":"<p>Resolve file path from:</p>\n<ul>\n<li>local/absolute file</li>\n<li>TNsPath (<code>myPlugin:/path/to/file.txt</code>)</li>\n</ul>"},{"title":"Bajo#getUnitFormat","link":"<a href=\"Bajo.html#getUnitFormat\">getUnitFormat</a>","description":"<p>Get unit format</p>"},{"title":"Bajo#importModule","link":"<a href=\"Bajo.html#importModule\">importModule</a>","description":"<p>Import file/module from any loaded plugins.</p>\n<p>Method proxy from {@link module:Lib.importModule}</p>"},{"title":"Bajo#importPkg","link":"<a href=\"Bajo.html#importPkg\">importPkg</a>","description":"<p>Import one or more packages belongs to a plugin.</p>\n<p>If the last arguments passed is an object, this object serves as options object:</p>\n<ul>\n<li><code>returnDefault</code>: should return package's default export. Defaults to <code>true</code></li>\n<li><code>throwNotFound</code>: should throw if package is not found. Defaults to <code>false</code></li>\n<li><code>noCache</code>: always use fresh import. Defaults to <code>false</code></li>\n<li><code>asObject</code>: see below. Defaults to <code>false</code></li>\n</ul>\n<p>Return value:</p>\n<ul>\n<li>if <code>options.asObject</code> is <code>true</code> (default <code>false</code>), return as object with package's names as it's keys</li>\n<li>Otherwise depends on how many parameters are provided, it should return the named package or an array of packages</li>\n</ul>\n<p>Example: you want to import <code>delay</code> and <code>chalk</code> from <code>bajo</code> plugin because you want to use it in your code</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { importPkg } from this.app.bajo\nconst [delay, chalk] = await importPkg('bajo:delay', 'bajo:chalk')\n\nawait delay(1000)\n...\n</code></pre>"},{"title":"Bajo#init","link":"<a href=\"Bajo.html#init\">init</a>","description":"<p>Initialization:</p>\n<ol>\n<li>Building {@link module:Helper/Bajo.buildBaseConfig|base config}</li>\n<li>{@link module:Helper/Bajo.buildPlugins|Building plugins}</li>\n<li>Collect all {@link module:Helper/Bajo.collectConfigHandlers|config handler}</li>\n<li>Building {@link module:Helper/Bajo.buildExtConfig|extra config}</li>\n<li>Setup {@link module:Helper/Bajo.bootOrder|boot order}</li>\n<li>{@link module:Helper/Bajo.bootPlugins|Boot loaded plugins}</li>\n<li>Attach {@link module:Helper/Bajo.exitHandler|exit handlers}</li>\n</ol>"},{"title":"Bajo#isEmptyDir","link":"<a href=\"Bajo.html#isEmptyDir\">isEmptyDir</a>","description":"<p>Check whether a directory is empty or not. More info please {@link https://github.com/gulpjs/empty-dir|check here}.</p>"},{"title":"Bajo#isLogInRange","link":"<a href=\"Bajo.html#isLogInRange\">isLogInRange</a>","description":"<p>Check whether log level is within log's app current level</p>"},{"title":"Bajo#isValidApp","link":"<a href=\"Bajo.html#isValidApp\">isValidApp</a>","description":"<p>Check whether directory is a valid Bajo app</p>"},{"title":"Bajo#isValidPlugin","link":"<a href=\"Bajo.html#isValidPlugin\">isValidPlugin</a>","description":"<p>Check whether directory is a valid Bajo plugin</p>"},{"title":"Bajo#join","link":"<a href=\"Bajo.html#join\">join</a>","description":"<p>Human friendly join array of items.</p>"},{"title":"Bajo#numUnit","link":"<a href=\"Bajo.html#numUnit\">numUnit</a>","description":"<p>Return its numeric portion of a value</p>"},{"title":"Bajo#parseDt","link":"<a href=\"Bajo.html#parseDt\">parseDt</a>","description":"<p>Parse datetime string as Javascript date object. Please visit {@link https://day.js.org|dayjs} for valid formats and more infos</p>"},{"title":"Bajo#parseDur","link":"<a href=\"Bajo.html#parseDur\">parseDur</a>","description":"<p>Parse duration to its millisecond value. Use {@link https://github.com/vercel/ms|ms} under the hood</p>"},{"title":"Bajo#parseObject","link":"<a href=\"Bajo.html#parseObject\">parseObject</a>","description":"<p>Parse an object and optionally normalize its values recursively. Use {@link https://github.com/ladjs/dotenv-parse-variables}\nto parse values, so please have a visit to know how it works</p>\n<p>If <code>options.parseValue</code> is <code>true</code>, any key ends with <code>Dur</code> and <code>Dt</code> will\nalso be parsed as millisecond and Javascript date time accordingly.</p>"},{"title":"Bajo#readAllConfigs","link":"<a href=\"Bajo.html#readAllConfigs\">readAllConfigs</a>","description":"<p>Read all config files by path</p>"},{"title":"Bajo#readConfig","link":"<a href=\"Bajo.html#readConfig\">readConfig</a>","description":"<p>Read and parse file as config object. Supported types: <code>.js</code> and <code>.json</code>.\nMore supports can be added using plugin. {@link https://github.com/ardhi/bajo-config|bajo-config} gives you additional supports for <code>.yml</code>, <code>.yaml</code> and <code>.toml</code> file</p>\n<p>If file extension is <code>.*</code>, it will be auto detected and parsed accordingly</p>"},{"title":"Bajo#readJson","link":"<a href=\"Bajo.html#readJson\">readJson</a>","description":"<p>Read and parse json file</p>"},{"title":"Bajo#resolvePath","link":"<a href=\"Bajo.html#resolvePath\">resolvePath</a>","description":"<p>Resolve file name to filesystem's path. Windows path separator <code>\\</code>\nis normalized to Unix's <code>/</code></p>"},{"title":"Bajo#runHook","link":"<a href=\"Bajo.html#runHook\">runHook</a>","description":"<p>Run named hook/event</p>"},{"title":"Bajo#saveAsDownload","link":"<a href=\"Bajo.html#saveAsDownload\">saveAsDownload</a>","description":"<p>Save item as file in Bajo's download directory. That is a directory inside your\nBajo plugin's data directory.</p>\n<p>If file exists already, file will automatically be\nrenamed incrementally.</p>"},{"title":"Base","link":"<a href=\"Base.html\">Base</a>"},{"title":"Base#exit","link":"<a href=\"Base.html#exit\">exit</a>","description":"<p>Upon app termination, this method will be called first. Mostly useful for system cleanup,\ndelete temporary files, freeing resources etc.</p>"},{"title":"Base#init","link":"<a href=\"Base.html#init\">init</a>","description":"<p>After config is read, plugin will be initialized. You can still change your config here,\nbecause after plugin is initialized, config will be deep frozen.</p>"},{"title":"Base#loadConfig","link":"<a href=\"Base.html#loadConfig\">loadConfig</a>","description":"<p>Load config from file in data directory, program arguments and environment variables. Level of importance:\n<code>Env Variables &gt; Program Arguments &gt; Config File</code></p>"},{"title":"Base#start","link":"<a href=\"Base.html#start\">start</a>","description":"<p>This method will be called after plugin's init</p>"},{"title":"Base.dependencies","link":"<a href=\"Base.html#.dependencies\">dependencies</a>","description":"<p>Dependencies to other plugins. Enter all plugin's package name your plugin dependent from.</p>\n<p>Semver is also supported.</p>"},{"title":"Err","link":"<a href=\"Err.html\">Err</a>"},{"title":"Err#app","link":"<a href=\"Err.html#app\">app</a>","description":"<p>The app instance</p>"},{"title":"Err#fatal","link":"<a href=\"Err.html#fatal\">fatal</a>","description":"<p>Print instance on console and terminate process</p>"},{"title":"Err#formatErrorDetails","link":"<a href=\"Err.html#formatErrorDetails\">formatErrorDetails</a>","description":"<p>Pretty format error details</p>"},{"title":"Err#message","link":"<a href=\"Err.html#message\">message</a>","description":"<p>Translated message</p>"},{"title":"Err#orgMessage","link":"<a href=\"Err.html#orgMessage\">orgMessage</a>","description":"<p>Original message before translation</p>"},{"title":"Err#payload","link":"<a href=\"Err.html#payload\">payload</a>","description":"<p>Error payload extracted from the last arguments</p>"},{"title":"Err#plugin","link":"<a href=\"Err.html#plugin\">plugin</a>","description":"<p>Attached plugin</p>"},{"title":"Err#write","link":"<a href=\"Err.html#write\">write</a>","description":"<p>Write message to the console</p>"},{"title":"Log","link":"<a href=\"Log.html\">Log</a>"},{"title":"Log#app","link":"<a href=\"Log.html#app\">app</a>","description":"<p>The app instance</p>"},{"title":"Log#debug","link":"<a href=\"Log.html#debug\">debug</a>","description":"<p>Display &amp; format message in <code>debug</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#error","link":"<a href=\"Log.html#error\">error</a>","description":"<p>Display &amp; format message in <code>error</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#fatal","link":"<a href=\"Log.html#fatal\">fatal</a>","description":"<p>Display &amp; format message in <code>fatal</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#formatMsg","link":"<a href=\"Log.html#formatMsg\">formatMsg</a>","description":"<p>Display &amp; format message according to one of these rules:</p>\n<ol>\n<li><code>level</code> <code>prefix</code> <code>text</code> <code>var 1</code> <code>var 2</code> <code>...var n</code> - Translate <code>text</code> and interpolate with <code>vars</code> for level <code>level</code></li>\n<li><code>level</code> <code>prefix</code> <code>data</code> <code>text</code> <code>var 1</code> <code>var 2</code> <code>...var n</code> - As above, and append stringified <code>data</code></li>\n<li><code>level</code> <code>prefix</code> <code>error</code> - Format as {@link Err} object. If current log level is <em>trace</em>, dump it on screen</li>\n</ol>\n<p>In <code>prod</code> environment, log will be delivered as JSON stringified object. See {@link TLogJson} for more info</p>"},{"title":"Log#info","link":"<a href=\"Log.html#info\">info</a>","description":"<p>Display &amp; format message in <code>info</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#silent","link":"<a href=\"Log.html#silent\">silent</a>","description":"<p>Display &amp; format message in <code>silent</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#trace","link":"<a href=\"Log.html#trace\">trace</a>","description":"<p>Display &amp; format message in <code>trace</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Log#warn","link":"<a href=\"Log.html#warn\">warn</a>","description":"<p>Display &amp; format message in <code>warn</code> level. See {@link Log#formatMsg|formatMsg} for details</p>"},{"title":"Plugin","link":"<a href=\"Plugin.html\">Plugin</a>"},{"title":"Plugin#alias","link":"<a href=\"Plugin.html#alias\">alias</a>","description":"<p>Getter for plugin's alias</p>"},{"title":"Plugin#app","link":"<a href=\"Plugin.html#app\">app</a>","description":"<p>Reference to app instance</p>"},{"title":"Plugin#config","link":"<a href=\"Plugin.html#config\">config</a>","description":"<p>Config object</p>"},{"title":"Plugin#error","link":"<a href=\"Plugin.html#error\">error</a>","description":"<p>Create an instance of {@link Err} object</p>"},{"title":"Plugin#fatal","link":"<a href=\"Plugin.html#fatal\">fatal</a>","description":"<p>Create an instance of Err object, display it on screen and then force\nterminate the app process</p>"},{"title":"Plugin#getConfig","link":"<a href=\"Plugin.html#getConfig\">getConfig</a>","description":"<p>Get plugin's config value</p>"},{"title":"Plugin#log","link":"<a href=\"Plugin.html#log\">log</a>","description":"<p>Shortcut to {@link App#log} with prefix parameter set to this plugin name.</p>"},{"title":"Plugin#ns","link":"<a href=\"Plugin.html#ns\">ns</a>","description":"<p>Getter for plugin's ns</p>"},{"title":"Plugin#pkgName","link":"<a href=\"Plugin.html#pkgName\">pkgName</a>","description":"<p>Getter for plugin's package name</p>"},{"title":"Plugin#t","link":"<a href=\"Plugin.html#t\">t</a>","description":"<p>Translate text and interpolate with given <code>args</code>.</p>\n<p>Shortcut to {@link App#t} with ns parameter set to this plugin namespace.</p>"},{"title":"Plugin.alias","link":"<a href=\"Plugin.html#.alias\">alias</a>","description":"<p>Plugin alias. Derived plugin must provide its own, unique alias. If it left blank,\nBajo will provide this automatically (by using the kebab-cased version of plugin name)</p>"},{"title":"Plugin.ns","link":"<a href=\"Plugin.html#.ns\">ns</a>","description":"<p>Namespace (ns) or plugin's name. Simply the camel cased version of plugin's package name</p>"},{"title":"Plugin.pkgName","link":"<a href=\"Plugin.html#.pkgName\">pkgName</a>","description":"<p>Package name, the one from package.json</p>"},{"title":"Print","link":"<a href=\"Print.html\">Print</a>"},{"title":"Print#app","link":"<a href=\"Print.html#app\">app</a>","description":"<p>The app instance</p>"},{"title":"Print#buildText","link":"<a href=\"Print.html#buildText\">buildText</a>","description":"<p>Translate, prefixed with counter and/or datetime etc</p>"},{"title":"Print#clear","link":"<a href=\"Print.html#clear\">clear</a>","description":"<p>Clear spinner text</p>"},{"title":"Print#fail","link":"<a href=\"Print.html#fail\">fail</a>","description":"<p>Print failed message, prefixed with a cross icon</p>"},{"title":"Print#fatal","link":"<a href=\"Print.html#fatal\">fatal</a>","description":"<p>Print failed message, prefixed with a cross icon and exit</p>"},{"title":"Print#getElapsed","link":"<a href=\"Print.html#getElapsed\">getElapsed</a>","description":"<p>Get elapsed time since instance is created</p>"},{"title":"Print#info","link":"<a href=\"Print.html#info\">info</a>","description":"<p>Print information message, prefixed with an info icon</p>"},{"title":"Print#options","link":"<a href=\"Print.html#options\">options</a>","description":"<p>Options object</p>"},{"title":"Print#ora","link":"<a href=\"Print.html#ora\">ora</a>","description":"<p>ora instance</p>"},{"title":"Print#plugin","link":"<a href=\"Print.html#plugin\">plugin</a>","description":"<p>Attached plugin</p>"},{"title":"Print#render","link":"<a href=\"Print.html#render\">render</a>","description":"<p>Force render spinner</p>"},{"title":"Print#setOpts","link":"<a href=\"Print.html#setOpts\">setOpts</a>","description":"<p>Setting spinner options; override the one passed at constructor</p>"},{"title":"Print#setText","link":"<a href=\"Print.html#setText\">setText</a>","description":"<p>Set spinner's text</p>"},{"title":"Print#spinner","link":"<a href=\"Print.html#spinner\">spinner</a>","description":"<p>Create a new print instance</p>"},{"title":"Print#start","link":"<a href=\"Print.html#start\">start</a>","description":"<p>Start the spinner</p>"},{"title":"Print#startTime","link":"<a href=\"Print.html#startTime\">startTime</a>","description":"<p>Time when instance is created</p>"},{"title":"Print#stop","link":"<a href=\"Print.html#stop\">stop</a>","description":"<p>Stop the spinner</p>"},{"title":"Print#succeed","link":"<a href=\"Print.html#succeed\">succeed</a>","description":"<p>Print success message, prefixed with a check icon</p>"},{"title":"Print#warn","link":"<a href=\"Print.html#warn\">warn</a>","description":"<p>Print warning message, prefixed with a warn icon</p>"},{"title":"TAppConfigHandler","link":"<a href=\"global.html#TAppConfigHandler\">TAppConfigHandler</a>"},{"title":"TAppEnv","link":"<a href=\"global.html#TAppEnv\">TAppEnv</a>"},{"title":"TAppLib","link":"<a href=\"global.html#TAppLib\">TAppLib</a>"},{"title":"TBajoDataType","link":"<a href=\"global.html#TBajoDataType\">TBajoDataType</a>","description":"<p>Supported data types</p>"},{"title":"TBajoFormatResult","link":"<a href=\"global.html#TBajoFormatResult\">TBajoFormatResult</a>","description":"<p>Object returned by {@link Bajo#getUnitFormat|bajo:getUnitFormat}</p>"},{"title":"TBajoFormatType","link":"<a href=\"global.html#TBajoFormatType\">TBajoFormatType</a>","description":"<p>General format types</p>"},{"title":"TLogJson","link":"<a href=\"global.html#TLogJson\">TLogJson</a>","description":"<p>Log output in stringified JSON format. Returned when app run in <code>prod</code> environment</p>"},{"title":"TLogLevels","link":"<a href=\"global.html#TLogLevels\">TLogLevels</a>"},{"title":"TNsPathPairs","link":"<a href=\"global.html#TNsPathPairs\">TNsPathPairs</a>","description":"<p>Name based <code>{ns}:{path}</code> format</p>"},{"title":"TNsPathResult","link":"<a href=\"global.html#TNsPathResult\">TNsPathResult</a>","description":"<p>Object returned by {@link Bajo#breakNsPath|bajo:breakNsPath}</p>"},{"title":"TPrintOptions","link":"<a href=\"global.html#TPrintOptions\">TPrintOptions</a>"},{"title":"bajo:afterAll{method}","link":"<a href=\"global.html#event:bajo:afterAll%257Bmethod%257D\">bajo:afterAll{method}</a>","description":"<p>Run after all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></p>"},{"title":"bajo:afterBootComplete","link":"<a href=\"global.html#event:bajo:afterBootComplete\">bajo:afterBootComplete</a>","description":"<p>Run after boot process is completed</p>"},{"title":"bajo:afterBuildCollection","link":"<a href=\"global.html#event:bajo:afterBuildCollection\">bajo:afterBuildCollection</a>","description":"<p>Run after collection is built</p>"},{"title":"bajo:afterCollectHooks","link":"<a href=\"global.html#event:bajo:afterCollectHooks\">bajo:afterCollectHooks</a>","description":"<p>Run after hooks are collected</p>"},{"title":"bajo:beforeAll{method}","link":"<a href=\"global.html#event:bajo:beforeAll%257Bmethod%257D\">bajo:beforeAll{method}</a>","description":"<p>Run before all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></p>"},{"title":"bajo:beforeBuildCollection","link":"<a href=\"global.html#event:bajo:beforeBuildCollection\">bajo:beforeBuildCollection</a>","description":"<p>Run before collection is built</p>"},{"title":"boot","link":"<a href=\"global.html#boot\">boot</a>","description":"<p>Main entry point of a Bajo app. Returned value is the app instance itself.</p>\n<p>While you can code directly around it, you typically write your code the main plugin (<code>{mainNs}</code>) or\nwriting your own custom plugin.</p>\n<p>I recommend the second method for its portability.</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>// index.js file. Your main package entry point\nimport bajo from 'bajo'\nawait bajo()\n</code></pre>"},{"title":"event:{ns}:afterAppletRun","link":"<a href=\"global.html#event:%257Bns%257D:afterAppletRun\">{ns}:afterAppletRun</a>","description":"<p>Run after applet is run. <code>[ns]</code> is applet's namespace</p>"},{"title":"event:{ns}:after{method}","link":"<a href=\"global.html#event:%257Bns%257D:after%257Bmethod%257D\">{ns}:after{method}</a>","description":"<p>Run after <code>{method}</code> is executed within <code>{ns}</code> context</p>\n<ul>\n<li><code>{ns}</code> - namespace</li>\n<li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></li>\n</ul>"},{"title":"event:{ns}:beforeAppletRun","link":"<a href=\"global.html#event:%257Bns%257D:beforeAppletRun\">{ns}:beforeAppletRun</a>","description":"<p>Run before applet is run. <code>[ns]</code> is applet's namespace</p>"},{"title":"event:{ns}:before{method}","link":"<a href=\"global.html#event:%257Bns%257D:before%257Bmethod%257D\">{ns}:before{method}</a>","description":"<p>Run before <code>{method}</code> is executed within <code>{ns}</code> context</p>\n<ul>\n<li><code>{ns}</code> - namespace</li>\n<li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></li>\n</ul>"},{"title":"module:Helper/Bajo","link":"<a href=\"module-Helper_Bajo.html\">Helper/Bajo</a>","description":"<p>Internal helpers called by Bajo that only used once for bootstrapping. It should remains\nhidden and not to be imported by any program.</p>"},{"title":"module:Helper/Bajo.bootOrder","link":"<a href=\"module-Helper_Bajo.html#.bootOrder\">bootOrder</a>","description":"<p>Setup plugins boot orders by reading plugin's <code>.bootorder</code> file if provided.</p>"},{"title":"module:Helper/Bajo.bootPlugins","link":"<a href=\"module-Helper_Bajo.html#.bootPlugins\">bootPlugins</a>","description":"<p>Iterate through all plugins loaded and do:</p>\n<ol>\n<li>{@link module:Helper/Base.buildConfigs|build configs}</li>\n<li>{@link module:Helper/Base.checkNameAliases|ensure names &amp; aliases uniqueness}</li>\n<li>{@link module:Helper/Base.checkDependencies|ensure dependencies are met}</li>\n<li>{@link module:Helper/Base.attachMethods|build and attach dynamic methods}</li>\n<li>{@link module:Helper/Base.collectHooks|collect hooks}</li>\n<li>{@link module:Helper/Base.run|run plugins}</li>\n</ol>"},{"title":"module:Helper/Bajo.buildBaseConfig","link":"<a href=\"module-Helper_Bajo.html#.buildBaseConfig\">buildBaseConfig</a>","description":"<p>Building bajo base config. Mostly dealing with directory setups:</p>\n<ul>\n<li>determine base directory</li>\n<li>check whether data directory is valid. If not exist, create one inside app dir</li>\n<li>ensure data config directory is there</li>\n<li>ensure tmp dir is there</li>\n<li>read the list of plugins from <code>.plugins</code> file</li>\n</ul>"},{"title":"module:Helper/Bajo.buildExtConfig","link":"<a href=\"module-Helper_Bajo.html#.buildExtConfig\">buildExtConfig</a>","description":"<p>Bajo extra config:</p>\n<ul>\n<li>reading config file</li>\n<li>merge config with arguments &amp; environments values</li>\n<li>Set environment (<code>dev</code> or <code>prod</code>)</li>\n</ul>"},{"title":"module:Helper/Bajo.buildPlugins","link":"<a href=\"module-Helper_Bajo.html#.buildPlugins\">buildPlugins</a>","description":"<p>Building all plugins:</p>\n<ul>\n<li>load from app's pluginPkgs</li>\n<li>iterate through the list and build related plugins</li>\n<li>making sure main plugin is there. If not, create from template</li>\n<li>attach these plugins to the app instance</li>\n</ul>"},{"title":"module:Helper/Bajo.collectConfigHandlers","link":"<a href=\"module-Helper_Bajo.html#.collectConfigHandlers\">collectConfigHandlers</a>","description":"<p>Collect all config handlers, including the one provided by plugins</p>"},{"title":"module:Helper/Bajo.exitHandler","link":"<a href=\"module-Helper_Bajo.html#.exitHandler\">exitHandler</a>","description":"<p>Attach plugins exit handlers and make sure the app shutdowns gracefully</p>"},{"title":"module:Helper/Bajo.runAsApplet","link":"<a href=\"module-Helper_Bajo.html#.runAsApplet\">runAsApplet</a>","description":"<p>If app is in <code>applet</code> mode, this little helper should take care plugin's applet boot process</p>"},{"title":"module:Helper/Base","link":"<a href=\"module-Helper_Base.html\">Helper/Base</a>","description":"<p>Internal helpers called by Bajo &amp; plugins that only used once for bootstrapping purpose.\nIt should remains hidden and not to be imported by any program.</p>"},{"title":"module:Helper/Base.attachMethods","link":"<a href=\"module-Helper_Base.html#.attachMethods\">attachMethods</a>","description":"<p>Scan plugins <code>method</code> directories, and turn + attach its found files as methods dynamically.</p>"},{"title":"module:Helper/Base.buildConfigs","link":"<a href=\"module-Helper_Base.html#.buildConfigs\">buildConfigs</a>","description":"<p>Build configurations</p>"},{"title":"module:Helper/Base.checkDependencies","link":"<a href=\"module-Helper_Base.html#.checkDependencies\">checkDependencies</a>","description":"<p>Ensure dependencies are met</p>"},{"title":"module:Helper/Base.checkNameAliases","link":"<a href=\"module-Helper_Base.html#.checkNameAliases\">checkNameAliases</a>","description":"<p>Ensure for names and aliases to be unique and no clashes with other plugins</p>"},{"title":"module:Helper/Base.collectHooks","link":"<a href=\"module-Helper_Base.html#.collectHooks\">collectHooks</a>","description":"<p>Collect and build hooks and push them to the bajo's hook system</p>"},{"title":"module:Helper/Base.run","link":"<a href=\"module-Helper_Base.html#.run\">run</a>","description":"<p>Finally, run all plugins</p>"},{"title":"module:Lib","link":"<a href=\"module-Lib.html\">Lib</a>","description":"<p>External helpers you can use by importing its file directly</p>"},{"title":"module:Lib.currentLoc","link":"<a href=\"module-Lib.html#.currentLoc\">currentLoc</a>","description":"<p>Get current directory &amp; file. An attempt to brings back the old <code>__dirname</code> and <code>__filename</code>\nto the ES6 era.</p>\n<p>Returns object with the following keys:</p>\n<ul>\n<li><code>__dirname</code> (aliases to <code>dir</code>) - current directory name</li>\n<li><code>__filename</code> (aliases to <code>file</code>) - current file path</li>\n</ul>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { importModule } = this.app.bajo\nconst currentLoc = await importModule('bajo:/lib/current-loc.js')\n\nconst { __dirname, __filename } = currentLoc(import.meta)\nconsole.log(__dirname, __filename)\n</code></pre>"},{"title":"module:Lib.importModule","link":"<a href=\"module-Lib.html#.importModule\">importModule</a>","description":"<p>Import file/module from any loaded plugins</p>\n<p>Example: your plugin structure looks like this</p>\n<pre class=\"prettyprint source\"><code>|- src\n| |- lib\n| | |- my-module.js\n|- index.js\n|- package.json\n</code></pre>\n<p>And now this is how to import <code>my-module.js</code>:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { importModule } = this.app.bajo\nconst myModule = await importModule('myPlugin:/src/lib/my-module.js')\n</code></pre>"},{"title":"module:Lib.parseArgsArgv","link":"<a href=\"module-Lib.html#.parseArgsArgv\">parseArgsArgv</a>","description":"<p>Parse program arguments (args) &amp; options (argv). See {@link App#args|args} &amp; {@link App#argv|argv} for examples</p>"},{"title":"module:Lib.parseEnv","link":"<a href=\"module-Lib.html#.parseEnv\">parseEnv</a>","description":"<p>Parse environment variables. See {@link App#envVars|envVars} for examples</p>"},{"title":"module:Lib.resolvePath","link":"<a href=\"module-Lib.html#.resolvePath\">resolvePath</a>","description":"<p>Resolve file name to filesystem's path. Windows path separator <code>\\</code>\nis normalized to Unix's <code>/</code></p>"},{"title":"module:Lib.shim","link":"<a href=\"module-Lib.html#.shim\">shim</a>","description":"<p>Function to attach some of the methods needed but probably not provided by your node installation:</p>\n<ul>\n<li><code>String.prototype.replaceAll</code></li>\n<li><code>String.prototype.splice</code></li>\n</ul>"}]}
1
+ {"list":[{"title":"App","link":"<a href=\"App.html\">App</a>"},{"title":"App#addPlugin","link":"<a href=\"App.html#addPlugin\">addPlugin</a>","description":"<p>Add and save plugin and it's base class definition (if provided).</p>"},{"title":"App#applet","link":"<a href=\"App.html#applet\">applet</a>","description":"<p>If app runs in applet mode, this will be the applet's name.</p>"},{"title":"App#applets","link":"<a href=\"App.html#applets\">applets</a>","description":"<p>Applets container.</p>"},{"title":"App#args","link":"<a href=\"App.html#args\">args</a>","description":"<p>Program arguments.</p>\n<pre class=\"prettyprint source\"><code>$ node index.js arg1 arg2\n...\nconsole.log(this.args) // it should print: ['arg1', 'arg2']\n</code></pre>"},{"title":"App#argv","link":"<a href=\"App.html#argv\">argv</a>","description":"<p>Program options.</p>\n<ul>\n<li>Dash (<code>-</code>) breaks the string into object keys</li>\n<li>While colon (<code>:</code>) is used as namespace separator. If no namespace found, it is saved under <code>_</code> key.</li>\n</ul>\n<p>Values are parsed automatically. See {@link https://github.com/ladjs/dotenv-parse-variables|dotenv-parse-variables}\nfor details.</p>\n<pre class=\"prettyprint source\"><code>$ node index.js --my-name-first=John --my-name-last=Doe --my-birthDay=secret --nameSpace:path-subPath=true\n...\n// {\n// _: {\n// my: {\n// name: { first: 'John', last: 'Doe' },\n// birthDay: 'secret'\n// }\n// },\n// nameSpace: { path: { subPath: true } }\n// }\n</code></pre>"},{"title":"App#baseClass","link":"<a href=\"App.html#baseClass\">baseClass</a>","description":"<p>All plugin's base class are saved here as key-value pairs with plugin name as its key.\nThe special key <code>Base</code> &amp;&amp; <code>Tools</code> is for {@link Base} &amp; {@link Tools} class so anytime you want to\ncreate your own plugin, just use something like this:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>class MyPlugin extends this.app.baseClass.Base {\n ... your class\n}</code></pre>"},{"title":"App#boot","link":"<a href=\"App.html#boot\">boot</a>","description":"<p>Boot process:</p>\n<ul>\n<li>Parsing {@link module:Lib.parseArgsArgv|program arguments, options} and {@link module:Lib.parseEnv|environment values}</li>\n<li>Create {@link Bajo|Bajo} instance &amp; initialize it</li>\n<li>{@link module:Helper/Bajo.runAsApplet|Run in applet mode} if <code>-a</code> or <code>--applet</code> is given</li>\n</ul>\n<p>After boot process is completed, event <code>bajo:afterBootCompleted</code> is emitted.</p>\n<p>If app mode is <code>applet</code>, it runs your choosen applet instead.</p>"},{"title":"App#boxen","link":"<a href=\"App.html#boxen\">boxen</a>","description":"<p>Placeholder for boxen that will get imported from <code>bajoCli</code> later during boot process.</p>"},{"title":"App#configHandlers","link":"<a href=\"App.html#configHandlers\">configHandlers</a>","description":"<p>Config handlers.</p>\n<p>By default, there are two built-in handlers available: <code>.js</code>\nand <code>.json</code>. Use plugins to add more, e.g {@link https://github.com/ardhi/bajo-config|bajo-config}\nlets you to use <code>.yaml/.yml</code> and <code>.toml</code>.</p>"},{"title":"App#dump","link":"<a href=\"App.html#dump\">dump</a>","description":"<p>Dumping variable on screen. Like <code>console.log</code> with configurable options. Useful for quick debugging and testing. You can also use it to dump variables in production without worrying about performance because it is using Bajo's built-in cache to store the result of util's inspect, so it will only be processed once for each unique variable.</p>\n<p>Any argument passed to this method will be displayed on screen.\nIf the last argument is a boolean <code>true</code>, app will quit rightaway after dumping.</p>\n<p>If you have <code>bajoCli</code> plugin installed, variables will be displayed in a nice box using <code>boxen</code> package.\nOtherwise, it will fallback to <code>console.log</code> with util's inspect result.</p>\n<p>To have more control on how the variable is displayed, you can set options in Bajo's config under <code>dump</code> key.\nSee {@link Bajo#config} for details.</p>"},{"title":"App#envVars","link":"<a href=\"App.html#envVars\">envVars</a>","description":"<p>Environment variables. Support dotenv (<code>.env</code>) file too!</p>\n<ul>\n<li>Underscore (<code>_</code>) translates key to camel-cased one</li>\n<li>Double underscores (<code>__</code>) breaks the key into object keys</li>\n<li>While dot (<code>.</code>) is used as namespace separator. If no namespace found, it is saved under <code>_</code> key.</li>\n</ul>\n<p>Values are also parsed automatically using {@link https://github.com/ladjs/dotenv-parse-variables|dotenv-parse-variables}.</p>\n<p>Example:</p>\n<ul>\n<li><code>MY_KEY=secret</code> → <code>{ _: { myKey: 'secret' } }</code></li>\n<li><code>MY_KEY__SUB_KEY=supersecret</code> → <code>{ _: { myKey: { subKey: 'supersecret' } } }</code></li>\n<li><code>MY_NS.MY_NAME=John</code> → <code>{ myNs: { myName: 'John' } }</code></li>\n</ul>"},{"title":"App#exit","link":"<a href=\"App.html#exit\">exit</a>","description":"<p>Terminate the app and back to console.</p>"},{"title":"App#getAllNs","link":"<a href=\"App.html#getAllNs\">getAllNs</a>","description":"<p>Get all loaded plugin namespaces.</p>"},{"title":"App#getAllPlugins","link":"<a href=\"App.html#getAllPlugins\">getAllPlugins</a>","description":"<p>Get all plugins loaded plugins.</p>"},{"title":"App#getConfigFormats","link":"<a href=\"App.html#getConfigFormats\">getConfigFormats</a>","description":"<p>Helper method to list all supported config formats.</p>"},{"title":"App#getPlugin","link":"<a href=\"App.html#getPlugin\">getPlugin</a>","description":"<p>Get plugin by its namespace.</p>"},{"title":"App#getPluginDataDir","link":"<a href=\"App.html#getPluginDataDir\">getPluginDataDir</a>","description":"<p>Get plugin data directory</p>"},{"title":"App#getPluginFile","link":"<a href=\"App.html#getPluginFile\">getPluginFile</a>","description":"<p>Resolve file path from:</p>\n<ul>\n<li>local/absolute file</li>\n<li>TNsPath (<code>myPlugin:/path/to/file.txt</code>)</li>\n<li>file under node_modules, e.g. <code>myPlugin:node_modules/some-package/file.txt</code></li>\n</ul>"},{"title":"App#getPlugins","link":"<a href=\"App.html#getPlugins\">getPlugins</a>","description":"<p>Get loaded plugins.</p>"},{"title":"App#lib","link":"<a href=\"App.html#lib\">lib</a>","description":"<p>Gives you direct access to the most commonly used 3rd party library in a Bajo based app.\nNo manual import necessary, always available, anywhere, anytime!</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { camelCase, kebabCase } = this.app.lib._\nconsole.log(camelCase('Elit commodo sit et aliqua'))\n</code></pre>"},{"title":"App#loadIntl","link":"<a href=\"App.html#loadIntl\">loadIntl</a>","description":"<p>Load internationalization &amp; languages files for particular plugin.</p>"},{"title":"App#log","link":"<a href=\"App.html#log\">log</a>","description":"<p>Instance of system log.</p>"},{"title":"App#options","link":"<a href=\"App.html#options\">options</a>","description":"<p>Copy of provided options.</p>"},{"title":"App#pluginPkgs","link":"<a href=\"App.html#pluginPkgs\">pluginPkgs</a>","description":"<p>Plugin's package names container. This is the list of plugins to load. It is read from <code>package.json</code> and <code>.plugins</code> file by default, but you can override it by providing <code>options.plugins</code> at constructor.</p>"},{"title":"App#runAt","link":"<a href=\"App.html#runAt\">runAt</a>","description":"<p>Date/time when your app start.</p>"},{"title":"App#startPlugin","link":"<a href=\"App.html#startPlugin\">startPlugin</a>","description":"<p>Start a plugin.</p>"},{"title":"App#stopPlugin","link":"<a href=\"App.html#stopPlugin\">stopPlugin</a>","description":"<p>Stop a plugin.</p>"},{"title":"App#t","link":"<a href=\"App.html#t\">t</a>","description":"<p>Translate text and interpolate with given <code>args</code>.</p>\n<p>There is a shortcut to this method attached on all plugins. You'll normally call that shorcut\ninstead of this method, because it is bound to plugin's name already</p>\n<pre class=\"prettyprint source lang-javascript\"><code>... within your main plugin\nconst translated = this.app.t('main', 'My cute cat is %s', 'purring')\n// or\nconst translated = this.t('My cute cat is %s', 'purring')\n</code></pre>"},{"title":"App#te","link":"<a href=\"App.html#te\">te</a>","description":"<p>Check whether translation text/key exists</p>"},{"title":"App.this.envs","link":"<a href=\"App.html#.this.envs\">this.envs</a>","description":"<p>App environments.</p>"},{"title":"App.this.mainNs","link":"<a href=\"App.html#.this.mainNs\">this.mainNs</a>","description":"<p>Your main namespace. And yes, you suppose to NOT CHANGE this.</p>"},{"title":"Bajo","link":"<a href=\"Bajo.html\">Bajo</a>"},{"title":"Bajo#breakNsPath","link":"<a href=\"Bajo.html#breakNsPath\">breakNsPath</a>","description":"<p>Break name to its namespace &amp; path infos.</p>"},{"title":"Bajo#buildCollections","link":"<a href=\"Bajo.html#buildCollections\">buildCollections</a>","description":"<p>Method to transform config's array or object into an array of collection.</p>"},{"title":"Bajo#buildNsPath","link":"<a href=\"Bajo.html#buildNsPath\">buildNsPath</a>","description":"<p>Build ns/path pairs.</p>"},{"title":"Bajo#callHandler","link":"<a href=\"Bajo.html#callHandler\">callHandler</a>","description":"<p>Calling any plugin's method by its name:</p>\n<ul>\n<li>If name is a string, the corresponding plugin's method will be called with passed args as its parameters</li>\n<li>If name is a plugin instance, this will be used as the scope instead. The first args is now the handler name and the rest are its parameters</li>\n<li>If name is a function, this function will be run under scope with the remaining args</li>\n<li>If name is an object and has <code>handler</code> key in it, this function handler will be instead</li>\n</ul>"},{"title":"Bajo#config","link":"<a href=\"Bajo.html#config\">config</a>","description":"<p>Config object.</p>"},{"title":"Bajo#eachPlugins","link":"<a href=\"Bajo.html#eachPlugins\">eachPlugins</a>","description":"<p>This function iterates through all loaded plugins and call the provided handler scoped as the running plugin.\nAnd an object with the following key serves as its parameter:</p>\n<ul>\n<li><code>file</code>: file matched the glob pattern</li>\n<li><code>dir</code>: plugin's base directory</li>\n</ul>"},{"title":"Bajo#format","link":"<a href=\"Bajo.html#format\">format</a>","description":"<p>Format value.</p>"},{"title":"Bajo#formatByType","link":"<a href=\"Bajo.html#formatByType\">formatByType</a>","description":"<p>Format value by type.</p>"},{"title":"Bajo#fromJs","link":"<a href=\"Bajo.html#fromJs\">fromJs</a>","description":"<p>Read and parse JavaScript file.</p>"},{"title":"Bajo#fromJson","link":"<a href=\"Bajo.html#fromJson\">fromJson</a>","description":"<p>Read and parse JSON string or object.</p>"},{"title":"Bajo#getGlobalModuleDir","link":"<a href=\"Bajo.html#getGlobalModuleDir\">getGlobalModuleDir</a>","description":"<p>Get NPM global module directory.</p>"},{"title":"Bajo#getMethod","link":"<a href=\"Bajo.html#getMethod\">getMethod</a>","description":"<p>Get class method by name.</p>"},{"title":"Bajo#getModuleDir","link":"<a href=\"Bajo.html#getModuleDir\">getModuleDir</a>","description":"<p>Get module directory, locally and globally.</p>"},{"title":"Bajo#getUnitFormat","link":"<a href=\"Bajo.html#getUnitFormat\">getUnitFormat</a>","description":"<p>Get unit format.</p>"},{"title":"Bajo#importModule","link":"<a href=\"Bajo.html#importModule\">importModule</a>","description":"<p>Import file/module from any loaded plugins.</p>\n<p>Method proxy from {@link module:Lib.importModule}</p>"},{"title":"Bajo#importPkg","link":"<a href=\"Bajo.html#importPkg\">importPkg</a>","description":"<p>Import one or more packages belongs to a plugin.</p>\n<p>If the last arguments passed is an object, this object serves as options object:</p>\n<ul>\n<li><code>returnDefault</code>: should return package's default export. Defaults to <code>true</code></li>\n<li><code>throwNotFound</code>: should throw if package is not found. Defaults to <code>false</code></li>\n<li><code>noCache</code>: always use fresh import. Defaults to <code>false</code></li>\n<li><code>asObject</code>: see below. Defaults to <code>false</code></li>\n</ul>\n<p>Return value:</p>\n<ul>\n<li>if <code>options.asObject</code> is <code>true</code> (default <code>false</code>), return as object with package's names as it's keys</li>\n<li>Otherwise depends on how many parameters are provided, it should return the named package or an array of packages</li>\n</ul>\n<p>Example: you want to import <code>delay</code> and <code>chalk</code> from <code>bajo</code> plugin because you want to use it in your code</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { importPkg } from this.app.bajo\nconst [delay, chalk] = await importPkg('bajo:delay', 'bajo:chalk')\n\nawait delay(1000)\n...\n</code></pre>"},{"title":"Bajo#init","link":"<a href=\"Bajo.html#init\">init</a>","description":"<p>Initialization:</p>\n<ol>\n<li>Building {@link module:Helper/Bajo.buildBaseConfig|base config}</li>\n<li>{@link module:Helper/Bajo.buildPlugins|Building plugins}</li>\n<li>Collect all {@link module:Helper/Bajo.collectConfigHandlers|config handler}</li>\n<li>Building {@link module:Helper/Bajo.buildExtConfig|extra config}</li>\n<li>Setup {@link module:Helper/Bajo.bootOrder|boot order}</li>\n<li>{@link module:Helper/Bajo.bootPlugins|Boot loaded plugins}</li>\n<li>Attach {@link module:Helper/Bajo.exitHandler|exit handlers}</li>\n</ol>"},{"title":"Bajo#isEmptyDir","link":"<a href=\"Bajo.html#isEmptyDir\">isEmptyDir</a>","description":"<p>Check whether a directory is empty or not. More info please {@link https://github.com/gulpjs/empty-dir|check here}.</p>"},{"title":"Bajo#isLogInRange","link":"<a href=\"Bajo.html#isLogInRange\">isLogInRange</a>","description":"<p>Check whether log level is within log's app current level.</p>"},{"title":"Bajo#isValidApp","link":"<a href=\"Bajo.html#isValidApp\">isValidApp</a>","description":"<p>Check whether directory is a valid Bajo app.</p>"},{"title":"Bajo#isValidPlugin","link":"<a href=\"Bajo.html#isValidPlugin\">isValidPlugin</a>","description":"<p>Check whether directory is a valid Bajo plugin.</p>"},{"title":"Bajo#join","link":"<a href=\"Bajo.html#join\">join</a>","description":"<p>Human friendly join array of items.</p>"},{"title":"Bajo#numUnit","link":"<a href=\"Bajo.html#numUnit\">numUnit</a>","description":"<p>Return its numeric portion of a value.</p>"},{"title":"Bajo#readAllConfigs","link":"<a href=\"Bajo.html#readAllConfigs\">readAllConfigs</a>","description":"<p>Read all config files from path.</p>"},{"title":"Bajo#readConfig","link":"<a href=\"Bajo.html#readConfig\">readConfig</a>","description":"<p>Read and parse file as config object. Supported types: <code>.js</code> and <code>.json</code>.\nMore supports can be added using plugin. {@link https://github.com/ardhi/bajo-config|bajo-config} gives you additional supports for <code>.yml</code>, <code>.yaml</code> and <code>.toml</code> file.</p>\n<p>If file extension is <code>.*</code>, it will be auto detected and parsed accordingly</p>"},{"title":"Bajo#readJson","link":"<a href=\"Bajo.html#readJson\">readJson</a>","description":"<p>Read and parse json file.</p>"},{"title":"Bajo#runHook","link":"<a href=\"Bajo.html#runHook\">runHook</a>","description":"<p>Run named hook/event.</p>"},{"title":"Bajo#saveAsDownload","link":"<a href=\"Bajo.html#saveAsDownload\">saveAsDownload</a>","description":"<p>Save item as file in Bajo's download directory. That is a directory inside your\nBajo plugin's data directory.</p>\n<p>If file exists already, file will automatically be\nrenamed incrementally.</p>"},{"title":"Bajo#toJson","link":"<a href=\"Bajo.html#toJson\">toJson</a>","description":"<p>Convert data to JSON string.</p>"},{"title":"Base","link":"<a href=\"Base.html\">Base</a>"},{"title":"Base#dispose","link":"<a href=\"Base.html#dispose\">dispose</a>","description":"<p>Dispose internal references.</p>"},{"title":"Base#exit","link":"<a href=\"Base.html#exit\">exit</a>","description":"<p>Upon app termination, this method will be called first. Mostly useful for system cleanup,\ndelete temporary files, freeing resources etc.</p>"},{"title":"Base#init","link":"<a href=\"Base.html#init\">init</a>","description":"<p>After config is read, plugin will be initialized. You can still change your config here,\nbecause after plugin is initialized, config will be deep frozen.</p>"},{"title":"Base#loadConfig","link":"<a href=\"Base.html#loadConfig\">loadConfig</a>","description":"<p>Load config from file in data directory, program arguments and environment variables. Level of importance:\n<code>Env Variables &gt; Program Arguments &gt; Config File</code></p>"},{"title":"Base#start","link":"<a href=\"Base.html#start\">start</a>","description":"<p>This method will be called after plugin's init</p>"},{"title":"Base.this.dependencies","link":"<a href=\"Base.html#.this.dependencies\">this.dependencies</a>","description":"<p>Dependencies to other plugins. Enter all plugin's package name your plugin dependent from.</p>\n<p>Semver is also supported.</p>"},{"title":"Cache","link":"<a href=\"Cache.html\">Cache</a>"},{"title":"Cache#_purgeItem","link":"<a href=\"Cache.html#_purgeItem\">_purgeItem</a>","description":"<p>Remove a specific cache namespace or all first-level namespaces.</p>"},{"title":"Cache#dispose","link":"<a href=\"Cache.html#dispose\">dispose</a>","description":"<p>Dispose internal reference.</p>"},{"title":"Cache#getRootDir","link":"<a href=\"Cache.html#getRootDir\">getRootDir</a>","description":"<p>Get root cache directory for this plugin.</p>"},{"title":"Cache#load","link":"<a href=\"Cache.html#load\">load</a>","description":"<p>Load cached content when available and not expired.</p>"},{"title":"Cache#prep","link":"<a href=\"Cache.html#prep\">prep</a>","description":"<p>Prepare cache paths for a namespaced key and TTL.</p>"},{"title":"Cache#purge","link":"<a href=\"Cache.html#purge\">purge</a>","description":"<p>Purge cache by namespace or remove expired TTL directories.</p>"},{"title":"Cache#save","link":"<a href=\"Cache.html#save\">save</a>","description":"<p>Save a value into cache for the given key and TTL directory.</p>"},{"title":"Cache#sync","link":"<a href=\"Cache.html#sync\">sync</a>","description":"<p>Return cached content, and store the fallback value if cache is empty.</p>"},{"title":"Err","link":"<a href=\"Err.html\">Err</a>"},{"title":"Err#fatal","link":"<a href=\"Err.html#fatal\">fatal</a>","description":"<p>Print instance on console and terminate process.</p>"},{"title":"Err#formatErrorDetails","link":"<a href=\"Err.html#formatErrorDetails\">formatErrorDetails</a>","description":"<p>Pretty format error details.</p>"},{"title":"Err#message","link":"<a href=\"Err.html#message\">message</a>","description":"<p>Translated message.</p>"},{"title":"Err#orgMessage","link":"<a href=\"Err.html#orgMessage\">orgMessage</a>","description":"<p>Original message before translation.</p>"},{"title":"Err#payload","link":"<a href=\"Err.html#payload\">payload</a>","description":"<p>Error payload extracted from the last arguments.</p>"},{"title":"Err#write","link":"<a href=\"Err.html#write\">write</a>","description":"<p>Write message to the console.</p>"},{"title":"Log","link":"<a href=\"Log.html\">Log</a>"},{"title":"Log#app","link":"<a href=\"Log.html#app\">app</a>","description":"<p>The app instance.</p>"},{"title":"Log#debug","link":"<a href=\"Log.html#debug\">debug</a>","description":"<p>Display &amp; format message in <code>debug</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#dispose","link":"<a href=\"Log.html#dispose\">dispose</a>","description":"<p>Dispose internal references.</p>"},{"title":"Log#error","link":"<a href=\"Log.html#error\">error</a>","description":"<p>Display &amp; format message in <code>error</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#fatal","link":"<a href=\"Log.html#fatal\">fatal</a>","description":"<p>Display &amp; format message in <code>fatal</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#formatMsg","link":"<a href=\"Log.html#formatMsg\">formatMsg</a>","description":"<p>Display &amp; format message according to one of these rules:</p>\n<ol>\n<li><code>level</code> <code>prefix</code> <code>text</code> <code>var 1</code> <code>var 2</code> <code>...var n</code> - Translate <code>text</code> and interpolate with <code>vars</code> for level <code>level</code></li>\n<li><code>level</code> <code>prefix</code> <code>data</code> <code>text</code> <code>var 1</code> <code>var 2</code> <code>...var n</code> - As above, and append stringified <code>data</code></li>\n<li><code>level</code> <code>prefix</code> <code>error</code> - Format as {@link Err} object. If current log level is <em>trace</em>, dump it on screen</li>\n</ol>\n<p>In <code>prod</code> environment, log will be delivered as JSON stringified object. See {@link TLogJson} for more info</p>"},{"title":"Log#getRotationPattern","link":"<a href=\"Log.html#getRotationPattern\">getRotationPattern</a>","description":"<p>Calculate pattern used for log rotation.</p>"},{"title":"Log#info","link":"<a href=\"Log.html#info\">info</a>","description":"<p>Display &amp; format message in <code>info</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#save","link":"<a href=\"Log.html#save\">save</a>","description":"<p>Save log to file in {dataDir}/log.</p>"},{"title":"Log#silent","link":"<a href=\"Log.html#silent\">silent</a>","description":"<p>Display &amp; format message in <code>silent</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#trace","link":"<a href=\"Log.html#trace\">trace</a>","description":"<p>Display &amp; format message in <code>trace</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Log#warn","link":"<a href=\"Log.html#warn\">warn</a>","description":"<p>Display &amp; format message in <code>warn</code> level. See {@link Log#formatMsg|formatMsg} for details.</p>"},{"title":"Plugin","link":"<a href=\"Plugin.html\">Plugin</a>"},{"title":"Plugin#app","link":"<a href=\"Plugin.html#app\">app</a>","description":"<p>Reference to the app instance.</p>"},{"title":"Plugin#config","link":"<a href=\"Plugin.html#config\">config</a>","description":"<p>Config object.</p>"},{"title":"Plugin#dispose","link":"<a href=\"Plugin.html#dispose\">dispose</a>","description":"<p>Dispose internal references.</p>"},{"title":"Plugin#dump","link":"<a href=\"Plugin.html#dump\">dump</a>","description":"<p>Alias to <code>this.app.dump()</code>.</p>"},{"title":"Plugin#error","link":"<a href=\"Plugin.html#error\">error</a>","description":"<p>Create an instance of {@link Err} object.</p>"},{"title":"Plugin#fatal","link":"<a href=\"Plugin.html#fatal\">fatal</a>","description":"<p>Create an instance of Err object, display it on screen and then force\nterminate the app process.</p>"},{"title":"Plugin#getConfig","link":"<a href=\"Plugin.html#getConfig\">getConfig</a>","description":"<p>Get plugin's config value.</p>"},{"title":"Plugin#getPkgInfo","link":"<a href=\"Plugin.html#getPkgInfo\">getPkgInfo</a>","description":"<p>Get package info.</p>"},{"title":"Plugin#log","link":"<a href=\"Plugin.html#log\">log</a>","description":"<p>Shortcut to {@link App#log} with prefix parameter set to this plugin namespace.</p>"},{"title":"Plugin#selfBind","link":"<a href=\"Plugin.html#selfBind\">selfBind</a>","description":"<p>Force bind methods to self (<code>this</code>).</p>"},{"title":"Plugin#t","link":"<a href=\"Plugin.html#t\">t</a>","description":"<p>Translate text and interpolate with given <code>args</code>.</p>\n<p>Shortcut to {@link App#t} with ns parameter set to this plugin namespace.</p>"},{"title":"Plugin#te","link":"<a href=\"Plugin.html#te\">te</a>","description":"<p>Check whether translation text/key exists.</p>\n<p>Shortcut to {@link App#te} with ns parameter set to this plugin namespace.</p>"},{"title":"Plugin.this.alias","link":"<a href=\"Plugin.html#.this.alias\">this.alias</a>","description":"<p>Plugin alias. Derived plugin must provide its own, unique alias. If it left blank,\nBajo will provide this automatically (by using the kebab-cased version of plugin name).</p>"},{"title":"Plugin.this.ns","link":"<a href=\"Plugin.html#.this.ns\">this.ns</a>","description":"<p>Namespace (ns) or plugin's name. Simply the camel cased version of plugin's package name.</p>"},{"title":"Plugin.this.pkgName","link":"<a href=\"Plugin.html#.this.pkgName\">this.pkgName</a>","description":"<p>Package name, the one from package.json.</p>"},{"title":"Print","link":"<a href=\"Print.html\">Print</a>"},{"title":"Print#buildText","link":"<a href=\"Print.html#buildText\">buildText</a>","description":"<p>Translate, prefixed with counter and/or datetime etc.</p>"},{"title":"Print#clear","link":"<a href=\"Print.html#clear\">clear</a>","description":"<p>Clear spinner text.</p>"},{"title":"Print#fail","link":"<a href=\"Print.html#fail\">fail</a>","description":"<p>Print failed message, prefixed with a cross icon.</p>"},{"title":"Print#fatal","link":"<a href=\"Print.html#fatal\">fatal</a>","description":"<p>Print failed message, prefixed with a cross icon and exit.</p>"},{"title":"Print#getElapsed","link":"<a href=\"Print.html#getElapsed\">getElapsed</a>","description":"<p>Get elapsed time since instance is created.</p>"},{"title":"Print#info","link":"<a href=\"Print.html#info\">info</a>","description":"<p>Print information message, prefixed with an info icon.</p>"},{"title":"Print#options","link":"<a href=\"Print.html#options\">options</a>","description":"<p>Options object.</p>"},{"title":"Print#ora","link":"<a href=\"Print.html#ora\">ora</a>","description":"<p>ora instance</p>"},{"title":"Print#render","link":"<a href=\"Print.html#render\">render</a>","description":"<p>Force render spinner.</p>"},{"title":"Print#setOpts","link":"<a href=\"Print.html#setOpts\">setOpts</a>","description":"<p>Setting spinner options; override the one passed at constructor.</p>"},{"title":"Print#setText","link":"<a href=\"Print.html#setText\">setText</a>","description":"<p>Set spinner's text,</p>"},{"title":"Print#spinner","link":"<a href=\"Print.html#spinner\">spinner</a>","description":"<p>Create a new print instance.</p>"},{"title":"Print#start","link":"<a href=\"Print.html#start\">start</a>","description":"<p>Start the spinner,</p>"},{"title":"Print#startTime","link":"<a href=\"Print.html#startTime\">startTime</a>","description":"<p>Time when instance is created.</p>"},{"title":"Print#stop","link":"<a href=\"Print.html#stop\">stop</a>","description":"<p>Stop the spinner.</p>"},{"title":"Print#succeed","link":"<a href=\"Print.html#succeed\">succeed</a>","description":"<p>Print success message, prefixed with a check icon.</p>"},{"title":"Print#warn","link":"<a href=\"Print.html#warn\">warn</a>","description":"<p>Print warning message, prefixed with a warn icon.</p>"},{"title":"TAppConfigHandler","link":"<a href=\"global.html#TAppConfigHandler\">TAppConfigHandler</a>"},{"title":"TAppEnv","link":"<a href=\"global.html#TAppEnv\">TAppEnv</a>"},{"title":"TBajoDataType","link":"<a href=\"global.html#TBajoDataType\">TBajoDataType</a>","description":"<p>Supported data types.</p>"},{"title":"TBajoFormatResult","link":"<a href=\"global.html#TBajoFormatResult\">TBajoFormatResult</a>","description":"<p>Object returned by {@link Bajo#getUnitFormat|bajo:getUnitFormat}.</p>"},{"title":"TBajoFormatType","link":"<a href=\"global.html#TBajoFormatType\">TBajoFormatType</a>","description":"<p>General format types,</p>"},{"title":"TLogJson","link":"<a href=\"global.html#TLogJson\">TLogJson</a>","description":"<p>Log output in stringified JSON format. Returned when app run in <code>prod</code> environment.</p>"},{"title":"TLogLevels","link":"<a href=\"global.html#TLogLevels\">TLogLevels</a>"},{"title":"TNsPathPairs","link":"<a href=\"global.html#TNsPathPairs\">TNsPathPairs</a>","description":"<p>Name based <code>{ns}:{path}</code> format.</p>"},{"title":"TNsPathResult","link":"<a href=\"global.html#TNsPathResult\">TNsPathResult</a>","description":"<p>Object returned by {@link Bajo#breakNsPath|bajo:breakNsPath}.</p>"},{"title":"TPrintOptions","link":"<a href=\"global.html#TPrintOptions\">TPrintOptions</a>"},{"title":"Tools","link":"<a href=\"Tools.html\">Tools</a>"},{"title":"Tools#app","link":"<a href=\"Tools.html#app\">app</a>","description":"<p>The app instance</p>"},{"title":"Tools#dispose","link":"<a href=\"Tools.html#dispose\">dispose</a>","description":"<p>Dispose internal references.</p>"},{"title":"Tools#plugin","link":"<a href=\"Tools.html#plugin\">plugin</a>","description":"<p>Attached plugin</p>"},{"title":"Tools#selfBind","link":"<a href=\"Tools.html#selfBind\">selfBind</a>","description":"<p>Force bind methods to self (<code>this</code>).</p>"},{"title":"bajo:afterAll{method}","link":"<a href=\"global.html#event:bajo:afterAll%257Bmethod%257D\">bajo:afterAll{method}</a>","description":"<p>Run after all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></p>"},{"title":"bajo:afterBootComplete","link":"<a href=\"global.html#event:bajo:afterBootComplete\">bajo:afterBootComplete</a>","description":"<p>Run after boot process is completed</p>"},{"title":"bajo:afterBuildCollection","link":"<a href=\"global.html#event:bajo:afterBuildCollection\">bajo:afterBuildCollection</a>","description":"<p>Run after collection is built</p>"},{"title":"bajo:afterCollectHooks","link":"<a href=\"global.html#event:bajo:afterCollectHooks\">bajo:afterCollectHooks</a>","description":"<p>Run after hooks are collected</p>"},{"title":"bajo:beforeAll{method}","link":"<a href=\"global.html#event:bajo:beforeAll%257Bmethod%257D\">bajo:beforeAll{method}</a>","description":"<p>Run before all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></p>"},{"title":"bajo:beforeBuildCollection","link":"<a href=\"global.html#event:bajo:beforeBuildCollection\">bajo:beforeBuildCollection</a>","description":"<p>Run before collection is built.</p>"},{"title":"boot","link":"<a href=\"global.html#boot\">boot</a>","description":"<p>Main entry point of a Bajo app. Returned value is the app instance itself.</p>\n<p>While you can code directly around it, you typically write your code the main plugin (<code>{mainNs}</code>) or\nwriting your own custom plugin.</p>\n<p>I recommend the second method for its portability.</p>"},{"title":"event:{ns}:after{method}","link":"<a href=\"global.html#event:%257Bns%257D:after%257Bmethod%257D\">{ns}:after{method}</a>","description":"<p>Run after <code>{method}</code> is executed within <code>{ns}</code> context</p>\n<ul>\n<li><code>{ns}</code> - namespace</li>\n<li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></li>\n</ul>"},{"title":"event:{ns}:beforeAppletRun","link":"<a href=\"global.html#event:%257Bns%257D:beforeAppletRun\">{ns}:beforeAppletRun</a>","description":"<p>Run before applet is run. <code>[ns]</code> is applet's namespace</p>"},{"title":"event:{ns}:before{method}","link":"<a href=\"global.html#event:%257Bns%257D:before%257Bmethod%257D\">{ns}:before{method}</a>","description":"<p>Run before <code>{method}</code> is executed within <code>{ns}</code> context</p>\n<ul>\n<li><code>{ns}</code> - namespace</li>\n<li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></li>\n</ul>"},{"title":"module:Helper","link":"<a href=\"module-Helper.html\">Helper</a>","description":"<p>Internal helpers called by Bajo and other classes. It should remains\nhidden and not to be imported by any program.</p>"},{"title":"module:Helper.exports.bootOrder","link":"<a href=\"module-Helper.html#.exports.bootOrder\">exports.bootOrder</a>","description":"<p>Setup plugins boot orders by reading plugin's <code>.bootorder</code> file if provided.</p>"},{"title":"module:Helper.exports.bootPlugins","link":"<a href=\"module-Helper.html#.exports.bootPlugins\">exports.bootPlugins</a>","description":"<p>Iterate through all plugins loaded and do:</p>\n<ol>\n<li>{@link module:Helper/Base.buildConfigs|build configs}</li>\n<li>{@link module:Helper/Base.checkNameAliases|ensure names &amp; aliases uniqueness}</li>\n<li>{@link module:Helper/Base.checkDependencies|ensure dependencies are met}</li>\n<li>{@link module:Helper/Base.collectHooks|collect hooks}</li>\n<li>{@link module:Helper/Base.run|run plugins}</li>\n</ol>"},{"title":"module:Helper.exports.buildBaseConfig","link":"<a href=\"module-Helper.html#.exports.buildBaseConfig\">exports.buildBaseConfig</a>","description":"<p>Building bajo base config. Mostly dealing with directory setups:</p>\n<ul>\n<li>determine base directory</li>\n<li>check whether data directory is valid. If not exist, create one inside app dir</li>\n<li>ensure data config directory is there</li>\n<li>ensure tmp dir is there</li>\n<li>read the list of plugins from <code>.plugins</code> file</li>\n</ul>"},{"title":"module:Helper.exports.buildConfigs","link":"<a href=\"module-Helper.html#.exports.buildConfigs\">exports.buildConfigs</a>","description":"<p>Build configurations</p>"},{"title":"module:Helper.exports.buildExtConfig","link":"<a href=\"module-Helper.html#.exports.buildExtConfig\">exports.buildExtConfig</a>","description":"<p>Bajo extra config:</p>\n<ul>\n<li>reading config file</li>\n<li>merge config with arguments &amp; environments values</li>\n<li>Set environment (<code>dev</code> or <code>prod</code>)</li>\n</ul>"},{"title":"module:Helper.exports.buildPlugins","link":"<a href=\"module-Helper.html#.exports.buildPlugins\">exports.buildPlugins</a>","description":"<p>Building all plugins:</p>\n<ul>\n<li>load from app's pluginPkgs</li>\n<li>iterate through the list and build related plugins</li>\n<li>making sure main plugin is there. If not, create from template</li>\n<li>attach these plugins to the app instance</li>\n</ul>"},{"title":"module:Helper.exports.checkDependencies","link":"<a href=\"module-Helper.html#.exports.checkDependencies\">exports.checkDependencies</a>","description":"<p>Ensure dependencies are met</p>"},{"title":"module:Helper.exports.checkNameAliases","link":"<a href=\"module-Helper.html#.exports.checkNameAliases\">exports.checkNameAliases</a>","description":"<p>Ensure for names and aliases to be unique and no clashes with other plugins</p>"},{"title":"module:Helper.exports.collectConfigHandlers","link":"<a href=\"module-Helper.html#.exports.collectConfigHandlers\">exports.collectConfigHandlers</a>","description":"<p>Collect all config handlers, including the one provided by plugins</p>"},{"title":"module:Helper.exports.collectHooks","link":"<a href=\"module-Helper.html#.exports.collectHooks\">exports.collectHooks</a>","description":"<p>Collect and build hooks and push them to the bajo's hook system</p>"},{"title":"module:Helper.exports.exitHandler","link":"<a href=\"module-Helper.html#.exports.exitHandler\">exports.exitHandler</a>","description":"<p>Attach plugins exit handlers and make sure the app shutdowns gracefully</p>"},{"title":"module:Helper.exports.run","link":"<a href=\"module-Helper.html#.exports.run\">exports.run</a>","description":"<p>Finally, run all plugins</p>"},{"title":"module:Helper.exports.runAsApplet","link":"<a href=\"module-Helper.html#.exports.runAsApplet\">exports.runAsApplet</a>","description":"<p>If app is in <code>applet</code> mode, this little helper should take care plugin's applet boot process</p>"},{"title":"module:Helper{ns}:afterAppletRun","link":"<a href=\"module-Helper%257Bns%257D_afterAppletRun.html\">module:Helper{ns}:afterAppletRun</a>","description":"<p>Run after applet is run. <code>[ns]</code> is applet's namespace</p>"},{"title":"module:Helper~TAppLib","link":"<a href=\"module-Helper.html#~TAppLib\">TAppLib</a>"},{"title":"module:Lib","link":"<a href=\"module-Lib.html\">Lib</a>","description":"<p>External helpers you can use by importing its file directly</p>"},{"title":"module:Lib.findDeep","link":"<a href=\"module-Lib.html#.findDeep\">findDeep</a>","description":"<p>Find item deep in paths.</p>"},{"title":"module:Lib.freeze","link":"<a href=\"module-Lib.html#.freeze\">freeze</a>","description":"<p>Freeze object.</p>"},{"title":"module:Lib.importModule","link":"<a href=\"module-Lib.html#.importModule\">importModule</a>","description":"<p>Import file/module from any loaded plugins.</p>\n<p>E.g. your plugin structure looks like this:</p>\n<pre class=\"prettyprint source\"><code>|- src\n| |- lib\n| | |- my-module.js\n|- index.js\n|- package.json\n</code></pre>\n<p>And this is how to import <code>my-module.js</code>:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { importModule } = this.app.bajo\nconst myModule = await importModule('myPlugin:/src/lib/my-module.js')\n</code></pre>"}]}
package/docs/global.html CHANGED
@@ -1,6 +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>Global</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">Bajo 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="App.html">App</a></div><div class="sidebar-section-children"><a href="Bajo.html">Bajo</a></div><div class="sidebar-section-children"><a href="Base.html">Base</a></div><div class="sidebar-section-children"><a href="Err.html">Err</a></div><div class="sidebar-section-children"><a href="Log.html">Log</a></div><div class="sidebar-section-children"><a href="Plugin.html">Plugin</a></div><div class="sidebar-section-children"><a href="Print.html">Print</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</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#event:bajo:afterAll%257Bmethod%257D">bajo:afterAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBootComplete">bajo:afterBootComplete</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBuildCollection">bajo:afterBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterCollectHooks">bajo:afterCollectHooks</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeAll%257Bmethod%257D">bajo:beforeAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeBuildCollection">bajo:beforeBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:afterAppletRun">{ns}:afterAppletRun</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:after%257Bmethod%257D">{ns}:after{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:beforeAppletRun">{ns}:beforeAppletRun</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:before%257Bmethod%257D">{ns}:before{method}</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper_Bajo.html">Helper/Bajo</a></div><div class="sidebar-section-children"><a href="module-Helper_Base.html">Helper/Base</a></div><div class="sidebar-section-children"><a href="module-Lib.html">Lib</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#TAppConfigHandler">TAppConfigHandler</a></div><div class="sidebar-section-children"><a href="global.html#TAppEnv">TAppEnv</a></div><div class="sidebar-section-children"><a href="global.html#TAppLib">TAppLib</a></div><div class="sidebar-section-children"><a href="global.html#TBajoDataType">TBajoDataType</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatResult">TBajoFormatResult</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatType">TBajoFormatType</a></div><div class="sidebar-section-children"><a href="global.html#TLogJson">TLogJson</a></div><div class="sidebar-section-children"><a href="global.html#TLogLevels">TLogLevels</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathPairs">TNsPathPairs</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathResult">TNsPathResult</a></div><div class="sidebar-section-children"><a href="global.html#TPrintOptions">TPrintOptions</a></div><div class="sidebar-section-children"><a href="global.html#boot">boot</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/bajo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/bajo" target="">Github</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><article><div class="container-overview"></div><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="boot"><span class="type-signature">(async) </span>boot<span class="signature">(cwd<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="App.html">App</a>}</span></h3><div class="description"><p>Main entry point of a Bajo app. Returned value is the app instance itself.</p><p>While you can code directly around it, you typically write your code the main plugin (<code>{mainNs}</code>) or writing your own custom plugin.</p><p>I recommend the second method for its portability.</p><p>Example:</p><pre class="prettyprint source lang-javascript"><code>// index.js file. Your main package entry point
4
- import bajo from 'bajo'
5
- await bajo()
6
- </code></pre></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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>cwd</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Current working 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#line27">line 27</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>01-getting-started</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"><a href="App.html">App</a></span></dd></dl></div><h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2><h3 class="name has-anchor" id="TAppConfigHandler">TAppConfigHandler</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>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>ext</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>File extension</p></td></tr><tr><td class="name"><code>readHandler</code></td><td class="type"><span class="param-type">function</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Function to call for reading</p></td></tr><tr><td class="name"><code>writeHandler</code></td><td class="type"><span class="param-type">function</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Function to call for writing</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="class_app.js.html">class/app.js</a>, <a href="class_app.js.html#line113">line 113</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="App.html#configHandlers">App#configHandlers</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TAppEnv">TAppEnv</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>dev</code></td><td class="type"><span class="param-type">string</span></td><td class="default">development</td><td class="description last"></td></tr><tr><td class="name"><code>prod</code></td><td class="type"><span class="param-type">string</span></td><td class="default">production</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="class_app.js.html">class/app.js</a>, <a href="class_app.js.html#line39">line 39</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="App.html">App</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TAppLib">TAppLib</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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>_</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://lodash.com">lodash</a></p></td></tr><tr><td class="name"><code>fs</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://github.com/jprichardson/node-fs-extra">fs-extra</a></p></td></tr><tr><td class="name"><code>fastGlob</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://github.com/mrmlnc/fast-glob">fast-glob</a></p></td></tr><tr><td class="name"><code>sprintf</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://github.com/alexei/sprintf.js">sprintf</a></p></td></tr><tr><td class="name"><code>aneka</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://github.com/ardhi/aneka">aneka</a></p></td></tr><tr><td class="name"><code>outmatch</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://github.com/axtgr/outmatch">outmatch</a></p></td></tr><tr><td class="name"><code>dayjs</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Access to <a href="https://day.js.org">dayjs</a> with utc &amp; customParseFormat plugin already applied</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="class_app.js.html">class/app.js</a>, <a href="class_app.js.html#line46">line 46</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="App.html">App</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TBajoDataType">TBajoDataType</h3><div class="description"><p>Supported data types</p></div><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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>0</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>string</p></td></tr><tr><td class="name"><code>1</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>float</p></td></tr><tr><td class="name"><code>2</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>double</p></td></tr><tr><td class="name"><code>3</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>integer</p></td></tr><tr><td class="name"><code>4</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>smallint</p></td></tr><tr><td class="name"><code>5</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>date</p></td></tr><tr><td class="name"><code>6</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>time</p></td></tr><tr><td class="name"><code>7</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>datetime</p></td></tr><tr><td class="name"><code>8</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>array</p></td></tr><tr><td class="name"><code>9</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>object</p></td></tr><tr><td class="name"><code>10</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>auto</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="lib_formats.js.html">lib/formats.js</a>, <a href="lib_formats.js.html#line1">line 1</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TBajoFormatResult">TBajoFormatResult</h3><div class="description"><p>Object returned by <a href="Bajo.html#getUnitFormat">bajo:getUnitFormat</a></p></div><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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>unitSys</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Unit system</p></td></tr><tr><td class="name"><code>format</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>Format 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="class_bajo.js.html">class/bajo.js</a>, <a href="class_bajo.js.html#line425">line 425</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="Bajo.html#getUnitFormat">Bajo#getUnitFormat</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TBajoFormatType">TBajoFormatType</h3><div class="description"><p>General format types</p></div><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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>0</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>speed</p></td></tr><tr><td class="name"><code>1</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>distance</p></td></tr><tr><td class="name"><code>3</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>area</p></td></tr><tr><td class="name"><code>4</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>degree</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="lib_formats.js.html">lib/formats.js</a>, <a href="lib_formats.js.html#line19">line 19</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TLogJson">TLogJson</h3><div class="description"><p>Log output in stringified JSON format. Returned when app run in <code>prod</code> environment</p></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Attributes</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="attributes"></td><td class="description last"><p>Message prefix</p></td></tr><tr><td class="name"><code>message</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>The message itself</p></td></tr><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>Log level</p></td></tr><tr><td class="name"><code>time</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>Time in millisecond</p></td></tr><tr><td class="name"><code>pid</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>Process ID</p></td></tr><tr><td class="name"><code>hostname</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>Hostname</p></td></tr><tr><td class="name"><code>data</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Payload data, if any</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="class_misc_log.js.html">class/misc/log.js</a>, <a href="class_misc_log.js.html#line9">line 9</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="Log.html#formatMsg">Log#formatMsg</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TLogLevels">TLogLevels</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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>trace</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">10</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">gray</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>debug</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">20</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">greenBright</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>info</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">30</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">blueBright</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>warn</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">40</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">yellowBright</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>error</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">50</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">redBright</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>fatal</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">60</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">magentaBright</td><td class="description last"></td></tr></tbody></table></div></td></tr><tr><td class="name"><code>silent</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><h6>Properties</h6><div class="allow-overflow"><table class="props"><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>number</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="default">99</td><td class="description last"></td></tr><tr><td class="name"><code>color</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">white</td><td class="description last"></td></tr></tbody></table></div></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="lib_log-levels.js.html">lib/log-levels.js</a>, <a href="lib_log-levels.js.html#line1">line 1</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TNsPathPairs">TNsPathPairs</h3><div class="description"><p>Name based <code>{ns}:{path}</code> format</p></div><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-source bold">Source</dt><dd class="tag-source"><ul><li><a href="class_bajo.js.html">class/bajo.js</a>, <a href="class_bajo.js.html#line149">line 149</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="global.html#TNsPathResult">TNsPathResult</a></li><li><a href="Bajo.html#buildNsPath">Bajo#buildNsPath</a></li><li><a href="Bajo.html#breakNsPath">Bajo#breakNsPath</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TNsPathResult">TNsPathResult</h3><div class="description"><p>Object returned by <a href="Bajo.html#breakNsPath">bajo:breakNsPath</a></p></div><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>Attributes</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="attributes"></td><td class="description last"><p>Namespace</p></td></tr><tr><td class="name"><code>subNs</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Sub namespace</p></td></tr><tr><td class="name"><code>subSubNs</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Sub of sub namespace</p></td></tr><tr><td class="name"><code>path</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>Path without query string or hash</p></td></tr><tr><td class="name"><code>fullPath</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>Full path, including query string and hash</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="class_bajo.js.html">class/bajo.js</a>, <a href="class_bajo.js.html#line174">line 174</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="global.html#TNsPathPairs">TNsPathPairs</a></li><li><a href="Bajo.html#buildNsPath">Bajo#buildNsPath</a></li><li><a href="Bajo.html#breakNsPath">Bajo#breakNsPath</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="TPrintOptions">TPrintOptions</h3><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><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>showDatetime</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>Show actual date &amp; time</p></td></tr><tr><td class="name"><code>showCounter</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>Show as counter</p></td></tr><tr><td class="name"><code>silent</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>Suppress any messages. Defaults to the one set in config</p></td></tr><tr><td class="name"><code>ora</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/sindresorhus/ora#api">Ora's options</a> 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="class_misc_print.js.html">class/misc/print.js</a>, <a href="class_misc_print.js.html#line8">line 8</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="Print.html">Print</a></li></ul></dd></div></dl><h2 id="events" class="subsection-title has-anchor">Events</h2><h3 class="name has-anchor" id="event:bajo:afterAll%7Bmethod%7D">bajo:afterAll{method}</h3><div class="description"><p>Run after all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></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="class_helper_base.js.html">class/helper/base.js</a>, <a href="class_helper_base.js.html#line234">line 234</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-Helper_Base.html#.run">module:Helper/Base.run</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:bajo:afterBootComplete">bajo:afterBootComplete</h3><div class="description"><p>Run after boot process is completed</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="class_app.js.html">class/app.js</a>, <a href="class_app.js.html#line316">line 316</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="App.html#boot">App#boot</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:bajo:afterBuildCollection">bajo:afterBuildCollection</h3><div class="description"><p>Run after collection is built</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>container</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"></td></tr><tr><td class="name"><code>items</code></td><td class="type"><span class="param-type">Array.&lt;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="class_bajo.js.html">class/bajo.js</a>, <a href="class_bajo.js.html#line301">line 301</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="Bajo.html#buildCollections">Bajo#buildCollections</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:bajo:afterCollectHooks">bajo:afterCollectHooks</h3><div class="description"><p>Run after hooks are collected</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>hooks</code></td><td class="type"><span class="param-type">Array.&lt;Object></span></td><td class="description last"><p>Array of hook objects</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="class_helper_base.js.html">class/helper/base.js</a>, <a href="class_helper_base.js.html#line169">line 169</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="module-Helper_Base.html#.collectHooks">module:Helper/Base.collectHooks</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:bajo:beforeAll%7Bmethod%7D">bajo:beforeAll{method}</h3><div class="description"><p>Run before all <code>{method}</code> executed. Accepted <code>{method}</code>: <code>Init</code> or <code>Start</code></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>method</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Accepted methods: <code>Init</code>, <code>Start</code></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="class_helper_base.js.html">class/helper/base.js</a>, <a href="class_helper_base.js.html#line198">line 198</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-Helper_Base.html#.run">module:Helper/Base.run</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:bajo:beforeBuildCollection">bajo:beforeBuildCollection</h3><div class="description"><p>Run before collection is built</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>container</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="class_bajo.js.html">class/bajo.js</a>, <a href="class_bajo.js.html#line265">line 265</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="Bajo.html#buildCollections">Bajo#buildCollections</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:%7Bns%7D:afterAppletRun">{ns}:afterAppletRun</h3><div class="description"><p>Run after applet is run. <code>[ns]</code> is applet's namespace</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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">any</span></td><td class="attributes">&lt;repeatable><br></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="class_helper_bajo.js.html">class/helper/bajo.js</a>, <a href="class_helper_bajo.js.html#line385">line 385</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="module-Helper_Bajo.html#.runAsApplet">module:Helper/Bajo.runAsApplet</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:%7Bns%7D:after%7Bmethod%7D">{ns}:after{method}</h3><div class="description"><p>Run after <code>{method}</code> is executed within <code>{ns}</code> context</p><ul><li><code>{ns}</code> - namespace</li><li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></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="class_helper_base.js.html">class/helper/base.js</a>, <a href="class_helper_base.js.html#line222">line 222</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-Helper_Base.html#.run">module:Helper/Base.run</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:%7Bns%7D:beforeAppletRun">{ns}:beforeAppletRun</h3><div class="description"><p>Run before applet is run. <code>[ns]</code> is applet's namespace</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 class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">any</span></td><td class="attributes">&lt;repeatable><br></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="class_helper_bajo.js.html">class/helper/bajo.js</a>, <a href="class_helper_bajo.js.html#line374">line 374</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li>hook</li><li><a href="module-Helper_Bajo.html#.runAsApplet">module:Helper/Bajo.runAsApplet</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="event:%7Bns%7D:before%7Bmethod%7D">{ns}:before{method}</h3><div class="description"><p>Run before <code>{method}</code> is executed within <code>{ns}</code> context</p><ul><li><code>{ns}</code> - namespace</li><li><code>{method}</code> - Accepted methods: <code>Init</code> or <code>Start</code></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="class_helper_base.js.html">class/helper/base.js</a>, <a href="class_helper_base.js.html#line210">line 210</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-Helper_Base.html#.run">module:Helper/Base.run</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">Bajo API</a><div class="mobile-nav-links"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/bajo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/bajo" target="">Github</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="App.html">App</a></div><div class="sidebar-section-children"><a href="Bajo.html">Bajo</a></div><div class="sidebar-section-children"><a href="Base.html">Base</a></div><div class="sidebar-section-children"><a href="Err.html">Err</a></div><div class="sidebar-section-children"><a href="Log.html">Log</a></div><div class="sidebar-section-children"><a href="Plugin.html">Plugin</a></div><div class="sidebar-section-children"><a href="Print.html">Print</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</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#event:bajo:afterAll%257Bmethod%257D">bajo:afterAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBootComplete">bajo:afterBootComplete</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBuildCollection">bajo:afterBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterCollectHooks">bajo:afterCollectHooks</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeAll%257Bmethod%257D">bajo:beforeAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeBuildCollection">bajo:beforeBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:afterAppletRun">{ns}:afterAppletRun</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:after%257Bmethod%257D">{ns}:after{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:beforeAppletRun">{ns}:beforeAppletRun</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:before%257Bmethod%257D">{ns}:before{method}</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper_Bajo.html">Helper/Bajo</a></div><div class="sidebar-section-children"><a href="module-Helper_Base.html">Helper/Base</a></div><div class="sidebar-section-children"><a href="module-Lib.html">Lib</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#TAppConfigHandler">TAppConfigHandler</a></div><div class="sidebar-section-children"><a href="global.html#TAppEnv">TAppEnv</a></div><div class="sidebar-section-children"><a href="global.html#TAppLib">TAppLib</a></div><div class="sidebar-section-children"><a href="global.html#TBajoDataType">TBajoDataType</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatResult">TBajoFormatResult</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatType">TBajoFormatType</a></div><div class="sidebar-section-children"><a href="global.html#TLogJson">TLogJson</a></div><div class="sidebar-section-children"><a href="global.html#TLogLevels">TLogLevels</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathPairs">TNsPathPairs</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathResult">TNsPathResult</a></div><div class="sidebar-section-children"><a href="global.html#TPrintOptions">TPrintOptions</a></div><div class="sidebar-section-children"><a href="global.html#boot">boot</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">Bajo 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="App.html">App</a></div><div class="sidebar-section-children"><a href="Bajo.html">Bajo</a></div><div class="sidebar-section-children"><a href="Base.html">Base</a></div><div class="sidebar-section-children"><a href="Cache.html">Cache</a></div><div class="sidebar-section-children"><a href="Err.html">Err</a></div><div class="sidebar-section-children"><a href="Log.html">Log</a></div><div class="sidebar-section-children"><a href="Plugin.html">Plugin</a></div><div class="sidebar-section-children"><a href="Print.html">Print</a></div><div class="sidebar-section-children"><a href="Tools.html">Tools</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</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#event:bajo:afterAll%257Bmethod%257D">bajo:afterAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBootComplete">bajo:afterBootComplete</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterBuildCollection">bajo:afterBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:afterCollectHooks">bajo:afterCollectHooks</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeAll%257Bmethod%257D">bajo:beforeAll{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:bajo:beforeBuildCollection">bajo:beforeBuildCollection</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:after%257Bmethod%257D">{ns}:after{method}</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:beforeAppletRun">{ns}:beforeAppletRun</a></div><div class="sidebar-section-children"><a href="global.html#event:%257Bns%257D:before%257Bmethod%257D">{ns}:before{method}</a></div><div class="sidebar-section-children"><a href="module-Helper%257Bns%257D_afterAppletRun.html">Helper{ns}:afterAppletRun</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper.html">Helper</a></div><div class="sidebar-section-children"><a href="module-Lib.html">Lib</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#TAppConfigHandler">TAppConfigHandler</a></div><div class="sidebar-section-children"><a href="global.html#TAppEnv">TAppEnv</a></div><div class="sidebar-section-children"><a href="global.html#TBajoDataType">TBajoDataType</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatResult">TBajoFormatResult</a></div><div class="sidebar-section-children"><a href="global.html#TBajoFormatType">TBajoFormatType</a></div><div class="sidebar-section-children"><a href="global.html#TLogJson">TLogJson</a></div><div class="sidebar-section-children"><a href="global.html#TLogLevels">TLogLevels</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathPairs">TNsPathPairs</a></div><div class="sidebar-section-children"><a href="global.html#TNsPathResult">TNsPathResult</a></div><div class="sidebar-section-children"><a href="global.html#TPrintOptions">TPrintOptions</a></div><div class="sidebar-section-children"><a href="global.html#boot">boot</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/bajo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/bajo" target="">Github</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><article><div class="container-overview"></div><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="boot"><span class="type-signature">(async) </span>boot<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="App.html">App</a>}</span></h3><div class="description"><p>Main entry point of a Bajo app. Returned value is the app instance itself.</p><p>While you can code directly around it, you typically write your code the main plugin (<code>{mainNs}</code>) or writing your own custom plugin.</p><p>I recommend the second method for its portability.</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 class="last">Description</th></tr></thead><tbody><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="description last"><p>App options.</p><h6>Properties</h6><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>cwd</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Set current working directory. Defaults to the script directory.</p></td></tr><tr><td class="name"><code>plugins</code></td><td class="type"><span class="param-type">Array.&lt;string></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Array of plugins to load. If provided, it override the list in <code>package.json</code> and <code>.plugins</code> file.</p></td></tr><tr><td class="name"><code>config</code></td><td class="type"><span class="param-type">Object</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Plugin's config object. If provided, plugin configs will no longer be read from its config files.</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#line27">line 27</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"><a href="App.html">App</a></span></dd></dl></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Example</strong><div class="rel"><pre class="prettyprint"><code>// index.js file. Your main package entry point