feat: add api server class

This commit is contained in:
2024-12-24 13:25:36 +09:00
parent cc655ac864
commit a06e72d24a
124 changed files with 460 additions and 413 deletions

50
src/types.d.ts vendored Normal file
View File

@ -0,0 +1,50 @@
/**
* This interface defines required structure for all bpsets.
*
* Modifying this interface causes VERY large blast impact.
* SO PLEASE DO NOT MODIFY.
*
* @author Minhyeok Park <pmh_only@pmh.codes>
*/
export interface BPSet {
check: () => Promise<{
compliantResources: string[]
nonCompliantResources: string[]
requiredParametersForFix: {
name: string
}[]
}>,
fix: (
nonCompliantResources: string[],
requiredParametersForFix: {
name: string,
value: string
}[]
) => Promise<void>
}
export interface BPSetMetadata {
name: string
description: string
priority: number
priorityReason: string
awsService: string
awsServiceCategory: string
bestPracticeCategory: string
requiredParametersForFix: {
name: string
description: string
default: string
example: string
}[]
isFixFunctionUsesDestructiveCommand: boolean
commandUsedInCheckFunction: {
name: string
reason: string
}[]
commandUsedInFixFunction: {
name: string
reason: string
}[]
adviseBeforeFixFunction: string
}