Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Production release 4.2.3 #994

Merged
merged 154 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 152 commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
0592d1c
Use beta logo
pwizla Mar 15, 2022
a09b7f2
Merge branch 'main' into next
derrickmehaffy Mar 15, 2022
f34d15c
[beta] Add TS command (#800)
soupette Mar 16, 2022
a1073a7
[beta] Dark mode: Updates user guide + dev docs (#795)
pwizla Mar 16, 2022
744d54a
Slightly update wording for TS flag
pwizla Mar 16, 2022
97b5f52
Update core store migration
pwizla Mar 16, 2022
0b5cea3
Added APP_KEYS to environmental variables table + fixed spelling error
stb13579 Mar 18, 2022
b5849fe
added link to middlewares documentation
stb13579 Mar 18, 2022
825fbe2
(WIP) Add permissions mapping tables
pwizla Mar 22, 2022
9b5f373
Fix typo
dsiddy Apr 3, 2022
893fbc6
Merge pull request #827 from dsiddy/patch-1
stb13579 Apr 4, 2022
861aa15
Added caution call out
stb13579 Apr 5, 2022
9efaeae
Updated the telemetry opt-out method
stb13579 Apr 5, 2022
1ad52cf
Update amazon-aws.md: Wrong package mentioned (#830)
spreadcharm Apr 5, 2022
9d662c5
Missing information for plugin creation #834
DimitriGilbert Apr 6, 2022
2d9e138
Include APP_KEYS in Heroku Deployment Guide
dsfaccini Apr 6, 2022
4ec63fc
Added caution callout and small text + formatting revisions
stb13579 Apr 8, 2022
906fb5d
Apply suggestions from code review
DimitriGilbert Apr 8, 2022
929c019
Merge pull request #831 from strapi/dev/telemetry-opt-out
stb13579 Apr 8, 2022
0c33ecd
Merge pull request #838 from dsfaccini/patch-1
stb13579 Apr 8, 2022
f2876ff
docs: improve the Laravel Documentation
Apr 8, 2022
12b3105
Merge pull request #836 from DimitriGilbert/patch-1
stb13579 Apr 8, 2022
e5651f5
docs: fix typo in code section
Apr 8, 2022
04c356b
Update azure.md
kulahad Apr 11, 2022
3b71421
Merge pull request #846 from kulahad/patch-1
stb13579 Apr 11, 2022
9f3c8ec
Merge pull request #843 from danielsum/patch-1
stb13579 Apr 11, 2022
58d8eb6
Finish adding permission mapping tables
pwizla Apr 12, 2022
a36afe7
Merge branch 'dev/next-sql-migration-updates'
pwizla Apr 12, 2022
4bf83e3
Merge branch 'production' into main
derrickmehaffy Apr 13, 2022
c5eb7e4
Remove typescript from production release
derrickmehaffy Apr 13, 2022
87a7001
Added migration guide
stb13579 Apr 19, 2022
f37dc7d
Added link to 4.1.8 migration guide
stb13579 Apr 19, 2022
208830a
add comments for Shaun
derrickmehaffy Apr 20, 2022
9e1198a
updated with Derrick's suggestions
stb13579 Apr 21, 2022
f949b2f
fixed spelling and phrasing
stb13579 Apr 21, 2022
1fea391
add JWT_SECRET code snippet
stb13579 Apr 21, 2022
b10d121
Fixed code for config/plugins
stb13579 Apr 21, 2022
48e9617
Update docs/developer-docs/latest/update-migration-guides/migration-g…
stb13579 Apr 21, 2022
ca702d0
Update docs/developer-docs/latest/update-migration-guides/migration-g…
stb13579 Apr 21, 2022
751757b
docs: fix typo (#853)
inc-ali Apr 21, 2022
8eeb915
Merge pull request #851 from strapi/dev/v4.1.8-migration
stb13579 Apr 21, 2022
44ea262
make render.com hosting guide work with strapi version >= v4.0.6 (#832)
NicoHof Apr 21, 2022
463e820
Add additional commands for Heroku environment variables config (#850)
derrickmehaffy Apr 21, 2022
491c601
Merge branch 'production' into main
derrickmehaffy Apr 21, 2022
5ce6da8
Fixed config object example code
mancku Apr 25, 2022
5d56315
remove API_TOKEN_SALT and APP_KEYS from env table
stb13579 Apr 25, 2022
f43441d
Merge pull request #805 from strapi/dev/env-update
stb13579 Apr 25, 2022
e9706ea
Merge pull request #859 from mancku/patch-1
stb13579 Apr 25, 2022
ed55fb6
Update routes.md
eliasleyton Apr 25, 2022
650cf1d
Merge pull request #860 from eliasleyton/patch-1
stb13579 Apr 25, 2022
bb43b7c
update link style
stb13579 Apr 26, 2022
6095196
updated migration guide to match template.
stb13579 Apr 27, 2022
c232bcd
Update docs/developer-docs/latest/update-migration-guides/migration-g…
stb13579 Apr 27, 2022
a9bd54d
Merge pull request #866 from strapi/dev/v4.1.8-migration
stb13579 Apr 27, 2022
c6a6a6d
[v4 migration] MongoDB additions to data migration guide (#818)
pwizla Apr 27, 2022
7a5149e
Lack one s in the file name middleware.js
slamer59 Apr 27, 2022
65f113b
Merge pull request #868 from slamer59/patch-1
stb13579 Apr 27, 2022
0def274
Merge pull request #828 from strapi/dev/Docker-update
stb13579 Apr 27, 2022
c63a2b1
Merge branch 'production' into main
derrickmehaffy Apr 27, 2022
bc3427e
Changed time based fields from snake case to camel case
kasonde May 3, 2022
a982168
docs: fixed command to start strapi (#870)
waznico May 3, 2022
e78f4cd
Update plugins-extension.md (#876)
rtalwar26 May 4, 2022
a1b31c8
fix: use correct key parameter for azure deploy (#874)
tefkah May 4, 2022
5af8275
Upload: improve code examples (#806)
gu-stav May 4, 2022
5935ad6
Update services.md (#880)
rtalwar26 May 6, 2022
a6a5cbd
Remove useless callout (#888)
pwizla May 10, 2022
e485b51
Force node 14 (#890)
derrickmehaffy May 10, 2022
53c5333
Update latest supported versions & expand docs (#883)
andrevitalb May 11, 2022
596e55b
Fix wrong wording in model information (#887)
pwizla May 11, 2022
cfaae3e
Add migration guide to 4.1.10 (#885)
petersg83 May 11, 2022
d76d4d0
Fix predefined hook's name. (#884)
kentarohorie May 11, 2022
cdf86b8
Strapi-maintained plugins descriptions (#833)
stb13579 May 11, 2022
cd4f8cb
Remove populateCreatorFields from models (#881)
stb13579 May 11, 2022
1c86ab9
Add NodeJS link to NODE_ENV=production (#879)
stb13579 May 11, 2022
fcffcd3
Fix the example code for registering hooks (#877)
pascalvaccaro May 11, 2022
7759647
Merge branch 'main' into production
pwizla May 11, 2022
59e173d
Update update-version.md
trulysinclair May 11, 2022
d3bf26d
typo
jbcrestot May 13, 2022
d22c018
Update services.md (#896)
alejandro-llanes May 16, 2022
4a9ad7f
Merge pull request #895 from jbcrestot/patch-1
stb13579 May 17, 2022
85f4798
Merge pull request #893 from TheGrimSilence/patch-1
stb13579 May 17, 2022
93ee4ec
Removed the getPlugin part for content-manager
kevinvugts May 17, 2022
6c50b59
Merge pull request #873 from strapi/fix/webhook_example
stb13579 May 17, 2022
d52bb20
Merge pull request #899 from kevinvugts/patch-1
stb13579 May 17, 2022
5eb3abf
Add caution call out to documentation plugin
stb13579 May 18, 2022
6b3e63b
Update docs/developer-docs/latest/plugins/documentation.md
stb13579 May 18, 2022
26d9014
Merge pull request #900 from strapi/dev/api-doc-plugin
stb13579 May 18, 2022
b2b24bd
Add caution callout above custom routes config (#901)
fdel-car May 20, 2022
0008937
docs typo (#871)
soldatovsh May 25, 2022
0751244
Configure last-updated plugin output (#905)
pwizla May 25, 2022
ff3c527
Replace logo with SVG version
pwizla May 30, 2022
306d572
Add 2x PNG logo
pwizla May 30, 2022
92c5932
Add a tip to content type schema migration page and link to Codemods …
tonoli May 30, 2022
8027bdd
Fix missing closing tip markup + improve wording
pwizla May 30, 2022
7c07de1
Improve wording further for codemods tip
pwizla May 30, 2022
7a14543
Update populating-fields.md (#913)
Benbinbin Jun 1, 2022
8cae88e
Update CONTRIBUTING.md
pwizla Jun 1, 2022
0bc1d3d
Update CONTRIBUTING.md
pwizla Jun 1, 2022
482e068
Update CONTRIBUTING.md
pwizla Jun 1, 2022
37fcaa4
Update CONTRIBUTING.md
pwizla Jun 1, 2022
888673e
Update CONTRIBUTING.md
pwizla Jun 1, 2022
5bceef4
Update CONTRIBUTING.md
pwizla Jun 1, 2022
48bf45b
Update CONTRIBUTING.md
pwizla Jun 1, 2022
c42b470
Merge branch 'production' of github.com:strapi/documentation into pro…
pwizla Jun 1, 2022
251b4a9
Fix typo
derrickmehaffy Jun 1, 2022
c167418
Fix 404 on migration guides
pwizla Jun 1, 2022
cce4830
Merge branch 'main' of github.com:strapi/documentation
pwizla Jun 1, 2022
1be3dc3
Merge branch 'production' of github.com:strapi/documentation into pro…
pwizla Jun 1, 2022
fe7976d
Update node versions
pwizla Jun 13, 2022
90f28fc
typo in Collection by Field section (#927)
j0hnskot Jun 13, 2022
14f369b
Fix upload example for Node.js (#908)
arslan Jun 13, 2022
39e1123
Update 11ty.md with Strapi v4 (#909)
ggirou Jun 13, 2022
5c52f8c
Update Autocreate Slug with Lifecycles (#910)
derschiw Jun 13, 2022
39ea19d
Fix middleware structure
pwizla Jun 13, 2022
8ca9559
Add missing acquireConnectionTimeout config option to database (#929)
derrickmehaffy Jun 14, 2022
8eb2088
Release 4.2.0 to staging (#933)
pwizla Jun 15, 2022
52e11f6
Remove TypeScript code snippets from DigitalOcean deployment guide (#…
stb13579 Jun 15, 2022
56c31d0
Update Marketplace-v4.png (#941)
gpene Jun 15, 2022
3c59e4c
Fix upload code example
pwizla Jun 15, 2022
4058944
Fix code example in upload.md
pwizla Jun 15, 2022
bf1b036
Merge branch 'main' of github.com:strapi/documentation
pwizla Jun 15, 2022
5de63a8
Merge branch 'production' of github.com:strapi/documentation into pro…
pwizla Jun 15, 2022
539141c
Merge branch 'production'
pwizla Jun 15, 2022
ef83549
Add caution callout about dynamic zones (#949)
pwizla Jun 16, 2022
38fd351
fix typo (#943)
stb13579 Jun 16, 2022
3ce821e
Fix aws-s3 provider code snippet to avoid ACL public-read access issu…
pwizla Jun 17, 2022
dec9a46
Document how to access a plugin configuration (#955)
pwizla Jun 17, 2022
884b024
Reference Entity Service API from Server API for plugins (#956)
pwizla Jun 17, 2022
ea08f9c
Explain Entity Service vs. Query Engine + document knex access (#953)
pwizla Jun 20, 2022
e3e6ce9
add 2nd connection property for managed db connection (#948)
stb13579 Jun 20, 2022
5dfa28c
typo fix (#960)
AlexMNet Jun 20, 2022
f61f868
fix typo in page Slug System (#958)
tvqqq Jun 21, 2022
c81b678
Updated documentation to support Strapi v4 (#701)
juliangra Jun 21, 2022
fc9d93c
Mention StoryBook link in Admin Panel customization (#962)
pwizla Jun 21, 2022
97a0f11
Add FAQ entry about serverless environments (#959)
pwizla Jun 23, 2022
1416722
Contributing: Add instructions on how to run the project (#968)
gu-stav Jun 24, 2022
56e65b1
Environment: add docs for `FAST_REFRESH` (#970)
gu-stav Jun 24, 2022
f6a08f4
Remove "pending repoduction" label
pwizla Jun 27, 2022
f8e6200
Merge branch 'production'
pwizla Jun 27, 2022
2b6876d
Various REST API improvements (#761)
meganelacheny Jun 28, 2022
c5f6f72
Update for installed providers (#976)
gpene Jun 29, 2022
c9f3cab
🧐 Release 4.2.1 to staging (#972)
pwizla Jun 29, 2022
e19c997
Use a more precise link for plugin install instructions
pwizla Jun 29, 2022
bde813f
Fix numbers in procedure
pwizla Jun 29, 2022
8600289
Fix broken links
pwizla Jun 29, 2022
63edaf9
Add missing default value for defaultLimit GraphQL config.
pwizla Jun 29, 2022
ded1f9f
Bump to 4.2.2
pwizla Jun 29, 2022
6de239c
Update plugins.md
pwizla Jul 5, 2022
cc480a7
Fix "readable" spelling (#986)
Fayazexo Jul 7, 2022
1719451
Merge branch 'production'
pwizla Jul 12, 2022
524b233
Make the default populating behavior change in Strapi v4 more visible…
pwizla Jul 13, 2022
10dac5b
🧐 Release 4.2.3 to staging (#993)
pwizla Jul 13, 2022
88a6dae
Reuse callout from docs-next about migration scripts
pwizla Jul 13, 2022
486fc90
Reuse callout from docs-next about migration scripts (SQL doc)
pwizla Jul 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/.vuepress/config/sidebar-developer.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ const developer = [
['/developer-docs/latest/development/admin-customization', 'Admin panel customization'],
['/developer-docs/latest/development/plugins-extension.md', 'Plugins extension'],
['/developer-docs/latest/development/plugins-development.md', 'Plugins development'],
['/developer-docs/latest/development/providers.md', 'Providers'],
],
},
{
Expand Down Expand Up @@ -423,6 +424,7 @@ const developer = [
['/developer-docs/latest/plugins/users-permissions', 'Users & Permissions'],
['/developer-docs/latest/plugins/email', 'Email'],
['/developer-docs/latest/plugins/upload', 'Upload'],
['/developer-docs/latest/plugins/sentry', 'Sentry'],
['/developer-docs/latest/plugins/documentation', 'API Documentation'],
],
sidebarDepth: 1,
Expand Down
13 changes: 13 additions & 0 deletions docs/.vuepress/theme/global-components/PluginsLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,19 @@
</template>
</InstallLink>
</div>

<!-- Sentry -->
<div>
<InstallLink link="/developer-docs/latest/plugins/sentry.html">
<template #icon>
<svg class="css-lfbo6j e10nushx4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 66" width="30" height="28"><path d="M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z" transform="translate(11, 11)" fill="#362d59"></path></svg>
</template>
<template #title>Sentry</template>
<template #description>
Plugin to track errors in your Strapi application using Sentry
</template>
</InstallLink>
</div>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/d

The REST API allows accessing the [content-types](/developer-docs/latest/development/backend-customization/models.md) through API endpoints. Strapi automatically creates [API endpoints](#endpoints) when a content-type is created. [API parameters](/developer-docs/latest/developer-resources/database-apis-reference/rest/api-parameters.md) can be used when querying API endpoints to refine the results.

:::note
[Components](/developer-docs/latest/development/backend-customization/models.md#components) don't have API endpoints.
::: note
The REST API by default does not populate any relations, media fields, components, or dynamic zones. Use the [`populate` parameter](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md) to populate specific fields.
:::

## Endpoints

For each Content-Type, the following endpoints are automatically generated:
Expand Down Expand Up @@ -115,6 +114,10 @@ For each Content-Type, the following endpoints are automatically generated:
::::
:::::

::: note
[Components](/developer-docs/latest/development/backend-customization/models.md#components) don't have API endpoints.
:::

## Requests

Requests return a response as an object which usually includes the following keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Errors thrown by the REST API are included in the [response](/developer-docs/lat
"error": {
"status": "", // HTTP status
"name": "", // Strapi error name ('ApplicationError' or 'ValidationError')
"message": "", // A human reable error message
"message": "", // A human readable error message
"details": {
// error info specific to the error type
}
Expand Down Expand Up @@ -63,7 +63,7 @@ Errors thrown by the GraphQL API are included in the [response](/developer-docs/

The recommended way to throw errors when developing any custom logic with Strapi is to have the [controller](/developer-docs/latest/development/backend-customization/controllers.md) respond with the correct status and body.

This can be done by calling an error function on the context (i.e. `ctx`). Available error functions are listed in the [http-errors documentation](https://github.com/jshttp/http-errors#list-of-all-constructors) but their name should be camel-cased to be used by Strapi (e.g. `badRequest`).
This can be done by calling an error function on the context (i.e. `ctx`). Available error functions are listed in the [http-errors documentation](https://github.com/jshttp/http-errors#list-of-all-constructors) but their name should be lower camel-cased to be used by Strapi (e.g. `badRequest`).

Error functions accept 2 parameters that correspond to the `error.message` and `error.details` attributes [received](#receiving-errors) by a developer querying the API:

Expand Down
205 changes: 205 additions & 0 deletions docs/developer-docs/latest/development/providers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
---
title: Providers - Strapi Developer Docs
description: Install and use providers to extend the functionality of available plugins.
canonicalUrl: https://docs.strapi.io/developer-docs/latest/development/providers.html
---

# Providers

Certain [plugins](../../../user-docs/latest/plugins/introduction-to-plugins.md) can be extended via the installation and configuration of additional [providers](../../../user-docs/latest/plugins/introduction-to-plugins.md#providers).

Providers add an extension to the core capabilities of the plugin, for example to upload media files to Rackspace instead of the local server, or using Amazon SES for emails instead of Sendmail.

::: note
Only the [Upload](../plugins/upload.md) and [Email](../plugins/email.md) plugins are currently designed to work with providers.
:::

For the relevant plugins, there are both official providers maintained by Strapi — discoverable via the [Marketplace](../../../user-docs/latest/plugins/installing-plugins-via-marketplace.md) — and many community maintained providers available via [npm](https://www.npmjs.com/).

## Installing providers

New providers can be installed using `npm` or `yarn` using the following format `@strapi/provider-<plugin>-<provider> --save`.

For example:

<code-group>

<code-block title="NPM">
```sh
# Install the AWS S3 provider for the Upload plugin
npm install @strapi/provider-upload-aws-s3 --save

# Install the Sendgrid provider for the Email plugin
npm install @strapi/provider-email-sendgrid --save
```
</code-block>

<code-block title="YARN">
```sh
# Install the AWS S3 provider for the Upload plugin
yarn add @strapi/provider-upload-aws-s3

# Install the Sendgrid provider for the Email plugin
yarn add @strapi/provider-email-sendgrid --save
```
</code-block>

</code-group>

## Configuring providers

Newly installed providers are enabled and configured in the `./config/plugins.js` file. If this file does not exist you must create it.

Each provider will have different configuration settings available. Review the respective entry for that provider in the [Marketplace](../../../user-docs/latest/plugins/installing-plugins-via-marketplace.md) or [npm](https://www.npmjs.com/) to learn more.

Below are example configurations for the Upload and Email plugins.

:::: tabs card

::: tab Upload

```js
// path: ./config/plugins.js

module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: 'aws-s3', // For community providers pass the full package name (e.g. provider: 'strapi-provider-upload-google-cloud-storage')
providerOptions: {
accessKeyId: env('AWS_ACCESS_KEY_ID'),
secretAccessKey: env('AWS_ACCESS_SECRET'),
region: env('AWS_REGION'),
params: {
Bucket: env('AWS_BUCKET'),
},
},
},
},
// ...
});
```

::: note
Strapi has a default [`security` middleware](/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md#security) that has a very strict `contentSecurityPolicy` that limits loading images and media to `"'self'"` only, see the example configuration on the [provider page](https://www.npmjs.com/package/@strapi/provider-upload-aws-s3) or the [middleware documentation](/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md#security) for more information.
:::

::: tab Email

```js
// path: ./config/plugins.js

module.exports = ({ env }) => ({
// ...
email: {
config: {
provider: 'sendgrid', // For community providers pass the full package name (e.g. provider: 'strapi-provider-email-mandrill')
providerOptions: {
apiKey: env('SENDGRID_API_KEY'),
},
settings: {
defaultFrom: '[email protected]',
defaultReplyTo: '[email protected]',
testAddress: '[email protected]',
},
},
},
// ...
});
```

Keep in mind that:

* When using a different provider per environment, specify the correct configuration in `./config/env/${yourEnvironment}/plugins.js` (See [Environments](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md)).
* Only one email provider will be active at a time. If the email provider setting isn't picked up by Strapi, verify the `plugins.js` file is in the correct folder.
* When testing the new email provider with those two email templates created during strapi setup, the _shipper email_ on the template defaults to `[email protected]` and needs to be updated according to your email provider, otherwise it will fail the test (See [Configure templates locally](/user-docs/latest/settings/configuring-users-permissions-plugin-settings.md#configuring-email-templates)).

:::

::::

### Configuration per environment

When configuring your provider you might want to change the configuration based on the `NODE_ENV` environment variable or use environment specific credentials.

You can set a specific configuration in the `./config/env/{env}/plugins.js` configuration file and it will be used to overwrite the default configuration.

## Creating providers

To implement your own custom provider you must [create a Node.js module](https://docs.npmjs.com/creating-node-js-modules).

The interface that must be exported depends on the plugin you are developing the provider for. Below are templates for the Upload and Email plugins:

:::: tabs card

::: tab Upload

```js
module.exports = {
init(providerOptions) {
// init your provider if necessary

return {
upload(file) {
// upload the file in the provider
// file content is accessible by `file.buffer`
},
uploadStream(file) {
// upload the file in the provider
// file content is accessible by `file.stream`
},
delete(file) {
// delete the file in the provider
},
};
},
};
```
:::
::: tab Email

```js
module.exports = {
init: (providerOptions = {}, settings = {}) => {
return {
send: async options => {},
};
},
};
```

In the send function you will have access to:

* `providerOptions` that contains configurations written in `plugins.js`
* `settings` that contains configurations written in `plugins.js`
* `options` that contains options you send when you call the send function from the email plugin service

:::

::::

You can review the [Strapi maintained providers](https://github.com/strapi/strapi/tree/master/packages/providers) for example implementations.

After creating your new provider you can [publish it to npm](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages) to share with the community or [use it locally](#local-providers) for your project only.

### Local providers

If you want to create your own provider without publishing it on npm you can follow these steps:

1. Create a `providers` folder in your application.
2. Create your provider (e.g. `./providers/strapi-provider-<plugin>-<provider>`)
3. Then update your `package.json` to link your `strapi-provider-<plugin>-<provider>` dependency to the [local path](https://docs.npmjs.com/files/package.json#local-paths) of your new provider.

```json
{
...
"dependencies": {
...
"strapi-provider-<plugin>-<provider>": "file:providers/strapi-provider-<plugin>-<provider>",
...
}
}
```

4. Update your `./config/plugins.js` file to [configure the provider](#configuring-providers).
5. Finally, run `yarn install` or `npm install` to install your new custom provider.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ Due to these two issues, it is recommended you use a proxy application such as [

## Is X feature available yet?

You can see the [ProductBoard roadmap](https://portal.productboard.com/strapi) to see which feature requests are currently being worked on and which have not been started yet.
You can see the [Public roadmap](https://feedback.strapi.io/) to see which feature requests are currently being worked on and which have not been started yet.

<!-- TODO: This will be changed to Canny eventually, leave this note here for Derrick please -->
Loading