Files
corescope-rx/package.json
T
efiten 65de1920f9 feat(native): choose the deployment at runtime instead of baking config.json into the APK
The APK carried the config.json that happened to be in public/ at build time, so
every APK belonged to one deployment, and a real one would have put the broker
login inside the file.

The native app now asks for the URL of a CoreDrive RX web deployment under
Settings and reads that deployment's config.json through CapacitorHttp, outside
the WebView, so the deployment needs no CORS header for it. A new URL is checked
before it replaces the old one. The last good config of the same deployment is
kept in localStorage and used when a start has no network; a different
deployment drops it. android:sync removes config.json from the APK assets.

- src/deployment.js: URL normalization (https only), fetch + validate + cache
- src/config.js: setConfigSource and parseConfigText, fetch path unchanged
- test/deployment.test.mjs: 11 tests (460 total pass)
- web build checked headless: appver filled, Deployment card hidden

Not tested on a device yet.
2026-11-10 09:04:56 +01:00

36 lines
1.1 KiB
JSON

{
"name": "coredrive-rx",
"version": "1.23.0",
"private": false,
"license": "GPL-3.0-or-later",
"type": "module",
"description": "Mobile RX coverage capture for CoreScope: BLE companion → MQTT (GPS + SNR/RSSI + multibyte)",
"repository": {
"type": "git",
"url": "git+https://github.com/efiten/coredrive-rx.git"
},
"homepage": "https://github.com/efiten/coredrive-rx#readme",
"bugs": "https://github.com/efiten/coredrive-rx/issues",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "node --test",
"deploy": "bash deploy.sh",
"android:sync": "vite build && cap sync android && node -e \"require('fs').rmSync('android/app/src/main/assets/public/config.json',{force:true})\""
},
"dependencies": {
"@capacitor-community/background-geolocation": "1.3.1",
"@capacitor-community/bluetooth-le": "8.3.0",
"@capacitor/core": "8.6.0",
"@noble/ciphers": "2.0.1",
"@noble/ed25519": "^3.2.0",
"mqtt": "^5.10.1"
},
"devDependencies": {
"@capacitor/android": "8.6.0",
"@capacitor/cli": "8.6.0",
"vite": "^6.4.5"
}
}