Socket
Socket
Sign inDemoInstall

balena-config-json

Package Overview
Dependencies
15
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    balena-config-json

Balena config.json manipulation utilities


Version published
Weekly downloads
513
increased by1.99%
Maintainers
1
Install size
935 kB
Created
Weekly downloads
 

Readme

Source

balena-config-json

npm version dependencies Build Status Build status

Balena config.json manipulation utilities.

Role

The intention of this module is to provide low level utilities to read and write config.json from balena devices.

THIS MODULE IS LOW LEVEL AND IS NOT MEANT TO BE USED BY END USERS DIRECTLY.

Installation

Install balena-config-json by running:

$ npm install --save balena-config-json

Documentation

config~read(image, _type) ⇒ Promise

Kind: inner method of config
Summary: Read a config.json from an image
Access: public
Fulfil: Object - config.json

ParamTypeDescription
imageStringimage or drive path
_typeStringignored (device type, no longer required)

Example

config.read('/dev/disk2', 'raspberry-pi').then (config) ->
	console.log(config)

config~write(image, _type, config) ⇒ Promise

Kind: inner method of config
Summary: Write a config.json to an image
Access: public

ParamTypeDescription
imageStringimage or drive path
_typeStringignored (device type, no longer required)
configObjectconfig.json

Example

config.write '/dev/disk2', 'raspberry-pi',
	username: 'foobar'
.then ->
	console.log('Done!')

Support

If you're having any problem, please raise an issue on GitHub and the balena team will be happy to help.

Tests

Run the test suite by doing:

$ gulp test

Contribute

Before submitting a PR, please make sure that you include tests, and that npm run lint runs without any warning:

$ gulp lint

License

The project is licensed under the Apache 2.0 license.

Keywords

FAQs

Last updated on 25 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc