Git Product home page Git Product logo

signally's Issues

Avoid clashing events by making buffers caller specific

Scenario:

  • a logging library uses signally for updating the log level
  • package x uses the logging library above
  • package x also uses signally for updating some configurations
  • if package x and the logging library both use events with the same name, unwanted effects may appear

Possible fix:

  • make events always caller specific: find out the caller module ID (module root of the caller?) and create a new directory for it under .buffer

JSON.parse error in Docker

When started in Docker, events sent with CLI fail in parsing from JSON:

Error when handling event 1: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.readJsonFile (/app/node_modules/signally/dist/utils.js:26:17)
    at FSWatcher.<anonymous> (/app/node_modules/signally/dist/listener.js:28:34)
    at emitTwo (events.js:126:13)
    at FSWatcher.emit (events.js:214:7)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1364:12)

Manually entering events to .signally inside the container is working fine:

echo '{"event": "hello", "messages": ["Hei"]}' > .signally/1

Error handling for sending events not listened to

CLI should indicate when an event is not listened to by the target process. This could be implemented e.g. by creating a directory for each listened-to event name under .buffer. Instead of a verbose object, each file would only include the messages as a JSON array.

If an event is not listened to (i.e. directory .buffer/[event name] does not exist), there should be an error, e.g.:

Event [event name] is not listened to

Add Travis CI

After implementing unit tests #1, add automatic test running with Travis CI.

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.