Merge branch 'master' into feature/998

This commit is contained in:
Jim LAURIE 2019-01-06 15:27:11 +01:00 committed by GitHub
commit 6a3d2daac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 312 additions and 205 deletions

View File

@ -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

View File

@ -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:

View File

@ -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/).

View File

@ -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
},
}
```

View File

@ -10,7 +10,7 @@ Create a new project
```bash
strapi new <name>
options: [--dev|--dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbname=<dbname> --dbusername=<dbusername> --dbpassword=<dbpassword> --dbssl=<dbssl> --dbauth=<dbauth>]
options: [--dev|--debug|--dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbname=<dbname> --dbusername=<dbusername> --dbpassword=<dbpassword> --dbssl=<dbssl> --dbauth=<dbauth> --dbforce]
```
- **strapi new &#60;name&#62;**<br/>
@ -18,11 +18,16 @@ options: [--dev|--dbclient=<dbclient> --dbhost=<dbhost> --dbport=<dbport> --dbna
- **strapi new &#60;name&#62; --dev**<br/>
Generates a new project called **&#60;name&#62;** 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 &#60;name&#62; --debug**<br/>
Will display the full error message if one is fired during the database connection.
- **strapi new &#60;name&#62; --dbclient=&#60;dbclient&#62; --dbhost=&#60;dbhost&#62; --dbport=&#60;dbport&#62; --dbname=&#60;dbname&#62; --dbusername=&#60;dbusername&#62; --dbpassword=&#60;dbpassword&#62; --dbssl=&#60;dbssl&#62; --dbauth=&#60;dbauth&#62; --dbforce**<br/>
- **strapi new &#60;name&#62; --dbclient=&#60;dbclient&#62; --dbhost=&#60;dbhost&#62; --dbport=&#60;dbport&#62; --dbname=&#60;dbname&#62; --dbusername=&#60;dbusername&#62; --dbpassword=&#60;dbpassword&#62; --dbssl=&#60;dbssl&#62; --dbauth=&#60;dbauth&#62;**<br/>
Generates a new project called **&#60;name&#62;** and skip the interactive database configuration and initilize with these options.
- **&#60;dbclient&#62;** can be `mongo`, `postgres`, `mysql`.
- **&#60;dbssl&#62;** and **&#60;dbauth&#62;** 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.

View File

@ -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

View File

@ -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:

View File

@ -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).

View File

@ -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)

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## 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).
<br>
## 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.
<br>
## 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.
<br>
## 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.
<br>
That's all, you have now upgraded to Strapi `alpha.18`.

View File

@ -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.

View File

@ -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.

View File

@ -1,6 +1,6 @@
{
"private": true,
"version": "3.0.0-alpha.17",
"version": "3.0.0-alpha.18",
"dependencies": {},
"devDependencies": {
"assert": "~1.3.0",

View File

@ -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:

View File

@ -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",

View File

@ -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:

View File

@ -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",

View File

@ -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:

View File

@ -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;
}

View File

@ -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": [

View File

@ -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);
}
};

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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();
}
});

View File

@ -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": {

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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",

View File

@ -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",

View File

@ -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:

View File

@ -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();
});
};

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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();
}

View File

@ -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",

View File

@ -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:

View File

@ -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",

View File

@ -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"

View File

@ -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:

View File

@ -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": [

View File

@ -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"

View File

@ -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",

View File

@ -0,0 +1 @@
<svg width="24" height="22" xmlns="http://www.w3.org/2000/svg"><text transform="translate(-23 -7)" fill="#4B515A" fill-rule="evenodd" font-family="AppleColorEmoji, Apple Color Emoji" font-size="24"><tspan x="23" y="28">🗂</tspan></text></svg>

After

Width:  |  Height:  |  Size: 244 B

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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);
}

View File

@ -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",

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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": [

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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": {

View File

@ -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:

View File

@ -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": [

View File

@ -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:

View File

@ -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,

View File

@ -53,6 +53,7 @@ program
program
.command('new')
.option('-d, --dev', 'Development mode')
.option('--debug', 'Display database connection error')
.option('--dbclient <dbclient>', 'Database client')
.option('--dbhost <dbhost>', 'Database host')
.option('--dbport <dbport>', 'Database port')
@ -61,6 +62,7 @@ program
.option('--dbpassword <dbpassword>', 'Database password')
.option('--dbssl <dbssl>', 'Database SSL')
.option('--dbauth <dbauth>', 'Authentication Database')
.option('--dbforce', 'Overwrite database content if any')
.description('create a new application')
.action(require('./strapi-new'));

Some files were not shown because too many files have changed in this diff Show More