create-strapi-starter
Advanced tools
Comparing version 4.0.0-beta.12 to 4.0.0-beta.13
'use strict'; | ||
// FIXME | ||
/* eslint-disable import/extensions */ | ||
const commander = require('commander'); | ||
@@ -13,2 +11,13 @@ | ||
const incompatibleQuickstartOptions = [ | ||
'dbclient', | ||
'dbhost', | ||
'dbport', | ||
'dbname', | ||
'dbusername', | ||
'dbpassword', | ||
'dbssl', | ||
'dbfile', | ||
]; | ||
program | ||
@@ -51,2 +60,17 @@ .version(packageJson.version) | ||
async function initProject(projectArgs, program) { | ||
const hasIncompatibleQuickstartOptions = incompatibleQuickstartOptions.some(opt => program[opt]); | ||
if (program.quickstart && hasIncompatibleQuickstartOptions) { | ||
console.error( | ||
`The quickstart option is incompatible with the following options: ${incompatibleQuickstartOptions.join( | ||
', ' | ||
)}` | ||
); | ||
process.exit(1); | ||
} | ||
if (hasIncompatibleQuickstartOptions) { | ||
program.quickstart = false; // Will disable the quickstart question because != 'undefined' | ||
} | ||
const { projectName, starterUrl } = projectArgs; | ||
@@ -57,3 +81,3 @@ if (program.quickstart) { | ||
const prompt = await promptUser(projectName, starterUrl); | ||
const prompt = await promptUser(projectName, starterUrl, program); | ||
@@ -67,3 +91,3 @@ const promptProjectArgs = { | ||
...program, | ||
quickstart: prompt.quick, | ||
quickstart: prompt.quick || program.quickstart, | ||
}; | ||
@@ -70,0 +94,0 @@ |
{ | ||
"name": "create-strapi-starter", | ||
"version": "4.0.0-beta.12", | ||
"version": "4.0.0-beta.13", | ||
"description": "Generate a new Strapi application.", | ||
@@ -19,3 +19,3 @@ "license": "SEE LICENSE IN LICENSE", | ||
"dependencies": { | ||
"@strapi/generate-new": "4.0.0-beta.12", | ||
"@strapi/generate-new": "4.0.0-beta.13", | ||
"chalk": "4.1.1", | ||
@@ -52,3 +52,3 @@ "ci-info": "3.1.1", | ||
}, | ||
"gitHead": "67fee6f3d59df974e8770bb123549f972edda905" | ||
"gitHead": "3a31a96067aa0a74cabf51282215820ba46dd447" | ||
} |
@@ -12,3 +12,3 @@ 'use strict'; | ||
*/ | ||
module.exports = async function promptUser(projectName, starter) { | ||
module.exports = async function promptUser(projectName, starter, program) { | ||
const mainQuestions = [ | ||
@@ -26,2 +26,3 @@ { | ||
message: 'Choose your installation type', | ||
when: !program.quickstart, | ||
choices: [ | ||
@@ -28,0 +29,0 @@ { |
19523
480
+ Added@strapi/generate-new@4.0.0-beta.13(transitive)
- Removed@strapi/generate-new@4.0.0-beta.12(transitive)