Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

balena-settings-client

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-settings-client

Balena client application shared settings

  • 5.0.2-build-flowzonify-f83a096015ccb7bdd6195c8cc0fbbe16ce62ae5f-1
  • build-flowzonify
  • build-flowzonify-f83a096015ccb7bdd6195c8cc0fbbe16ce62ae5f
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-11.66%
Maintainers
1
Weekly downloads
 
Created
Source

balena-settings-client

npm version dependencies Build Status Build status

Join our online chat at Gitter chat

Balena client application shared settings.

Role

The intention of this module is to provice low level access to user configurable balena simple settings.

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

Unless you know what you're doing, use the balena SDK instead.

Installation

Install balena-settings-client by running:

$ npm install --save balena-settings-client

Documentation

This module attempts to retrieve configuration from the following places:

UNIX:

  • Default settings.
  • $HOME/.balenarc.yml.
  • $PWD/balenarc.yml.
  • Environment variables matching BALENARC_<SETTING_NAME>.

Windows:

  • Default settings.
  • %UserProfile%\_balenarc.yml.
  • %cd%\balenarc.yml.
  • Environment variables matching BALENARC_<SETTING_NAME>.

The values from all locations are merged together, with sources listed below taking precedence.

For example:

	$ cat $HOME/.balenarc.yml
	balenaUrl: 'balena-staging.com'
	projectsDirectory: '/opt/balena'

	$ cat $PWD/.balenarc.yml
	projectsDirectory: '/Users/balena/Projects'
	dataDirectory: '/opt/balena-data'

	$ echo $BALENARC_DATA_DIRECTORY
	/opt/cache/balena

That specific environment will have the following configuration:

	balenaUrl: 'balena-staging.com'
	projectsDirectory: '/Users/balena/Projects'
	dataDirectory: '/opt/cache/balena'

settings~get(name) ⇒ *

Kind: inner method of settings
Summary: Get a setting
Returns: * - setting value
Access: public

ParamTypeDescription
nameStringsetting name

Example

settings.get('dataDirectory')

settings~getAll() ⇒ Object

Kind: inner method of settings
Summary: Get all settings
Returns: Object - all settings
Access: public
Example

settings.getAll()

Modifying settings

This module is intended to only provide read only access to the settings. Balena settings client reads settings from various locations, like a local balenarc file and a per user config file, therefore the module doesn't know where to write changes back.

If you want to persist data related to balena, consider using balena settings storage instead.

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:

$ npm test

Contribute

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

$ npm run lint

License

The project is licensed under the Apache 2.0 license.

Keywords

FAQs

Package last updated on 20 Apr 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc