You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cli/src/commands/install.ts
+26-22Lines changed: 26 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -16,32 +16,36 @@ export async function install() {
16
16
// Get available content types
17
17
constcontentTypes=getContentTypes();
18
18
19
-
// Let user select content types
20
-
constselectedContentTypes=awaitcheckbox({
21
-
message: 'Select content types to enable Webtools for:',
22
-
choices: contentTypes.map((type)=>({
23
-
name: type,
24
-
value: type,
25
-
})),
26
-
});
19
+
if(contentTypes.length===0){
20
+
console.log(chalk.yellow('No content types found in your Strapi project, skipping Webtools setup step. You can enable Webtools later using the "enable" command.'));
21
+
}else{
22
+
// Let user select content types
23
+
constselectedContentTypes=awaitcheckbox({
24
+
message: 'Select content types to enable Webtools for:',
25
+
choices: contentTypes.map((type)=>({
26
+
name: type,
27
+
value: type,
28
+
})),
29
+
});
27
30
28
-
// Enable Webtools for selected content types
29
-
if(selectedContentTypes.length>0){
30
-
console.log(chalk.blue('\nEnabling Webtools for selected content types...'));
31
+
// Enable Webtools for selected content types
32
+
if(selectedContentTypes.length>0){
33
+
console.log(chalk.blue('\nEnabling Webtools for selected content types...'));
0 commit comments