OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface-android / chk-probe.mjs

14 lines · javascript ref:
import process from 'bare-process'
const storage = process.argv[process.argv.length - 1]
const m = await import('./lib/node.js')
const st = await m.boot(storage)
console.log('BOOTED', st.url)
// Give the boot-time OTA a moment, then drive the exact op the button drives.
await new Promise((r) => setTimeout(r, 20000))
const fs = (await import('bare-fs')).default
const { join } = await import('bare-path')
const read = (f) => { try { return JSON.parse(fs.readFileSync(join(storage, f), 'utf8')) } catch { return null } }
console.log('app-update.json  :', JSON.stringify(read('app-update.json')))
console.log('bundles/current  :', JSON.stringify(read('bundles/current.json')))
process.exit(0)