diff --git a/packages/providers/email-amazon-ses/README.md b/packages/providers/email-amazon-ses/README.md index 5a5fbae988..c8e982671b 100644 --- a/packages/providers/email-amazon-ses/README.md +++ b/packages/providers/email-amazon-ses/README.md @@ -1,27 +1,24 @@ -# strapi-provider-email-amazon-ses +# @strapi/provider-email-amazon-ses ## Resources -- [License](LICENSE) +- [LICENSE](LICENSE) ## Links - [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) - [Strapi news on Twitter](https://twitter.com/strapijs) -## Prerequisites - -You need to have the plugin `strapi-plugin-email` installed in you Strapi project. - ## Installation ```bash # using yarn -yarn add strapi-provider-email-amazon-ses +yarn add @strapi/provider-email-amazon-ses # using npm -npm install strapi-provider-email-amazon-ses --save +npm install @strapi/provider-email-amazon-ses --save ``` ## Configuration @@ -38,7 +35,7 @@ npm install strapi-provider-email-amazon-ses --save ### Example -**Path -** `config/plugins.js` +**Path -** `./config/plugins.js` ```js module.exports = ({ env }) => ({ diff --git a/packages/providers/email-mailgun/README.md b/packages/providers/email-mailgun/README.md index 6bd7bcedc6..612ecc1eeb 100644 --- a/packages/providers/email-mailgun/README.md +++ b/packages/providers/email-mailgun/README.md @@ -1,27 +1,24 @@ -# strapi-provider-email-mailgun +# @strapi/provider-email-mailgun ## Resources -- [License](LICENSE) +- [LICENSE](LICENSE) ## Links - [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) - [Strapi news on Twitter](https://twitter.com/strapijs) -## Prerequisites - -You need to have the plugin `strapi-plugin-email` installed in you Strapi project. - ## Installation ```bash # using yarn -yarn add strapi-provider-email-mailgun +yarn add @strapi/provider-email-mailgun # using npm -npm install strapi-provider-email-mailgun --save +npm install @strapi/provider-email-mailgun --save ``` ## Configuration diff --git a/packages/providers/email-mailgun/package.json b/packages/providers/email-mailgun/package.json index 2c89e3d819..145d0d1047 100644 --- a/packages/providers/email-mailgun/package.json +++ b/packages/providers/email-mailgun/package.json @@ -42,8 +42,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/email-nodemailer/.editorconfig b/packages/providers/email-nodemailer/.editorconfig new file mode 100644 index 0000000000..473e45184b --- /dev/null +++ b/packages/providers/email-nodemailer/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/packages/providers/email-nodemailer/.gitignore b/packages/providers/email-nodemailer/.gitignore new file mode 100644 index 0000000000..28ca81d44a --- /dev/null +++ b/packages/providers/email-nodemailer/.gitignore @@ -0,0 +1,96 @@ +############################ +# OS X +############################ + +.DS_Store +.AppleDouble +.LSOverride +Icon +.Spotlight-V100 +.Trashes +._* + + +############################ +# Linux +############################ + +*~ + + +############################ +# Windows +############################ + +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ +*.cab +*.msi +*.msm +*.msp + + +############################ +# Packages +############################ + +*.7z +*.csv +*.dat +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.com +*.class +*.dll +*.exe +*.o +*.seed +*.so +*.swo +*.swp +*.swn +*.swm +*.out +*.pid + + +############################ +# Logs and databases +############################ + +.tmp +*.log +*.sql +*.sqlite + + +############################ +# Misc. +############################ + +*# +.idea +nbproject + + +############################ +# Node.js +############################ + +lib-cov +lcov.info +pids +logs +results +build +node_modules +.node_history +package-lock.json + diff --git a/packages/providers/email-nodemailer/.npmignore b/packages/providers/email-nodemailer/.npmignore new file mode 100644 index 0000000000..4ce3e454f1 --- /dev/null +++ b/packages/providers/email-nodemailer/.npmignore @@ -0,0 +1,100 @@ +############################ +# OS X +############################ + +.DS_Store +.AppleDouble +.LSOverride +Icon +.Spotlight-V100 +.Trashes +._* + +############################ +# Linux +############################ + +*~ + +############################ +# Windows +############################ + +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ +*.cab +*.msi +*.msm +*.msp + +############################ +# Packages +############################ + +*.7z +*.csv +*.dat +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.com +*.class +*.dll +*.exe +*.o +*.seed +*.so +*.swo +*.swp +*.swn +*.swm +*.out +*.pid + +############################ +# Logs and databases +############################ + +.tmp +*.log +*.sql +*.sqlite + +############################ +# Misc. +############################ + +*# +ssl +.editorconfig +.gitattributes +.idea +nbproject + +############################ +# Node.js +############################ + +lib-cov +lcov.info +pids +logs +results +build +node_modules +.node_history + +############################ +# Tests +############################ + +test +tests +__tests__ +jest.config.js diff --git a/packages/providers/email-nodemailer/README.md b/packages/providers/email-nodemailer/README.md index 62b8548ea5..3fddddf76c 100644 --- a/packages/providers/email-nodemailer/README.md +++ b/packages/providers/email-nodemailer/README.md @@ -1,27 +1,24 @@ -# strapi-provider-email-nodemailer +# @strapi/provider-email-nodemailer ## Resources -- [License](LICENSE) +- [LICENSE](LICENSE) ## Links - [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) - [Strapi news on Twitter](https://twitter.com/strapijs) -## Prerequisites - -You need to have the plugin `strapi-plugin-email` installed in your Strapi project. - ## Installation ```bash # using yarn -yarn add strapi-provider-email-nodemailer +yarn add @strapi/provider-email-nodemailer # using npm -npm install strapi-provider-email-nodemailer --save +npm install @strapi/provider-email-nodemailer --save ``` ## Example diff --git a/packages/providers/email-nodemailer/package.json b/packages/providers/email-nodemailer/package.json index 41cafe4f9d..9437920878 100644 --- a/packages/providers/email-nodemailer/package.json +++ b/packages/providers/email-nodemailer/package.json @@ -55,8 +55,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/email-sendgrid/README.md b/packages/providers/email-sendgrid/README.md index 9c7072f222..cf627b8c48 100644 --- a/packages/providers/email-sendgrid/README.md +++ b/packages/providers/email-sendgrid/README.md @@ -1,27 +1,24 @@ -# strapi-provider-email-sendgrid +# @strapi/provider-email-sendgrid ## Resources -- [License](LICENSE) +- [LICENSE](LICENSE) ## Links - [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) - [Strapi news on Twitter](https://twitter.com/strapijs) -## Prerequisites - -You need to have the plugin `strapi-plugin-email` installed in you Strapi project. - ## Installation ```bash # using yarn -yarn add strapi-provider-email-sendgrid +yarn add @strapi/provider-email-sendgrid # using npm -npm install strapi-provider-email-sendgrid --save +npm install @strapi/provider-email-sendgrid --save ``` ## Configuration diff --git a/packages/providers/email-sendgrid/package.json b/packages/providers/email-sendgrid/package.json index a6a6ba5408..d168b81438 100644 --- a/packages/providers/email-sendgrid/package.json +++ b/packages/providers/email-sendgrid/package.json @@ -42,8 +42,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/email-sendmail/README.md b/packages/providers/email-sendmail/README.md index 804dbfe13f..1662d527d3 100644 --- a/packages/providers/email-sendmail/README.md +++ b/packages/providers/email-sendmail/README.md @@ -1,27 +1,24 @@ -# strapi-provider-email-sendmail +# @strapi/provider-email-sendmail ## Resources -- [License](LICENSE) +- [LICENSE](LICENSE) ## Links - [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) - [Strapi news on Twitter](https://twitter.com/strapijs) -## Prerequisites - -You need to have the plugin `strapi-plugin-email` installed in you Strapi project. - ## Installation ```bash # using yarn -yarn add strapi-provider-email-sendmail +yarn add @strapi/provider-email-sendmail # using npm -npm install strapi-provider-email-sendmail --save +npm install @strapi/provider-email-sendmail --save ``` ## Configuration diff --git a/packages/providers/email-sendmail/package.json b/packages/providers/email-sendmail/package.json index 52f180477b..99dcec29dc 100644 --- a/packages/providers/email-sendmail/package.json +++ b/packages/providers/email-sendmail/package.json @@ -41,8 +41,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/upload-aws-s3/README.md b/packages/providers/upload-aws-s3/README.md index 112dd379ea..1db0c64b36 100644 --- a/packages/providers/upload-aws-s3/README.md +++ b/packages/providers/upload-aws-s3/README.md @@ -1,4 +1,25 @@ -# strapi-provider-upload-aws-s3 +# @strapi/provider-upload-aws-s3 + +## Resources + +- [LICENSE](LICENSE) + +## Links + +- [Strapi website](https://strapi.io/) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) +- [Strapi news on Twitter](https://twitter.com/strapijs) + +## Installation + +```bash +# using yarn +yarn add @strapi/provider-upload-aws-s3 + +# using npm +npm install @strapi/provider-upload-aws-s3 --save +``` ## Configurations @@ -6,7 +27,7 @@ Your configuration is passed down to the provider. (e.g: `new AWS.S3(config)`). See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs. -**Example** +### Provider Configuration `./config/plugins.js` @@ -30,11 +51,37 @@ module.exports = ({ env }) => ({ }); ``` +### Security Middleware Configuration + +Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation. + +`./config/middlewares.js` + +````js +module.exports = [ + // ... + { + name: "strapi::security", + config: { + contentSecurityPolicy: { + useDefaults: true, + directives: { + "connect-src": ["'self'", "https:"], + "img-src": ["'self'", "data:", "blob:", "yourBucketName.s3.yourRegion.amazonaws.com"], + "media-src": ["'self'", "data:", "blob:", "yourBucketName.s3.yourRegion.amazonaws.com"], + upgradeInsecureRequests: null, + }, + }, + }, + }, + // ... +]; + ## Required AWS Policy Actions These are the minimum amount of permissions needed for this provider to work. -``` +```json "Action": [ "s3:PutObject", "s3:GetObject", @@ -42,14 +89,4 @@ These are the minimum amount of permissions needed for this provider to work. "s3:DeleteObject", "s3:PutObjectAcl" ], -``` - -## Resources - -- [License](LICENSE) - -## Links - -- [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) -- [Strapi news on Twitter](https://twitter.com/strapijs) +```` diff --git a/packages/providers/upload-aws-s3/package.json b/packages/providers/upload-aws-s3/package.json index b90a21b301..8910f1f203 100644 --- a/packages/providers/upload-aws-s3/package.json +++ b/packages/providers/upload-aws-s3/package.json @@ -43,8 +43,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/upload-cloudinary/README.md b/packages/providers/upload-cloudinary/README.md index 877e229082..9520061f0c 100644 --- a/packages/providers/upload-cloudinary/README.md +++ b/packages/providers/upload-cloudinary/README.md @@ -1,4 +1,25 @@ -# strapi-provider-upload-cloudinary +# @strapi/provider-upload-cloudinary + +## Resources + +- [LICENSE](LICENSE) + +## Links + +- [Strapi website](https://strapi.io/) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) +- [Strapi news on Twitter](https://twitter.com/strapijs) + +## Installation + +```bash +# using yarn +yarn add @strapi/provider-upload-cloudinary + +# using npm +npm install @strapi/provider-upload-cloudinary --save +``` ## Configurations @@ -8,7 +29,7 @@ Your configuration is passed down to the cloudinary configuration. (e.g: `cloudi See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs. -**Example** +### Provider Configuration `./config/plugins.js` @@ -33,12 +54,29 @@ module.exports = ({ env }) => ({ }); ``` -## Resources +### Security Middleware Configuration -- [License](LICENSE) +Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation. -## Links +`./config/middlewares.js` -- [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) -- [Strapi news on Twitter](https://twitter.com/strapijs) +```js +module.exports = [ + // ... + { + name: 'strapi::security', + config: { + contentSecurityPolicy: { + useDefaults: true, + directives: { + 'connect-src': ["'self'", 'https:'], + 'img-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'], + 'media-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'], + upgradeInsecureRequests: null, + }, + }, + }, + }, + // ... +]; +``` diff --git a/packages/providers/upload-cloudinary/package.json b/packages/providers/upload-cloudinary/package.json index 83ae6666ba..d87e42b1ff 100644 --- a/packages/providers/upload-cloudinary/package.json +++ b/packages/providers/upload-cloudinary/package.json @@ -43,8 +43,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/upload-local/README.md b/packages/providers/upload-local/README.md index d4a3b28c5a..cc9f0a0df4 100644 --- a/packages/providers/upload-local/README.md +++ b/packages/providers/upload-local/README.md @@ -1,10 +1,31 @@ -# strapi-provider-upload-local +# @strapi/provider-upload-local + +## Resources + +- [LICENSE](LICENSE) + +## Links + +- [Strapi website](https://strapi.io/) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) +- [Strapi news on Twitter](https://twitter.com/strapijs) + +## Installation + +```bash +# using yarn +yarn add @strapi/provider-upload-local + +# using npm +npm install @strapi/provider-upload-local --save +``` ## Configurations This provider has only one parameter: `sizeLimit`. -**Example** +### Provider Configuration `./config/plugins.js` @@ -25,12 +46,6 @@ module.exports = ({ env }) => ({ The `sizeLimit` parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware `maxFileSize` so the file can be sent and processed. Read more [here](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration) -## Resources +### Security Middleware Configuration -- [License](LICENSE) - -## Links - -- [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) -- [Strapi news on Twitter](https://twitter.com/strapijs) +Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from `"'self'"`. diff --git a/packages/providers/upload-local/package.json b/packages/providers/upload-local/package.json index 1cb90a7bdd..18182c28d0 100644 --- a/packages/providers/upload-local/package.json +++ b/packages/providers/upload-local/package.json @@ -40,8 +40,5 @@ "engines": { "node": ">=12.x.x <=16.x.x", "npm": ">=6.0.0" - }, - "strapi": { - "isProvider": true } } diff --git a/packages/providers/upload-rackspace/README.md b/packages/providers/upload-rackspace/README.md index e646728d56..03fd26be26 100644 --- a/packages/providers/upload-rackspace/README.md +++ b/packages/providers/upload-rackspace/README.md @@ -1,4 +1,25 @@ -# strapi-provider-upload-rackspace +# @strapi/provider-upload-rackspace + +## Resources + +- [LICENSE](LICENSE) + +## Links + +- [Strapi website](https://strapi.io/) +- [Strapi documentation](https://docs.strapi.io) +- [Strapi community on Discord](https://discord.strapi.io) +- [Strapi news on Twitter](https://twitter.com/strapijs) + +## Installation + +```bash +# using yarn +yarn add @strapi/provider-upload-rackspace + +# using npm +npm install @strapi/provider-upload-rackspace --save +``` ## Configurations @@ -6,7 +27,7 @@ Your configuration is passed down to the client initialization. (e.g: `createCli See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs. -**Example** +### Provider Configuration `./config/plugins.js` @@ -28,12 +49,29 @@ module.exports = ({ env }) => ({ }); ``` -## Resources +### Security Middleware Configuration -- [License](LICENSE) +Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation. -## Links +`./config/middlewares.js` -- [Strapi website](https://strapi.io/) -- [Strapi community on Slack](https://slack.strapi.io) -- [Strapi news on Twitter](https://twitter.com/strapijs) +```js +module.exports = [ + // ... + { + name: 'strapi::security', + config: { + contentSecurityPolicy: { + useDefaults: true, + directives: { + 'connect-src': ["'self'", 'https:'], + 'img-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'], + 'media-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'], + upgradeInsecureRequests: null, + }, + }, + }, + }, + // ... +]; +```