{"_id":"@deanc/gatsby-source-firestorer","_rev":"3-a57e7cc8dbf22f57c4bc7cb800764763","name":"@deanc/gatsby-source-firestorer","dist-tags":{"latest":"5.0.2"},"versions":{"5.0.0":{"name":"@deanc/gatsby-source-firestorer","version":"5.0.0","description":"Gatsby source plugin for building websites using Firestore as a data source.","main":"gatsby-node.js","repository":{"type":"git","url":"git+https://github.com/deanc/gatsby-source-firestorer.git"},"author":{"name":"Dean Clatworthy"},"license":"MIT","dependencies":{"firebase-admin":"^8.7.0","gatsby-cli":"^2.8.0"},"keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","firebase","firestore"],"gitHead":"8e382ca0afe62659c9ec79c73256bb8b083439d0","bugs":{"url":"https://github.com/deanc/gatsby-source-firestorer/issues"},"homepage":"https://github.com/deanc/gatsby-source-firestorer#readme","_id":"@deanc/gatsby-source-firestorer@5.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-VbY/8Ke5tPmv1VP4/JR5PLm/3N1TY56tyYz2RO1Pbjam5C5qW9aqBSCwfdDWeZWQXL5ibvFMbEuR7WEfZtnovA==","shasum":"71dab52ba08b00fdd39db10a19c7a62c41b88bdf","tarball":"https://registry.npmjs.org/@deanc/gatsby-source-firestorer/-/gatsby-source-firestorer-5.0.0.tgz","fileCount":3,"unpackedSize":4530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBRqsCRA9TVsSAnZWagAAaXIP/RSZV6lxAPctpEGVJHPl\n5XtTmGOkgy1Q/f/C2umTqCvccXvB1GJEx/mkjYBDIoUl0tIIffvmeMxSMPrz\n5PoJQdn2xh7jzKuChe0+HcCsu2CxhcbVSdc6n5swMR+usQ6nav7mLDhXtTEJ\n11yHhsnMBP+RP4s1zFXqpyTX+qARjkzeyb2nghdTwhm9g5xB5WEcZrA1xSU1\nzwpcXlR6DbMr2LitUIE36VPYJ8L/EmZ0k5wHoDJgTudBW7pE6+ZDpVZnVhUy\nDuM80lqxGiVBEwyT5MEycObnNVYEgP9FPKPTWderAQOxaHu/Q1Cvo6QUen51\neywcd3j41UXmxNH5QZU4xbVo4k15iCgpQzWP+hmEgScbEiXRVLUF3Pp0qei1\n+6ndT1tpKhDZiMdXN4qBYtfx89H2KGyOZhYa3T+t/+dOTI1tYBs5YfJfD52a\nSTYXm92WLeQW38HRlQPhKhfRVUNbuqjZKK2iYGH8zJp6Og4lO7J3rcdDmQ30\n0n/++CfNUFkEInsREn6wM4r7yyMpI2/M8fQ/wqD0JxSXu4ZmAFSfllkpdKV/\nBQIWOkzOueS9fzkuXg87AKoCjqh5yeFHqLt1SgIahOLukuPTO+7hAHCt7l5S\n5cH/znZ51S+Nl2RtsPSVzpFe2215djBBUlYZNTQFDAuaKq/8QJ9StRUGpVHd\nOjx/\r\n=jYZ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBb/WjPzzrKqPSbVkEwyGyCtCZKwIvXfs24oxyVCccsMAiEA9mEx+pgsiCCE7koEDPU9zMFQN1TOTu1VDucmZWRbqd8="}]},"maintainers":[{"name":"deanc","email":"dean.clatworthy@gmail.com"}],"_npmUser":{"name":"deanc","email":"dean.clatworthy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-firestorer_5.0.0_1577392812317_0.1808759394643964"},"_hasShrinkwrap":false},"5.0.1":{"name":"@deanc/gatsby-source-firestorer","version":"5.0.1","description":"Gatsby source plugin for building websites using Firestore as a data source.","main":"gatsby-node.js","repository":{"type":"git","url":"git+https://github.com/deanc/gatsby-source-firestorer.git"},"author":{"name":"Dean Clatworthy"},"license":"MIT","dependencies":{"firebase":"^7.6.1","firebase-admin":"^8.7.0","gatsby-cli":"^2.8.0"},"keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","firebase","firestore"],"gitHead":"c836a8ac9a37c95eef67b2f5490e2eac5db0d840","bugs":{"url":"https://github.com/deanc/gatsby-source-firestorer/issues"},"homepage":"https://github.com/deanc/gatsby-source-firestorer#readme","_id":"@deanc/gatsby-source-firestorer@5.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-JYksgb39+nkJuM0tuU2kcc54z3eZoNSGBIaZD5F5y5smIE7kA6mh0+F+3qJYSIQl/A1Z6WShwWrhyEdzekzdPA==","shasum":"51a34c01ef0c705f51a90ea34338661035f9f84f","tarball":"https://registry.npmjs.org/@deanc/gatsby-source-firestorer/-/gatsby-source-firestorer-5.0.1.tgz","fileCount":3,"unpackedSize":6544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeB8g3CRA9TVsSAnZWagAAXesP/jBt1OUWSGyJuLzvuCSn\nZnrct2BkX5q3jr5Ogvht86/15VwsHKGcdEMQdH9UTGugZ+TGo2A3L8Ov3+K7\naPAcXtvbIgRiQ0/w46o8YNXl23kjR0AWvDGCQp2RepcEntMdFCZuRTLRAHv6\ncRMS0FP6R98dYIFtd+K/gRDN3iKqrhzUubKVE2GTu5sTjpeyhWuSQQEdUybG\nMZG2DQbp7w8hKm9wimzJVKe3mpq0Prk2MIX1la6ygyU2aQzCQck8esB4XcMG\nvx3+v1YEdHKvClpjnkvezkITRsodMuiABqvnP0tS4Ex7jFPclG7qejT0/dka\n2Op19aD4Hf4B795uUkIsvX1czFdhEoLfpDrlOXgAOx3IGVrL6/9W3TglvGVJ\nyrIoi39QtVaMYMo8l4GomYU/flfD8iGxHivbj9JcBkicdggeCe57//7qtDKx\nOYy3g8kuzBQwbviSF7ENUhMDfOPWBKF5o+SBis4jJTobqCo+75wYJHbBX9al\nKu7kgDzpAqAryISBE6GJPIQryanzYqsYoAA67qFSFXs1GScg9IMfgvXagUyc\nMU0OLIqP+Kt/Y35ZrDlv2wSa3qTFhZXt7JvFQclN5sdpGfa/7LXLq24hz512\n2q0OixsRw+vlqWluLl61LkLKxe3gBD1AOittptyj2SVWXtYyOmOoFjRkyLfH\ngvao\r\n=v9QS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSrJowmyoq/gLyY9tsQfwdhw42M43JptSGYEBElXa97AiEAkH6fl4nCwVo4dYrZFpsQTsIrb2xkVfi9AL6KwnUOy7A="}]},"maintainers":[{"name":"deanc","email":"dean.clatworthy@gmail.com"}],"_npmUser":{"name":"deanc","email":"dean.clatworthy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-firestorer_5.0.1_1577568310893_0.24275937632376787"},"_hasShrinkwrap":false},"5.0.2":{"name":"@deanc/gatsby-source-firestorer","version":"5.0.2","description":"Gatsby source plugin for building websites using Firestore as a data source.","main":"gatsby-node.js","repository":{"type":"git","url":"git+https://github.com/deanc/gatsby-source-firestorer.git"},"author":{"name":"Dean Clatworthy"},"license":"MIT","dependencies":{"firebase":"^7.6.1","firebase-admin":"^8.7.0","gatsby-cli":"^2.8.0"},"keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","firebase","firestore"],"gitHead":"bfb72aaac216a9b80072c52c270a217f7bcc6954","bugs":{"url":"https://github.com/deanc/gatsby-source-firestorer/issues"},"homepage":"https://github.com/deanc/gatsby-source-firestorer#readme","_id":"@deanc/gatsby-source-firestorer@5.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-bAexTBiXONRdbfKgZtbRdNCCcqS3TlWMcKIPWnjzV6HBAoYnPRLcJ+RvglrepOo+3k6RHQbyTarbNwG74Ndzpw==","shasum":"a6cbfd96288033d840b285acba12a064bc60103d","tarball":"https://registry.npmjs.org/@deanc/gatsby-source-firestorer/-/gatsby-source-firestorer-5.0.2.tgz","fileCount":3,"unpackedSize":7226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeC09nCRA9TVsSAnZWagAAVbwP/ipzBoLCZa2mxFKmF7WB\nyTJIrvC+h3KR9a9BWta/pCT+i8tOhW182ZRYGfB+2eaILXkiofYXfNIUWYoC\nkl/oajLhExjxzkmYSHkKw0lEyIKZ2WTitiG/qPUrko7hpisy4KTHh0KfkwCt\nsCa2/Bhe2A1OWFKanbYNW2JFwW2lVgTJQZwHfWPMqjMkNIWCQTicjxmIJcbz\nFjW0sC8dw67DBiZEbdw6EkMJESlegb2RPlePQGRidLYCkKQO778U51gzCSPM\npLuOTY9UpoOCoBx8PeMdODMZibxRVEvjwwL9xrr4/AyLiY4NR51DMdlTyb6i\n+keySNMZWlJnyE98F1bMHAwHs5wAhnqZ3kPQ2fDovCN93cj1flHas9UeRmMh\nZCFO6yT8zqTupDFvmauEK8E/QAVLzSqUuCh0jxrU3VbyzFhHyYMuc8sglRbs\numUD3GpAeD7yjd78c2YtkCqipySKDzHqFo/e10Js16OivKi+45+09s4ieihO\nFZ2XlKstpYnG0jS53nssmJgOGaiBA2NWgvz0ZPA2P/qRNt8OW7WFRUF/ga5U\nYrLsnmFyFGMpR2PQ/8oL/qP3tkJUjZgY+B/BAsDVX3luXUyQRccHnwUdAc9A\nZty+MNksHsD+UBic0UDTHbP5c9pcckSikVwo8DqEerZVbg7XedCGxsLakOYg\nLz4/\r\n=OVy5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzBkk5t4uDT4scBSeCzhkO+B/sC2DzG0YBL5HspFsuGAiEA0utO+1wExZspCXv1v+vYCphhqjLSESZXA+mjRjzOkNM="}]},"maintainers":[{"name":"deanc","email":"dean.clatworthy@gmail.com"}],"_npmUser":{"name":"deanc","email":"dean.clatworthy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-firestorer_5.0.2_1577799527106_0.9939267675091066"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-26T20:40:12.285Z","5.0.0":"2019-12-26T20:40:12.437Z","modified":"2022-04-05T03:27:58.946Z","5.0.1":"2019-12-28T21:25:11.039Z","5.0.2":"2019-12-31T13:38:47.191Z"},"maintainers":[{"name":"deanc","email":"dean.clatworthy@gmail.com"}],"description":"Gatsby source plugin for building websites using Firestore as a data source.","homepage":"https://github.com/deanc/gatsby-source-firestorer#readme","keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","firebase","firestore"],"repository":{"type":"git","url":"git+https://github.com/deanc/gatsby-source-firestorer.git"},"author":{"name":"Dean Clatworthy"},"bugs":{"url":"https://github.com/deanc/gatsby-source-firestorer/issues"},"license":"MIT","readme":"# deanc/gatsby-source-firestorer [![npm version](https://badge.fury.io/js/%40deanc%2Fgatsby-source-firestorer.svg)](https://badge.fury.io/js/%40deanc%2Fgatsby-source-firestorer)\n\nGatsby source plugin for building websites using the Firestore as a data source. Forked from a couple of other versions and updated to use\nlatest Gatsby params.\n\n# Authentication\n\nYou have two ways to authenticate to Firebase.\n\n1. (Reccommended) Supply a valid firebaseConfig object with read-only credentials. [Instructions here](https://support.google.com/firebase/answer/7015592#web).\n2. Get a private key for your Firebase project from the Firebase console.\n\n# Usage\n\n## Method 1: Standard web SDK (Reccommended)\n\n1. Supply a valid firebaseConfig object\n2. `$ yarn add @deanc/gatsby-source-firestore`\n3. Configure `gatsby-config.js`\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: '@deanc/gatsby-source-firestore',\n      options: {\n        config: {\n          apiKey: 'api-key',\n          authDomain: 'project-id.firebaseapp.com',\n          databaseURL: 'https://project-id.firebaseio.com',\n          storageBucket: 'yourapp.appspot.com',\n          projectId: 'project-id',\n          messagingSenderId: 'sender-id',\n          appId: 'app-id',\n          measurementId: 'measurement-id',\n        },\n        types: [\n          {\n            type: 'Book',\n            collection: 'books',\n            map: doc => ({\n              title: doc.title,\n              isbn: doc.isbn,\n              author___NODE: doc.author.id,\n            }),\n          },\n          {\n            type: 'Author',\n            collection: 'authors',\n            map: doc => ({\n              name: doc.name,\n              country: doc.country,\n              books___NODE: doc.books.map(book => book.id),\n            }),\n          },\n        ],\n      },\n    },\n  ],\n};\n```\n\n## Method 2: Firebase Admin SDK\n\n1. Get a private key for your Firebase project.\n2. Put that private key somewhere in your Gatsby project.\n3. `$ yarn add @deanc/gatsby-source-firestore`\n4. Configure `gatsby-config.js`\n\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: '@deanc/gatsby-source-firestore',\n      options: {\n        credential: require('./firebase.credentials.json'),\n        types: [\n          {\n            type: 'Book',\n            collection: 'books',\n            map: doc => ({\n              title: doc.title,\n              isbn: doc.isbn,\n              author___NODE: doc.author.id,\n            }),\n            conditions: [['status', '==', 'public']], // optional\n          },\n          {\n            type: 'Author',\n            collection: 'authors',\n            map: doc => ({\n              name: doc.name,\n              country: doc.country,\n              books___NODE: doc.books.map(book => book.id),\n            }),\n          },\n        ],\n      },\n    },\n  ],\n};\n```\n\n# Querying\n\nTo query\n\n```graphql\n{\n  allBooks {\n    edges {\n      node {\n        title\n        isbn\n        author {\n          name\n        }\n      }\n    }\n  }\n}\n```\n\n# Configurations\n\n| Key        | Description                                                                                                                                            |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| credential | Require your private key here                                                                                                                          |\n| config     | Put a valid firebaseConfig object here                                                                                                                 |\n| types      | Array of types, which require some of the following 3 keys                                                                                             |\n| type       | (required) The type of the collection, which will be used in GraphQL queries. Eg, when `type = Book`, the GraphQL types are named `book` and `allBook` |\n| collection | (required) The name of the collections in Firestore. Nested collections are **not** tested.                                                            |\n| map        | (required) A function to map your data in Firestore to Gatsby nodes, utilize the undocumented `___NODE` to link between nodes                          |\n| conditions | (optional) An array of where conditions. Corresponds directly to: https://firebase.google.com/docs/firestore/query-data/queries#simple_queries         |\n\n# Disclaimer\n\nNo maintenance/warranty are provided. Feel free to send in pull requests.\n\n# Acknowledgement\n\n- [gatsby-source-firebase (Original)](https://github.com/ReactTraining/gatsby-source-firebase)\n- [gatsby-source-firebase (Most recent fork)](https://github.com/tomphill/gatsby-source-firestore)\n","readmeFilename":"README.md"}