{"_id":"@denis.babineau.sg/gatsby-source-drupal","_rev":"6-18cbaabc71098ec82be4a268e98ae72b","name":"@denis.babineau.sg/gatsby-source-drupal","dist-tags":{"next":"3.2.34-2","latest":"3.2.34-0"},"versions":{"3.2.34-0":{"name":"@denis.babineau.sg/gatsby-source-drupal","description":"Gatsby source plugin for building websites using the Drupal CMS as a data source","version":"3.2.34-0","author":{"name":"Denis Babineau","email":"denis.babineau@scientificgames.com"},"dependencies":{"@babel/runtime":"^7.6.2","axios":"^0.19.0","bluebird":"^3.7.0","body-parser":"^1.19.0","gatsby-source-filesystem":"^2.1.29","lodash":"^4.17.15","tiny-async-pool":"^1.0.4"},"devDependencies":{"@babel/cli":"^7.6.2","@babel/core":"^7.6.2","babel-preset-gatsby-package":"^0.2.7","cross-env":"^5.2.1"},"homepage":"https://github.com/denisbabineau/gatsby/tree/master/packages/gatsby-source-drupal#readme","keywords":["gatsby","gatsby-plugin","gatsby-source-plugin"],"license":"MIT","peerDependencies":{"gatsby":"^2.0.15"},"repository":{"type":"git","url":"git+https://github.com/denisbabineau/gatsby.git","directory":"packages/gatsby-source-drupal"},"scripts":{"build":"babel src --out-dir . --ignore **/__tests__","prepare":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore **/__tests__"},"engines":{"node":">=8.0.0"},"bugs":{"url":"https://github.com/denisbabineau/gatsby/issues"},"_id":"@denis.babineau.sg/gatsby-source-drupal@3.2.34-0","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","dist":{"integrity":"sha512-NH2zNPfdu3MwdK24wTvLBo0ibrQnSa6RBF/HWOaQKnvnW2n57tIoVql7UhyIzVGLI8Pp7SUAM981DFnBUmxwLg==","shasum":"527bdd3af89f4253aaed1f8d4103ccece7c4abf0","tarball":"https://registry.npmjs.org/@denis.babineau.sg/gatsby-source-drupal/-/gatsby-source-drupal-3.2.34-0.tgz","fileCount":9,"unpackedSize":44522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm03fCRA9TVsSAnZWagAAKu0P/3+xyzQfuoM6CmGb4trQ\n/4/q8zH0wSl4L9R4tUqKCEdEmC6t5inq+FHCM3vfLpxo/P9Am6+mm53TrXkr\nT5bl2cPv/HF3DfREQRMAuEpq9B85TPVuX1yJH38Jle54tZSZCy0muxCqGi2a\nqkNUFJYpE9TSw3KCFZyPtvR7lLRbnx0iNwe1tS+TEddOlFa/3HkoQjyYxTQ5\nZxIyNvxIHPZrioGo4pOBVzYKdeQTDsi4G8uVYLWImkgcW+Q/cuWYJ2X/s0Lx\naJOXqrDjBg1qhJWu8+ppFNnK1MQ3vBmZxkIWDtEP+Io3iz9aLf58+eoFc6aE\n1VPKsCrqbDwJPYdXeZmiiSCHGhxQi+3S4cOoRCmWgX7xgywHu99Z22YrOH1Z\nVkCfXGBYND6TWq6YfJrrJDi5zOPmyy7UESa7nTA2fyW28rYuPwTS9/oL9qDk\nOgSv8a3xu4HfPMlq4tWO3q/3ANNYudb3yfT16O6kIZV4uLdI0FYWni3FXdD/\nKfiw13aQ+GpWDs7kO61/sN0K7h/4/UVYCGWAIrhiAevLCcTTY1gKUIoROJET\nLPjDnPaZd+y/RlDS/9aZSzOk2MnaCr7bSTzJj3Sdp96yYnA8io2yBLQHOijQ\nqsCssSoT7Q9kdSSlrppmunqTVdB76ZiUGWXn4C95lg8qXOl1CcEy29g94wQW\nRH7z\r\n=/ByY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAaEU5RR4yd1lh91mlTKrYC400qOr+rf6zuY9BGuG9+IAiEAsFp62qo0Hzu98P45oikow+BVHtA/dcMPbNQS2v3eWjM="}]},"maintainers":[{"name":"denis.babineau.sg","email":"denis.babineau@scientificgames.com"}],"_npmUser":{"name":"denis.babineau.sg","email":"denis.babineau@scientificgames.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-drupal_3.2.34-0_1570459103200_0.49339253052779997"},"_hasShrinkwrap":false},"3.2.34-2":{"name":"@denis.babineau.sg/gatsby-source-drupal","description":"Gatsby source plugin for building websites using the Drupal CMS as a data source","version":"3.2.34-2","author":{"name":"Denis Babineau","email":"denis.babineau@scientificgames.com"},"dependencies":{"@babel/runtime":"^7.6.2","axios":"^0.19.0","bluebird":"^3.7.0","body-parser":"^1.19.0","gatsby-source-filesystem":"^2.1.29","lodash":"^4.17.15","tiny-async-pool":"^1.0.4"},"devDependencies":{"@babel/cli":"^7.6.2","@babel/core":"^7.6.2","babel-preset-gatsby-package":"^0.2.7","cross-env":"^5.2.1"},"homepage":"https://github.com/denisbabineau/gatsby/tree/master/packages/gatsby-source-drupal#readme","keywords":["gatsby","gatsby-plugin","gatsby-source-plugin"],"license":"MIT","peerDependencies":{"gatsby":"^2.0.15"},"repository":{"type":"git","url":"git+https://github.com/denisbabineau/gatsby.git","directory":"packages/gatsby-source-drupal"},"scripts":{"build":"babel src --out-dir . --ignore **/__tests__","prepare":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore **/__tests__"},"engines":{"node":">=8.0.0"},"readme":"# gatsby-source-drupal\n\nSource plugin for pulling data (including images) into Gatsby from Drupal sites.\n\nPulls data from Drupal 8 sites with the\n[Drupal JSONAPI module](https://www.drupal.org/project/jsonapi) installed.\n\nAn example site built with the headless Drupal distro\n[ContentaCMS](https://twitter.com/contentacms) is at\nhttps://using-drupal.gatsbyjs.org/\n\n`apiBase` Option allows changing the API entry point depending on the version of\njsonapi used by your Drupal instance. The default value is `jsonapi`, which has\nbeen used since jsonapi version `8.x-1.0-alpha4`.\n\n## Install\n\n`npm install --save gatsby-source-drupal`\n\n## How to use\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`, // optional, defaults to `jsonapi`\n      },\n    },\n  ],\n}\n```\n\n### Filters\n\nYou can use the `filters` option to limit the data that is retrieved from Drupal. Filters are applied per JSON API collection. You can use any [valid JSON API filter query](https://www.drupal.org/docs/8/modules/jsonapi/filtering). For large data sets this can reduce the build time of your application by allowing Gatsby to skip content you'll never use.\n\nAs an example, if your JSON API endpoint (https://live-contentacms.pantheonsite.io/api) returns the following collections list, then `articles` and `recipes` are both collections that can have a filters applied:\n\n```json\n{\n  ...\n  links: {\n    articles: \"https://live-contentacms.pantheonsite.io/api/articles\",\n    recipes: \"https://live-contentacms.pantheonsite.io/api/recipes\",\n    ...\n  }\n}\n```\n\nTo retrieve only recipes with a specific tag you could do something like the following where the key (recipe) is the collection from above, and the value is the filter you want to apply.\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`,\n        filters: {\n          // collection : filter\n          recipe: \"filter[tags.name][value]=British\",\n        },\n      },\n    },\n  ],\n}\n```\n\nWhich would result in Gatsby using the filtered collection https://live-contentacms.pantheonsite.io/api/recipes?filter[tags.name][value]=British to retrieve data.\n\n### Basic Auth\n\nYou can use `basicAuth` option if your site is protected by basicauth.\nFirst, you need a way to pass environment variables to the build process, so secrets and other secured data aren't committed to source control. We recommend using [`dotenv`][dotenv] which will then expose environment variables. [Read more about dotenv and using environment variables here][envvars]. Then we can _use_ these environment variables and configure our plugin.\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`, // optional, defaults to `jsonapi`\n        basicAuth: {\n          username: process.env.BASIC_AUTH_USERNAME,\n          password: process.env.BASIC_AUTH_PASSWORD,\n        },\n      },\n    },\n  ],\n}\n```\n\n## Request Headers\n\nYou can add optional request headers to the request using `headers` param.\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`, // optional, defaults to `jsonapi`\n        headers: {\n          Host: \"https://example.com\", // any valid request header here\n        },\n      },\n    },\n  ],\n}\n```\n\n## GET Params\n\nYou can append optional GET request params to the request url using `params` option.\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`, // optional, defaults to `jsonapi`\n        params: {\n          \"api-key\": \"your-api-key-header-here\", // any valid key value pair here\n        },\n      },\n    },\n  ],\n}\n```\n\n## Concurrent File Requests\n\nYou can use the `concurrentFileRequests` option to change how many simultaneous file requests are made to the server/service. This benefits build speed, however to many concurrent file request could cause memory exhaustion depending on the server's memory size so change with caution.\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-drupal`,\n      options: {\n        baseUrl: `https://live-contentacms.pantheonsite.io/`,\n        apiBase: `api`, // optional, defaults to `jsonapi`\n        concurrentFileRequests: 60, // optional, defaults to `20`\n      },\n    },\n  ],\n}\n```\n\n## Gatsby Preview (experimental)\n\nYou will need to have the Drupal module installed, more information on that here: https://www.drupal.org/project/gatsby\n\nIn your Drupal module configuration, set the update URL to your Gatsby Preview instance URL.\n\n_NOTES_:\n\n- This is experimental feature in active development. APIs used for this feature are not yet stable - it can break while we iterate on API design (particularly when versions of `gatsby-source-drupal` and `Gatsby Live Preview` drupal module are incompatible).\n- It's not feature complete yet. There is no handling of deleting content yet.\n\n## How to query\n\nYou can query nodes created from Drupal like the following:\n\n```graphql\n{\n  allArticle {\n    edges {\n      node {\n        title\n        internalId\n        created(formatString: \"DD-MMM-YYYY\")\n      }\n    }\n  }\n}\n```\n\n[dotenv]: https://github.com/motdotla/dotenv\n[envvars]: https://www.gatsbyjs.org/docs/environment-variables\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/denisbabineau/gatsby/issues"},"_id":"@denis.babineau.sg/gatsby-source-drupal@3.2.34-2","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","dist":{"integrity":"sha512-P6T/SJ/8VAQ+iWBSMyHkyWZ+/2qHeR0TmhbuFTPpzYZMrJwm3Gn6yRiGUjmvLR4VVSyS7adwW1CqzSugsbt9Yg==","shasum":"88a11e742dfa2f3d13ad4382fd24ba88c6f7fe62","tarball":"https://registry.npmjs.org/@denis.babineau.sg/gatsby-source-drupal/-/gatsby-source-drupal-3.2.34-2.tgz","fileCount":9,"unpackedSize":44510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm2pfCRA9TVsSAnZWagAAYoAQAIJFvjGzwqCyDQsiLGQt\ngkZbtuZIP8c5WTmJKnCk2X0C1OFYZ8qg8HCMhlRvg8djncNw68ttQjXX1qgN\nbvgkaK6OiwJe26qvoxcKyWnuftNrL9dFjJPUJGjwDnP1KAUK6UeGVE76o39/\nF13PCBvN5mmBgGZY3IE3a+YwBWRBKiq4yH9A/4SLCQrtYsL2wO1qv3kmMPPj\n4RfEsgPESMXQv4k0bt0WRvnHXFW2SmqOYeU//HOiuHiOxrtA5BC0rsSy1LXi\nTxz2wciHbbofxNBqjfH4idYtkxPfYYmuCP7cNEL3PO6xL5eqRTIbGSq0QbKt\nUr1jo1M5kBWWLLdI1e1QayPhfUqZAqKBMCJgHGEqnvqingcwUbZ3g00Bug10\nTqVzQ88ta+vvk/pphz6z28Vd9CCOu1bg17N2FhqX39oboFE+34ViPRm0T5+m\nNM8wmC2oyc3w6E1URS1SmFS+lhrPi8Gj4EHzZIfsBRuig16RlUKMoEyocgAf\nsPjdi7CjwfBkb59ayV0v95x38QaiHnooPT63LdsKMBC4fGqYgAxl6j3Oq+xR\nuZcLx284mWWqaJFWtTMXsZofz4hN6QpQLL3xB+XUt3/wabqq2pHHMc3M7Nu9\njr40bccj0B/NEpiuJFuJSuPs3el8DiV4nG7HNFjp5FL4lRcYKisncUUc0W21\nD1xO\r\n=dm3X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDjIuLS3afWoR38AQNrUQ+5P9EdXMGqTzOt2QGbfkMoAiAzywV0royfGOg+Wyi4+hbB5eNIYkyB6NakkAT/pvjvSg=="}]},"maintainers":[{"name":"denis.babineau.sg","email":"denis.babineau@scientificgames.com"}],"_npmUser":{"name":"denis.babineau.sg","email":"denis.babineau@scientificgames.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-drupal_3.2.34-2_1570466398874_0.9482397317120475"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-07T14:00:44.238Z","3.2.34":"2019-10-07T14:00:44.586Z","modified":"2022-04-05T03:45:01.081Z","3.2.34-1":"2019-10-07T14:23:45.469Z","3.2.34-0":"2019-10-07T14:38:23.345Z","3.2.34-2":"2019-10-07T16:39:59.027Z"},"maintainers":[{"name":"denis.babineau.sg","email":"denis.babineau@scientificgames.com"}],"description":"Gatsby source plugin for building websites using the Drupal CMS as a data source","homepage":"https://github.com/denisbabineau/gatsby/tree/master/packages/gatsby-source-drupal#readme","keywords":["gatsby","gatsby-plugin","gatsby-source-plugin"],"repository":{"type":"git","url":"git+https://github.com/denisbabineau/gatsby.git","directory":"packages/gatsby-source-drupal"},"author":{"name":"Denis Babineau","email":"denis.babineau@scientificgames.com"},"bugs":{"url":"https://github.com/denisbabineau/gatsby/issues"},"license":"MIT","readme":"","readmeFilename":""}