{"_id":"@baymose/gatsby-source-rehabpath","_rev":"3-c4cefd4b1ff8baecd8485290f9c20d3f","name":"@baymose/gatsby-source-rehabpath","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@baymose/gatsby-source-rehabpath","description":"A plugin for pulling in data for RehabPath websites.","version":"1.0.0","author":{"name":"Bailey Griswold","email":"baymose@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baymose/gatsby-source-rehabpath.git"},"keywords":["firebase","firestore","gatsby-plugin","gatsby-source-plugin","gatsby-source","gatsby"],"main":"gatsby-node.js","scripts":{"lint":"prettier --write gatsby-node.js"},"dependencies":{"firebase-admin":"^6.3.0","gatsby-cli":"^2.4.6"},"devDependencies":{"prettier":"^1.15.3"},"license":"MIT","bugs":{"url":"https://github.com/baymose/gatsby-source-rehabpath/issues"},"homepage":"https://github.com/baymose/gatsby-source-rehabpath#readme","gitHead":"55ea608ac303c7c570b83fde6d069fa5d1a13da1","_id":"@baymose/gatsby-source-rehabpath@1.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-HOQ6f8T/uivRnI8siJsoCqJ8HIiNpwhmYpN3fh2Lf+V799rTf0tHB+YdI7Y+cnxObeqIk50fzgMqpx4vDSv2yw==","shasum":"434b145971df9c0cc7595bdd5933b21235eadf6e","tarball":"https://registry.npmjs.org/@baymose/gatsby-source-rehabpath/-/gatsby-source-rehabpath-1.0.0.tgz","fileCount":3,"unpackedSize":6455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr3YNCRA9TVsSAnZWagAARNcP/AzoLg0o+0m5xg2ybh33\nMUOFG9ggCx3cBIsyZ65FD7b7+NBaamN4RgZBeKhqU1USioRDr4DNkn8D83/m\nyuOdEy2ex8VNxNI+pyLETP58QxM9/ZYfHpecT1fooZq54kQZfCQ3ck3aHEKW\nz+aaqUYKfr0rbh2S8MTwcPz0+/MHh63rm6fzsPd7yWMw/loWRO4Alfpr9tCd\nX4NMOE8ITD3ZewEn1lbsImAfgcFyoC8sKz2LqlVK5Kjc5hW+s7bSwNOG2Qsf\n/AeMP3Da3N8LI/ViF54zrLrnk++ZWrt+GrofV25Pp5wXXAInxw7bJZHmWP2n\ngh6UBlu1OI7FwBUxTk6X0FVvy49RJCxANCVrexK4iiQD7EFJuAoSeaYwPnDD\n9u+htyQRjBJNsZXwSSILCKjEkEzKsIVG9nt51ChZcDHuyqPSb9/+yRmEym1J\nErI01KoQV6DM15yzs7oxvRfZDQPoUGs7EpRz/hS3BaP6mCWATdtOg5HnJ8vd\nXz0EW0sFzD6SI2KMk8h3/BFeleCpI+iQVcLx9YiXAfhJeRTZOjpj3DSH3Kwe\nryouIDWs7pwYdKOa/1VWkgv77rwoLEQ3sRKUBQcvYiQentP/qqyj+eElmO+J\na5YADkONTdjAv8uYjdaOmqh78JNvvCHZTypNqWr+xnoN5GMYlkLEzjdLSS93\nZza8\r\n=ARQ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFJtCaXxjCD4XaZS4JEoBttRN3HPUXfubg6UVIPaLQQQIgDjWPq6o7FWKMD70ck8CMg8UcdjiXAzFdycumV+B6QKo="}]},"maintainers":[{"name":"baymose","email":"baymose@gmail.com"}],"_npmUser":{"name":"baymose","email":"baymose@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-rehabpath_1.0.0_1571780109453_0.23322084059841797"},"_hasShrinkwrap":false},"1.0.1":{"name":"@baymose/gatsby-source-rehabpath","description":"A plugin for pulling in data for RehabPath websites.","version":"1.0.1","author":{"name":"Bailey Griswold","email":"baymose@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baymose/gatsby-source-rehabpath.git"},"keywords":["firebase","firestore","gatsby-plugin","gatsby-source-plugin","gatsby-source","gatsby"],"main":"gatsby-node.js","scripts":{"lint":"prettier --write gatsby-node.js"},"dependencies":{"firebase-admin":"^6.3.0","gatsby-cli":"^2.4.6"},"devDependencies":{"prettier":"^1.15.3"},"license":"MIT","bugs":{"url":"https://github.com/baymose/gatsby-source-rehabpath/issues"},"homepage":"https://github.com/baymose/gatsby-source-rehabpath#readme","gitHead":"55ea608ac303c7c570b83fde6d069fa5d1a13da1","_id":"@baymose/gatsby-source-rehabpath@1.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-5jTiKrDGcXVb+9FLRgnZlCQq4OyzvqCSCb+W9dXrBcIbjXxpDTAmphZTIWIglZiIngrJwL5eaby0imu7ArCxbg==","shasum":"8fd86aa2a0aaa670617a0d831b7a5c516c4c5c60","tarball":"https://registry.npmjs.org/@baymose/gatsby-source-rehabpath/-/gatsby-source-rehabpath-1.0.1.tgz","fileCount":3,"unpackedSize":6540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr3mECRA9TVsSAnZWagAA7yQP/RiPaGsPaCaJX922q8Ch\nZOOuou28xZl3MIedEs8eI1RW4yediSPbxpabg+is3G/EhBqrukmjrz/TO8HG\nmO9RRMBScNbf6Cc/xEXmnuvh8wT9oVOxRtrxOoGk3IUBpT90jpVA2+Okji/Y\no/QaetGmMcHVkKU+SjyG6vGizQAtI1PcKXsoRs10DsF2fe8Q9AKTAUOY7s2o\ngaFz+VlPPjeRlXDVx2lwy+56QSi0sAF7pLyCXbe7yi+Ebgvq1zWVeiLMND5C\nG7cvawdbISB8B6ljJky81L/bhbiluJazIdDWA9l6NLybAaE5d80QgaoBc/PY\nUlkwkl+M86DzHPCDRAEe9KBoRSn2JNnyo4bQ+Gcct10RQLc2RSaaVakaqAlF\n6+RVkudhi23CbD+XEu2Qi9aBVHqtTG+78nTF9kl6a6SFRqbigALqdmhesUSN\nLgsxIA867+4tu8a9BUmu+ifKKDsexJl+sQYvoBBaEq9+7lsGWarqinG5Qobn\nOeY8+GBcRSNKAeFnBc2tfOCej1yyyhA5/rKZH+UrExUXy3H7wujaHx6pT0v2\nWw/zCU2VLuCVWXhWokCCRDEQl+FovAF5OvaWsjC/ffxFsAqrBweaQHIAV4c/\nktLLq5f+pst+5IYnAujlPV7juT73K/urirBifcXpTUFeG/tGgdLDPVH/hRUV\ngq85\r\n=zj2u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHS42elUyf1JieI69aiZBMUa9aUIam8dMWiv0J281SfPAiEAvOayMWwpCCV6pHcxqY0pYd5IJUqYWeXMg2IbSP7q+/g="}]},"maintainers":[{"name":"baymose","email":"baymose@gmail.com"}],"_npmUser":{"name":"baymose","email":"baymose@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-rehabpath_1.0.1_1571780995628_0.5414941968001492"},"_hasShrinkwrap":false},"1.0.2":{"name":"@baymose/gatsby-source-rehabpath","description":"A plugin for pulling in data for RehabPath websites.","version":"1.0.2","author":{"name":"Bailey Griswold","email":"baymose@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baymose/gatsby-source-rehabpath.git"},"keywords":["firebase","firestore","gatsby-plugin","gatsby-source-plugin","gatsby-source","gatsby"],"main":"gatsby-node.js","scripts":{"lint":"prettier --write gatsby-node.js"},"dependencies":{"firebase-admin":"8.6.1","gatsby-cli":"^2.4.6"},"devDependencies":{"prettier":"^1.15.3"},"license":"MIT","bugs":{"url":"https://github.com/baymose/gatsby-source-rehabpath/issues"},"homepage":"https://github.com/baymose/gatsby-source-rehabpath#readme","gitHead":"55ea608ac303c7c570b83fde6d069fa5d1a13da1","_id":"@baymose/gatsby-source-rehabpath@1.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-9eCQT/vu/V24HHH3PGSSVqXnsF32yxQodIXWDNRr3oDGpVc/DwVkxjFCTUhnDZkEG4hnejPvegRRFs6qzHX1kA==","shasum":"e06611655090a6f2c44ed89a549a779a28be0f56","tarball":"https://registry.npmjs.org/@baymose/gatsby-source-rehabpath/-/gatsby-source-rehabpath-1.0.2.tgz","fileCount":3,"unpackedSize":6561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr3rDCRA9TVsSAnZWagAAmuEQAJ/4hy/bPlB+/4Gae6S8\n17gGBfJn7bp3eX+Tj0+5Ro+szQSRTIKHz75okbPCgh4ghvHKR25kRfiM9vKr\nNw9RfuBUHf5XI8RfTUN49TC7x3HBegr7IucmunHH0YXIQC0klFjviq3N8Fxx\nWrjIu0UrmKSRxhLgeIDZWflh2Zd3KnPUOb4uYoiBugwIVv0iYi3TBygS8+bX\n5OjJTzeV82zmNZsRAFans6dShpjLP6LTUHFE5aRuGAfvkjshuSMxcKvLObTX\nKUEzLogrS9A+RPqe8dtwk6HqoAJnPd6yAHSuJeh1+mmqqsj7mmN7YSkARbIa\nZXhx6TGk0Gi4zr193cz5uAa1Mr/GvP9XOmvVRRyCUyE+/Q0rsqlgZPZGbnOY\nJFo0f9TDYVSamNNU5IR91R3ZTgL2vxmVL+WC6UBJII2od9KJTZEIfKT9lLmU\ngVhJH1m7Rbjnnqmo2ogqRnLV604HVNvLwRQboUSatFIw4proHrNSqqtJS7df\nO+NFwNo06XIBEbyh19gv7d3YE81F0PzKexZXBoEmO83pSXmHvAIg6A70JMfy\nZPYd6kwAc0mnVrQkIyZ81g6d3uZKSY/EM8UID+pAdL3Tr/F9BqgAPLhzTJ1u\nX+PmCZlOv9dvJ6qMNq6NE62I+L0bsb6K55SVKFOWIkGb4nbnwzVjGYNjhNHU\nALTu\r\n=91yz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHOa/GvoB9lYUxYM0SyLh0bqaQgC/qJiBoLcLEDMcnVNAiEAtz29iALac3oe/hPXPkUg3hwUrZ/aNX5y2K8PvQrNMJI="}]},"maintainers":[{"name":"baymose","email":"baymose@gmail.com"}],"_npmUser":{"name":"baymose","email":"baymose@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-rehabpath_1.0.2_1571781315521_0.1017282423249517"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-22T21:35:09.225Z","1.0.0":"2019-10-22T21:35:09.593Z","modified":"2022-04-04T17:49:10.492Z","1.0.1":"2019-10-22T21:49:55.758Z","1.0.2":"2019-10-22T21:55:15.641Z"},"maintainers":[{"name":"baymose","email":"baymose@gmail.com"}],"description":"A plugin for pulling in data for RehabPath websites.","homepage":"https://github.com/baymose/gatsby-source-rehabpath#readme","keywords":["firebase","firestore","gatsby-plugin","gatsby-source-plugin","gatsby-source","gatsby"],"repository":{"type":"git","url":"git+https://github.com/baymose/gatsby-source-rehabpath.git"},"author":{"name":"Bailey Griswold","email":"baymose@gmail.com"},"bugs":{"url":"https://github.com/baymose/gatsby-source-rehabpath/issues"},"license":"MIT","readme":"# gatsby-source-firestore\n\n[![npm version](https://badge.fury.io/js/gatsby-source-firestore.svg)](https://badge.fury.io/js/gatsby-source-firestore)\n\nGatsby source plugin for building websites using\n[Firebase Firestore](https://firebase.google.com/products/firestore)\nas a data source\n\n## Usage\n\n1. Generate and download a Firebase Admin SDK private key by accessing the\n   [Firebase Project Console > Settings > Service Accounts](https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk)\n\n2. Rename and put the downloaded `.json` crendtial file somewhere in the\n   GatsbyJS project (e.g. `./credentials.json`)\n\n3. Add `gatsby-source-firestore` as a dependency by running using `npm` or `yarn`:\n\n   ```sh\n   npm i gatsby-source-firestore\n   # or\n   yarn add gatsby-source-firestore\n   ```\n\n4. Configure settings at `gatsby-config.js`, for example:\n\n   ```js\n   module.exports = {\n      plugins: [\n        {\n          resolve: `gatsby-source-firestore`,\n          options: {\n            // credential or appConfig\n            credential: require(`./credentials.json`),\n            appConfig: {\n              apiKey: \"api-key\",\n              authDomain: \"project-id.firebaseapp.com\",\n              databaseURL: \"https://project-id.firebaseio.com\",\n              projectId: \"project-id\",\n              storageBucket: \"project-id.appspot.com\",\n              messagingSenderId: \"sender-id\",\n              appID: \"app-id\",\n\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   Note that you will need to have `books` and `authors` in Firestore matching\n   this schema before Gatsby can query correctly, e.g `books__NODE` on `author`\n   needs to be an array with `books` as a key of reference types to `book`\n   documents.\n\n5. Test GraphQL 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`       | Credential configurations from downloaded private key                                                                                        |\n| `types`            | Array of types, which require the following keys (`type`, `collection`, `map`)                                                               |\n| `types.type`       | The type of the collection, which will be used in GraphQL queries, e.g. when `type = Book`, the GraphQL types are named `book` and `allBook` |\n| `types.collection` | The name of the collections in Firestore. **Nested collections are not tested**                                                              |\n| `types.map`        | A function to map your data in Firestore to Gatsby nodes, utilize the undocumented `___NODE` to link between nodes                           |\n\n## Disclaimer\n\nThis project is created solely to suit our requirements, no maintenance or\nwarranty are provided. Feel free to send in pull requests.\n\n## Acknowledgement\n\n- [ryanflorence/gatsby-source-firebase](https://github.com/ryanflorence/gatsby-source-firebase)\n","readmeFilename":"README.md"}