Skip to content

Commit

Permalink
name is required not optional BoilerplateAppType
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Jul 19, 2024
1 parent 72e40ad commit 0e7b449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/commands/app/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
flags,
HttpClient,
configHandler,
FlagInput
FlagInput,
} from "@contentstack/cli-utilities";

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

if (boilerplate) {
if (boilerplate.name) {
this.sharedConfig.boilerplateName = boilerplate.name
.toLowerCase()
.replace(/ /g, "-");
}
this.sharedConfig.boilerplateName = boilerplate.name
.toLowerCase()
.replace(/ /g, "-");
this.sharedConfig.appBoilerplateGithubUrl = boilerplate.link;
this.sharedConfig.appName = await getAppName(
this.sharedConfig.boilerplateName
Expand Down
2 changes: 1 addition & 1 deletion src/types/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export interface LaunchProjectRes {
}

export interface BoilerplateAppType {
name?: string;
name: string;
description?: string;
link: string;
tags?: string[];
Expand Down

0 comments on commit 0e7b449

Please sign in to comment.