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 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/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 }, } ``` diff --git a/docs/3.x.x/cli/CLI.md b/docs/3.x.x/cli/CLI.md index 5ed7c01e84..9ebe1d6b9e 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= --dbforce] ``` - **strapi new <name>**
@@ -18,11 +18,16 @@ 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> --dbforce**
-- **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`. - **<dbssl>** and **<dbauth>** are available only for `mongo` and are 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. 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 diff --git a/docs/3.x.x/getting-started/quick-start.md b/docs/3.x.x/getting-started/quick-start.md index e475365988..021ccd9e1b 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: diff --git a/docs/3.x.x/guides/models.md b/docs/3.x.x/guides/models.md index edb9cc73f3..955e662e46 100644 --- a/docs/3.x.x/guides/models.md +++ b/docs/3.x.x/guides/models.md @@ -149,6 +149,17 @@ module.exports = { } ``` +**Example** +```js +// Create a pet +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 +})); +``` + ### One-to-one Refer to the [one-to-one concept](../concepts/concepts.md#one-to-one) for informations. @@ -212,6 +223,17 @@ module.exports = { } ``` +**Example** +```js +// Create an address +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 +})); +``` + ### One-to-many Refer to the [one-to-many concept](../concepts/concepts.md#one-to-many) for more informations. @@ -275,6 +297,25 @@ module.exports = { } ``` +**Examples** +```js +// Create an article +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 +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) +})); +``` + ### Many-to-many Refer to the [many-to-many concept](../concepts/concepts.md#many-to-many). @@ -344,6 +385,17 @@ module.exports = { } ``` +**Example** +```js +// Update a product +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) +})); +``` + ### 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). diff --git a/docs/3.x.x/migration-guide/README.md b/docs/3.x.x/migration-guide/README.md index c6d199d02b..000a49d734 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.18](migration-guide-alpha.17-to-alpha.18.md) 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 new file mode 100644 index 0000000000..77baf53262 --- /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.17 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.17...v3.0.0-alpha.18](https://github.com/strapi/strapi/compare/v3.0.0-alpha.17...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` 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. + +
+ +That's all, you have now upgraded to Strapi `alpha.18`. 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/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/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-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/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-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/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-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/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-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); } }; 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-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/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-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/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-new/lib/before.js b/packages/strapi-generate-new/lib/before.js index bc69e93e2e..3bdce44d98 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(); + } }); }) ]; @@ -258,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-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/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-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/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-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/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-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/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-bookshelf/lib/utils/connectivity.js b/packages/strapi-hook-bookshelf/lib/utils/connectivity.js index 34671904b7..97f6a5b5cc 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 @@ -27,20 +39,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.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.'); - 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(); } @@ -48,10 +64,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-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/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-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/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-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/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-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-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/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-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/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-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/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 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/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); } 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/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-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/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-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/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-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/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-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/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-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/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-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/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-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/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-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/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: diff --git a/packages/strapi/bin/strapi-new.js b/packages/strapi/bin/strapi-new.js index 6c475c28f7..707a7bbe35 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']; @@ -54,6 +55,8 @@ module.exports = function (name, cliArguments) { return process.exit(1); } + scope.dbforce = cliArguments.dbforce !== undefined; + scope.database = { settings: { client: cliArguments.dbclient, diff --git a/packages/strapi/bin/strapi.js b/packages/strapi/bin/strapi.js index 453a7705eb..4aa5d87cdd 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') @@ -61,6 +62,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')); 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",