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

@jepz20/conman

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jepz20/conman - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

4

package.json
{
"name": "@jepz20/conman",
"version": "0.0.6",
"version": "0.0.7",
"description": "Configuration manager that supports ttl and plugabble sources",

@@ -17,3 +17,3 @@ "main": "./src/conman",

},
"gitHead": "71f94a800cc512bd74269e165a466e722efbe23a",
"gitHead": "349fbbbbe10fe177bab4de63d6c81d8ec7b06b78",
"lint-staged": {

@@ -20,0 +20,0 @@ "src/**/*.*": [

@@ -160,2 +160,3 @@ const { mergeDeepRight } = require('ramda');

const sourcesTypes = _sources.map(({ name, type }) => name || type);
const sourcesKeys = _sources.map(source => source.key);
logger(

@@ -170,3 +171,7 @@ 'log',

);
return configs.reduce((acc, config) => {
return configs.reduce((acc, config, index) => {
const sourceKey = sourcesKeys[index];
if (sourceKey) {
return mergeDeepRight(acc, { [sourceKey]: config });
}
return mergeDeepRight(acc, config);

@@ -173,0 +178,0 @@ }, {});

@@ -6,3 +6,3 @@ jest.mock('jsonfile');

const source = obj => {
const source = (obj, { key, name } = {}) => {
return {

@@ -12,3 +12,5 @@ build() {

},
type: 'syncSource'
type: 'syncSource',
key,
name
};

@@ -43,3 +45,3 @@ };

it('should build with one synchronous source', async () => {
it('should build with one asynchronous source', async () => {
const source1 = asyncSource({ test: 'test' });

@@ -53,3 +55,12 @@ const config = await conman()

it('should build with one asynchronous source', async () => {
it('should build with one synchronous source and use the key', async () => {
const source1 = source({ test: 'test' }, { key: 'TEST' });
const config = await conman()
.addSource(source1)
.build();
conman.stop();
expect(config).toEqual({ TEST: { test: 'test' } });
});
it('should build with one synchronous source', async () => {
const source1 = source({ test: 'test async' });

@@ -56,0 +67,0 @@ const config = await conman()

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