{"_id":"@aquaswim/admin-bro-firebase","_rev":"1-528880ed3f005f9e4967d860fec8a079","name":"@aquaswim/admin-bro-firebase","dist-tags":{"latest":"1.0.11"},"versions":{"1.0.11":{"name":"@aquaswim/admin-bro-firebase","version":"1.0.11","description":"Firebase adapter for admin-bro","main":"lib/index.js","types":"lib/index.d.ts","license":"MIT","scripts":{"dev":"tsc --watch","lint":"eslint . --ext .ts","style":"prettier --write '**/*.ts'","test":"jest","test:e2e":"cypress run","build":"tsc"},"devDependencies":{"@types/busboy":"^0.2.3","@types/jest":"^26.0.9","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^3.8.0","admin-bro":"^4.0.1","cypress":"^4.12.1","cypress-dotenv":"^1.2.2","dotenv":"^8.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-cypress":"^2.10.3","eslint-plugin-prettier":"^3.1.4","firebase":"^8.4.1","firebase-admin":"^9.6.0","firebase-functions":"^3.13.2","jest":"^26.2.2","prettier":"^2.0.5","ts-jest":"^26.1.4","ts-node":"^8.10.2","typescript":"^3.9.7","wait-on":"^5.1.0"},"peerDependencies":{"admin-bro":"^4.0.1","firebase":"^7.x","firebase-admin":"^9.x","firebase-functions":"^3.x"},"dependencies":{"body-parser":"^1.19.0","busboy":"^0.3.1","cookie":"^0.4.1","firebaseui":"^4.6.1","flat":"^5.0.2","jsonwebtoken":"^8.5.1","lodash":"^4.17.19","path-to-regexp":"^6.1.0"},"resolutions":{"cypress":"4.12.1","@types/react":"^16.9.16"},"gitHead":"c2ee9d33b10602c2fc7bfdc348c61fe007f6b2b8","_id":"@aquaswim/admin-bro-firebase@1.0.11","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-5E58x0CQVvF+sgAcPd5gw1qtVxds6fdIiF8aYFRSgc7qUW0p9UPZhL4iDM3+31R49HP4ORmC6WmOF5X/d5D1Mg==","shasum":"959fdac7659b58b6c941ec9f72386eea38f420bf","tarball":"https://registry.npmjs.org/@aquaswim/admin-bro-firebase/-/admin-bro-firebase-1.0.11.tgz","fileCount":59,"unpackedSize":65332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghqX5CRA9TVsSAnZWagAA99MP/1LGEGwIeliXHOAGfLAp\nVlGPu0bkJI++WfAiivGl+8yx3KXQwl5/65DvxP366FFIRCudvYfOGxf/74+v\nwiXQodMYhZEQN2eO0ct+daj4XJS8GfhPv2aRqP8pAlyJG+GlF9bkG1kgLlmG\nePyTa6TMPnlvYA2mR1OpwgiZbv7nT4TzhwtYaXYJ/tQYY0yqLaHMkYaLjFAi\nOogErHVCpXWAWJ0C18THdosQyChz3C1wewrrnp3T58R9p+gE1xco5JnUoMTT\nTMr3r6ADYylSOANt8l5Wbpy3DwR8y9tv9/oNVy0p0kQI/C1FhamY2Fg0F37J\nv1mkXFyCDU7moSZFekAxV5b3KeiPlS5MM/GiduVHF/9AMjCzNruIQG3BHlQy\nlhLu7ZunkQDilyGw3ficY/eaDRBvSeZztv1XqYXh3KxqwGPQs1XB6JtatuDM\n5/VCmFJVSAV387PlA4gRnYtSYsDFzTh1WINipqzDu2BY82l5dOFejHVpEJpL\ngOjsIpgEtEfl8aYawacqi2+RrNxtXCe68fhhK33AO87X+x+e3YdTDoqt3lAg\nt/gJXvnLSssHHupUBW/FVHsBoYNpWfEM1WX7KxOX/xelUnh/GvW/UBNjN+rP\nHRV6jn0HsL+xltZlIhD5CGQVVnPwK5i57fmKLD+E8RANikvaeykwE4qRTHMh\nlX6e\r\n=VVUT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCIzxm00ZndsGVfiwZSekLVWjyS1lm9P39qnG/rMxj1AiAyb0MJZIKKpNIalObV8Wg6kIGojUUKc9ZphzU3CkDSrA=="}]},"_npmUser":{"name":"aquaswim","email":"bayusetiawan37@gmail.com"},"directories":{},"maintainers":[{"name":"aquaswim","email":"bayusetiawan37@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/admin-bro-firebase_1.0.11_1619437048986_0.4021814981462146"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-26T11:37:28.909Z","1.0.11":"2021-04-26T11:37:29.146Z","modified":"2022-04-04T15:13:57.878Z"},"maintainers":[{"name":"aquaswim","email":"bayusetiawan37@gmail.com"}],"description":"Firebase adapter for admin-bro","license":"MIT","readme":"# AdminBro Firebase Adapter\n![Build status](https://github.com/JonaszJestem/admin-bro-firebase/workflows/Lint%20and%20test%20application/badge.svg)\n![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=JonaszJestem_admin-bro-firebase&metric=sqale_rating)\n\nAdapter for AdminBro which allows to add your own Firebase resources\n\n### Prerequisites\n\nYou will need AdminBro panel configured for your project.\nSee [AdminBro Repository](https://github.com/SoftwareBrothers/admin-bro/) for instructions\n\nYou have to initialize your Firebase app before connecting resources to AdminBro.\nThat means you have to write something like:\n\n```javascript\n// Your firebase config see https://firebase.google.com/docs/web/setup\nexport const firebaseConfig = {\n  // [...]\n};\n\nFirebase.initializeApp(firebaseConfig);\n```\n\n### Installing\n\nTo connect adapter to your AdminBro instance all you need is to:\n\n1. Register this adapter into AdminBro instance\n2. Write resource with schema\n3. Pass resource to AdminBro config object\n\nCheck `example` folder for full example application!\n```javascript\nimport * as firebase from \"firebase\";\nimport AdminBroExpress from 'admin-bro-expressjs';\nimport AdminBroFirebase from 'admin-bro-firebase';\nimport AdminBro from 'admin-bro'; \n\nconst setupAdmin = async expressApp => {\n  AdminBro.registerAdapter(AdminBroFirebase);\n  const adminBro = new AdminBro({\n    branding: {\n      companyName: 'Firebase example',\n    },\n    resources: [\n      {\n        collection: firebase.firestore().collection('Users'),\n        schema: {\n          name: 'string',\n          isAdmin: 'boolean',\n          location: 'mixed',\n          attributes: {\n            type: 'mixed',\n            schema: {\n              birthdate: 'date',\n              height: 'number',\n              eyeColors: 'mixed',\n            },\n          },\n        },\n      },\n    ],\n  });\n\n  const router = await AdminBroExpress.buildRouter(adminBro);\n  app.use(adminBro.options.rootPath, router);\n};\n```\n\n## Authors\n\n- **Jonasz Wiącek** - _Initial work_ - [JonaszJestem](https://github.com/JonaszJestem)\n\n## Known Issues\n\nDescribed in Issues tab.\n\nFeel free to contribute.\n\n## License\n\nThis project is licensed under the MIT License\n","readmeFilename":"README.md"}