@elsikora/commitizen-plugin-commitlint-ai
Version:
AI-powered Commitizen adapter with Commitlint integration
45 lines (42 loc) • 2.42 kB
JavaScript
import { createAppContainer } from './infrastructure/di/container.js';
import { CommitizenAdapter } from './presentation/commitizen.adapter.js';
import 'dotenv/config';
export { ConfigureLLMUseCase } from './application/use-case/configure-llm.use-case.js';
export { GenerateCommitMessageUseCase } from './application/use-case/generate-commit-message.use-case.js';
export { ManualCommitUseCase } from './application/use-case/manual-commit.use-case.js';
export { ValidateCommitMessageUseCase } from './application/use-case/validate-commit-message.use-case.js';
export { CommitMessage } from './domain/entity/commit-message.entity.js';
export { LLMConfiguration } from './domain/entity/llm-configuration.entity.js';
export { EAnthropicModel } from './domain/enum/anthropic-model.enum.js';
export { EAWSBedrockModel } from './domain/enum/aws-bedrock-model.enum.js';
export { EAzureOpenAIModel } from './domain/enum/azure-openai-model.enum.js';
export { ECommitMode } from './domain/enum/commit-mode.enum.js';
export { EGoogleModel } from './domain/enum/google-model.enum.js';
export { ELLMProvider } from './domain/enum/llm-provider.enum.js';
export { ELogLevel } from './domain/enum/log-level.enum.js';
export { EOllamaModel } from './domain/enum/ollama-model.enum.js';
export { EOpenAIModel } from './domain/enum/openai-model.enum.js';
export { ApiKey } from './domain/value-object/api-key.value-object.js';
export { CommitBody } from './domain/value-object/commit-body.value-object.js';
export { CommitHeader } from './domain/value-object/commit-header.value-object.js';
// Initialize the DI container
createAppContainer();
// Create adapter instance
const adapter = new CommitizenAdapter();
/**
* Commitizen adapter entry point
* This function is called by Commitizen when running `git cz`
* It delegates to the CommitizenAdapter to handle the interactive commit process
* @param {unknown} inquirerInstance - The inquirer instance provided by Commitizen
* @param {(message: string) => void} commit - Callback function to execute the commit with the generated message
* @returns {Promise<void>} Promise that resolves when the commit process is complete
*/
async function prompter(inquirerInstance, commit) {
return adapter.prompter(inquirerInstance, commit);
}
// Export the prompter function for Commitizen
var index = {
prompter,
};
export { index as default, prompter };
//# sourceMappingURL=index.js.map