pear-runtime-updater 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -117,9 +117,11 @@ module.exports = class PearRuntimeUpdater extends ReadyResource {
117
117
 
118
118
  const local = new Localdrive(next)
119
119
 
120
+ const prefix = prefixFor(host, this.name)
121
+ const exists = await co.get(prefix)
122
+ if (!exists) throw new Error('update not found')
120
123
  this.updating = true
121
124
  this.emit('updating')
122
- const prefix = prefixFor(host, this.name)
123
125
  for await (const data of co.mirror(local, { prefix })) {
124
126
  this.emit('updating-delta', data)
125
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pear-runtime-updater",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Listens for OTA Pear App updates",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc",