# nsis-compat-updater

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

Latest version **1.2.0** (published 2018-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install nsis-compat-updater
pnpm add nsis-compat-updater
yarn add nsis-compat-updater
bun add nsis-compat-updater
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2018-02-04 |
| First published | 2017-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 288 |
| Author | evshiron |
| Maintainers | evshiron |

## Links

- npm: https://www.npmjs.com/package/nsis-compat-updater
- Repository: https://github.com/evshiron/nwjs-builder-phoenix
- Homepage: https://github.com/evshiron/nwjs-builder-phoenix#readme
- Issues: https://github.com/evshiron/nwjs-builder-phoenix/issues
- npm.io page: https://npm.io/package/nsis-compat-updater

## Recent versions

- 1.2.0 (latest) — 2018-02-04
- 1.1.0 — 2017-04-20
- 1.0.0 — 2017-04-19

## README

# nsis-compat-updater

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

## API

### Imports

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

### Types

```typescript

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')`

```javascript
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)`~~

---
_Source: https://npm.io/package/nsis-compat-updater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
