{"id":20499653,"url":"https://github.com/apla/conf-fu","last_synced_at":"2026-04-21T04:31:37.785Z","repository":{"id":17289290,"uuid":"20059576","full_name":"apla/conf-fu","owner":"apla","description":"configuration for everything","archived":false,"fork":false,"pushed_at":"2016-04-26T18:32:26.000Z","size":120,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T18:57:36.021Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T12:07:55.000Z","updated_at":"2021-04-15T19:07:52.000Z","dependencies_parsed_at":"2022-08-22T18:30:47.818Z","dependency_job_id":null,"html_url":"https://github.com/apla/conf-fu","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/apla/conf-fu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apla%2Fconf-fu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apla%2Fconf-fu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apla%2Fconf-fu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apla%2Fconf-fu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apla","download_url":"https://codeload.github.com/apla/conf-fu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apla%2Fconf-fu/sbom","scorecard":{"id":202874,"data":{"date":"2025-08-11","repo":{"name":"github.com/apla/conf-fu","commit":"d8a127eb68618aa054558cd924e4c30100639391"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T23:07:39.956Z","repository_id":17289290,"created_at":"2025-08-16T23:07:39.956Z","updated_at":"2025-08-16T23:07:39.956Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32076875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T18:18:01.112Z","updated_at":"2026-04-21T04:31:37.766Z","avatar_url":"https://github.com/apla.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"conf-fu\n==========\n\n[![build](https://travis-ci.org/apla/conf-fu.svg)](https://travis-ci.org/apla/conf-fu)\n[![NPM Version](http://img.shields.io/npm/v/conf-fu.svg?style=flat)](https://www.npmjs.org/package/conf-fu)\n[![codecov.io](https://codecov.io/github/apla/conf-fu/coverage.svg?branch=master)](https://codecov.io/github/apla/conf-fu?branch=master)\n\nSimple configuration module to handle complex problems\n\nInstall\n-------\n\nnpm install -g conf-fu\n\nSynopsis\n--------\n\n```javascript\n\nvar ConfFu = require ('conf-fu');\n\n// init from files\nvar config = new ConfFu ({\n   configFile: path.join (configDir, 'index.json'),\n   fixupFile:  path.join (configDir, 'fixup.json')\n});\n\nconfig.verbose = globalVerbose || false;\n\nconfig.on ('ready', function () {\n   done();\n});\n\nconfig.on ('error', function (eOrigin, eType, eData, eFile) {\n   assert (false, 'wrong config');\n});\n\n// init from structures\nvar config = new ConfFu ({\n   config: {a: {b: {c: \"\u003c#who knows\u003e\"}}, x: true}\n});\n\n```\n\nGoals\n----------\n\n1. Easy to use\n\n   Common formats, you can set up a location of configuration files.\nIf you already have one, you do not need to change files location for each project,\nyou can just point this location (set up environment) for all needed projects.\n\n2. Scalable\n\n   Hierarchical, any section can live in a separate file, easy access to frequently changing sections.\n\n3. Easy deployment\n\n   Configuration is actually is splitted to the project configuration and the instance fixup.\nYou can have as many fixups as you want, not only development and production.\n\n4. Persistent\n\n   Current configuration snapshot is always on disk and in vcs. No code allowed within configuration.\nTools never change project config, only fixup allowed to change.\n\nThose is not acceptable:\n\n1. `require ('config.json')` — 1, 2, 3;\n2. nconf - 4 (require code to load includes)\n3. node-convict - 2 (no access to frequently changing sections), 3 (no separation beween project config and instance fixup)\n4. dotenv - 2, 4 (recommended not to commit config)\n5. node-config - 1 (cannot change location), 4 (instance name not stored on disk)\n\nConfiguration file\n---------------\n\nConfiguration format when parsed must be presented with tree or key-value structure.\n\nEach string can be basic or enchanted. `conf-fu` supports those enchantments:\n\n1. variables\n\n   examples:\n\n    * `\u003c$db.mongo.collection\u003e` —  linked to the other value in configuration\n    * `\u003c$bool(on|off):db_unix_sock=on\u003e` — variable with type and default value\n    * `\u003c$http_domain\u003e:\u003c$http_port\u003e` — string concatenation\n\n2. placeholders\n\n   examples:\n   \n    * `\u003c#placeholder\u003e` — just a placeholder, need to be fullfilled\n    * `\u003c#optional:placeholder\u003e` — you can omit this value in fixup\n    * `\u003c#default:127.0.0.1\u003e` — you can omit this value in fixup and default value will be used\n    \n3. includes\n\n   examples:\n   \n   * `\u003c\u003cfilename\u003e\u003e` — parsed content from filename need to be inserted into that node\n\nUsage\n---------------\n\nYou can use `conf-fu` standalone, integrate within project or use it in browser.\n\n####node.js in standalone mode \n\nconf-fu configuration is located within `.conf-fu` directory in project root.\nMain configuration file named `project.json`, fixup directories located at same level as the `project.json` file.\n\n1. `project.json` file is loaded and parsed. `json`, `ini` and `yaml` formats supported, new formats can be added easily;\n2. `project.json` contents is scanned for includes in form `\"\u003cinclude-file-name\u003e\"`;\n3. when all includes is loaded, config tree is scanned for variables (`\"\u003c$config.path.variable\u003e\"`) and placeholders (`\"\u003c#please fix me\u003e\"`, `\"\u003c#optional:please fix me\u003e\"`, `\"\u003c#default:127.0.0.1\u003e\"`);\n4. `fixup.json` file loaded and checked, whether all variables and placeholders fulfilled;\n5. if resulting config is fulfilled, `conf-fu` emits `ready` event; otherwise, `error` event emitted.\n\n#####Environment variables to drive config\n\nrequired:\n\n * `CONF_FU`       core file path, parent directory is assumed as config location\n * `CONF_FU_FIXUP` fixup file path\n * `INSTANCE` or `CONF_FU_INSTANCE` instance name\n\noptional:\n\n * `CONF_FU_PROJECT` (relative to project root, dir name to search for `project.json` file)\n\n#### Integration to the existing project\n\nYou have two options to integrate conf-fu to existing projects:\n\n1. Use as configuration management script\n\n   For example, one part of your project written on `php` and you want to add `conf-fu`.\nYou'll need to install `conf-fu` from npm, then just use it from command line to edit configuration,\nvalidate it, fullfill variables and placeholders. Then, just ask `conf-fu` to store\nconfiguration artifact in place where you can read it with `php`.\n\n\n2. Use within code to get a configuration.\n\nTODO\n\n\nLinks\n---------------\n\n * http://thejeffchao.com/blog/2013/09/26/an-alternative-node-dot-js-configuration-management-pattern/\n * http://metaduck.com/03-konphyg.html\n * https://github.com/mozilla/node-convict\n * https://github.com/scottmotte/dotenv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapla%2Fconf-fu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapla%2Fconf-fu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapla%2Fconf-fu/lists"}