Socket
Socket
Sign inDemoInstall

nsis-compat-updater

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nsis-compat-updater

`nsis-compat-updater` is an auto updater implementation for NW.js, inspired by `electron-updater`.


Version published
Maintainers
1
Created

Changelog

Source

1.2.0 (2017-03-30)

Features

  • Builder: integrate nsis target building (#11) (28a247d)

<a name="1.1.1"></a>

Readme

Source

nsis-compat-updater

nsis-compat-updater is an auto updater implementation for NW.js, inspired by electron-updater.

API

Imports

import { NsisCompatUpdater } from 'nsis-compat-updater';
// Or
// const { NsisCompatUpdater } = require('nsis-compat-updater');

Types


interface IInstaller {
    arch: string;
    path: string;
    hash: string;
    created: number;
}

interface IUpdater {
    arch: string;
    fromVersion: string;
    path: string;
    hash: string;
    created: number;
}

interface IVersion {
    version: string;
    changelog: string;
    source: string;
    installers: IInstaller[];
    updaters: IUpdater[];
}

interface IStreamProgress {
    percentage: number;
    transferred: number;
    length: number;
    remaining: number;
    eta: number;
    runtime: number;
    delta: number;
    speed: number;
}

new NsisCompatUpdater(feed: string, version: string, arch: 'x86' | 'x64')

const updater = new NsisCompatUpdater(feed, version, arch);

updater.onDownloadProgress.subscribe((state: IStreamProgress) => void)

updater.onDownloadProgress.unsubscribe((state: IStreamProgress) => void)

updater.checkForUpdates(): Promise<IVersion | null>

Returns an instance of IVersion if new version is available, otherwise null.

updater.downloadUpdate(version: string): Promise<string>

Returns the temporary path of the downloaded update.

updater.quitAndInstall(path: string)

updater.installWhenQuit(path: string)

FAQs

Last updated on 04 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc