{"id":23174215,"url":"https://github.com/coursedesign/conev-core","last_synced_at":"2026-04-20T10:04:17.433Z","repository":{"id":36954013,"uuid":"248408211","full_name":"CourseDesign/conev-core","owner":"CourseDesign","description":"Conev is a module that build environment variables from a source into config.","archived":false,"fork":false,"pushed_at":"2023-01-24T09:03:59.000Z","size":26,"stargazers_count":0,"open_issues_count":8,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-09T14:42:45.404Z","etag":null,"topics":["conenv","configuration","environment","npm","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/conev-core","language":"TypeScript","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/CourseDesign.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":"2020-03-19T04:10:16.000Z","updated_at":"2021-06-26T00:49:13.000Z","dependencies_parsed_at":"2023-02-13T19:30:40.696Z","dependency_job_id":null,"html_url":"https://github.com/CourseDesign/conev-core","commit_stats":null,"previous_names":["kdpark0723/conev-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CourseDesign%2Fconev-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CourseDesign%2Fconev-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CourseDesign%2Fconev-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CourseDesign%2Fconev-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CourseDesign","download_url":"https://codeload.github.com/CourseDesign/conev-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247268502,"owners_count":20911147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["conenv","configuration","environment","npm","npm-package"],"created_at":"2024-12-18T05:19:37.676Z","updated_at":"2026-04-20T10:04:12.373Z","avatar_url":"https://github.com/CourseDesign.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# conev-core\n\nConev is a module that build environment variables from a `source` into `config`. Storing configuration in the environment separate from code is based on [The Twelve-Factor App](http://12factor.net/config) methodology.\n\n![](https://img.shields.io/npm/dm/conev-core.png?style=flat-square)\n\n​    \n\n## Install\n\n```shell\n# with npm \nnpm install conev-core\n \n# or with Yarn \nyarn add conev-core\n```\n\n​    \n\n## Config Builder\n\n```typescript\nclass ConfigBuilder {\n    setEnv(...env: string[]): ConfigBuilder;\n    addEnv(...env: string[]): ConfigBuilder;\n    addSource(source: Source, priority?: number): ConfigBuilder;\n\n    build(): Config;\n}\n```\n\n`ConfigBuilder` takes a configuration from the source and creates a new configuration according to the environment. `Env` and `Source` have priority. If priority is not defined, highest priority is added first.\n\n​    \n\n## Config\n\n```typescript\nclass Config {\n    constructor(sources: Source[], env: string[]);\n    \n    setEnv(...env: string[]): Config;\n    addEnv(...env: string[]): Config;\n    addSource(source: Source, priority?: number): Config;\n    \n    refresh(): Promise\u003cConfig\u003e;\n    validate(): void;\n    \n    get(key?: string): any | null;\n    set(key: string, value: any): void;\n}\n```\n\n`config` is a container for configuration. `config` is provided by creating a new configuration from the configuration and environment obtained from ` source`.\n\n​    \n\n## Source\n\n```typescript\ninterface Source {\n    export(): Promise\u003cMap\u003cstring, object\u003e\u003e;\n}\n```\n\n`Source` defines the source from which to get the configuration. Map is returned as the result value of `export`. The key of this map is environment and the value is the configuration when environment.\n\n​    \n\n## Expansion\n\nIt can be extended by defining a new `Source`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoursedesign%2Fconev-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoursedesign%2Fconev-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoursedesign%2Fconev-core/lists"}