Code Monkey home page Code Monkey logo

basebot's People

Contributors

carlevans719 avatar ceuk avatar dependabot[bot] avatar dewhurstwill avatar nathanguk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

basebot's Issues

[generator-basebot] html template has incorrect script path

Describe the bug
Frontend app is blank due to incorrect script path in basebot generator template

To Reproduce

  1. npm i -g basebot-cli
  2. basebot create
  3. follow instructions from the docs but skip NLP service
  4. npm run dev
  5. visit localhost:3000 and notice blank screen

Expected behavior
Web page shows bot frontend app

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 20H2 (19042.572)
  • Browser: Edge
  • Version: 86.0.622.69

Smartphone (please complete the following information):

Additional context

Basebot URL unaccessible (https://basebot.ans.tools)

Describe the bug
The URL https://basebot.ans.tools is no longer accessible

To Reproduce
Steps to reproduce the behavior:

  1. Go to your browser of choice
  2. Navigate to https://basebot.ans.tools

Hmmm… can't reach this pagebasebot.ans.tools’s server IP address could not be found.
ERR_NAME_NOT_RESOLVED

Expected behavior
Basebot documentation site loads

Desktop (please complete the following information):

  • OS: OSX 10.15.6
  • Browser Edge
  • Version 84.0.522.63

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro Maz
  • OS: IOS 14.0 (beta4)
  • Browser: Safari

Middleware models not being passed in correctly to storage engines

Describe the bug
In basebot-core, the models extracted from middlewares are passed into the storage engine as an array of objects. But the storage engine expects a single object.

In the basebot-core init function:

  const logger = getSingleModule(config.logger)
  const channels = getAllModules(config.channels)
  const rawMiddleware = getAllModules(config.middleware)
  const models = getAllModels(rawMiddleware)
  const storage = getSingleModule(config.storage)({ logger, models: models })
  const middleware = rawMiddleware.map(mw => mw({ storage, logger }))
  const info = logger('core', 'info')
  const { server, app } = Server({ logger })
  const controllers = startChannels({ channels, storage, logger, server, app })

Should be:

  const logger = getSingleModule(config.logger)
  const channels = getAllModules(config.channels)
  const rawMiddleware = getAllModules(config.middleware)
  const models = getAllModels(rawMiddleware)
  const storage = getSingleModule(config.storage)({ logger, models: Object.assign(...models) })
  const middleware = rawMiddleware.map(mw => mw({ storage, logger }))
  const info = logger('core', 'info')
  const { server, app } = Server({ logger })
  const controllers = startChannels({ channels, storage, logger, server, app })

Note the merging of the array of objects into one object with Object.assign(...models)

Source: https://github.com/ans-group/basebot/blob/master/packages/basebot-core/src/index.js#L11

This was observed when using the azure table storage engine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.