Skip to content

Commit c3e18d8

Browse files
name is required not optional BoilerplateAppType
1 parent ec3b197 commit c3e18d8

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/commands/app/create.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
flags,
2222
HttpClient,
2323
configHandler,
24-
FlagInput
24+
FlagInput,
2525
} from "@contentstack/cli-utilities";
2626

2727
import { BaseCommand } from "../../base-command";
@@ -100,11 +100,9 @@ export default class Create extends BaseCommand<typeof Create> {
100100
const boilerplate: BoilerplateAppType = await selectedBoilerplate();
101101

102102
if (boilerplate) {
103-
if (boilerplate.name) {
104-
this.sharedConfig.boilerplateName = boilerplate.name
105-
.toLowerCase()
106-
.replace(/ /g, "-");
107-
}
103+
this.sharedConfig.boilerplateName = boilerplate.name
104+
.toLowerCase()
105+
.replace(/ /g, "-");
108106
this.sharedConfig.appBoilerplateGithubUrl = boilerplate.link;
109107
this.sharedConfig.appName = await getAppName(
110108
this.sharedConfig.boilerplateName

src/types/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export interface LaunchProjectRes {
142142
}
143143

144144
export interface BoilerplateAppType {
145-
name?: string;
145+
name: string;
146146
description?: string;
147147
link: string;
148148
tags?: string[];

0 commit comments

Comments
 (0)