How to use the balena-sdk.setSharedOptions function in balena-sdk

To help you get started, we’ve selected a few balena-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github balena-io / balena-cli / lib / app-common.ts View on Github external
function setupBalenaSdkSharedOptions() {
	// We don't yet use balena-sdk directly everywhere, but we set up shared
	// options correctly so we can do safely in submodules
	const BalenaSdk = require('balena-sdk');
	const settings = require('balena-settings-client');
	BalenaSdk.setSharedOptions({
		apiUrl: settings.get('apiUrl'),
		imageMakerUrl: settings.get('imageMakerUrl'),
		dataDirectory: settings.get('dataDirectory'),
		retries: 2,
	});
}

balena-sdk

The Balena JavaScript SDK

Apache-2.0
Latest version published 5 days ago

Package Health Score

78 / 100
Full package analysis