This repository has been archived by the owner on Dec 27, 2018. It is now read-only.
Releases: sphereio/sphere-node-connect
Releases · sphereio/sphere-node-connect
v0.4.4
v0.4.3
v0.4.2
- 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
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
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
- dependencies upgraded
- response
body
is now automatically parsed as JSON 5d69998
v0.2.6 - Internal refactoring
- don't commit generated sources
- use JS classes
- update dependencies versions
Fix for error handling in case of an connection error
v0.2.3 Version 0.2.3
v0.2.2 - Allow to set User-Agent
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
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