From 7ea6950968b734d2df5292a1fe6e64b90ab5e95e Mon Sep 17 00:00:00 2001 From: Nick Verwymeren Date: Mon, 17 Dec 2018 15:47:59 -0600 Subject: [PATCH 01/21] added noted for fish shell users Trying to carry out the steps here in fish shell will result in the symlinks being incorrectly interpreted by Strapi at run time. Added a message here to make sure fish shell users don't spend a bunch of time trying to debug their setup (as I did). --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0fbdca6cce..7b1dda35ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,6 +32,8 @@ If you send a pull request, please do it against the `master` branch. We are dev ## Setup Development Environment To facilitate the contribution, we drastically reduce the amount of commands necessary to install the entire development environment. First of all, you need to check if you're using the [required versions of Node.js and npm](https://strapi.io/documentation/3.x.x/getting-started/installation.html#requirements) +**Note: Fish shell users** - due to the way fish shell deals with symlinks, the following steps will not work. + Then, please follow the instructions below: #### 1. ▪️ Fork the repository From 12a15f4d9f8b988da819cdf970a7e5cffac7a638 Mon Sep 17 00:00:00 2001 From: Amin Zibayi <43344360+AminZibayi@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:03:54 +0330 Subject: [PATCH 02/21] Update quick start documentation --- docs/3.x.x/getting-started/quick-start.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/3.x.x/getting-started/quick-start.md b/docs/3.x.x/getting-started/quick-start.md index e475365988..eaf8df903f 100644 --- a/docs/3.x.x/getting-started/quick-start.md +++ b/docs/3.x.x/getting-started/quick-start.md @@ -39,6 +39,10 @@ The CLI will ask you to choose your database: select MongoDB, Postgres or MySQL. This action creates a new folder named `my-project` with the entire [files structure](../concepts/concepts.md#files-structure) of a Strapi application. +::: note +Unfortunately, There is an issue on windows, you will probably be stuck and unable to enter your `Database name` to continue; using a VM is one of the solutions; see [the issue](https://github.com/strapi/strapi/issues/1281). +::: + **#3 — Go to your project and launch the server:** In your terminal run the following commands: From ec7c2f9d785b8ef2d279c1da5a7f2019ca1cbeb2 Mon Sep 17 00:00:00 2001 From: Amin Zibayi <43344360+AminZibayi@users.noreply.github.com> Date: Sat, 22 Dec 2018 15:21:22 +0330 Subject: [PATCH 03/21] Improve text quality --- docs/3.x.x/getting-started/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/getting-started/quick-start.md b/docs/3.x.x/getting-started/quick-start.md index eaf8df903f..021ccd9e1b 100644 --- a/docs/3.x.x/getting-started/quick-start.md +++ b/docs/3.x.x/getting-started/quick-start.md @@ -40,7 +40,7 @@ The CLI will ask you to choose your database: select MongoDB, Postgres or MySQL. This action creates a new folder named `my-project` with the entire [files structure](../concepts/concepts.md#files-structure) of a Strapi application. ::: note -Unfortunately, There is an issue on windows, you will probably be stuck and unable to enter your `Database name` to continue; using a VM is one of the solutions; see [the issue](https://github.com/strapi/strapi/issues/1281). +Unfortunately, there is an issue on Windows, you will probably be stuck and unable to enter your `Database name` to continue. Using a VM is one of the solutions. See [the issue](https://github.com/strapi/strapi/issues/1281). ::: **#3 — Go to your project and launch the server:** From cf713b2c58f6fc7b07a390a9e81896b9e7103c8b Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Mon, 24 Dec 2018 15:39:51 +0530 Subject: [PATCH 04/21] Add force option when database not empty with bookshelf --- docs/3.x.x/cli/CLI.md | 5 ++-- .../lib/utils/connectivity.js | 30 +++++++++++-------- packages/strapi/bin/strapi-new.js | 5 +++- packages/strapi/bin/strapi.js | 1 + 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docs/3.x.x/cli/CLI.md b/docs/3.x.x/cli/CLI.md index 5ed7c01e84..d62931465d 100644 --- a/docs/3.x.x/cli/CLI.md +++ b/docs/3.x.x/cli/CLI.md @@ -10,7 +10,7 @@ Create a new project ```bash strapi new -options: [--dev|--dbclient= --dbhost= --dbport= --dbname= --dbusername= --dbpassword= --dbssl= --dbauth=] +options: [--dev|--dbclient= --dbhost= --dbport= --dbname= --dbusername= --dbpassword= --dbssl= --dbauth= --dbforce] ``` - **strapi new <name>**
@@ -19,10 +19,11 @@ options: [--dev|--dbclient= --dbhost= --dbport= --dbna - **strapi new <name> --dev**
Generates a new project called **<name>** and creates symlinks for the `./admin` folder and each plugin inside the `./plugin` folder. It means that the Strapi's development workflow has been set up on the machine earlier. -- **strapi new <name> --dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbname=<dbname> --dbusername=<dbusername> --dbpassword=<dbpassword> --dbssl=<dbssl> --dbauth=<dbauth>**
+- **strapi new <name> --dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbname=<dbname> --dbusername=<dbusername> --dbpassword=<dbpassword> --dbssl=<dbssl> --dbauth=<dbauth> --dbforce**
Generates a new project called **<name>** and skip the interactive database configuration and initilize with these options. - **<dbclient>** can be `mongo`, `postgres`, `mysql`. - **<dbssl>** and **<dbauth>** are available only for `mongo` and are optional. + - **--dbforce** is only available for `postgres`, `mysql`, and is optional. See the [CONTRIBUTING guide](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md) for more details. diff --git a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js index 34671904b7..c6ecda3b39 100644 --- a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js +++ b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js @@ -27,20 +27,24 @@ module.exports = (scope, success, error) => { }; if (tables.rows && tables.rows.length !== 0) { - console.log('🤔 It seems that your database is not empty. Be aware that Strapi is going to automatically creates tables & columns, and might update columns which can corrupt data or cause data loss.'); + if (scope.database.options.force) { + next(); + } else { + console.log('🤔 It seems that your database is not empty. Be aware that Strapi is going to automatically creates tables & columns, and might update columns which can corrupt data or cause data loss.'); - inquirer.prompt([{ - type: 'confirm', - name: 'confirm', - message: `Are you sure you want to continue with the ${scope.database.settings.database} database:`, - }]) - .then(({ confirm }) => { - if (confirm) { - next(); - } else { - error(); - } - }); + inquirer.prompt([{ + type: 'confirm', + name: 'confirm', + message: `Are you sure you want to continue with the ${scope.database.settings.database} database:`, + }]) + .then(({ confirm }) => { + if (confirm) { + next(); + } else { + error(); + } + }); + } } else { next(); } diff --git a/packages/strapi/bin/strapi-new.js b/packages/strapi/bin/strapi-new.js index 6c475c28f7..ecdd9d167a 100644 --- a/packages/strapi/bin/strapi-new.js +++ b/packages/strapi/bin/strapi-new.js @@ -54,6 +54,8 @@ module.exports = function (name, cliArguments) { return process.exit(1); } + const dbforce = cliArguments.dbforce !== undefined; + scope.database = { settings: { client: cliArguments.dbclient, @@ -65,7 +67,8 @@ module.exports = function (name, cliArguments) { }, options: { authenticationDatabase: cliArguments.dbauth, - ssl: cliArguments.dbssl + ssl: cliArguments.dbssl, + force: dbforce } }; } diff --git a/packages/strapi/bin/strapi.js b/packages/strapi/bin/strapi.js index 453a7705eb..38c6d807bc 100755 --- a/packages/strapi/bin/strapi.js +++ b/packages/strapi/bin/strapi.js @@ -61,6 +61,7 @@ program .option('--dbpassword ', 'Database password') .option('--dbssl ', 'Database SSL') .option('--dbauth ', 'Authentication Database') + .option('--dbforce', 'Overwrite database content if any') .description('create a new application') .action(require('./strapi-new')); From 230a8af1f7fd440ac94e6aa0aa7a95601322a915 Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Wed, 26 Dec 2018 13:50:53 +0530 Subject: [PATCH 05/21] Force attribute not required in database object. --- packages/strapi-hook-bookshelf/lib/utils/connectivity.js | 2 +- packages/strapi/bin/strapi-new.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js index c6ecda3b39..32734c2bb5 100644 --- a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js +++ b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js @@ -27,7 +27,7 @@ module.exports = (scope, success, error) => { }; if (tables.rows && tables.rows.length !== 0) { - if (scope.database.options.force) { + if (scope.dbforce) { next(); } else { console.log('🤔 It seems that your database is not empty. Be aware that Strapi is going to automatically creates tables & columns, and might update columns which can corrupt data or cause data loss.'); diff --git a/packages/strapi/bin/strapi-new.js b/packages/strapi/bin/strapi-new.js index ecdd9d167a..38b9e2fad9 100644 --- a/packages/strapi/bin/strapi-new.js +++ b/packages/strapi/bin/strapi-new.js @@ -54,7 +54,7 @@ module.exports = function (name, cliArguments) { return process.exit(1); } - const dbforce = cliArguments.dbforce !== undefined; + scope.dbforce = cliArguments.dbforce !== undefined; scope.database = { settings: { @@ -67,8 +67,7 @@ module.exports = function (name, cliArguments) { }, options: { authenticationDatabase: cliArguments.dbauth, - ssl: cliArguments.dbssl, - force: dbforce + ssl: cliArguments.dbssl } }; } From 24db8ef8684fd274493f3836e3a28809d1e54890 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 26 Dec 2018 12:30:52 +0100 Subject: [PATCH 06/21] Add JS query example in relation documentation --- docs/3.x.x/guides/models.md | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index c286de9bc6..0a0e57f177 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -148,6 +148,17 @@ module.exports = { } ``` +**Example** +```js +// Create a pet +var xhr = new XMLHttpRequest(); +xhr.open("POST", "/pets", true); +xhr.setRequestHeader('Content-Type', 'application/json'); +xhr.send(JSON.stringify({ + owner: '5c151d9d5b1d55194d3209be' // The id of the user you want to link +})); +``` + ### One-to-one Refer to the [one-to-one concept](../concepts/concepts.md#one-to-one) for informations. @@ -211,6 +222,17 @@ module.exports = { } ``` +**Example** +```js +// Create an address +var xhr = new XMLHttpRequest(); +xhr.open("POST", "/addresses", true); +xhr.setRequestHeader('Content-Type', 'application/json'); +xhr.send(JSON.stringify({ + user: '5c151d9d5b1d55194d3209be' // The id of the user you want to link +})); +``` + ### One-to-many Refer to the [one-to-many concept](../concepts/concepts.md#one-to-many) for more informations. @@ -274,6 +296,25 @@ module.exports = { } ``` +**Examples** +```js +// Create an article +var xhr = new XMLHttpRequest(); +xhr.open("POST", "/articles", true); +xhr.setRequestHeader('Content-Type', 'application/json'); +xhr.send(JSON.stringify({ + author: '5c151d9d5b1d55194d3209be' // The id of the user you want to link +})); + +// Update an article +var xhr = new XMLHttpRequest(); +xhr.open("PUT", "/users/5c151d9d5b1d55194d3209be", true); +xhr.setRequestHeader('Content-Type', 'application/json'); +xhr.send(JSON.stringify({ + articles: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL articles linked to the user (existing articles + new article or - removed article) +})); +``` + ### Many-to-many Refer to the [many-to-many concept](../concepts/concepts.md#many-to-many). @@ -343,6 +384,17 @@ module.exports = { } ``` +**Example** +```js +// Update a product +var xhr = new XMLHttpRequest(); +xhr.open("PUT", "/products/5c151d9d5b1d55194d3209be", true); +xhr.setRequestHeader('Content-Type', 'application/json'); +xhr.send(JSON.stringify({ + categories: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL categories linked to the product (existing categories + new category or - removed category) +})); +``` + ### Polymorphic The polymorphic relationships are the solution when you don't know which kind of model will be associated to your entry. A common use case is an `Image` model that can be associated to many others kind of models (Article, Product, User, etc). From f123639edfdb62666f91615739b16d701870d87f Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 26 Dec 2018 14:36:49 +0100 Subject: [PATCH 07/21] Update middleware documentation enable --- docs/3.x.x/advanced/middlewares.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/3.x.x/advanced/middlewares.md b/docs/3.x.x/advanced/middlewares.md index 740d5eb326..8e5f4febb8 100644 --- a/docs/3.x.x/advanced/middlewares.md +++ b/docs/3.x.x/advanced/middlewares.md @@ -7,11 +7,8 @@ Enable the middleware in environments settings **Path —** `config/environments/middleware.json`. ```json { - "ejs": { - "enabled": true, - "viewExt": "ejs", - "debug": false, - "cache": false + "responseTime": { + "enabled": true }, } ``` From afe6d60c01dea6768b1b463b90e843c44102563e Mon Sep 17 00:00:00 2001 From: Amin Zibayi <43344360+AminZibayi@users.noreply.github.com> Date: Wed, 26 Dec 2018 18:54:03 +0330 Subject: [PATCH 08/21] Fix a typo in concepts documentation --- docs/3.x.x/concepts/concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/concepts/concepts.md b/docs/3.x.x/concepts/concepts.md index 52e35efa57..0d4b1bc91f 100644 --- a/docs/3.x.x/concepts/concepts.md +++ b/docs/3.x.x/concepts/concepts.md @@ -106,7 +106,7 @@ Please refer to the [filters' guide](../guides/filters.md) for more informations ## Models -Models are a representation of the database's structure and lifecyle. They are split into two separate files. A JavaScript file that contains the lifecycle callbacks, and a JSON one that represents the data stored in the database and their format. The models also allow you to define the relationships between them. +Models are a representation of the database's structure and lifecycle. They are split into two separate files. A JavaScript file that contains the lifecycle callbacks, and a JSON one that represents the data stored in the database and their format. The models also allow you to define the relationships between them. **Path —** `./api/user/models/User.js`. ```js From 080fd1721bd928d605e076aecfdb1fe14ac8c469 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 28 Dec 2018 14:59:45 +0100 Subject: [PATCH 09/21] In dev mode use local connectivity script --- packages/strapi-generate-new/lib/before.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index bc69e93e2e..fff1a83e98 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -226,6 +226,7 @@ module.exports = (scope, cb) => { } let cmd = `${packageCmd} ${scope.client.connector}@${scope.strapiPackageJSON.version}`; + let linkNodeModulesCommand = `cd ${scope.tmpPath} && npm link ${scope.client.connector}`; if (scope.client.module) { cmd += ` ${scope.client.module}`; @@ -233,6 +234,7 @@ module.exports = (scope, cb) => { if (scope.client.connector === 'strapi-hook-bookshelf') { cmd += ` strapi-hook-knex@${scope.strapiPackageJSON.version}`; + linkNodeModulesCommand += ` && npm link strapi-hook-knex`; scope.additionalsDependencies = ['strapi-hook-knex', 'knex']; } @@ -248,7 +250,13 @@ module.exports = (scope, cb) => { } } - resolve(); + if (scope.developerMode) { + exec(linkNodeModulesCommand, () => { + resolve(); + }); + } else { + resolve(); + } }); }) ]; From 6de05cbdad99a72c5922c6e68ce698519863cb68 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 28 Dec 2018 16:51:02 +0100 Subject: [PATCH 10/21] Add debug option on strapi new --- packages/strapi-generate-new/lib/before.js | 2 +- .../lib/utils/connectivity.js | 26 ++++++++++++++++--- .../lib/utils/connectivity.js | 8 +++++- packages/strapi/bin/strapi-new.js | 3 ++- packages/strapi/bin/strapi.js | 1 + 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/packages/strapi-generate-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index fff1a83e98..3bdce44d98 100644 --- a/packages/strapi-generate-new/lib/before.js +++ b/packages/strapi-generate-new/lib/before.js @@ -266,8 +266,8 @@ module.exports = (scope, cb) => { try { require(path.join(`${scope.tmpPath}`, '/node_modules/', `${scope.client.connector}/lib/utils/connectivity.js`))(scope, cb.success, connectionValidation); } catch(err) { - shell.rm('-r', scope.tmpPath); console.log(err); + shell.rm('-r', scope.tmpPath); cb.error(); } }); diff --git a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js index 34671904b7..187492aa61 100644 --- a/packages/strapi-hook-bookshelf/lib/utils/connectivity.js +++ b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js @@ -1,12 +1,24 @@ 'use strict'; +// Core +const path = require('path'); + // Public node modules const inquirer = require('inquirer'); const rimraf = require('rimraf'); module.exports = (scope, success, error) => { - // eslint-disable-next-line import/no-unresolved - const knex = require('knex')({ + let knex; + + try { + // eslint-disable-next-line import/no-unresolved + knex = require('knex'); + } catch (err) { + // eslint-disable-next-line import/no-unresolved + knex = require(path.resolve(scope.tmpPath, 'node_modules', 'knex')); + } + + knex = knex({ client: scope.client.module, connection: Object.assign({}, scope.database.settings, { user: scope.database.settings.username @@ -48,10 +60,16 @@ module.exports = (scope, success, error) => { }) .catch((err) => { if (err.sql) { - console.log('⚠️ Server connection has failed! Make sure your database server is running.'); + console.log('⚠️ Server connection has failed! Make sure your database server is running.'); } else { - console.log(`⚠️ Database connection has failed! Make sure your "${scope.database.settings.database}" database exist.`); + console.log(`⚠️ Database connection has failed! Make sure your "${scope.database.settings.database}" database exist.`); } + + if (scope.debug) { + console.log('🐛 Full error log:'); + console.log(err); + } + error(); }); }; diff --git a/packages/strapi-hook-mongoose/lib/utils/connectivity.js b/packages/strapi-hook-mongoose/lib/utils/connectivity.js index 214ab4196b..f2addd4b0c 100644 --- a/packages/strapi-hook-mongoose/lib/utils/connectivity.js +++ b/packages/strapi-hook-mongoose/lib/utils/connectivity.js @@ -29,7 +29,13 @@ module.exports = (scope, success, error) => { Mongoose.connect(`mongodb${srv ? '+srv' : ''}://${scope.database.settings.host}${!srv ? `:${scope.database.settings.port}` : ''}/`, connectOptions, function (err) { if (err) { - console.log('⚠️ Database connection has failed! Make sure your database is running.'); + console.log('⚠️ Database connection has failed! Make sure your database is running.'); + + if (scope.debug) { + console.log('🐛 Full error log:'); + console.log(err); + } + return error(); } diff --git a/packages/strapi/bin/strapi-new.js b/packages/strapi/bin/strapi-new.js index 6c475c28f7..718bf93e79 100644 --- a/packages/strapi/bin/strapi-new.js +++ b/packages/strapi/bin/strapi-new.js @@ -42,7 +42,8 @@ module.exports = function (name, cliArguments) { generatorType: 'new', name, strapiPackageJSON: packageJSON, - developerMode + developerMode, + debug: cliArguments.debug !== undefined }; const dbArguments = ['dbclient', 'dbhost', 'dbport', 'dbname', 'dbusername', 'dbpassword']; diff --git a/packages/strapi/bin/strapi.js b/packages/strapi/bin/strapi.js index 453a7705eb..1740314572 100755 --- a/packages/strapi/bin/strapi.js +++ b/packages/strapi/bin/strapi.js @@ -53,6 +53,7 @@ program program .command('new') .option('-d, --dev', 'Development mode') + .option('--debug', 'Display database connection error') .option('--dbclient ', 'Database client') .option('--dbhost ', 'Database host') .option('--dbport ', 'Database port') From 31626ae14e0d853383c3e2a6f2e1de98e69fe78f Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 28 Dec 2018 17:05:16 +0100 Subject: [PATCH 11/21] Add documentation --- docs/3.x.x/cli/CLI.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/3.x.x/cli/CLI.md b/docs/3.x.x/cli/CLI.md index 5ed7c01e84..e56430d188 100644 --- a/docs/3.x.x/cli/CLI.md +++ b/docs/3.x.x/cli/CLI.md @@ -10,7 +10,7 @@ Create a new project ```bash strapi new -options: [--dev|--dbclient= --dbhost= --dbport= --dbname= --dbusername= --dbpassword= --dbssl= --dbauth=] +options: [--dev|--debug|--dbclient= --dbhost= --dbport= --dbname= --dbusername= --dbpassword= --dbssl= --dbauth=] ``` - **strapi new <name>**
@@ -19,6 +19,9 @@ options: [--dev|--dbclient= --dbhost= --dbport= --dbna - **strapi new <name> --dev**
Generates a new project called **<name>** and creates symlinks for the `./admin` folder and each plugin inside the `./plugin` folder. It means that the Strapi's development workflow has been set up on the machine earlier. +- **strapi new <name> --debug**
+ Will display the full error message if one is fired during the database connection. + - **strapi new <name> --dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbname=<dbname> --dbusername=<dbusername> --dbpassword=<dbpassword> --dbssl=<dbssl> --dbauth=<dbauth>**
Generates a new project called **<name>** and skip the interactive database configuration and initilize with these options. - **<dbclient>** can be `mongo`, `postgres`, `mysql`. From 45bcaf770b65f419065d148f1976ab6972893f9e Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Wed, 2 Jan 2019 09:41:53 +0100 Subject: [PATCH 12/21] Update to 2019 --- LICENSE.md | 2 +- README.md | 8 ++++---- packages/strapi-admin/LICENSE.md | 2 +- packages/strapi-generate-admin/LICENSE.md | 2 +- packages/strapi-generate-api/LICENSE.md | 2 +- packages/strapi-generate-controller/LICENSE.md | 2 +- packages/strapi-generate-model/LICENSE.md | 2 +- packages/strapi-generate-new/LICENSE.md | 2 +- packages/strapi-generate-plugin/LICENSE.md | 2 +- packages/strapi-generate-policy/LICENSE.md | 2 +- packages/strapi-generate-service/LICENSE.md | 2 +- packages/strapi-hook-bookshelf/LICENSE.md | 2 +- packages/strapi-hook-ejs/LICENSE.md | 2 +- packages/strapi-hook-knex/LICENSE.md | 2 +- packages/strapi-hook-mongoose/LICENSE.md | 2 +- packages/strapi-hook-redis/LICENSE.md | 2 +- packages/strapi-middleware-views/LICENSE.md | 2 +- packages/strapi-provider-email-amazon-ses/LICENSE.md | 2 +- packages/strapi-provider-email-mailgun/LICENSE.md | 2 +- packages/strapi-provider-email-sendgrid/LICENSE.md | 2 +- packages/strapi-provider-email-sendmail/LICENSE.md | 2 +- packages/strapi-provider-upload-aws-s3/LICENSE.md | 2 +- packages/strapi-provider-upload-local/LICENSE.md | 2 +- packages/strapi-provider-upload-rackspace/LICENSE.md | 2 +- packages/strapi-utils/LICENSE.md | 2 +- packages/strapi/LICENSE.md | 2 +- 26 files changed, 29 insertions(+), 29 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 374bffb6c5..de086c6dba 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index abdada932e..ded3a2b0a9 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Node: **Please note that right now Node 11 is not Officially supported, and the current Node LTS (v10) should be used.** Database: - * MongoDB >= 3.x + * MongoDB >= 3.x * MySQL >= 5.6 * MariaDB >= 10.1 * PostgreSQL >= 10 @@ -71,7 +71,7 @@ Database: npm install strapi@alpha -g ```` -**We recommend to use the latest version of Strapi to start your new project**. +**We recommend to use the latest version of Strapi to start your new project**. Some breaking changes might happen, new releases are shipped every two weeks to fix/enhance the product. #### 🏗 Create a new project @@ -140,7 +140,7 @@ For general help using Strapi, please refer to [the official Strapi documentatio #### Professional support -[Strapi Solutions](https://strapi.io), the company behind Strapi, provides a full range of solutions to get better results, faster. We're always looking for the next challenge: coaching, consulting, training, customization, etc. +[Strapi Solutions](https://strapi.io), the company behind Strapi, provides a full range of solutions to get better results, faster. We're always looking for the next challenge: coaching, consulting, training, customization, etc. [Drop us an email](mailto:support@strapi.io) to see how we can help you. @@ -160,4 +160,4 @@ Check out our [roadmap](https://portal.productboard.com/strapi) to get informed ## License -[MIT License](LICENSE.md) Copyright (c) 2015-2018 [Strapi Solutions](https://strapi.io/). +[MIT License](LICENSE.md) Copyright (c) 2015-2019 [Strapi Solutions](https://strapi.io/). diff --git a/packages/strapi-admin/LICENSE.md b/packages/strapi-admin/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-admin/LICENSE.md +++ b/packages/strapi-admin/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-admin/LICENSE.md b/packages/strapi-generate-admin/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-admin/LICENSE.md +++ b/packages/strapi-generate-admin/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-api/LICENSE.md b/packages/strapi-generate-api/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-api/LICENSE.md +++ b/packages/strapi-generate-api/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-controller/LICENSE.md b/packages/strapi-generate-controller/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-controller/LICENSE.md +++ b/packages/strapi-generate-controller/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-model/LICENSE.md b/packages/strapi-generate-model/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-model/LICENSE.md +++ b/packages/strapi-generate-model/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-new/LICENSE.md b/packages/strapi-generate-new/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-new/LICENSE.md +++ b/packages/strapi-generate-new/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-plugin/LICENSE.md b/packages/strapi-generate-plugin/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-plugin/LICENSE.md +++ b/packages/strapi-generate-plugin/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-policy/LICENSE.md b/packages/strapi-generate-policy/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-policy/LICENSE.md +++ b/packages/strapi-generate-policy/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-generate-service/LICENSE.md b/packages/strapi-generate-service/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-generate-service/LICENSE.md +++ b/packages/strapi-generate-service/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-hook-bookshelf/LICENSE.md b/packages/strapi-hook-bookshelf/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-hook-bookshelf/LICENSE.md +++ b/packages/strapi-hook-bookshelf/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-hook-ejs/LICENSE.md b/packages/strapi-hook-ejs/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-hook-ejs/LICENSE.md +++ b/packages/strapi-hook-ejs/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-hook-knex/LICENSE.md b/packages/strapi-hook-knex/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-hook-knex/LICENSE.md +++ b/packages/strapi-hook-knex/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-hook-mongoose/LICENSE.md b/packages/strapi-hook-mongoose/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-hook-mongoose/LICENSE.md +++ b/packages/strapi-hook-mongoose/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-hook-redis/LICENSE.md b/packages/strapi-hook-redis/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-hook-redis/LICENSE.md +++ b/packages/strapi-hook-redis/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-middleware-views/LICENSE.md b/packages/strapi-middleware-views/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-middleware-views/LICENSE.md +++ b/packages/strapi-middleware-views/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-email-amazon-ses/LICENSE.md b/packages/strapi-provider-email-amazon-ses/LICENSE.md index 6865b7e33f..50b3f25404 100644 --- a/packages/strapi-provider-email-amazon-ses/LICENSE.md +++ b/packages/strapi-provider-email-amazon-ses/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2018 Nikolay Tsenkov (nikolay@tsenkov.net). +Copyright (c) 2019 Nikolay Tsenkov (nikolay@tsenkov.net). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-email-mailgun/LICENSE.md b/packages/strapi-provider-email-mailgun/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-email-mailgun/LICENSE.md +++ b/packages/strapi-provider-email-mailgun/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-email-sendgrid/LICENSE.md b/packages/strapi-provider-email-sendgrid/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-email-sendgrid/LICENSE.md +++ b/packages/strapi-provider-email-sendgrid/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-email-sendmail/LICENSE.md b/packages/strapi-provider-email-sendmail/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-email-sendmail/LICENSE.md +++ b/packages/strapi-provider-email-sendmail/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-upload-aws-s3/LICENSE.md b/packages/strapi-provider-upload-aws-s3/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-upload-aws-s3/LICENSE.md +++ b/packages/strapi-provider-upload-aws-s3/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-upload-local/LICENSE.md b/packages/strapi-provider-upload-local/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-upload-local/LICENSE.md +++ b/packages/strapi-provider-upload-local/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-provider-upload-rackspace/LICENSE.md b/packages/strapi-provider-upload-rackspace/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi-provider-upload-rackspace/LICENSE.md +++ b/packages/strapi-provider-upload-rackspace/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi-utils/LICENSE.md b/packages/strapi-utils/LICENSE.md index e5988d638b..fde19dd49e 100644 --- a/packages/strapi-utils/LICENSE.md +++ b/packages/strapi-utils/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Copyright (c) 2017, Vandium Software Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/packages/strapi/LICENSE.md b/packages/strapi/LICENSE.md index e02de523ba..c4bd2fe9e7 100644 --- a/packages/strapi/LICENSE.md +++ b/packages/strapi/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015-2018 Strapi Solutions. +Copyright (c) 2015-2019 Strapi Solutions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From f3de1e5934584cef7ef4e518b0825a07cd67ec71 Mon Sep 17 00:00:00 2001 From: Chaitanya Choudhary Date: Thu, 3 Jan 2019 12:46:47 +0530 Subject: [PATCH 13/21] Updated documentation on dbforce. --- docs/3.x.x/cli/CLI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/cli/CLI.md b/docs/3.x.x/cli/CLI.md index d62931465d..e818fbe275 100644 --- a/docs/3.x.x/cli/CLI.md +++ b/docs/3.x.x/cli/CLI.md @@ -23,7 +23,7 @@ options: [--dev|--dbclient= --dbhost= --dbport= --dbna Generates a new project called **<name>** and skip the interactive database configuration and initilize with these options. - **<dbclient>** can be `mongo`, `postgres`, `mysql`. - **<dbssl>** and **<dbauth>** are available only for `mongo` and are optional. - - **--dbforce** is only available for `postgres`, `mysql`, and is optional. + - **--dbforce** Allows you to overwrite content if the provided database is not empty. Only available for `postgres`, `mysql`, and is optional. See the [CONTRIBUTING guide](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md) for more details. From 95007e8552dc754ea37e66478e0c15e8759444e0 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Thu, 3 Jan 2019 10:33:11 +0100 Subject: [PATCH 14/21] Fix single quote and const --- docs/3.x.x/guides/models.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index 0a0e57f177..fd9b43071e 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -151,8 +151,8 @@ module.exports = { **Example** ```js // Create a pet -var xhr = new XMLHttpRequest(); -xhr.open("POST", "/pets", true); +const xhr = new XMLHttpRequest(); +xhr.open('POST', '/pets', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ owner: '5c151d9d5b1d55194d3209be' // The id of the user you want to link @@ -225,8 +225,8 @@ module.exports = { **Example** ```js // Create an address -var xhr = new XMLHttpRequest(); -xhr.open("POST", "/addresses", true); +const xhr = new XMLHttpRequest(); +xhr.open('POST', '/addresses', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ user: '5c151d9d5b1d55194d3209be' // The id of the user you want to link @@ -299,16 +299,16 @@ module.exports = { **Examples** ```js // Create an article -var xhr = new XMLHttpRequest(); -xhr.open("POST", "/articles", true); +const xhr = new XMLHttpRequest(); +xhr.open('POST', '/articles', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ author: '5c151d9d5b1d55194d3209be' // The id of the user you want to link })); // Update an article -var xhr = new XMLHttpRequest(); -xhr.open("PUT", "/users/5c151d9d5b1d55194d3209be", true); +const xhr = new XMLHttpRequest(); +xhr.open('PUT', '/users/5c151d9d5b1d55194d3209be', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ articles: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL articles linked to the user (existing articles + new article or - removed article) @@ -387,8 +387,8 @@ module.exports = { **Example** ```js // Update a product -var xhr = new XMLHttpRequest(); -xhr.open("PUT", "/products/5c151d9d5b1d55194d3209be", true); +const xhr = new XMLHttpRequest(); +xhr.open('PUT', '/products/5c151d9d5b1d55194d3209be', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ categories: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL categories linked to the product (existing categories + new category or - removed category) From 02867b2e65578c2acb580ad2916277c2e0f6475f Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 4 Jan 2019 11:21:18 +0100 Subject: [PATCH 15/21] Add migration guide alpha.17 to alpha.18 --- docs/3.x.x/migration-guide/README.md | 1 + .../migration-guide-alpha.17-to-alpha.18.md | 59 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index c6d199d02b..8a0ba080bc 100644 --- a/docs/3.x.x/migration-guide/README.md +++ b/docs/3.x.x/migration-guide/README.md @@ -24,3 +24,4 @@ - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.16 to alpha.17](migration-guide-alpha.16-to-alpha.17.md) +- [Migration guide from alpha.17 to alpha.17](migration-guide-alpha.17-to-alpha.17.md) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md new file mode 100644 index 0000000000..ffe375ba0c --- /dev/null +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md @@ -0,0 +1,59 @@ +# Migration guide from alpha.16 to alpha.18 + +**Here are the major changes:** + +- Improve debug on strapi new +- Apollo server tracing in GraphQL +- Fix cors + +**Useful links:** +- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.18](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.18) +- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.16...v3.0.0-alpha.18](https://github.com/strapi/strapi/compare/v3.0.0-alpha.16...v3.0.0-alpha.18) + +
+ +::: note +Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process. +::: + +
+ +## Getting started + +Install Strapi `alpha.18` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.18 -g`. + +When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration). + +
+ +## Update node modules + +Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.18` version) of your project. + +Run `npm install strapi@3.0.0-alpha.18 --save` to update your strapi version. + +
+ +## Update the Admin + +::: note +If you performed updates in the Admin, you will have to manually migrate your changes. +::: + +Delete your old admin folder and replace it with the new one. + +
+ +## Update the Plugins + +::: note +If you did a custom update on one of the plugins, you will have to manually migrate your update. +::: + +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. + +Then, delete your old `plugins` folder and replace it with the new one. + +
+ +That's all, you have now upgraded to Strapi `alpha.18`. From 09530e9cd9ff27ea0686172474042f7805d4318b Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 4 Jan 2019 11:23:15 +0100 Subject: [PATCH 16/21] 3.0.0-alpha.18 --- package.json | 2 +- packages/strapi-admin/package.json | 6 ++--- packages/strapi-generate-admin/package.json | 6 ++--- packages/strapi-generate-api/package.json | 2 +- .../strapi-generate-controller/package.json | 2 +- packages/strapi-generate-model/package.json | 2 +- packages/strapi-generate-new/package.json | 4 ++-- packages/strapi-generate-plugin/package.json | 2 +- packages/strapi-generate-policy/package.json | 2 +- packages/strapi-generate-service/package.json | 2 +- packages/strapi-generate/package.json | 4 ++-- packages/strapi-helper-plugin/package.json | 2 +- packages/strapi-hook-bookshelf/package.json | 6 ++--- packages/strapi-hook-ejs/package.json | 2 +- packages/strapi-hook-knex/package.json | 2 +- packages/strapi-hook-mongoose/package.json | 4 ++-- packages/strapi-hook-redis/package.json | 4 ++-- packages/strapi-lint/package.json | 2 +- packages/strapi-middleware-views/package.json | 2 +- .../package.json | 4 ++-- .../package.json | 8 +++---- .../strapi-plugin-documentation/package.json | 4 ++-- packages/strapi-plugin-email/package.json | 6 ++--- packages/strapi-plugin-graphql/package.json | 4 ++-- .../package.json | 4 ++-- packages/strapi-plugin-upload/package.json | 6 ++--- .../package.json | 6 ++--- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../strapi-provider-upload-local/package.json | 2 +- .../package.json | 2 +- packages/strapi-utils/package.json | 2 +- packages/strapi/package.json | 22 +++++++++---------- 37 files changed, 70 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index 954176f379..3df98bc00a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "dependencies": {}, "devDependencies": { "assert": "~1.3.0", diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index 07f7ee5d6e..b9518fed2a 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-admin", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "description": "Strapi Admin", "repository": { "type": "git", @@ -31,8 +31,8 @@ }, "devDependencies": { "sanitize.css": "^4.1.0", - "strapi-helper-plugin": "3.0.0-alpha.17", - "strapi-utils": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.18" }, "author": { "name": "Strapi", diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 3fd96ea202..28264fb9ef 100644 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate-admin", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "description": "Generate the default admin panel for a Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -15,8 +15,8 @@ "dependencies": { "fs-extra": "^4.0.1", "lodash": "^4.17.5", - "strapi-admin": "3.0.0-alpha.17", - "strapi-utils": "3.0.0-alpha.17" + "strapi-admin": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.18" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-generate-api/package.json b/packages/strapi-generate-api/package.json index 27d6545286..9ade023cf8 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-alpha.17", + "version": "3.0.0-alpha.18", "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 41eb822a8b..fbdd4638c4 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-alpha.17", + "version": "3.0.0-alpha.18", "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 0ca6438af8..c030aca1ea 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-alpha.17", + "version": "3.0.0-alpha.18", "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 fdfb911a97..daa5f2aa0e 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Generate a new Strapi application.", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "listr": "^0.14.1", "lodash": "^4.17.5", "ora": "^2.1.0", - "strapi-utils": "3.0.0-alpha.17", + "strapi-utils": "3.0.0-alpha.18", "uuid": "^3.1.0" }, "scripts": { diff --git a/packages/strapi-generate-plugin/package.json b/packages/strapi-generate-plugin/package.json index 367b219abd..7f0aa48f52 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-alpha.17", + "version": "3.0.0-alpha.18", "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 438fc4ee28..c956efe970 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-alpha.17", + "version": "3.0.0-alpha.18", "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 8c3cb65f21..a6477e7dc2 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-alpha.17", + "version": "3.0.0-alpha.18", "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 a25695987a..4530ae077b 100644 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -1,6 +1,6 @@ { "name": "strapi-generate", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "description": "Master of ceremonies for the Strapi generators.", "homepage": "http://strapi.io", "keywords": [ @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "lodash": "^4.17.5", "reportback": "^2.0.1", - "strapi-utils": "3.0.0-alpha.17" + "strapi-utils": "3.0.0-alpha.18" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 3599bd6be5..83df546fe6 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Helper for Strapi plugins development", "engines": { "node": ">= 10.0.0", diff --git a/packages/strapi-hook-bookshelf/package.json b/packages/strapi-hook-bookshelf/package.json index 2a02e9b4ed..f0104486bc 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Bookshelf hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -21,8 +21,8 @@ "lodash": "^4.17.5", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-hook-knex": "3.0.0-alpha.17", - "strapi-utils": "3.0.0-alpha.17" + "strapi-hook-knex": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.18" }, "strapi": { "dependencies": [ diff --git a/packages/strapi-hook-ejs/package.json b/packages/strapi-hook-ejs/package.json index b5f93ad0b0..fb5f497570 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-alpha.17", + "version": "3.0.0-alpha.18", "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 8fa339e824..639fec3a5a 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-alpha.17", + "version": "3.0.0-alpha.18", "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 ce638194ec..eb4f8d46e8 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Mongoose hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -20,7 +20,7 @@ "mongoose-float": "^1.0.3", "pluralize": "^6.0.0", "rimraf": "^2.6.2", - "strapi-utils": "3.0.0-alpha.17" + "strapi-utils": "3.0.0-alpha.18" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-hook-redis/package.json b/packages/strapi-hook-redis/package.json index 51f346748a..26b965c73f 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Redis hook for the Strapi framework", "homepage": "http://strapi.io", "keywords": [ @@ -19,7 +19,7 @@ "lodash": "^4.17.5", "rimraf": "^2.6.2", "stack-trace": "0.0.10", - "strapi-utils": "3.0.0-alpha.17" + "strapi-utils": "3.0.0-alpha.18" }, "author": { "email": "hi@strapi.io", diff --git a/packages/strapi-lint/package.json b/packages/strapi-lint/package.json index 99aca6e232..0b68645a0d 100644 --- a/packages/strapi-lint/package.json +++ b/packages/strapi-lint/package.json @@ -1,6 +1,6 @@ { "name": "strapi-lint", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "description": "Strapi eslint and prettier configurations", "directories": { "lib": "lib" diff --git a/packages/strapi-middleware-views/package.json b/packages/strapi-middleware-views/package.json index 26422cb5c1..85b8e80616 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-alpha.17", + "version": "3.0.0-alpha.18", "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 f47e64ce26..4470a36399 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "A powerful UI to easily manage your data.", "strapi": { "name": "Content Manager", @@ -26,7 +26,7 @@ "draft-js": "^0.10.5", "react-select": "^1.2.1", "showdown": "^1.8.6", - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "dependencies": { "pluralize": "^7.0.0" diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 0c3e129b31..248ed8c09b 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Strapi plugin to create content type (API).", "strapi": { "name": "Content Type Builder", @@ -24,11 +24,11 @@ "dependencies": { "immutable": "^3.8.2", "pluralize": "^7.0.0", - "strapi-generate": "3.0.0-alpha.17", - "strapi-generate-api": "3.0.0-alpha.17" + "strapi-generate": "3.0.0-alpha.18", + "strapi-generate-api": "3.0.0-alpha.18" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index c061827574..ef58a8d1da 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "This is the description of the plugin.", "strapi": { "name": "Documentation", @@ -29,7 +29,7 @@ "swagger-ui-dist": "^3.18.3-republish2" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "soupette", diff --git a/packages/strapi-plugin-email/package.json b/packages/strapi-plugin-email/package.json index 20bf93b1b0..fcc3b1a40e 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "This is the description of the plugin.", "strapi": { "name": "Email", @@ -22,11 +22,11 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-email-sendmail": "3.0.0-alpha.17" + "strapi-provider-email-sendmail": "3.0.0-alpha.18" }, "devDependencies": { "react-copy-to-clipboard": "5.0.1", - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-graphql/package.json b/packages/strapi-plugin-graphql/package.json index 349f038f57..47d96fb787 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "This is the description of the plugin.", "strapi": { "name": "graphql", @@ -30,7 +30,7 @@ "graphql-type-json": "^0.2.1", "graphql-type-datetime": "^0.2.2", "pluralize": "^7.0.0", - "strapi-utils": "3.0.0-alpha.17" + "strapi-utils": "3.0.0-alpha.18" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index e0548a4aad..bb764771a4 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Strapi plugin to manage settings.", "strapi": { "name": "Settings Manager", @@ -25,7 +25,7 @@ "devDependencies": { "flag-icon-css": "^2.8.0", "react-select": "^1.0.0-rc.5", - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 38d3557d39..0ce4d7d143 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "This is the description of the plugin.", "strapi": { "name": "Files Upload", @@ -22,12 +22,12 @@ "prepublishOnly": "IS_MONOREPO=true npm run build" }, "dependencies": { - "strapi-provider-upload-local": "3.0.0-alpha.17", + "strapi-provider-upload-local": "3.0.0-alpha.18", "stream-to-array": "^2.3.0", "uuid": "^3.2.1" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "A Strapi developer", diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index 7dbb574de9..c276ad5026 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Protect your API with a full-authentication process based on JWT", "strapi": { "name": "Roles & Permissions", @@ -29,11 +29,11 @@ "koa2-ratelimit": "^0.6.1", "purest": "^2.0.1", "request": "^2.83.0", - "strapi-utils": "3.0.0-alpha.17", + "strapi-utils": "3.0.0-alpha.18", "uuid": "^3.1.0" }, "devDependencies": { - "strapi-helper-plugin": "3.0.0-alpha.17" + "strapi-helper-plugin": "3.0.0-alpha.18" }, "author": { "name": "Strapi team", diff --git a/packages/strapi-provider-email-amazon-ses/package.json b/packages/strapi-provider-email-amazon-ses/package.json index ca1d263ad8..90835cb311 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-alpha.17", + "version": "3.0.0-alpha.18", "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 b292cffc23..4b92e64b55 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-alpha.17", + "version": "3.0.0-alpha.18", "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 d6d0bd7c06..ed90354386 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-alpha.17", + "version": "3.0.0-alpha.18", "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 4dc2925d1c..2b4cc2d0c5 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-alpha.17", + "version": "3.0.0-alpha.18", "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 f01868296c..02440749e7 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-alpha.17", + "version": "3.0.0-alpha.18", "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 3211e71d0d..09e4d897f5 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-alpha.17", + "version": "3.0.0-alpha.18", "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 2a8e9aceba..f5d880fe3e 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-alpha.17", + "version": "3.0.0-alpha.18", "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 9e923e4e2e..9c02ba1ca4 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-alpha.17", + "version": "3.0.0-alpha.18", "description": "Rackspace provider for strapi upload", "main": "./lib", "scripts": { diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index ca360f8e08..52cf337974 100644 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "strapi-utils", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "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 c1b10d91df..b4896681b9 100644 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -1,6 +1,6 @@ { "name": "strapi", - "version": "3.0.0-alpha.17", + "version": "3.0.0-alpha.18", "description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.", "homepage": "http://strapi.io", "keywords": [ @@ -60,16 +60,16 @@ "rimraf": "^2.6.2", "semver": "^5.4.1", "stack-trace": "0.0.10", - "strapi-generate": "3.0.0-alpha.17", - "strapi-generate-admin": "3.0.0-alpha.17", - "strapi-generate-api": "3.0.0-alpha.17", - "strapi-generate-controller": "3.0.0-alpha.17", - "strapi-generate-model": "3.0.0-alpha.17", - "strapi-generate-new": "3.0.0-alpha.17", - "strapi-generate-plugin": "3.0.0-alpha.17", - "strapi-generate-policy": "3.0.0-alpha.17", - "strapi-generate-service": "3.0.0-alpha.17", - "strapi-utils": "3.0.0-alpha.17" + "strapi-generate": "3.0.0-alpha.18", + "strapi-generate-admin": "3.0.0-alpha.18", + "strapi-generate-api": "3.0.0-alpha.18", + "strapi-generate-controller": "3.0.0-alpha.18", + "strapi-generate-model": "3.0.0-alpha.18", + "strapi-generate-new": "3.0.0-alpha.18", + "strapi-generate-plugin": "3.0.0-alpha.18", + "strapi-generate-policy": "3.0.0-alpha.18", + "strapi-generate-service": "3.0.0-alpha.18", + "strapi-utils": "3.0.0-alpha.18" }, "author": { "email": "hi@strapi.io", From fab0f401cb81ed7f342f424ed1e60c49d6d1273c Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 4 Jan 2019 11:54:55 +0100 Subject: [PATCH 17/21] Fix migration guide version --- docs/3.x.x/migration-guide/README.md | 2 +- .../migration-guide/migration-guide-alpha.17-to-alpha.18.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index 8a0ba080bc..0d35536b3f 100644 --- a/docs/3.x.x/migration-guide/README.md +++ b/docs/3.x.x/migration-guide/README.md @@ -24,4 +24,4 @@ - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.16 to alpha.17](migration-guide-alpha.16-to-alpha.17.md) -- [Migration guide from alpha.17 to alpha.17](migration-guide-alpha.17-to-alpha.17.md) +- [Migration guide from alpha.18 to alpha.17](migration-guide-alpha.18-to-alpha.17.md) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md index ffe375ba0c..048f573b62 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md @@ -1,4 +1,4 @@ -# Migration guide from alpha.16 to alpha.18 +# Migration guide from alpha.17 to alpha.18 **Here are the major changes:** @@ -8,7 +8,7 @@ **Useful links:** - Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.18](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.18) -- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.16...v3.0.0-alpha.18](https://github.com/strapi/strapi/compare/v3.0.0-alpha.16...v3.0.0-alpha.18) +- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.17...v3.0.0-alpha.18](https://github.com/strapi/strapi/compare/v3.0.0-alpha.17...v3.0.0-alpha.18)
From df2a2e6548838d417f41b337855888ace54606da Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 4 Jan 2019 11:56:06 +0100 Subject: [PATCH 18/21] Fail index version --- docs/3.x.x/migration-guide/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index 0d35536b3f..000a49d734 100644 --- a/docs/3.x.x/migration-guide/README.md +++ b/docs/3.x.x/migration-guide/README.md @@ -24,4 +24,4 @@ - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md) - [Migration guide from alpha.16 to alpha.17](migration-guide-alpha.16-to-alpha.17.md) -- [Migration guide from alpha.18 to alpha.17](migration-guide-alpha.18-to-alpha.17.md) +- [Migration guide from alpha.17 to alpha.18](migration-guide-alpha.17-to-alpha.18.md) From d142b02f619e404a295c18da1ec092f64d5b7c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Sat, 5 Jan 2019 16:53:05 +0100 Subject: [PATCH 19/21] Add logo to documentation plugin --- .../strapi-plugin-documentation/admin/src/assets/images/logo.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/strapi-plugin-documentation/admin/src/assets/images/logo.svg diff --git a/packages/strapi-plugin-documentation/admin/src/assets/images/logo.svg b/packages/strapi-plugin-documentation/admin/src/assets/images/logo.svg new file mode 100644 index 0000000000..ca58a5d865 --- /dev/null +++ b/packages/strapi-plugin-documentation/admin/src/assets/images/logo.svg @@ -0,0 +1 @@ +🗂 \ No newline at end of file From 2b3af8300c44a229370aadb4b26a70d7fb7cc3be Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Sun, 6 Jan 2019 14:00:04 +0100 Subject: [PATCH 20/21] Add migration of jwt.json file --- .../migration-guide/migration-guide-alpha.10-to-alpha.11.md | 2 +- .../migration-guide/migration-guide-alpha.11-to-alpha.12.md | 2 +- .../migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md | 2 +- .../migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md | 2 +- .../migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md | 2 +- .../migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md | 2 +- .../migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md | 2 +- .../migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md | 2 +- .../migration-guide/migration-guide-alpha.12.7-to-alpha.13.md | 2 +- .../migration-guide/migration-guide-alpha.13-to-alpha.13.1.md | 2 +- .../migration-guide/migration-guide-alpha.13.1-to-alpha.14.md | 2 +- .../migration-guide/migration-guide-alpha.14-to-alpha.14.1.md | 2 +- .../migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md | 2 +- .../migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md | 2 +- .../migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md | 2 +- .../migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md | 2 +- .../migration-guide/migration-guide-alpha.14.5-to-alpha.15.md | 2 +- .../migration-guide/migration-guide-alpha.15-to-alpha.16.md | 2 +- .../migration-guide/migration-guide-alpha.16-to-alpha.17.md | 2 +- .../migration-guide/migration-guide-alpha.17-to-alpha.18.md | 2 +- .../3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md | 2 +- .../migration-guide/migration-guide-alpha.9-to-alpha.10.md | 2 +- .../admin/src/containers/AuthPage/saga.js | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md b/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md index ee8ae2bc7b..499da425b4 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.10-to-alpha.11.md @@ -49,7 +49,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md b/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md index 99f919af0b..b241352b6d 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.11-to-alpha.12.md @@ -45,7 +45,7 @@ Delete your old admin folder and replace it by the new one. ## Update the Plugins -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md index 617e4ceb4f..a46511eaee 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.1-to-alpha.12.2.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it by the new one. If you did custom update on one of the plugin, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md index 8a5c3fcc04..eb73c78b2a 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.2-to-alpha.12.3.md @@ -52,7 +52,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md index 3e6cb83e65..d2047ad8fd 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.3-to-alpha.12.4.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md index 40383792be..96f7896bc5 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.4-to-alpha.12.5.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md index 0c501cec7c..582d46174c 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.5-to-alpha.12.6.md @@ -52,7 +52,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md index e5e572c1c7..c837e6ee86 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.6-to-alpha.12.7.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md b/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md index ab9ca361c1..ea64fa1317 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.12.7-to-alpha.13.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md b/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md index 115d438be3..4753f0d87a 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.13-to-alpha.13.1.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md b/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md index 6bcf9c6266..be26b35945 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.13.1-to-alpha.14.md @@ -51,7 +51,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md index be905d6945..46bab8798c 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14-to-alpha.14.1.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md index efb9d11724..70ae766485 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.1-to-alpha.14.2.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md index dcca160861..65f7374d82 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.2-to-alpha.14.3.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md index 44b7ccf907..52a24ffe6f 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.3-to-alpha.14.4.md @@ -44,7 +44,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md index 5af978fd02..f395127c84 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.4-to-alpha.14.5.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md b/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md index e481ea6586..90a0ec9a83 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.14.5-to-alpha.15.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md b/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md index 8da2aaf60f..e9a103e80b 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.15-to-alpha.16.md @@ -48,7 +48,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md b/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md index 4a2bb70ac6..dc8aa358f8 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.16-to-alpha.17.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md index 048f573b62..77baf53262 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.17-to-alpha.18.md @@ -50,7 +50,7 @@ Delete your old admin folder and replace it with the new one. If you did a custom update on one of the plugins, you will have to manually migrate your update. ::: -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it with the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md b/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md index 396bef9ab2..7186ae1a48 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.8-to-alpha.9.md @@ -60,7 +60,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md b/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md index 6d6f698585..41ee41e793 100644 --- a/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md +++ b/docs/3.x.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md @@ -49,7 +49,7 @@ Delete your old admin folder and replace it by the new one. Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project. -Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one. Then, delete your old `plugins` folder and replace it by the new one. diff --git a/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js b/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js index 3d8f4addb7..a72ff96c22 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js +++ b/packages/strapi-plugin-users-permissions/admin/src/containers/AuthPage/saga.js @@ -37,7 +37,7 @@ export function* submitForm(action) { const response = yield call(request, requestURL, { method: 'POST', body: omit(body, 'news') }); if(get(response, 'user.role.name', '') === 'Administrator' || isRegister){ - + yield call(auth.setToken, response.jwt, body.rememberMe); yield call(auth.setUserInfo, response.user, body.rememberMe); } From a23fe2c307016996eddd03640199d410b3ac3a9d Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Sun, 6 Jan 2019 15:17:59 +0100 Subject: [PATCH 21/21] Remove relations route from bookshelf template --- .../strapi-generate-api/json/routes.json.js | 25 ---------------- .../templates/bookshelf/controller.template | 30 ------------------- 2 files changed, 55 deletions(-) diff --git a/packages/strapi-generate-api/json/routes.json.js b/packages/strapi-generate-api/json/routes.json.js index 7f65faf4af..3fba474798 100644 --- a/packages/strapi-generate-api/json/routes.json.js +++ b/packages/strapi-generate-api/json/routes.json.js @@ -64,31 +64,6 @@ module.exports = scope => { }] }; - if (scope.args.tpl && scope.args.tpl !== 'mongoose') { - routes.routes.push({ - method: 'POST', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.createRelation', - config: { - policies: [] - } - }, { - method: 'PUT', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.updateRelation', - config: { - policies: [] - } - }, { - method: 'DELETE', - path: '/' + scope.idPluralized + '/:' + tokenID + '/relationships/:relation', - handler: scope.globalID + '.destroyRelation', - config: { - policies: [] - } - }); - } - return routes; } diff --git a/packages/strapi-generate-api/templates/bookshelf/controller.template b/packages/strapi-generate-api/templates/bookshelf/controller.template index 48ed7c3a4f..e8da47f529 100644 --- a/packages/strapi-generate-api/templates/bookshelf/controller.template +++ b/packages/strapi-generate-api/templates/bookshelf/controller.template @@ -70,35 +70,5 @@ module.exports = { destroy: async (ctx, next) => { return strapi.services.<%= id %>.remove(ctx.params); - }, - - /** - * Add relation to a/an <%= id %> record. - * - * @return {Object} - */ - - createRelation: async (ctx, next) => { - return strapi.services.<%= id %>.addRelation(ctx.params, ctx.request.body); - }, - - /** - * Update relation to a/an <%= id %> record. - * - * @return {Object} - */ - - updateRelation: async (ctx, next) => { - return strapi.services.<%= id %>.editRelation(ctx.params, ctx.request.body); - }, - - /** - * Destroy relation to a/an <%= id %> record. - * - * @return {Object} - */ - - destroyRelation: async (ctx, next) => { - return strapi.services.<%= id %>.removeRelation(ctx.params, ctx.request.body); } };