{"_id":"@chubbyjs/chubbyjs-laminas-config-factory","_rev":"4-96b9f530a78f4afc8ec81ba449e6becc","name":"@chubbyjs/chubbyjs-laminas-config-factory","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@chubbyjs/chubbyjs-laminas-config-factory","version":"1.0.0","description":"An abstract service factory for chubbyjs/chubbyjs-laminas-config or any other similar implementation.","keywords":["chubbyjs-container","chubbyjs","laminas","psr-11","factory"],"author":{"name":"Dominik Zogg"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/chubbyjs/chubbyjs-laminas-config-factory.git"},"scripts":{"cs-fix":"prettier --write src tests","cs":"prettier --check src tests","test":"jest","infection":"stryker run","build":"tsc","prepare":"rm -Rf dist && npm run build && npm run cs && npm run test"},"jest":{"preset":"ts-jest","testEnvironment":"node","collectCoverageFrom":["src/**/*.ts"],"coverageThreshold":{"global":{"lines":100}}},"prettier":{"printWidth":120,"tabWidth":4,"singleQuote":true,"trailingComma":"all"},"engines":{"node":">=12"},"dependencies":{"@chubbyjs/chubbyjs-container":"github:chubbyjs/chubbyjs-container","@chubbyjs/chubbyjs-negotiation":"github:chubbyjs/chubbyjs-negotiation","@chubbyjs/psr-container":"^1.0.0"},"devDependencies":{"@chubbyjs/chubbyjs-mock":"^1.1.0","@stryker-mutator/core":"^5.3.0","@stryker-mutator/jest-runner":"^5.3.0","@types/jest":"^27.0.1","jest":"^27.1.0","prettier":"2.3.2","ts-jest":"^27.0.5","typescript":"^4.4.2"},"publishConfig":{"access":"public"},"gitHead":"f61d54c80aa2dae8aa005ddfea4eb2c1f24a4c9a","bugs":{"url":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory/issues"},"homepage":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory#readme","_id":"@chubbyjs/chubbyjs-laminas-config-factory@1.0.0","_nodeVersion":"16.9.1","_npmVersion":"7.21.1","dist":{"integrity":"sha512-jB6FoubqdnpK/vOfPvWXD84H3Q+4+TBF1+uCatms2WKz8ss2fhBkTJ3/LwdWGrV072TDn0SAucHxofCyMTxjHA==","shasum":"7d10329920cd83ba1d3995e0fe1ce0f7b05158c0","tarball":"https://registry.npmjs.org/@chubbyjs/chubbyjs-laminas-config-factory/-/chubbyjs-laminas-config-factory-1.0.0.tgz","fileCount":7,"unpackedSize":10233,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiGwHqouVjflmq0sJtynk3QfmSHiZYz93L3OxpzXIQoAiA0n1Zr+78avKXW9LtTnAxWLTo+MUQuSkp2VRAdiaMaZQ=="}]},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"directories":{},"maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chubbyjs-laminas-config-factory_1.0.0_1634400458552_0.46416242344011627"},"_hasShrinkwrap":false,"deprecated":"there is no replacement, please check @chubbyts/chubbyts-dic-config"},"1.0.1":{"name":"@chubbyjs/chubbyjs-laminas-config-factory","version":"1.0.1","description":"An abstract service factory for chubbyjs/chubbyjs-laminas-config or any other similar implementation.","keywords":["chubbyjs-container","chubbyjs","laminas","psr-11","factory"],"author":{"name":"Dominik Zogg"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/chubbyjs/chubbyjs-laminas-config-factory.git"},"scripts":{"cs-fix":"prettier --write src tests","cs":"prettier --check src tests","test":"jest","infection":"stryker run","build":"tsc","prepare":"rm -Rf dist && npm run build && npm run cs && npm run test"},"jest":{"preset":"ts-jest","testEnvironment":"node","collectCoverageFrom":["src/**/*.ts"],"coverageThreshold":{"global":{"lines":100}}},"prettier":{"printWidth":120,"tabWidth":4,"singleQuote":true,"trailingComma":"all"},"engines":{"node":">=12"},"dependencies":{"@chubbyjs/psr-container":"^1.0.0"},"devDependencies":{"@chubbyjs/chubbyjs-mock":"^1.1.0","@stryker-mutator/core":"^5.3.0","@stryker-mutator/jest-runner":"^5.3.0","@types/jest":"^27.0.1","jest":"^27.1.0","prettier":"2.3.2","ts-jest":"^27.0.5","typescript":"^4.4.2"},"publishConfig":{"access":"public"},"gitHead":"f635f88d591d4db81347964bf93c56a6b8b8a6cf","bugs":{"url":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory/issues"},"homepage":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory#readme","_id":"@chubbyjs/chubbyjs-laminas-config-factory@1.0.1","_nodeVersion":"16.9.1","_npmVersion":"7.21.1","dist":{"integrity":"sha512-VzhPUXrfspOkqzGZ8JvlY0z8uAWnj+8kBxrksBInSU671/Mn0AFoJedSCYiiMc0dodSNaoRF8KkStvqTtUlSnA==","shasum":"a4039b04a70b43d919a6c7c508fcd8367d0e28d6","tarball":"https://registry.npmjs.org/@chubbyjs/chubbyjs-laminas-config-factory/-/chubbyjs-laminas-config-factory-1.0.1.tgz","fileCount":7,"unpackedSize":10359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2CsiCRA9TVsSAnZWagAAtBgP/1Uk1wbQzW6TG1sxNYvi\nUEWSrXCs1f/BGQPoR3m4eZNxhGg+xDS83gQJPtTGavqM0viBVVHFvlXaViuy\nVkQR8Oh/mPmeud8X9xh/bM6e7cg7LhKJ4uNbyf+aOdvB9v+V8lAKZAXJlN3k\nPoif2jjMR9VL8hNnYuR08v4vpQO80ph/0kgNK9ADNihXzmA296F3gT4jl7e9\n1aJDzyKiFc3nAfTR5WJCqfXEarrHjQfKbIp7lJguPI2okASNRKbVquSQWUwY\nfH12gJK6LsCkJ+S/luJQNl6KCN3uZyHwmDsqFcu/45ajab8h4a9PdC2az6N6\noh3C7OAtOteUjjNhzbHBr40xKMht0GGNJRTiy/Uvd51KHpN5/xBH1hWl0cQl\nKF7NM1ermHvCtuEnQIC52/TPiK5eOr9PihaUX64aO7cK7kSNEI27FfowVRPa\n8nv9mrIzRFqn9WYvxGQtin3F5r07slRXhEbpA7/Iqhz9JekilLS/pgbubdJR\n19ghJ5zrX6tRysN0iSGUAD3YI9iokhLaeP4IPATtQ++wq0XpNhngpihaJiQ3\nkkdd6XrKBOTC01a/F0Nc1F310Z6Jou9zHuGvbo0aMKneYcHooPA6WY/UmIaS\n/TO3j7aFC3lgA/uDAbAb2jKKcRBLVQl5ZZLH/D0SMDJ3RIUeaML7hmrZmd63\nB3Hg\r\n=v8Qt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlZ2Bziu7xzoKcK4LXBkVp8ya6TbdQ9XjeGiDKJhBofAiEA6nJMiDNR+TuoAM1rWZLy/UVHKqDBY+9c3Un5Ccoa2Ow="}]},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"},"directories":{},"maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chubbyjs-laminas-config-factory_1.0.1_1634496412964_0.6946282378097417"},"_hasShrinkwrap":false,"deprecated":"there is no replacement, please check @chubbyts/chubbyts-dic-config"}},"time":{"created":"2021-10-16T16:07:38.483Z","1.0.0":"2021-10-16T16:07:38.730Z","modified":"2022-07-10T13:35:19.606Z","1.0.1":"2021-10-17T18:46:53.127Z"},"maintainers":[{"name":"dominikzogg","email":"dominik.zogg@hotmail.com"}],"description":"An abstract service factory for chubbyjs/chubbyjs-laminas-config or any other similar implementation.","homepage":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory#readme","keywords":["chubbyjs-container","chubbyjs","laminas","psr-11","factory"],"repository":{"type":"git","url":"git+https://github.com/chubbyjs/chubbyjs-laminas-config-factory.git"},"author":{"name":"Dominik Zogg"},"bugs":{"url":"https://github.com/chubbyjs/chubbyjs-laminas-config-factory/issues"},"license":"MIT","readme":"# chubbyjs-laminas-config-factory\n\n[![CI](https://github.com/chubbyjs/chubbyjs-laminas-config-factory/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyjs/chubbyjs-laminas-config-factory/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyjs/chubbyjs-laminas-config-factory/badge.svg?branch=master)](https://coveralls.io/github/chubbyjs/chubbyjs-laminas-config-factory?branch=master)\n[![Infection MSI](https://badge.stryker-mutator.io/github.com/chubbyjs/chubbyjs-laminas-config-factory/master)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyjs/chubbyjs-laminas-config-factory/master)\n[![npm-version](https://img.shields.io/npm/v/@chubbyjs/chubbyjs-laminas-config-factory.svg)](https://www.npmjs.com/package/@chubbyjs/chubbyjs-laminas-config-factory)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyjs_chubbyjs-laminas-config-factory&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyjs_chubbyjs-laminas-config-factory)\n\n## Description\n\nAn abstract service factory for [chubbyjs/chubbyjs-laminas-config][2] or any other similar implementation.\n\n## Requirements\n\n * node: 12\n * [@chubbyjs/psr-container][3]: ^1.0\n\n## Installation\n\nThrough [NPM](https://www.npmjs.com) as [@chubbyjs/chubbyjs-laminas-config-factory][1].\n\n```sh\nnpm i @chubbyjs/chubbyjs-laminas-config-factory@1.0.1\n```\n\n## Usage\n\n```ts\nimport ServiceA from './ServiceA';\nimport ServiceB from './ServiceB';\nimport ServiceC from './ServiceC';\nimport ServiceBFactory from './ServiceBFactory';\nimport AbstractBaseFactory, { Invokable } from '@chubbyjs/chubbyjs-laminas-config-factory/dist/BaseFactory';\nimport ContainerInterface from '@chubbyjs/psr-container/dist/ContainerInterface';\n\nconst ServiceAFactory = Invokable(class extends AbstractBaseFactory {\n    public __invoke(container: ContainerInterface): ServiceA {\n        return new ServiceA(\n            this.resolveConfig(container.get('config').serviceA ?? {}),\n            this.resolveDependency<ServiceB>(container, ServiceB.name,  ServiceBFactory),\n            this.resolveDependency<ServiceC>(container, ServiceC.name,  ServiceCFactory),\n        );\n    }\n});\n\n// ContainerInterface\nconst container = ...;\n\n// without name\nconst serviceA = ServiceAFactory()(container);\n\n// with name\nconst serviceA = ServiceAFactory('default')(container);\n```\n\n## Copyright\n\nDominik Zogg 2021\n\n[1]: https://www.npmjs.com/package/@chubbyjs/chubbyjs-laminas-config-factory\n[2]: https://www.npmjs.com/package/@chubbyjs/chubbyjs/chubbyjs-laminas-config\n[3]: https://www.npmjs.com/package/@chubbyjs/psr-container\n","readmeFilename":"README.md"}