/*eslint max-len: 0 */
const _ = require('lodash')

module.exports = {
  hr: '---------------------------------------------------------------',

  info: {
    start: 'Starting...',
    stop: 'Shutting down...',
    initialized: 'All trailpacks are loaded.',
    ready (app) {
      return (
        `---------------------------------------------------------------
        ${new Date()}
        Basic Info
          Application       : ${app.pkg.name}
          Version           : ${app.pkg.version}
          Environment       : ${process.env.NODE_ENV}`
      )
    }
  },

  debug: {
    ready (app) {
      return (
        ` Database Info
          ORM               : ${_.get(app.config, 'database.orm') || 'NOT INSTALLED'}
          Stores            : ${_.get(app.config, 'database.orm') ? Object.keys(app.config.database.stores) : 'N/A'}
        Web Server Info
          Engine            : ${_.get(app.config, 'views.engine') || 'NOT INSTALLED'}
          Port              : ${_.get(app.config, 'views.engine') ? _.get(app, 'config.web.port') : 'N/A'}
          Routes            : ${(app.routes || [ ]).length}`
      )
    }
  },

  silly: {
    stop: `
      Happy trails to you, until we meet again.
      - Dale Evans
    `,

    ready (app) {
      return (
        ` API
          Models            : ${_.keys(app.api.models)}
          Controllers       : ${_.keys(app.api.controllers)}
          Policies          : ${_.keys(app.api.policies)}
          Trailpacks        : ${_.map(app.packs, pack => pack.name)}`
        )
    },

    initialized: `
             . . ....                  ..                            ..
            .. .. ......               ..                       .:.  ..
           ... .. ........             ..                      :   : ..
          .... ... .........           .....  ::::  ::::  :::: :   : ..
         ..... ... ..........          ..                       ':'  ..
        ...... .... ..........         ..                            ..
       ....... ..... ..........        ..    . ....  ....        .   ..   ......
      ........ ...... ..........       ..    ...    ..           .   ..  ..
     ......... '...... ..........      ..    .     ..            .   ..  ..
    ..........  ....... ..........     ..    .     .         .   .   ..   '...
   ...........   ....... ..........    ..    .     .         ..  .   ..    '...
  ............    ....... ..........   ..    .     ..        ..  .   ..       ..
 .............      ...... ..........  ..    .      ..     ....  .   ..       ..
..............        ..... .......... ..    .       ....... ..  .   ..  .....,'
    `
  }
}


@@ -877,19 +877,103 @@
     
+Server            : $%7B_.get(app.config, 'web.server') %7C%7C 'NOT INSTALLED'%7D%0A          View 
 Engine
-     
     
@@ -1088,44 +1088,8 @@
 g, '
-views.engine') ? _.get(app, 'config.
 web.
@@ -1095,17 +1095,18 @@
 .port') 
-:
+%7C%7C
  'N/A'%7D%0A

add web server name