
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
larvitconf
Advanced tools
larvitconf is configuration loading library that take options and load json files in to a json object.
let options = {
'requiredFiles': [
'configFile1.json',
'/subFolder/configFile2.json',
'/subFolder/subFolder2/configFile3.json'
],
'configFolder': '/srv/application/config/', // Optional
'envOverride': true // Optional, defaults to false
};
const config = await configLib.loadConfigs(options); // throws on error
console.log(config);
Code above returns a json object that look like this.
{
configs: {
configFile1: {},
subFolder: {
configFile2: {},
subFolder2: {
configFile3: {}
}
}
},
configFolder: '/srv/application/config/'
}
"configFolder" is optional and if not specified the lib will look in the folder where the process is run and in it's subfolder "config/"
Values in configuration files can be overridden by using environmental variables. The value should be valid json.
The following format is expected (note the double underscore separator): <key1.2>=
For instance, a config file example.json
like:
{
"key1": "value",
"nested": {
"object": [12, 13]
}
}
can be overridden by the following environmental variables:
example__key1="new value"
example__nested__object=[23,24]
FAQs
Configuration lib
The npm package larvitconf receives a total of 231 weekly downloads. As such, larvitconf popularity was classified as not popular.
We found that larvitconf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.