Skip to content

Commit

Permalink
Deno formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorzavodnik authored and malhussan committed Jul 30, 2024
1 parent fbab13c commit cc56352
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/api/CliApiFacadeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export class CliApiFacadeFactory {
return azure;
}

// buildCustom() {
// }
// buildCustom() {
// }

public buildGit() {
const detectorRunner = this.buildQuietLoggingProcessRunner();
Expand Down
2 changes: 1 addition & 1 deletion src/api/PlatformSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export abstract class PlatformSetup<T extends PlatformConfig> {
message: "Define a type",
hint: "The type will be displayed in the Readme file",
default: id,
})
});

return { id, name, type };
}
Expand Down
39 changes: 19 additions & 20 deletions src/api/custom/CustomPlatformSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,39 @@ import { Dir } from "../../cli/DirectoryGenerator.ts";
import { PlatformSetup } from "../PlatformSetup.ts";

export class CustomPlatformSetup extends PlatformSetup<PlatformConfigCustom> {
constructor() {
super();
}
constructor() {
super();
}

async promptInteractively(): Promise<PlatformConfigCustom> {
async promptInteractively(): Promise<PlatformConfigCustom> {
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();
}
}
2 changes: 1 addition & 1 deletion src/model/PlatformConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type AzureConfig = {
export type PlatformConfigAzure = PlatformConfigBase & AzureConfig;

type CustomConfig = {
type: "custom";
type: "custom";
};

export type PlatformConfigCustom = PlatformConfigBase & CustomConfig;
Expand Down
2 changes: 1 addition & 1 deletion src/model/schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
}
},
"required": ["name", "type"]
},
},
"CollieConfig": {
"type": "object",
"properties": {
Expand Down

0 comments on commit cc56352

Please sign in to comment.