Socket
Socket
Sign inDemoInstall

confedarate

Package Overview
Dependencies
12
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.4 to 0.8.5

test/confederate.test.js

5

package.json
{
"name": "confedarate",
"version": "0.8.4",
"version": "0.8.5",
"description": "Narrow road conf-loader suitable for confederates of apps (for instance suits of microserviceses)",

@@ -10,2 +10,3 @@ "repository": "git+https://git.wazep.se/wace-p/confederate.git",

"scripts": {
"prepublish": "make",
"test": "test/run-tests.sh"

@@ -17,3 +18,3 @@ },

"chalk": "^2.3.0",
"cabler": "git+https://git.wazep.se/wace-p/cabler.git"
"cabler": "^0.8.1"
},

@@ -20,0 +21,0 @@ "devDependencies": {

10

README.md

@@ -5,10 +5,10 @@ ## Confederate - Tight Conf Loader ##

All the conf-loaders out there where way bloated, we wanted the init of apps tight. We wanted it aimed at suits of microservices.
We wanted the init of apps tiny and tight. We wanted it aimed at suits of microservices.
Every app has its' name configured. That's used for identification in logging. And of specific conf file. Confederate utilizes that. It also looks for a common conf. They're merged — with top-level keys granularity only. That's it. Because "fancy and elaborate" complex chains of inheritence, variable expansion and merging have _avsolutely no place_ in app-confs. _When_ you need that, you solve it in a conf-build stage. You want to catch problems at build time, not deploy time on server, with it's invariably differing setup compared to your dev-situation. Also, we all love yaml, etc — but again, that convenience saves no time in a deployed conf situation. For that: again, add a build-stage for the confs! Don't be lazy in the wrong places!
Every app has a name configured in code. That's used for identification in logging, and for specific conf file - when needed. Confederate utilizes that. It also looks for a common conf. They're merged — with top-level keys granularity only. That's it. Because "fancy and elaborate" complex chains of inheritence, variable expansion and merging have _avsolutely no place_ in app-confs at run-time. _When_ you need that, you solve it in a conf-build stage. You want to catch problems at build time, not at deploy-time on server, with it's invariably differing setup compared to your dev-situation. Also, we all love yaml, etc — but again, that convenience saves no time in a deployed conf situation. For that: again, add a build-stage for the confs! Don't be lazy in the wrong places!
### Details? ###
It's picky. Pass `my-app --conf the-conf-dir`, `my-app --conf=the-conf-dir` or `CONF=the-conf-dir my-app`. A specific conffile-path instead of dir can be passed instead.
With the dir, it looks for "the-conf-dir/common-defaults.conf.json" and "the-conf-dir/the-app-name.conf.json" and merges them at _top-level keys granularity only_ — yes, that's a feature — with the app-specific naturally taking precedence.
It's picky. Pass `my-app --conf the-conf-dir`, `my-app --conf=the-conf-dir` or `CONF=the-conf-dir my-app`. A specific conf-file-path be passed instead of dir.
With the dir, it looks for "the-conf-dir/common-defaults.conf.json" and "the-conf-dir/the-app-name.conf.json" and merges them at _top-level keys granularity only_ — yes, that's a feature — with the app-specific properties naturally taking precedence.

@@ -19,2 +19,2 @@ It's written in TypeScript for buildtime insurances.

More details to come — and changes. Don't install this until v1.0.0, you've been warned.
More details to come — and changes. The goal is to reduce it to the least possible amount of code. Don't use this until v1.0.0, you've been warned.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc