3.3.0 • Published 5 years ago

node-savas v3.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

node-savas

A simple wrapper to communicate with savas

Installation

yarn add node-savas

Usage

const savas = require('node-savas')

let app = savas.instance({
    // The host, with protocol and no ending slash
    host: 'http://savas.test',
    // The label of your application
    id: 'development-tool',
    // The release channel (available values based on your configuration)
    channel: 'production',
    // The platform (available values based on your configuration)
    platform: 'windows',
    // The current installed version (can be null to receive the latest version)
    version: '0.0.0'
})

app.getUpdate()
    .then(update => {

        app.download(update, {
            destination: __dirname + '/picture.jpg',

            progress ({ total, current, percentage }) {
                console.log('%d/%d (%d%%)', current, total, percentage)
            },
            resolve ({ filename }) {
                console.log('Downloaded update file: %s', filename)
            },
            reject (error) {
                console.log('There was an error while downloading the update')
            }
        })

    })
    .catch(error => {
        if (error) {
            console.log('There was an error while checking for updates')
        } else {
            console.log('No update available')
        }
    })
3.3.0

5 years ago

3.2.3

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago