Merge branch 'master' into patch-1

This commit is contained in:
Paolo Ragone 2019-01-05 09:40:58 +13:00 committed by GitHub
commit 2a1cb510b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 253 additions and 93 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

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

@ -148,6 +148,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.
@ -211,6 +222,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.
@ -274,6 +296,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).
@ -343,6 +384,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

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

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

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

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

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

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

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

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

View File

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