balena-supervisor/src
Felipe Lalanne 0605e996c9 Make readFromBoot behave more like Node readFile
The `readFromBoot` function replaced calls to readFile in the codebase
when the target location is under `/mnt/boot` in order to use `fatrw`
to check for corruption. Unfortunately this function behaved a little
differently with regards to errors. While `readFile` returns a code `ENOENT`
when the file is not found, `readFromBoot` would just throw an exception
with whatever code was given by fatrw. This would cause confusion for
some calls that were behaving differently with a `ENOENT`, causing some
issues.

Closes: #2071
Change-type: patch
2022-12-07 18:30:34 +00:00
..
api-binder Improve determination of when a state change may need to be reported 2022-11-18 09:23:20 -05:00
compose Use timers/promises for promisified setTimeout 2022-11-21 18:17:34 -05:00
config Remove some unnecessary usage of .reduce 2022-11-18 17:10:36 +00:00
device-api Access api-key methods through device API 2022-10-18 14:27:19 -07:00
device-state Remove some unnecessary usage of .reduce 2022-11-18 17:10:36 +00:00
lib Make readFromBoot behave more like Node readFile 2022-12-07 18:30:34 +00:00
logging Run the built supervisor as part of docker-compose tests 2022-11-03 15:45:39 -03:00
migrations Update to typescript 4.8.2 2022-09-19 16:36:17 +01:00
types Enable node16 module resolution in tsconfig to ease the ESM transition 2022-11-22 11:01:03 -03:00
app.ts Set desired es-version for downstream modules that support it 2022-09-07 17:07:16 +03:00
db.ts Update dependencies to fix NPM build 2022-09-26 15:26:48 -03:00
device-config.ts Update to typescript 4.8.2 2022-09-19 16:36:17 +01:00
device-state.ts Report must include a state change if sooner than metrics frequency 2022-11-18 09:12:10 -05:00
event-bus.ts Add newTargetState event and use it for backup loading 2020-04-07 14:50:34 +01:00
event-tracker.ts Disable event tracking 2022-09-20 14:19:26 -03:00
host-config.ts Use fatrw utility for writes to boot partition 2022-11-16 21:21:23 -03:00
local-mode.ts Update to typescript 4.8.2 2022-09-19 16:36:17 +01:00
logger.ts Remove side effects for module imports 2022-09-06 15:48:18 -04:00
network.ts Update @balena/lint to 6.2.0 2022-09-19 16:41:28 +01:00
proxyvisor.js Use v2 router directly instead of through application manager 2022-10-18 14:16:53 -07:00
supervisor.ts Fix typo: intialise -> initialize 2022-11-07 12:09:17 -08:00