diff --git a/docs/3.0.0-alpha.x/assets/internationalization.gif b/docs/3.0.0-alpha.x/assets/internationalization.gif deleted file mode 100644 index d4dcd412e5..0000000000 Binary files a/docs/3.0.0-alpha.x/assets/internationalization.gif and /dev/null differ diff --git a/docs/3.0.0-alpha.x/guides/i18n.md b/docs/3.0.0-alpha.x/guides/i18n.md index 92fe15b804..cf300be9a6 100644 --- a/docs/3.0.0-alpha.x/guides/i18n.md +++ b/docs/3.0.0-alpha.x/guides/i18n.md @@ -23,6 +23,7 @@ Please refer to the [language configuration](../configurations/configurations.md Let's say we want to say `Hello John` in english and `Bonjour Tom` in french. We need to use the built-in `i18n` feature and replace the string based on the received name. **Path —** `./api/hello/config/routes.json`. + ```json { "routes": [ @@ -36,18 +37,20 @@ Let's say we want to say `Hello John` in english and `Bonjour Tom` in french. We ``` **Path —** `./api/hello/controllers/Hello.js`. + ```js module.exports = { // GET /hello/:name - sayHello: async (ctx) => { + sayHello: async ctx => { ctx.send(ctx.i18n.__('Hello %s', ctx.params.name)); - } + }, }; ``` You need to define the english and french translation for this key. **Path —** `./config/locales/en_US.json`. + ```json { "Hello %s": "Hello %s" @@ -55,6 +58,7 @@ You need to define the english and french translation for this key. ``` **Path —** `./config/locales/fr_FR.json`. + ```json { "Hello %s": "Bonjour %s" @@ -62,17 +66,3 @@ You need to define the english and french translation for this key. ``` That's all! The request `GET /hello/John?locale=en_US` will return `Hello John` and `GET /hello/Tom?locale=fr_FR` will return `Bonjour Tom`. - -## Content Internationalization - -Translating content from a language to another has been requested by many of you. As you may have seen on our website, the [Internationalization plugin](https://strapi.io/marketplace/internationalization) is not available yet because we need to go out of alpha before developing new plugins. - -But, no worries, we have a good **work around to help you internationalize your content**! - -The solution is simple: **suffix your fields**. - -For example if you are building a blog with posts, you may have a Content Type `post` with two fields: `title` and `content`. To make them available in english and french for example, simply replace them by `title_en`, `title_fr`, `content_en` and `content_fr`. - -Then, when you request your API, you will get all these fields in your response payload. If you want to select only some of them (in a specific language) we recommend you to use the [GraphQL plugin](graphql.md). - -![Content Internationalization Strapi](../assets/internationalization.gif) diff --git a/docs/3.0.0-beta.x/assets/internationalization.gif b/docs/3.0.0-beta.x/assets/internationalization.gif deleted file mode 100644 index d4dcd412e5..0000000000 Binary files a/docs/3.0.0-beta.x/assets/internationalization.gif and /dev/null differ diff --git a/docs/3.0.0-beta.x/guides/databases.md b/docs/3.0.0-beta.x/guides/databases.md index 209ec53243..5d1b47b999 100644 --- a/docs/3.0.0-beta.x/guides/databases.md +++ b/docs/3.0.0-beta.x/guides/databases.md @@ -232,40 +232,50 @@ Follow these steps to configure a local Strapi project to use a [MongoDB Atlas]( - In **Cluster Name**, name your cluster. - Click the green `Create Cluster` button. You will get a message that says, "_Your cluster is being created..._" -2. Next, click on the `Security` tab (next to `Overview`): +2. Next, click on the `Database Access` in the left menu (under `Overview`): - Click the green `+ ADD NEW USER` button: - Enter a `username`. - Enter a `password`. - Under `User Privileges` ensure **`Read and write to any database`** is selected. Then click `Add User` to save. -3. Then `whitelist` your IP address. Under `Security`, click to `IP Whitelist` +3. Then `whitelist` your IP address. Click into `Network Access`, under `Security` in the left menu: - Click the green `+ ADD IP ADDRESS` - - Next click `ALLOW ACCESS FROM ANYWHERE`. **Note:** In permanent projects you would configure this with the appropriate IP addresses. - - Click `Confirm`. Then wait until the status turns from `Pending` to `Active`. + + - Click `ADD CURRENT IP ADDRESS` or **manually** enter in an IP address to `whitelist`. + - Leave a comment to label this IP Address. E.g. `Office`. + - Then click the green `Confirm` button. + - Delete the `0.0.0.0/0` configuration after testing the connection. + + **NOTE:** If for any reason you need to test the configuration or other aspect of your connection to the database, you may want to set back the `Allow Access from Anywhere`. Follow this steps: + + - Click the green `+ ADD IP ADDRESS` + - Next add `0.0.0.0/0` in the `Whitelist Entry`. **Note:** In permanent projects you would configure this with the appropriate IP addresses. + - Leave a comment to label this IP Address. E.g. `Anywhere`. + - Click `Confirm`. Then wait until the status turns from `Pending` to `Active`. + + **OPTIONAL:** If you are serving you Strapi project from a known IP Address then follow the following steps to `allow Network Access`: + + - **Manually** enter in an IP address to `whitelist`, for your Strapi server. + - Leave a comment to label this IP Address. E.g. `Heroku Server` + - Then click the green `Confirm` button. 4. Retrieve database credentials MongoDB Atlas automatically exposes the database credentials into a single environment variable accessible by your app. To locate it, follow these steps: -- Under the `Overview` tab, click `CONNECT` and then `Connect Your Application`. -- Under `1. Choose your driver version`, select **DRIVER** as `Node.js` and **VERSION** as `2.2.12 or later`. +- Under `Atlas` in the left-hand, click on `Clusters`. This should take you to your `cluster`. Next, click `CONNECT` and then `Connect Your Application`. +- Under `1. Choose your driver version`, select **DRIVER** as `Node.js` and **VERSION** as `2.2.12 or later`. **IMPORTANT:** You **must** use `Version: 2.2.12 or later`. - This should show a **Connection String Only** similar to this: -`mongodb://paulbocuse:@strapi-heroku-shard-00-00-o777o.mongodb.net:27017,strapi-heroku-shard-00-01-o606o.mongodb.net:27017,strapi-heroku-shard-00-02-o606o.mongodb.net:27017/test?ssl=true&replicaSet=Strapi-Heroku-shard-0&authSource=admin&retryWrites=true` +`mongodb://paulbocuse:@strapi-heroku-shard-00-00-oxxxo.mongodb.net:27017,strapi-heroku-shard-00-01-oxxxo.mongodb.net:27017,strapi-heroku-shard-00-02-oxxxo.mongodb.net:27017/test?ssl=true&replicaSet=Strapi-Heroku-shard-0&authSource=admin&retryWrites=true&w=majority` -- You are interested in everything **AFTER** the **@** symbol. This is your **Database Host** variable. So in this case, +**IMPORTANT:** Please note the `` after your `username`. In this example, after `mongodb://paulbocuse:`. You will need to replace the `` with the password you created earlier for this user in your **MongoDB Atlas** account. -`strapi-heroku-shard-00-00-o777o.mongodb.net:27017,strapi-heroku-shard-00-01-o606o.mongodb.net:27017,strapi-heroku-shard-00-02-o606o.mongodb.net:27017/test?ssl=true&replicaSet=Strapi-Heroku-shard-0&authSource=admin&retryWrites=true`\_ +5. Update and replace your existing `/database.json` config file for the appropriate environment (development | production). -- You created earlier a `cluster name`, `username` and `password`. These are the other variables needed to configure your project to connect to MongoDB Atlas. - -Keep these five MongoDB Atlas database variables from your MongoDB Atlas account ready and available. - -5. Update your database config file - -Replace the contents of `database.json` with the following: +Replace the contents of `/database.json` with the following and replace **< password >** with the password of the user of your database you created earlier: `Path: ./config/environments/(development|production)/database.json`. @@ -276,12 +286,7 @@ Replace the contents of `database.json` with the following: "default": { "connector": "strapi-hook-mongoose", "settings": { - "client": "mongo", - "host": "cluster0-shard-00-00-y8imj.mongodb.net:27017,cluster0-shard-00-01-y8imj.mongodb.net:27017,cluster0-shard-00-02-y8imj.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin&retryWrites=true", - "port": 27017, - "database": "test", - "username": "john", - "password": "doe" + "uri": "mongodb://paulbocuse:@strapidatabase-shard-00-00-fxxx6c.mongodb.net:27017,strapidatabase-shard-00-01-fxxxc.mongodb.net:27017,strapidatabase-shard-00-02-fxxxc.mongodb.net:27017/test?ssl=true&replicaSet=strapidatabase-shard-0&authSource=admin&retryWrites=true&w=majority" }, "options": { "ssl": true @@ -291,4 +296,16 @@ Replace the contents of `database.json` with the following: } ``` +::: warning Note +The above configuration will create a database called `strapi`, the _default database_ Strapi sets for any **MongoDB** database. If you would like to name your database something else, add the following **key:value pair** into your **"settings":** located in your `database.json` file. + +`"database": "my-database-name"` + +::: + +::: danger Warning +We recommend replacing sensitive (eg. "URI string" above) information in your database.json files before uploading your project to a public repository such as GitHub. For more information about using environment variables, please read [dynamic configurations](/3.0.0-beta.x/configurations/configurations.html#dynamic-configurations). + +::: + You are now ready use Strapi locally or to deploy your project to an external hosting provider and use MongoDB Atlas as your database server. diff --git a/docs/3.0.0-beta.x/guides/deployment.md b/docs/3.0.0-beta.x/guides/deployment.md index 65ed54f698..5bcb9ce008 100644 --- a/docs/3.0.0-beta.x/guides/deployment.md +++ b/docs/3.0.0-beta.x/guides/deployment.md @@ -1218,7 +1218,7 @@ Init the Git repository and commit your project. cd my-project git init git add . -git commit -am "Initial Commit" +git commit -m "Initial Commit" ``` ### 6. Create a Heroku project @@ -1343,23 +1343,25 @@ npm install pg --save Please follow these steps the **deploy a Strapi app with MongoDB on Heroku**. -You must have completed the [steps to use Strapi with MongoDB Atlas in production](/3.0.0-beta.x/guides/databases.html#install-on-atlas-mongodb-atlas). +You must have completed the [steps to use Strapi with MongoDB Atlas](/3.0.0-beta.x/guides/databases.html#install-on-atlas-mongodb-atlas) - through **4. Retrieve database credentials**. ##### 1. Set environment variables -When you [set-up your MongoDB Atlas database](/3.0.0-beta.x/guides/databases.html#install-on-atlas-mongodb-atlas) you created and noted the five key/value pairs that correspond to your **MongoDB Atlas** database. These five keys are: `DATABASE_NAME`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE PORT`, and `DATABASE_HOST`. - -Strapi expects a variable for each database connection detail (host, username, etc.). So, from **MongoDB Atlas**, you have to set the environment variables in the Heroku config (for **DATABASE_HOST** you need to surround the URL with **""**, and set **DATABASE_PORT** to nothing): +When you [set-up your MongoDB Atlas database](/3.0.0-beta.x/guides/databases.html#install-on-atlas-mongodb-atlas) you noted a connection string. Similar to this: ```bash -heroku config:set DATABASE_USERNAME=paulbocuse -heroku config:set DATABASE_PASSWORD=mySecretPassword -heroku config:set DATABASE_HOST="stapi-mongo-heroku-shard-00-00-fty6c.mongodb.net:27017,strapi-mongo-heroku-shard-00-01-fty6c.mongodb.net:27017,strapi-mongo-heroku-shard-00-02-fty6c.mongodb.net:27017/test?ssl=true&replicaSet=strapi-mongo-heroku-shard-0&authSource=admin&retryWrites=true" -heroku config:set DATABASE_PORT= -heroku config:set DATABASE_NAME=strapi-mongo-heroku +mongodb://paulbocuse:@strapidatabase-shard-00-00-fxxx6c.mongodb.net:27017,strapidatabase-shard-00-01-fxxxc.mongodb.net:27017,strapidatabase-shard-00-02-fxxxc.mongodb.net:27017/test?ssl=true&replicaSet=strapidatabase-shard-0&authSource=admin&retryWrites=true&w=majority + ``` -**Note:** Please replace these above values with your actual values. +So, from **MongoDB Atlas**, you have to set two environment variables in the Heroku config (for **DATABASE_URI** and **DATABASE_NAME**). Set the environment variables using the following commands: + +```bash +heroku config:set DATABASE_URI="mongodb://paulbocuse:@strapidatabase-shard-00-00-fxxx6c.mongodb.net:27017,strapidatabase-shard-00-01-fxxxc.mongodb.net:27017,strapidatabase-shard-00-02-fxxxc.mongodb.net:27017/test?ssl=true&replicaSet=strapidatabase-shard-0&authSource=admin&retryWrites=true&w=majority" +heroku config:set DATABASE_NAME="my-database-name" +``` + +**Note:** Please replace the `` and `my-database-name` values with the your actual values. ##### 2. Update your database config file @@ -1374,12 +1376,8 @@ Replace the contents of `database.json` with the following: "default": { "connector": "strapi-hook-mongoose", "settings": { - "client": "mongo", - "host": "${process.env.DATABASE_HOST}", - "port": "${process.env.DATABASE_PORT}", - "database": "${process.env.DATABASE_NAME}", - "username": "${process.env.DATABASE_USERNAME}", - "password": "${process.env.DATABASE_PASSWORD}" + "uri": "${process.env.DATABASE_URI}", + "database": "${process.env.DATABASE_NAME}" }, "options": { "ssl": true @@ -1396,7 +1394,8 @@ Replace the contents of `database.json` with the following: `Path: ./my-project/` ```bash -git commit -am "Update database config" +git add . +git commit -m "Update database config" ``` ### 9. Deploy diff --git a/docs/3.0.0-beta.x/guides/i18n.md b/docs/3.0.0-beta.x/guides/i18n.md index 92fe15b804..2797a79a40 100644 --- a/docs/3.0.0-beta.x/guides/i18n.md +++ b/docs/3.0.0-beta.x/guides/i18n.md @@ -23,6 +23,7 @@ Please refer to the [language configuration](../configurations/configurations.md Let's say we want to say `Hello John` in english and `Bonjour Tom` in french. We need to use the built-in `i18n` feature and replace the string based on the received name. **Path —** `./api/hello/config/routes.json`. + ```json { "routes": [ @@ -36,18 +37,20 @@ Let's say we want to say `Hello John` in english and `Bonjour Tom` in french. We ``` **Path —** `./api/hello/controllers/Hello.js`. + ```js module.exports = { // GET /hello/:name - sayHello: async (ctx) => { + sayHello: async ctx => { ctx.send(ctx.i18n.__('Hello %s', ctx.params.name)); - } + }, }; ``` You need to define the english and french translation for this key. **Path —** `./config/locales/en_US.json`. + ```json { "Hello %s": "Hello %s" @@ -55,24 +58,11 @@ You need to define the english and french translation for this key. ``` **Path —** `./config/locales/fr_FR.json`. + ```json { "Hello %s": "Bonjour %s" } ``` -That's all! The request `GET /hello/John?locale=en_US` will return `Hello John` and `GET /hello/Tom?locale=fr_FR` will return `Bonjour Tom`. - -## Content Internationalization - -Translating content from a language to another has been requested by many of you. As you may have seen on our website, the [Internationalization plugin](https://strapi.io/marketplace/internationalization) is not available yet because we need to go out of alpha before developing new plugins. - -But, no worries, we have a good **work around to help you internationalize your content**! - -The solution is simple: **suffix your fields**. - -For example if you are building a blog with posts, you may have a Content Type `post` with two fields: `title` and `content`. To make them available in english and french for example, simply replace them by `title_en`, `title_fr`, `content_en` and `content_fr`. - -Then, when you request your API, you will get all these fields in your response payload. If you want to select only some of them (in a specific language) we recommend you to use the [GraphQL plugin](graphql.md). - -![Content Internationalization Strapi](../assets/internationalization.gif) +That's all! The request `GET /hello/John?locale=en_US` will return `Hello John` and `GET /hello/Tom?locale=fr_FR` will return `Bonjour Tom` diff --git a/examples/getstarted/package.json b/examples/getstarted/package.json index 30b1767239..f8ff03297c 100644 --- a/examples/getstarted/package.json +++ b/examples/getstarted/package.json @@ -1,7 +1,7 @@ { "name": "getstarted", "private": true, - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "A Strapi application.", "scripts": { "develop": "strapi develop", @@ -15,23 +15,23 @@ "mysql": "^2.17.1", "pg": "^7.10.0", "sqlite3": "^4.0.6", - "strapi": "3.0.0-beta.13", - "strapi-admin": "3.0.0-beta.13", - "strapi-hook-bookshelf": "3.0.0-beta.13", - "strapi-hook-knex": "3.0.0-beta.13", - "strapi-hook-mongoose": "3.0.0-beta.13", - "strapi-middleware-views": "3.0.0-beta.13", - "strapi-plugin-content-manager": "3.0.0-beta.13", - "strapi-plugin-content-type-builder": "3.0.0-beta.13", - "strapi-plugin-documentation": "3.0.0-beta.13", - "strapi-plugin-email": "3.0.0-beta.13", - "strapi-plugin-graphql": "3.0.0-beta.13", - "strapi-plugin-settings-manager": "3.0.0-beta.13", - "strapi-plugin-upload": "3.0.0-beta.13", - "strapi-plugin-users-permissions": "3.0.0-beta.13", - "strapi-provider-email-mailgun": "3.0.0-beta.13", - "strapi-provider-upload-aws-s3": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13" + "strapi": "3.0.0-beta.14", + "strapi-admin": "3.0.0-beta.14", + "strapi-hook-bookshelf": "3.0.0-beta.14", + "strapi-hook-knex": "3.0.0-beta.14", + "strapi-hook-mongoose": "3.0.0-beta.14", + "strapi-middleware-views": "3.0.0-beta.14", + "strapi-plugin-content-manager": "3.0.0-beta.14", + "strapi-plugin-content-type-builder": "3.0.0-beta.14", + "strapi-plugin-documentation": "3.0.0-beta.14", + "strapi-plugin-email": "3.0.0-beta.14", + "strapi-plugin-graphql": "3.0.0-beta.14", + "strapi-plugin-settings-manager": "3.0.0-beta.14", + "strapi-plugin-upload": "3.0.0-beta.14", + "strapi-plugin-users-permissions": "3.0.0-beta.14", + "strapi-provider-email-mailgun": "3.0.0-beta.14", + "strapi-provider-upload-aws-s3": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14" }, "strapi": { "uuid": "getstarted" diff --git a/lerna.json b/lerna.json index b24a5e4530..02667e0d9c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "packages": [ "packages/*", "examples/*" diff --git a/packages/create-strapi-app/package.json b/packages/create-strapi-app/package.json index a974194cb8..da13682bfe 100644 --- a/packages/create-strapi-app/package.json +++ b/packages/create-strapi-app/package.json @@ -1,6 +1,6 @@ { "name": "create-strapi-app", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a new Strapi application.", "license": "MIT", "homepage": "http://strapi.io", @@ -21,7 +21,7 @@ ], "dependencies": { "commander": "^2.20.0", - "strapi-generate-new": "3.0.0-beta.13" + "strapi-generate-new": "3.0.0-beta.14" }, "scripts": { "test": "echo \"no tests yet\"" diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index 9063c89a28..c7a4d172bd 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Strapi Admin", "repository": { "type": "git", @@ -74,8 +74,8 @@ "sanitize.css": "^4.1.0", "sass-loader": "^7.1.0", "shelljs": "^0.7.8", - "strapi-helper-plugin": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13", + "strapi-helper-plugin": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14", "style-loader": "^0.23.1", "styled-components": "^4.2.0", "terser-webpack-plugin": "^1.2.3", diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 4251123357..2a5042a9fd 100644 --- a/packages/strapi-generate-api/package.json +++ b/packages/strapi-generate-api/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-api", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate an API for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-controller/package.json b/packages/strapi-generate-controller/package.json index 116e5dac7d..88460ef270 100644 --- a/packages/strapi-generate-controller/package.json +++ b/packages/strapi-generate-controller/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-controller", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a controller for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-model/package.json b/packages/strapi-generate-model/package.json index 432702185d..135b99910a 100644 --- a/packages/strapi-generate-model/package.json +++ b/packages/strapi-generate-model/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-model", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a model for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index b9fc1f40f3..c3c121c20d 100644 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-new", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a new Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index fc0572823f..8aea46dbfa 100644 --- a/packages/strapi-generate-plugin/package.json +++ b/packages/strapi-generate-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-plugin", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate an plugin for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-policy/package.json b/packages/strapi-generate-policy/package.json index 2410be531e..b9fe8806f1 100644 --- a/packages/strapi-generate-policy/package.json +++ b/packages/strapi-generate-policy/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-policy", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a policy for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate-service/package.json b/packages/strapi-generate-service/package.json index 894aea4913..e392d1e04a 100644 --- a/packages/strapi-generate-service/package.json +++ b/packages/strapi-generate-service/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-service", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Generate a service for a Strapi API.", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index e45670fee4..e494c5a2a0 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Master of ceremonies for the Strapi generators.", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "fs-extra": "^8.0.1", "lodash": "^4.17.11", "reportback": "^2.0.2", - "strapi-utils": "3.0.0-beta.13" + "strapi-utils": "3.0.0-beta.14" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index f547cdb758..f65417fb89 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-helper-plugin", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Helper for Strapi plugins development", "files": [ "dist" diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 962f1ea047..4f2f07b264 100644 --- a/packages/strapi-hook-bookshelf/package.json +++ b/packages/strapi-hook-bookshelf/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-bookshelf", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.11", "pluralize": "^7.0.0", "rimraf": "^2.6.3", - "strapi-hook-knex": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13" + "strapi-hook-knex": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14" }, "strapi": { "dependencies": [ diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index da054850f7..087abd667f 100644 --- a/packages/strapi-hook-ejs/package.json +++ b/packages/strapi-hook-ejs/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-ejs", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "EJS hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-knex/package.json b/packages/strapi-hook-knex/package.json index b3fef13e72..4a34c4fd92 100644 --- a/packages/strapi-hook-knex/package.json +++ b/packages/strapi-hook-knex/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-knex", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Knex hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-hook-mongoose/package.json b/packages/strapi-hook-mongoose/package.json index ea80cda322..041abb7298 100644 --- a/packages/strapi-hook-mongoose/package.json +++ b/packages/strapi-hook-mongoose/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-mongoose", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "mongoose": "^5.5.9", "mongoose-float": "^1.0.4", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-beta.13" + "strapi-utils": "3.0.0-beta.14" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index c4995c5ae1..5875478f93 100644 --- a/packages/strapi-hook-redis/package.json +++ b/packages/strapi-hook-redis/package.json @@ -1,6 +1,6 @@ { "name": "strapi-hook-redis", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.11", "rimraf": "^2.6.3", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-beta.13" + "strapi-utils": "3.0.0-beta.14" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 490a40864c..afa06a4d31 100644 --- a/packages/strapi-middleware-views/package.json +++ b/packages/strapi-middleware-views/package.json @@ -1,6 +1,6 @@ { "name": "strapi-middleware-views", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Views middleware to enable server-side rendering for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index ac67a88f7c..1042d575fc 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-content-manager", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "A powerful UI to easily manage your data.", "strapi": { "name": "Content Manager", @@ -32,8 +32,8 @@ "redux-immutable": "^4.0.0", "reselect": "^3.0.1", "showdown": "^1.9.0", - "strapi-helper-plugin": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13", + "strapi-helper-plugin": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14", "styled-components": "^4.2.0", "yup": "^0.27.0" }, diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 16f1569625..960dbb75b4 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-content-type-builder", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Strapi plugin to create content type (API).", "strapi": { "name": "Content Type Builder", @@ -29,9 +29,9 @@ "redux": "^4.0.1", "redux-immutable": "^4.0.0", "reselect": "^3.0.1", - "strapi-generate": "3.0.0-beta.13", - "strapi-generate-api": "3.0.0-beta.13", - "strapi-helper-plugin": "3.0.0-beta.13", + "strapi-generate": "3.0.0-beta.14", + "strapi-generate-api": "3.0.0-beta.14", + "strapi-helper-plugin": "3.0.0-beta.14", "yup": "^0.27.0" }, "author": { diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index 92e07158d1..aee6ba0362 100755 --- a/packages/strapi-plugin-documentation/package.json +++ b/packages/strapi-plugin-documentation/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-documentation", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "This is the description of the plugin.", "strapi": { "name": "Documentation", @@ -33,7 +33,7 @@ "redux": "^4.0.1", "redux-immutable": "^4.0.0", "reselect": "^4.0.0", - "strapi-helper-plugin": "3.0.0-beta.13", + "strapi-helper-plugin": "3.0.0-beta.14", "swagger-ui-dist": "3.22.1" }, "author": { diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index bf6f8392e4..f0141b191c 100644 --- a/packages/strapi-plugin-email/package.json +++ b/packages/strapi-plugin-email/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-email", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -12,13 +12,13 @@ "test": "echo \"no tests yet\"" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13" + "strapi-provider-email-sendmail": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", "rimraf": "^2.6.3", - "strapi-helper-plugin": "3.0.0-beta.13" + "strapi-helper-plugin": "3.0.0-beta.14" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 92fadcf920..7a3dd2b051 100644 --- a/packages/strapi-plugin-graphql/package.json +++ b/packages/strapi-plugin-graphql/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-graphql", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -23,7 +23,7 @@ "graphql-type-long": "^0.1.1", "koa-compose": "^4.0.0", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-beta.13" + "strapi-utils": "3.0.0-beta.14" }, "devDependencies": { "cross-env": "^5.2.0", diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 008d14e5ae..038656c240 100644 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-settings-manager", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Strapi plugin to manage settings.", "strapi": { "name": "Settings Manager", @@ -27,7 +27,7 @@ "redux": "^4.0.1", "reselect": "^3.0.1", "shelljs": "^0.7.8", - "strapi-helper-plugin": "3.0.0-beta.13" + "strapi-helper-plugin": "3.0.0-beta.14" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 4b7f1d43a9..ad61dbf092 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-upload", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "This is the description of the plugin.", "strapi": { "name": "Files Upload", @@ -23,9 +23,9 @@ "react-router-dom": "^5.0.0", "react-transition-group": "^2.5.0", "reactstrap": "^5.0.0", - "strapi-helper-plugin": "3.0.0-beta.13", - "strapi-provider-upload-local": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13", + "strapi-helper-plugin": "3.0.0-beta.14", + "strapi-provider-upload-local": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql b/packages/strapi-plugin-users-permissions/config/schema.graphql index 0144712c28..6bebd3d457 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql @@ -6,7 +6,7 @@ module.exports = { }, definition: ` type UsersPermissionsMe { - _id: ID! + id: ID! username: String! email: String! confirmed: Boolean @@ -15,7 +15,7 @@ module.exports = { } type UsersPermissionsMeRole { - _id: ID! + id: ID! name: String! description: String type: String @@ -25,6 +25,11 @@ module.exports = { me: UsersPermissionsMe `, resolver: { + UsersPermissionsMe: { + id(obj) { + return obj.id || obj._id; + }, + }, Query: { me: { resolverOf: 'User.me', diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index bf59fd620c..be8634bb2f 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-users-permissions", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Protect your API with a full-authentication process based on JWT", "strapi": { "name": "Roles & Permissions", @@ -31,8 +31,8 @@ "reactstrap": "^5.0.0", "redux-saga": "^0.16.0", "request": "^2.83.0", - "strapi-helper-plugin": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13", + "strapi-helper-plugin": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14", "uuid": "^3.1.0" }, "devDependencies": { diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index 8b94f0d95d..50a2d445ac 100644 --- a/packages/strapi-provider-email-amazon-ses/package.json +++ b/packages/strapi-provider-email-amazon-ses/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-amazon-ses", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Amazon SES provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-mailgun/package.json b/packages/strapi-provider-email-mailgun/package.json index f1ec69c977..00faeb26cf 100644 --- a/packages/strapi-provider-email-mailgun/package.json +++ b/packages/strapi-provider-email-mailgun/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-mailgun", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Mailgun provider for strapi email plugin", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendgrid/package.json b/packages/strapi-provider-email-sendgrid/package.json index 3c73008507..85c83d84d4 100644 --- a/packages/strapi-provider-email-sendgrid/package.json +++ b/packages/strapi-provider-email-sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendgrid", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Sendgrid provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-email-sendmail/package.json b/packages/strapi-provider-email-sendmail/package.json index 1995e8330f..c17612178d 100644 --- a/packages/strapi-provider-email-sendmail/package.json +++ b/packages/strapi-provider-email-sendmail/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-email-sendmail", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Sendmail provider for strapi email", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-aws-s3/package.json b/packages/strapi-provider-upload-aws-s3/package.json index ee8b69102c..dafab78c2e 100644 --- a/packages/strapi-provider-upload-aws-s3/package.json +++ b/packages/strapi-provider-upload-aws-s3/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-aws-s3", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "AWS S3 provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-cloudinary/package.json b/packages/strapi-provider-upload-cloudinary/package.json index 44898ecad9..32871983b8 100644 --- a/packages/strapi-provider-upload-cloudinary/package.json +++ b/packages/strapi-provider-upload-cloudinary/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-cloudinary", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Cloudinary provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-local/package.json b/packages/strapi-provider-upload-local/package.json index bb1ccb748c..8d2e1a2ecf 100644 --- a/packages/strapi-provider-upload-local/package.json +++ b/packages/strapi-provider-upload-local/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-local", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Local provider for strapi upload", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi-provider-upload-rackspace/package.json b/packages/strapi-provider-upload-rackspace/package.json index 3eb9f92573..dd5c1e74da 100644 --- a/packages/strapi-provider-upload-rackspace/package.json +++ b/packages/strapi-provider-upload-rackspace/package.json @@ -1,6 +1,6 @@ { "name": "strapi-provider-upload-rackspace", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Rackspace provider for strapi upload", "main": "./lib", "keywords": [], diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index f8c3d7019a..49ffe0e0a3 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "Shared utilities for the Strapi packages", "homepage": "http://strapi.io", "keywords": [ diff --git a/packages/strapi/package.json b/packages/strapi/package.json index d5d6b07a97..294b304001 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "name": "strapi", - "version": "3.0.0-beta.13", + "version": "3.0.0-beta.14", "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite", "homepage": "http://strapi.io", "directories": { @@ -47,15 +47,15 @@ "resolve-cwd": "^3.0.0", "rimraf": "^2.6.2", "shelljs": "^0.8.3", - "strapi-generate": "3.0.0-beta.13", - "strapi-generate-api": "3.0.0-beta.13", - "strapi-generate-controller": "3.0.0-beta.13", - "strapi-generate-model": "3.0.0-beta.13", - "strapi-generate-new": "3.0.0-beta.13", - "strapi-generate-plugin": "3.0.0-beta.13", - "strapi-generate-policy": "3.0.0-beta.13", - "strapi-generate-service": "3.0.0-beta.13", - "strapi-utils": "3.0.0-beta.13" + "strapi-generate": "3.0.0-beta.14", + "strapi-generate-api": "3.0.0-beta.14", + "strapi-generate-controller": "3.0.0-beta.14", + "strapi-generate-model": "3.0.0-beta.14", + "strapi-generate-new": "3.0.0-beta.14", + "strapi-generate-plugin": "3.0.0-beta.14", + "strapi-generate-policy": "3.0.0-beta.14", + "strapi-generate-service": "3.0.0-beta.14", + "strapi-utils": "3.0.0-beta.14" }, "scripts": { "test": "jest --verbose",