Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

Releases: sphereio/sphere-node-connect

v0.4.4

06 Mar 15:56
Compare
Choose a tag to compare

Fixes:

  • Correctly initialize logger with given streams 1fb595d

v0.4.3

27 Feb 22:36
Compare
Choose a tag to compare

Fixes:

  • use correct Logger API format #4
  • use 'debug' level instead of 'info' #5

v0.4.2

20 Feb 18:30
Compare
Choose a tag to compare
  • use instance of class in order to override static properties 1a95af8
# Before
{Logger} = require 'sphere-node-connect'
# or
Logger = require './logger'
# => 
logger = Logger.init {...}


# Now
{Logger} = require 'sphere-node-connect'
# or
Logger = require './logger'
# =>
logger = new Logger {...}

v0.4.1 - Exports Logger

20 Feb 13:01
Compare
Choose a tag to compare

Exports Logger and extend configuration ecf0528

You can now use the Logger in another component and just extend it with the configuration you need

# your logger class
{Logger} = require 'sphere-node-connect'

module.exports = class extends Logger
  @appName: 'my-new-app'

  @levelStream: 'warn'

  @levelFile: 'error'

  @path: '/var/log/my-app.log'


# implementation
logger = require './logger'

@logger = logger.init
  streams: [
    type: 'rotating-file'
    path: '/var/log/foo.log'
    period: '1d', # daily rotation
    count: 3 # keep 3 back copies
  ]

@logger.error 'Oops, something went wrong'

v0.4.0 - Enable JSON logging

20 Feb 09:09
Compare
Choose a tag to compare

Logging is supported by the lightweight JSON logging module called Bunyan.

https://github.com/emmenko/sphere-node-connect/tree/v0.4.0#logging

v0.3.0 - Return `body` as JSON

10 Feb 10:35
Compare
Choose a tag to compare
  • dependencies upgraded
  • response body is now automatically parsed as JSON 5d69998

v0.2.6 - Internal refactoring

25 Jan 23:26
Compare
Choose a tag to compare
  • don't commit generated sources
  • use JS classes
  • update dependencies versions

Fix for error handling in case of an connection error

15 Jan 22:08
Compare
Choose a tag to compare

v0.2.2 - Allow to set User-Agent

04 Jan 12:27
Compare
Choose a tag to compare

With this release you can instantiate Rest with a new options user_agent, which will be used in the User-Agent header for each call.
By default the user agent is set to sphere-node-connect.

v0.2.1 - Better error handling

31 Dec 13:45
Compare
Choose a tag to compare

When there are base connection problems, you don't get any response.
In those cases we handle the connection error now to give better feedback.

Updated request dependency