{"_id":"@cgduzan/strapi-plugin-website-builder","name":"@cgduzan/strapi-plugin-website-builder","dist-tags":{"latest":"2.2.1"},"versions":{"2.2.1":{"$schema":"https://json.schemastore.org/package","name":"@cgduzan/strapi-plugin-website-builder","version":"2.2.1","description":"A plugin for Strapi Headless CMS that provides the ability to trigger website builds manually, periodically or through model events.","scripts":{"lint":"eslint . --fix","format":"prettier --write **/*.{ts,js,json,yml}"},"author":{"name":"@ComfortablyCoding","url":"https://github.com/ComfortablyCoding"},"maintainers":[{"name":"cgduzan","email":"cgduzan@gmail.com"}],"homepage":"https://github.com/ComfortablyCoding/strapi-plugin-website-builder#readme","repository":{"type":"git","url":"git+https://github.com/ComfortablyCoding/strapi-plugin-website-builder.git"},"bugs":{"url":"https://github.com/ComfortablyCoding/strapi-plugin-website-builder/issues"},"dependencies":{},"devDependencies":{"@babel/core":"^7.17.2","@babel/eslint-parser":"^7.17.0","@babel/preset-react":"^7.16.7","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-node":"^11.1.0","eslint-plugin-react":"^7.28.0","prettier":"^2.5.1"},"peerDependencies":{"@strapi/strapi":"^4.0.7","axios":"^0.24.0","lodash":"^4.17.21","react-query":"^3.24.3","yup":"^0.32.9"},"strapi":{"displayName":"Website Builder","description":"A plugin for Strapi Headless CMS that provides the ability to trigger website builds manually, periodically or through model events.","name":"website-builder","kind":"plugin"},"engines":{"node":">=12.x.x <=16.x.x","npm":">=6.0.0"},"keywords":["strapi","strapi-plugin","plugin","strapi plugin","publishing","website-builder","website builder","build website"],"license":"MIT","gitHead":"bb2e61d56c22c9a5ed09b021d18265662f2d7d7f","_id":"@cgduzan/strapi-plugin-website-builder@2.2.1","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Z168JNW70Vqw32H9saDxcF+QTIKFXHRDm73UUfmlHFr03mH4o/sRq2FAMlcyFMpIpbC2oISY+yTs8EN7dTJquw==","shasum":"9a921c700db68150a4b72b112b97096abfcbe72e","tarball":"https://registry.npmjs.org/@cgduzan/strapi-plugin-website-builder/-/strapi-plugin-website-builder-2.2.1.tgz","fileCount":47,"unpackedSize":30646,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDFNnnp7zWxVxY7IU/089eytWcnXh8YgisfSxtP313FqAiEAg8yRxgZ0HZNxsofRtcU1hLzkA150R4xzP9K1gXiWOWA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaEpoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/7w//XWaK0+uz8200nNMWFRd86Zhqpp/61banpKcQ2mUOVrr9TZ4S\r\n/8SdQrlt0iwAp7Wk+qFfuvT2+gH8xsX+hp/ig9wqC67pqb8DTFLkNEKiTMdp\r\npvKe0qW9iB5rfqbd2XtwCydKLcEdDoXE0oq5P+hYffBnPbB9wxRpOPJTCwfx\r\nBUYSfLPT7wm3eZEUqqrxNTQlO03y7KgWRs4ykx6vxqPNdX8/f63Cahvwm109\r\n7/ruoy5oqhrNOjlxrDwycMYTcvDApxo5J2Pck0XC3OryU+mXoiCtAB8dNS2m\r\nFYhnvHhLLZpR8rJ0M880FRxJI759qLh58ojVcSLREQF/BRb9TdRJd4u3CamM\r\ngRbheS4x9v6lQBZ2Qc1v1c7hmGLY2DZRFmoA7O9NmZvw4fc4PwioJ3yg8BOv\r\nIM6VHXOYISOcpfKcMjFP1G/YSBMEXXRq5OysDpZAazlUXasl2hVuQLWcR+k9\r\nzoTcY9xpyEn4af+EFrKVGKaNm8Qww1BXN+wC1iOg+GXaW80a67flg0pyva0j\r\nbZS8aJHY5rQIxGFd+I+v7vSnKHYU9rOSXMZd88XTSF0uK1zxiylfQyNtbxLv\r\nAR9fdNXnTm6L+kMeUovVmiWSBcFjnkVpMlnJpU0unbYFLd9bQ4cxYOoQyJHF\r\niK0LFFv9dSauTdXBlCwRrT8E3zpWRbm0aCQ=\r\n=PsXS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cgduzan","email":"cgduzan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strapi-plugin-website-builder_2.2.1_1651001960229_0.486478591597179"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-26T19:39:20.157Z","2.2.1":"2022-04-26T19:39:20.391Z","modified":"2022-04-26T19:39:20.539Z"},"maintainers":[{"name":"cgduzan","email":"cgduzan@gmail.com"}],"description":"A plugin for Strapi Headless CMS that provides the ability to trigger website builds manually, periodically or through model events.","homepage":"https://github.com/ComfortablyCoding/strapi-plugin-website-builder#readme","keywords":["strapi","strapi-plugin","plugin","strapi plugin","publishing","website-builder","website builder","build website"],"repository":{"type":"git","url":"git+https://github.com/ComfortablyCoding/strapi-plugin-website-builder.git"},"author":{"name":"@ComfortablyCoding","url":"https://github.com/ComfortablyCoding"},"bugs":{"url":"https://github.com/ComfortablyCoding/strapi-plugin-website-builder/issues"},"license":"MIT","readme":"# strapi-plugin-website-builder\n\nA plugin for [Strapi](https://github.com/strapi/strapi) that provides the ability to trigger website builds manually, periodically or through model events.\n\n[![Downloads](https://img.shields.io/npm/dm/strapi-plugin-website-builder?style=for-the-badge)](https://img.shields.io/npm/dm/strapi-plugin-website-builder?style=for-the-badge)\n[![Install size](https://img.shields.io/npm/l/strapi-plugin-website-builder?style=for-the-badge)](https://img.shields.io/npm/l/strapi-plugin-website-builder?style=for-the-badge)\n[![Package version](https://img.shields.io/github/v/release/ComfortablyCoding/strapi-plugin-website-builder?style=for-the-badge)](https://img.shields.io/github/v/release/ComfortablyCoding/strapi-plugin-website-builder?style=for-the-badge)\n\n## Requirements\n\nThe installation requirements are the same as Strapi itself and can be found in the documentation on the [Quick Start](https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html) page in the Prerequisites info card.\n\n### Supported Strapi versions\n\n- v4.x.x\n\n**NOTE**: While this plugin may work with the older Strapi versions, they are not supported, it is always recommended to use the latest version of Strapi.\n\n## Installation\n\n```sh\nnpm install strapi-plugin-website-builder\n```\n\n**or**\n\n```sh\nyarn add strapi-plugin-website-builder\n```\n\n## Configuration\n\nThe plugin configuration is stored in a config file located at `./config/plugins.js`.\n\nThe plugin has different structures depending on the type of trigger for the build. Each of the following sample configurations is the minimum needed for their respective trigger type.\n\n### Manual Configuration\n\n```javascript\nmodule.exports = ({ env }) => ({\n  // ...\n 'website-builder': {\n    enabled: true,\n    config: {\n      url: 'https://link-to-hit-on-trigger.com',\n      trigger: {\n        type: 'manual',\n      },\n    }\n  },\n  // ...\n});\n```\n\n### Cron/Periodic Configuration\n\n```javascript\nmodule.exports = ({ env }) => ({\n  // ...\n 'website-builder': {\n    enabled: true,\n    config: {\n      url: 'https://link-to-hit-on-trigger.com',\n      trigger: {\n        type: 'cron',\n        cron: '* * 1 * * *',\n      },\n    }\n  },\n  // ...\n});\n```\n\n### Event Configuration\n\n```javascript\nmodule.exports = ({ env }) => ({\n  // ...\n 'website-builder': {\n    enabled: true,\n    config: {\n      url: 'https://link-to-hit-on-trigger.com',\n      trigger: {\n        type: 'event',\n        events: [\n          {\n            params: (record) => ({\n              id: `${record.id}_${record.title}`\n            }),\n            model: 'recipe',\n            types: ['create', 'delete'],\n          },\n          {\n            params: {\n              page: \"home\"\n            },\n            model: 'homepage',\n            types: ['update'],\n          },\n        ],\n      },\n    }\n  },\n  // ...\n});\n```\n\n**IMPORTANT NOTE**: Make sure any sensitive data is stored in env files.\n\n#### The Complete Plugin Configuration  Object\n\n| Property | Description | Type | Required |\n| -------- | ----------- | ---- | -------- |\n| url | The trigger URL for the website build. | String | Yes |\n| headers | Any headers to send along with the request. | Object | No |\n| body | Any body data to send along with the request. | Object | No |\n| trigger | The trigger conditions for the build.  | Object | Yes |\n| trigger.type | The type of trigger. The current supported options are `manual`,`cron` and `event` | String | Yes |\n| trigger.cron | The cron expression to use for cron trigger. The supported expressions are the same as in the [strapi docs](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/cronjobs.html#cron-jobs) | String | Only if the type is cron |\n| trigger.events | The events to use for the event trigger. | Array | Only if the type is event |\n| trigger.events.url | The model specific url to hit on event trigger. | String | No |\n| trigger.events.params | The model specific params to add on event trigger. | Object `or` Function | No |\n| trigger.events.model | The model to listen for events on. | String | Yes |\n| trigger.events.types | The model events to trigger on. The current supported events are `create`, `update`, `delete`, `publish` and `unpublish`. Publish/Unpublish is only supported for non media models. | Array | Yes |\n\n## Usage\n\nOnce the plugin has been installed and configured, it will show in the sidebar as `Website Builder`.\nTo trigger a manual build select the `Website Builder` menu item in the sidebar and click\nthe `Trigger Build` button to start a build process.\n\n## Bugs\n\nIf any bugs are found please report them as a [Github Issue](https://github.com/ComfortablyCoding/strapi-plugin-website-builder/issues)","readmeFilename":"README.md"}