pear-runtime-updater 0.0.9 → 0.0.10

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 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -10,7 +10,7 @@ const link = require('pear-link')
10
10
  const hid = require('hypercore-id-encoding')
11
11
  const { platform, arch } = require('which-runtime')
12
12
  const isMobile = platform === 'ios' || platform === 'android'
13
- const host = isMobile ? platform : platform + '-' + arch
13
+ const host = platform + '-' + arch
14
14
 
15
15
  module.exports = class PearRuntime extends ReadyResource {
16
16
  constructor(opts = {}) {
@@ -121,10 +121,11 @@ module.exports = class PearRuntime extends ReadyResource {
121
121
  const local = new Localdrive(next)
122
122
 
123
123
  this.emit('updating')
124
- const prefix = `/by-arch/${host}/app/${isMobile ? '' : this.name}`
124
+ const prefix = `/by-arch/${host}/app${isMobile ? '' : `/${this.name}`}`
125
125
  for await (const data of co.mirror(local, { prefix })) {
126
126
  this.emit('updating-delta', data)
127
127
  }
128
+ if (isMobile) await local.put(`${prefix}/package.json`, manifest)
128
129
 
129
130
  await co.close()
130
131
  await local.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pear-runtime-updater",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Listens for OTA Pear App updates",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc",