{"_id":"@car2go/spicker","_rev":"9-79b81bf65668e801b203ea3edefe9f9b","name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.0.0","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"c4b4b4169f2d46489fe508c659531fa8f96a7d8b","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.0.0","_shasum":"fa4ffda68773c951c02c98129a3d600ccec6f5fd","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.2","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"fa4ffda68773c951c02c98129a3d600ccec6f5fd","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.0.0.tgz","integrity":"sha512-V+htNe2fXcTHyQr8iobMunEaEeucrM68xlFFDDT4ZXRJT6rX2duhQbZZPS6Fll4EigMvNGZiCjgF0etMAnCPng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaXmL8Nw6Q0aoYPMyD0BT/0U+Poh+7VfsSItsXafU5awIgY7gW/JsrFQaKaUQ12QrPAs4cYdcW/d08JuyTK05MHGg="}]},"maintainers":[{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.0.0.tgz_1493382689642_0.4577850392088294"},"directories":{},"deprecated":"not longer maintained"},"1.0.1":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.0.1","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"1a0fb5ffc0e6e2b295aac1ad420d26652643dd27","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.0.1","_shasum":"538e4426b111b09b32e24389beced82accc8d7b3","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.2","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"538e4426b111b09b32e24389beced82accc8d7b3","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.0.1.tgz","integrity":"sha512-1smAP2vKftlhRe8dTExCLaC/oWt2m5nwo9oFvoBsL5HBH8r22cHJBa2uYdytAFgoH6S8efM8Q8xQi4HCrsFgyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJZJYX2oJezuDxn9rcM4voEj93IsnLVXbsRA03CTRS4AiAvF8hVb2Kqcm6OUQEcKqfozdqsSibShBDT4GslBtxtRA=="}]},"maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.0.1.tgz_1493382787949_0.9367524029221386"},"directories":{},"deprecated":"not longer maintained"},"1.0.2":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.0.2","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"ec6b731f5a496597df893a8f4a349efbca3b16db","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.0.2","_shasum":"40c58999c35e75cc8af05a45f9d92c61832dcb45","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"40c58999c35e75cc8af05a45f9d92c61832dcb45","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.0.2.tgz","integrity":"sha512-rXXggIyt5c/h05p5Tw0CPa6y/ACwdjw1dbxizoTlE5qBKHdRfyOI/vjEhOxUFky+zsB/CuLajhP/W/sMS5WhwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMrIBcl+dnMgZ8fyHk63iWhyOKtAJOpseAq/5F2lo7VAiBa2lkmcfBb45JkIBg6qNLIvTxI70VcvKkzpVyc6nA2AA=="}]},"maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.0.2.tgz_1493385199582_0.8099742014892399"},"directories":{},"deprecated":"not longer maintained"},"1.1.0":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.1.0","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"478f0b1b1e1b6fb989f53e80feed0c27142dfcac","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.1.0","_shasum":"32e7d5e27dcea1a740d7d679a1fcac1813654787","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.2","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"32e7d5e27dcea1a740d7d679a1fcac1813654787","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.1.0.tgz","integrity":"sha512-sRzURrKoRQBKpG0eUKjVVS6XBtjqESJ8rmI1IF9sKzkFbWuNWZLg5M4iOFiLjoNjoFL8bQAc3QsBjqPecprH4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcQpsLNSe6jiC99sgWPrjuw5xRbkSN2sX0InGH0ue2UgIgRTnkz51UsCbRrdjA0AIpLjYvPfSbHVWocmb8bjuujHc="}]},"maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.1.0.tgz_1493723025867_0.37282000109553337"},"directories":{},"deprecated":"not longer maintained"},"1.2.0":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.2.0","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4","mkdirp":"^0.5.1"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"0cf41ebc224bfedb37ffd3500760f6391fc06380","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.2.0","_shasum":"1a7b9b682d4348de24edd66a79e3b97fe240b37d","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"1a7b9b682d4348de24edd66a79e3b97fe240b37d","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.2.0.tgz","integrity":"sha512-27kv5h0pH4UUODqnpznLIa0i8yPPrxw6RlQN3sdhAkiuTBiGH3BpGFkvdlYsa/vmz3sdIFaF2dlpsGLtSizJEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd7hCjJnBAO5A6kJfujoZhVxaOPUDQW2LQmzDx6HhojQIgSDkMNNuS7GkNT7bDrk8KPrkgouLxcDF2r4ZHbp17yRQ="}]},"maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.2.0.tgz_1494854452746_0.15422720718197525"},"directories":{},"deprecated":"not longer maintained"},"1.2.1":{"name":"@car2go/spicker","description":"Environment-based Configuration with YAML Export","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"version":"1.2.1","license":"MIT","author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"main":"index.js","scripts":{"start":"npm test -- -w","lint":"eslint **/*.js *.js","test":"nyc --check-coverage --lines 80 ava --timeout=30s","coverage":"nyc report --reporter=lcov"},"dependencies":{"glob":"^7.1.1","glob-promise":"^3.1.0","joi":"^10.3.0","js-yaml":"^3.8.2","lodash":"^4.17.4","mkdirp":"^0.5.1"},"devDependencies":{"ava":"^0.18.2","eslint":"^3.18.0","eslint-config-airbnb-base":"^11.1.2","eslint-plugin-import":"^2.2.0","nyc":"^10.1.2"},"engines":{"node":">=6.0.0","npm":">=3.8.8"},"gitHead":"707f3c7962acad680c248399eaf34d2276baf889","homepage":"https://github.com/car2go/spicker#readme","_id":"@car2go/spicker@1.2.1","_shasum":"6eb61ebe7d194c82a7ca32e83948dfb8c21ea3a9","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"whotheheck","email":"hi@whotheheck.de"},"dist":{"shasum":"6eb61ebe7d194c82a7ca32e83948dfb8c21ea3a9","tarball":"https://registry.npmjs.org/@car2go/spicker/-/spicker-1.2.1.tgz","integrity":"sha512-A5uxy3syF69tQR5MnEeeIbPFjjCQZ04icccLzxWWsFW1nDARf94uktCK0wd8+hxE6nG/Bz7YUZ2fBWcX+MBVDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGkjVeZCO4NTgjKYrdMWujqBJ6ajVzrHfKVqYicTILPGAiBdUZ2mU8Z85L0S61Q4t0XHiiv/F2ggLl4nlL7P73mjsQ=="}]},"maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spicker-1.2.1.tgz_1494860184416_0.06411171657964587"},"directories":{},"deprecated":"not longer maintained"}},"readme":"# spicker\n#### Environment-based Configuration with YAML Export\n\n![node](https://img.shields.io/badge/node-%3E%3D6.0.0-brightgreen.svg) ![npm](https://img.shields.io/npm/dt/@car2go/spicker.svg) ![npm](https://img.shields.io/npm/l/@car2go/spicker.svg)\n\nLead Maintainer: [Felix Heck](https://github.com/felixheck)\n\n---\n\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Usage](#usage)\n4. [API](#api)\n5. [Developing and Testing](#developing-and-testing)\n6. [Contribution](#contribution)\n7. [License](#license)\n\n## Introduction\n**spicker** is oriented at [node-config](https://github.com/lorenwest/node-config) and enables to organize simple hierarchical configuration for deployments. It lets you define default parameters and extend them for different deployment environments.\n\nThe functionality of [node-config](https://github.com/lorenwest/node-config) is simplified and extended with a [YAML](http://yaml.org/) export.<br>\nSo instead of using `const config = require('config')()` to access the built configuration set, a [YAML](http://yaml.org/) file is created.<br>\nThis gives your application a consistent configuration interface for uses cases like in [kubernetes](https://kubernetes.io/).\n\n*spicker* is the German translation for *cheat sheet*.\n\nThis util is implemented in ECMAScript 6 without any transpilers like `babel`.<br>\nAdditionally `eslint` and `ava` are used to grant a high quality implementation.\n\n\n## Installation\nFor installation use the [Node Package Manager](https://github.com/npm/npm):\n\n```\n$ npm install --save @car2go/spicker\n```\n\nor clone the repository:\n\n```\n$ git clone https://github.com/car2go/spicker\n```\n\nAlternatively use the [Yarn Package Manager](https://yarnpkg.com):\n\n``` bash\n$ yarn add @car2go/spicker\n```\n\n## Usage\n#### Import\nFirst you have to import the module:\n\n``` js\nconst spicker = require('@car2go/spicker');\n```\n\n#### Define your configuration files split in stage-specific diretories\nUse YAML or JSON files.<br>\nFiles located in `/default` are used as default.\n\n```\n/\n  /config\n    /default\n      deployment.yaml\n    /development\n      deployment.json\n``` \n\n#### Load Configs and Generate File\nAfterwards call the method with the fitting arguments and save the generated config file.\n\n``` js\nspicker('deployment', '/config', {}).then(() => { console.log('finished'); });\n```\n\nIt uses [lodash's merge](https://lodash.com/docs/4.17.4#merge) to deep merge the files.\n\n## API\n`spicker(name, source, options)` – Returns a promise handling both success and failure cases.\n\n- `name {string}` – Name of the resource files without any suffix.<br>\nRequired.\n- `source {string}` - Path to the directory containing stage-specific files. Relative to `options.cwd`.<br>\nDefault: `config`.\n- `options {Object}`\n  - `cwd {string}` – The current working directory. Have to be an absolute path.<br>\n  Default: `process.cwd()`.\n  - `destination {string}` - Path to the generated file. Relative to `options.cwd`.<br>\n  Default: `${source}/${name}.yaml`.\n  - `debug {boolean}` – Log the composed files to the console.<br>\n  Default: `false`.\n\n## Developing and Testing\nFirst you have to install all dependencies:\n\n```\n$ npm install\n```\n\nTo execute all unit tests once, use:\n\n```\n$ npm test\n```\n\nor to run tests based on file watcher, use:\n\n```\n$ npm start\n```\n\nTo get information about the test coverage, use:\n\n```\n$ npm run coverage\n```\n\n## Contribution\nFork this repository and push in your ideas.\n\nDo not forget to add corresponding tests to keep up 100% test coverage.\n\n## License\nThe MIT License\n\nCopyright (c) 2017 car2go group GmbH\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","maintainers":[{"name":"npmofsumit","email":"sk@outlook.com"},{"name":"whotheheck","email":"hi@whotheheck.de"}],"time":{"modified":"2022-06-12T15:40:56.761Z","created":"2017-04-28T12:31:31.712Z","1.0.0":"2017-04-28T12:31:31.712Z","1.0.1":"2017-04-28T12:33:09.832Z","1.0.2":"2017-04-28T13:13:21.532Z","1.1.0":"2017-05-02T11:03:47.632Z","1.2.0":"2017-05-15T13:20:54.763Z","1.2.1":"2017-05-15T14:56:26.371Z"},"homepage":"https://github.com/car2go/spicker#readme","keywords":["config","configuration","env","envs","environment","k8s","kubernetes","yaml","yml"],"repository":{"type":"git","url":"git+https://github.com/car2go/spicker.git"},"author":{"name":"Felix Heck","email":"felix.heck@daimler.com","url":"https://whotheheck.de"},"bugs":{"url":"https://github.com/car2go/spicker/issues","email":"felix.heck@daimler.com"},"license":"MIT","readmeFilename":"README.md"}