3.4.3 • Published 6 months ago

pear-updater v3.4.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

Pear Updater

The updater the pear-runtime runs on.

npm install pear-updater

Usage

const PearUpdater = require('pear-updater')

const u = new PearUpdater(drive, {
  directory: '/where/is/platform/dir',
  swap: '/current/swap/to/use/0',
  checkout: { key: 'z32-key-in-use', length: 42, fork: 0 }, // current checkout in swap
  async onupdating (newCheckout) {
    // fired before updates with an async ctx
  },
  async onupdate (newCheckout) {
    // fired on updates with an async ctx
  }
})

u.on('updating', function (checkout) {
  // emitted when a new update is being downloaded
})

u.on('update', function (checkout) {
  // emitted when a new update has been downloaded
})

for await (const checkout of u.watch(opts)) {
  // watch all updates as they come in, opts forwarded to streamx readable
}

// wait for a min version, opts forwarded to streamx readable
await u.wait(minimumCheckout, opts)

License

Apache-2.0

3.4.0

7 months ago

3.3.0

7 months ago

3.4.3

6 months ago

3.4.2

7 months ago

3.4.1

7 months ago

3.2.1

9 months ago

3.2.0

9 months ago

3.1.0

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.0

1 year ago

0.0.0

1 year ago