diff --git a/src/api/CliApiFacadeFactory.ts b/src/api/CliApiFacadeFactory.ts index fc2801a..b9217e4 100644 --- a/src/api/CliApiFacadeFactory.ts +++ b/src/api/CliApiFacadeFactory.ts @@ -114,8 +114,8 @@ export class CliApiFacadeFactory { return azure; } -// buildCustom() { -// } + // buildCustom() { + // } public buildGit() { const detectorRunner = this.buildQuietLoggingProcessRunner(); diff --git a/src/api/PlatformSetup.ts b/src/api/PlatformSetup.ts index d2a277c..32bba12 100644 --- a/src/api/PlatformSetup.ts +++ b/src/api/PlatformSetup.ts @@ -35,7 +35,7 @@ export abstract class PlatformSetup { message: "Define a type", hint: "The type will be displayed in the Readme file", default: id, - }) + }); return { id, name, type }; } diff --git a/src/api/custom/CustomPlatformSetup.ts b/src/api/custom/CustomPlatformSetup.ts index 9c2aedc..b33bbbd 100644 --- a/src/api/custom/CustomPlatformSetup.ts +++ b/src/api/custom/CustomPlatformSetup.ts @@ -4,40 +4,39 @@ import { Dir } from "../../cli/DirectoryGenerator.ts"; import { PlatformSetup } from "../PlatformSetup.ts"; export class CustomPlatformSetup extends PlatformSetup { - constructor() { - super(); - } + constructor() { + super(); + } - async promptInteractively(): Promise { + async promptInteractively(): Promise { + const { id, name, type } = await this.promptPlatformName(); - const { id, name, type } = await this.promptPlatformName(); - - return { + return { id, name, type, - }; -} + }; + } -preparePlatformDir(config: PlatformConfigCustom): Dir { - return { + preparePlatformDir(config: PlatformConfigCustom): Dir { + return { name: config.id, entries: [ - { name: "README.md", content: this.generateCustomReadmeMd(config) }, + { name: "README.md", content: this.generateCustomReadmeMd(config) }, ], - }; -} + }; + } -private generateCustomReadmeMd(config: PlatformConfigCustom): string { - const frontmatter = config; - const md = ` + private generateCustomReadmeMd(config: PlatformConfigCustom): string { + const frontmatter = config; + const md = ` # ${config.name} This is a custom platform. `; - const doc = new MarkdownDocument(frontmatter, md); + const doc = new MarkdownDocument(frontmatter, md); - return doc.format(); - } + return doc.format(); + } } diff --git a/src/model/PlatformConfig.ts b/src/model/PlatformConfig.ts index abf1ec2..2457c2e 100644 --- a/src/model/PlatformConfig.ts +++ b/src/model/PlatformConfig.ts @@ -42,7 +42,7 @@ type AzureConfig = { export type PlatformConfigAzure = PlatformConfigBase & AzureConfig; type CustomConfig = { - type: "custom"; + type: "custom"; }; export type PlatformConfigCustom = PlatformConfigBase & CustomConfig; diff --git a/src/model/schemas/schema.json b/src/model/schemas/schema.json index 7557a98..e47dc88 100644 --- a/src/model/schemas/schema.json +++ b/src/model/schemas/schema.json @@ -210,7 +210,7 @@ } }, "required": ["name", "type"] - }, + }, "CollieConfig": { "type": "object", "properties": {