{"id":22053331,"url":"https://github.com/bertrandom/pamplemousse","last_synced_at":"2026-05-06T11:35:41.485Z","repository":{"id":51912569,"uuid":"520649596","full_name":"bertrandom/pamplemousse","owner":"bertrandom","description":"hierarchical config for deno with support for layering and environment variables","archived":false,"fork":false,"pushed_at":"2022-08-03T07:22:30.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T02:40:17.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://deno.land/x/pamplemousse","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/bertrandom.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":"2022-08-02T21:06:20.000Z","updated_at":"2023-07-10T11:01:57.000Z","dependencies_parsed_at":"2022-08-23T15:11:42.240Z","dependency_job_id":null,"html_url":"https://github.com/bertrandom/pamplemousse","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bertrandom/pamplemousse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpamplemousse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpamplemousse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpamplemousse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpamplemousse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandom","download_url":"https://codeload.github.com/bertrandom/pamplemousse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpamplemousse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32692207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-30T15:16:20.600Z","updated_at":"2026-05-06T11:35:41.450Z","avatar_url":"https://github.com/bertrandom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pamplemousse\n\n## Introduction\n\nThis is a port of [node-config](https://github.com/node-config/node-config) that does hierarchical configuration. It allows you define a set of default values and extend them for different environments. It does not contain all the features of `node-config` but feel free to submit a PR or suggest one to implement.\n\nFeatures supported:\n* JSON and JSON5 parsing formats (JSON5 allows comments)\n* [deployments](https://github.com/node-config/node-config/wiki/Configuration-Files#file-load-order), deployment name sourced from NODE_ENV or NODE_CONFIG_ENV\n* [custom environment variables](https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables)\n* config.has() and config.get()\n\nFeatures not supported:\n* recursion detection\n* YAML, JS, XML, etc. parsing formats\n* instance names\n* hostnames\n\n## Usage\n\nIf you would like to use the default options, simply import your configuration like this:\n\n```\nimport config from \"https://deno.land/x/pamplemousse/mod.ts\";\n```\n\nAnd access the config variables using `config.has()` and `config.get()`. Optionally, you can use the shorthand, `config.varname` or `config.nested.varname` but this has no protection for typos.\n\nIf you'd like to pass in environment variables via code, for example, if you want to set the NODE_ENV in code, you can do something like this:\n```\nimport config, { loadConfig } from \"https://deno.land/x/pamplemousse/mod.ts\";\nawait loadConfig({\n    env: {\n        \"NODE_ENV\": \"dev\",\n    }\n});\n```\n\nWhen running your app, you must allow read access, like so:\n\n```\ndeno run --allow-read app.ts\n```\n\nIf you fail to do so, Deno will prompt you to allow access in the CLI:\n\n```\n$ deno run app.ts\n⚠️  ️Deno requests read access to \u003cCWD\u003e. Run again with --allow-read to bypass this prompt.\n   Allow? [y/n (y = yes allow, n = no deny)]\n```\n\nIf you don't want to grant access to the whole filesystem, you must at least grant access to `.` so that it can determine the current working directory:\n```\ndeno run --allow-read=. app.ts\n```\n\nIf you pass in environment variables, you should add `--allow-env` to correctly read them.\n\nYou can allow all environment variables:\n```\nNODE_ENV=staging PORT=8080 deno run --allow-env --allow-read app.ts\n```\n\nOr specific ones:\n```\nNODE_ENV=staging deno run --allow-env=NODE_ENV --allow-read app.ts\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fpamplemousse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandom%2Fpamplemousse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fpamplemousse/lists"}