
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
config-type
Advanced tools
A library created with the objective to facilitate creating configuration for applications utilizing JSON (or others formats in the future). While having the security of type checking the variables and resolver to default values.
An alternative of Convict written in Typescript, the primary reason of this library is the need of dynamically updating the configuration file in some of my projects (yeah, it has it's owns risk but I need to do it :/ and take care of all possible errors)
Setup an configuration file anywhere in your machine (be certain that the application can read the file), and use it's path in configurator
Example:
import { configurator } from "config-type";
import path from 'path';
const Configurator = configurator({
databaseUrl: {
description: 'Database url',
type: 'string',
required: true,
},
insert_invertal: {
description: 'Bach insert interval used for buffer cleaning',
type: 'number',
required: true,
default: 15000
}
});
Configurator.load(path.join(__dirname, 'config.json'));
console.log(Configurator.get('databaseUrl'));
FAQs
An config loader with type checking and resolver to defaults values
The npm package config-type receives a total of 4 weekly downloads. As such, config-type popularity was classified as not popular.
We found that config-type demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.