create-strapi-app 3.6.7 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-strapi-app.js +3 -3
- package/package.json +5 -6
- package/utils/prompt-user.js +11 -9
package/create-strapi-app.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// FIXME
|
|
4
|
+
/* eslint-disable import/extensions */
|
|
3
5
|
const commander = require('commander');
|
|
4
|
-
const generateNewApp = require('strapi
|
|
6
|
+
const generateNewApp = require('@strapi/generate-new');
|
|
5
7
|
const promptUser = require('./utils/prompt-user');
|
|
6
8
|
const packageJson = require('./package.json');
|
|
7
9
|
|
|
@@ -16,13 +18,11 @@ program
|
|
|
16
18
|
.option('--quickstart', 'Quickstart app creation')
|
|
17
19
|
.option('--dbclient <dbclient>', 'Database client')
|
|
18
20
|
.option('--dbhost <dbhost>', 'Database host')
|
|
19
|
-
.option('--dbsrv <dbsrv>', 'Database srv')
|
|
20
21
|
.option('--dbport <dbport>', 'Database port')
|
|
21
22
|
.option('--dbname <dbname>', 'Database name')
|
|
22
23
|
.option('--dbusername <dbusername>', 'Database username')
|
|
23
24
|
.option('--dbpassword <dbpassword>', 'Database password')
|
|
24
25
|
.option('--dbssl <dbssl>', 'Database SSL')
|
|
25
|
-
.option('--dbauth <dbauth>', 'Authentication Database')
|
|
26
26
|
.option('--dbfile <dbfile>', 'Database file path for sqlite')
|
|
27
27
|
.option('--dbforce', 'Overwrite database content if any')
|
|
28
28
|
.option('--template <templateurl>', 'Specify a Strapi template')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-strapi-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.10",
|
|
4
4
|
"description": "Generate a new Strapi application.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://strapi.io",
|
|
@@ -16,12 +16,11 @@
|
|
|
16
16
|
"create-strapi-app": "./index.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"
|
|
19
|
+
"@strapi/generate-new": "4.0.0-beta.10",
|
|
20
20
|
"commander": "6.1.0",
|
|
21
21
|
"inquirer": "8.1.0",
|
|
22
22
|
"js-yaml": "4.1.0",
|
|
23
|
-
"node-fetch": "^2.6.1"
|
|
24
|
-
"strapi-generate-new": "3.6.7"
|
|
23
|
+
"node-fetch": "^2.6.1"
|
|
25
24
|
},
|
|
26
25
|
"scripts": {
|
|
27
26
|
"test": "echo \"no tests yet\""
|
|
@@ -39,8 +38,8 @@
|
|
|
39
38
|
"url": "https://github.com/strapi/strapi/issues"
|
|
40
39
|
},
|
|
41
40
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
41
|
+
"node": ">=12.x.x <=16.x.x",
|
|
43
42
|
"npm": ">=6.0.0"
|
|
44
43
|
},
|
|
45
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6d23a0e2da28a45c69589516ed205f2bf3e6486f"
|
|
46
45
|
}
|
package/utils/prompt-user.js
CHANGED
|
@@ -57,10 +57,11 @@ async function getTemplateQuestion() {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* @param {string|null} projectName - The name of the project
|
|
61
|
+
* @param {string|null} template - The template the project should use
|
|
61
62
|
* @returns Array of prompt question objects
|
|
62
63
|
*/
|
|
63
|
-
async function getPromptQuestions(projectName
|
|
64
|
+
async function getPromptQuestions(projectName /*, template*/) {
|
|
64
65
|
return [
|
|
65
66
|
{
|
|
66
67
|
type: 'input',
|
|
@@ -84,13 +85,14 @@ async function getPromptQuestions(projectName, template) {
|
|
|
84
85
|
},
|
|
85
86
|
],
|
|
86
87
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
// TODO: re-enable once we know where to list the official compatible templates
|
|
89
|
+
// {
|
|
90
|
+
// type: 'confirm',
|
|
91
|
+
// name: 'useTemplate',
|
|
92
|
+
// when: !template,
|
|
93
|
+
// message:
|
|
94
|
+
// 'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)',
|
|
95
|
+
// },
|
|
94
96
|
];
|
|
95
97
|
}
|
|
96
98
|
|