Initial upload: AI Context Generator CLI with TypeScript implementation
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
90
app/ai-context-generator-cli/src/types.ts
Normal file
90
app/ai-context-generator-cli/src/types.ts
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
export interface CLIOptions {
|
||||||
|
dir: string;
|
||||||
|
output: string;
|
||||||
|
format: 'json' | 'yaml';
|
||||||
|
template: string;
|
||||||
|
config: string;
|
||||||
|
verbose: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectInfo {
|
||||||
|
projectType: ProjectType;
|
||||||
|
language: string;
|
||||||
|
framework: string | null;
|
||||||
|
dependencies: DependencyInfo;
|
||||||
|
conventions: ConventionInfo | undefined;
|
||||||
|
fileCount: number;
|
||||||
|
analysisDate: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectType {
|
||||||
|
primaryLanguage: string;
|
||||||
|
languages: string[];
|
||||||
|
frameworks: string[];
|
||||||
|
buildTools: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DependencyInfo {
|
||||||
|
direct: Dependency[];
|
||||||
|
dev: Dependency[];
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Dependency {
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
type: 'prod' | 'dev';
|
||||||
|
isLocal: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConventionInfo {
|
||||||
|
namingConvention: NamingConvention;
|
||||||
|
importStyle: ImportStyle;
|
||||||
|
testingFramework: string | null;
|
||||||
|
codeStyle: CodeStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface NamingConvention {
|
||||||
|
files: 'camelCase' | 'snake_case' | 'kebab-case' | 'PascalCase';
|
||||||
|
variables: 'camelCase' | 'snake_case' | 'kebab-case' | 'PascalCase';
|
||||||
|
functions: 'camelCase' | 'snake_case' | 'kebab-case' | 'PascalCase';
|
||||||
|
classes: 'PascalCase' | 'camelCase' | 'snake_case' | 'kebab-case';
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ImportStyle {
|
||||||
|
style: 'ESM' | 'CommonJS' | 'mixed';
|
||||||
|
aliasPrefix: string | null;
|
||||||
|
commonPatterns: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CodeStyle {
|
||||||
|
indentSize: number;
|
||||||
|
indentType: 'spaces' | 'tabs';
|
||||||
|
lineEndings: 'LF' | 'CRLF';
|
||||||
|
quoteStyle: 'single' | 'double';
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ContextConfig {
|
||||||
|
includes: string[];
|
||||||
|
excludes: string[];
|
||||||
|
outputFormat: 'json' | 'yaml';
|
||||||
|
template: 'cursor' | 'copilot' | 'generic' | 'default';
|
||||||
|
outputFile: string;
|
||||||
|
analyzeConventions: boolean;
|
||||||
|
includeDevDependencies: boolean;
|
||||||
|
respectGitignore: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TemplateData {
|
||||||
|
projectInfo: ProjectInfo;
|
||||||
|
files: FileInfo[];
|
||||||
|
config: ContextConfig;
|
||||||
|
generatedAt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FileInfo {
|
||||||
|
path: string;
|
||||||
|
size: number;
|
||||||
|
type: string;
|
||||||
|
language: string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user