@elsikora/commitizen-plugin-commitlint-ai 2.0.0-dev.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -58
- package/dist/cjs/application/constant/config-file-directory.constant.d.ts +0 -1
- package/dist/cjs/application/constant/config-module-name.constant.d.ts +0 -1
- package/dist/cjs/application/constant/index.d.ts +2 -3
- package/dist/cjs/application/index.d.ts +2 -3
- package/dist/cjs/application/interface/cli-interface-service-select-options.interface.d.ts +0 -1
- package/dist/cjs/application/interface/cli-interface-service.interface.d.ts +1 -2
- package/dist/cjs/application/interface/command-service.interface.d.ts +0 -1
- package/dist/cjs/application/interface/commit-repository.interface.d.ts +1 -2
- package/dist/cjs/application/interface/commit-validator.interface.d.ts +2 -3
- package/dist/cjs/application/interface/config-service.interface.d.ts +2 -3
- package/dist/cjs/application/interface/config.interface.d.ts +2 -3
- package/dist/cjs/application/interface/file-system-service.interface.d.ts +0 -1
- package/dist/cjs/application/interface/index.d.ts +9 -10
- package/dist/cjs/application/interface/llm-service.interface.d.ts +2 -3
- package/dist/cjs/application/use-case/configure-llm.use-case.d.ts +11 -11
- package/dist/cjs/application/use-case/configure-llm.use-case.js +25 -19
- package/dist/cjs/application/use-case/configure-llm.use-case.js.map +1 -1
- package/dist/cjs/application/use-case/generate-commit-message.use-case.d.ts +8 -9
- package/dist/cjs/application/use-case/generate-commit-message.use-case.js +5 -5
- package/dist/cjs/application/use-case/index.d.ts +4 -5
- package/dist/cjs/application/use-case/manual-commit.use-case.d.ts +5 -6
- package/dist/cjs/application/use-case/manual-commit.use-case.js +4 -2
- package/dist/cjs/application/use-case/manual-commit.use-case.js.map +1 -1
- package/dist/cjs/application/use-case/validate-commit-message.use-case.d.ts +11 -12
- package/dist/cjs/application/use-case/validate-commit-message.use-case.js +9 -8
- package/dist/cjs/application/use-case/validate-commit-message.use-case.js.map +1 -1
- package/dist/cjs/domain/constant/index.d.ts +1 -2
- package/dist/cjs/domain/constant/numeric.constant.d.ts +0 -1
- package/dist/cjs/domain/entity/commit-message.entity.d.ts +19 -7
- package/dist/cjs/domain/entity/commit-message.entity.js +19 -4
- package/dist/cjs/domain/entity/commit-message.entity.js.map +1 -1
- package/dist/cjs/domain/entity/index.d.ts +2 -3
- package/dist/cjs/domain/entity/llm-configuration.entity.d.ts +25 -18
- package/dist/cjs/domain/entity/llm-configuration.entity.js +27 -16
- package/dist/cjs/domain/entity/llm-configuration.entity.js.map +1 -1
- package/dist/cjs/domain/enum/anthropic-model.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/aws-bedrock-model.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/azure-openai-model.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/commit-mode.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/google-model.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/index.d.ts +9 -10
- package/dist/cjs/domain/enum/llm-provider.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/log-level.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/ollama-model.enum.d.ts +0 -1
- package/dist/cjs/domain/enum/openai-model.enum.d.ts +0 -1
- package/dist/cjs/domain/index.d.ts +3 -4
- package/dist/cjs/domain/value-object/api-key.value-object.d.ts +5 -4
- package/dist/cjs/domain/value-object/api-key.value-object.js +5 -3
- package/dist/cjs/domain/value-object/api-key.value-object.js.map +1 -1
- package/dist/cjs/domain/value-object/commit-body.value-object.d.ts +7 -1
- package/dist/cjs/domain/value-object/commit-body.value-object.js +7 -0
- package/dist/cjs/domain/value-object/commit-body.value-object.js.map +1 -1
- package/dist/cjs/domain/value-object/commit-header.value-object.d.ts +6 -1
- package/dist/cjs/domain/value-object/commit-header.value-object.js +6 -0
- package/dist/cjs/domain/value-object/commit-header.value-object.js.map +1 -1
- package/dist/cjs/domain/value-object/index.d.ts +3 -4
- package/dist/cjs/index.d.ts +15 -4
- package/dist/cjs/index.js +17 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.d.ts +15 -16
- package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.js +13 -13
- package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.js.map +1 -1
- package/dist/cjs/infrastructure/commit-validator/index.d.ts +1 -2
- package/dist/cjs/infrastructure/di/container.d.ts +1 -2
- package/dist/cjs/infrastructure/di/container.js +1 -1
- package/dist/cjs/infrastructure/di/index.d.ts +1 -2
- package/dist/cjs/infrastructure/git/git-commit.repository.d.ts +9 -10
- package/dist/cjs/infrastructure/git/git-commit.repository.js +6 -6
- package/dist/cjs/infrastructure/git/index.d.ts +1 -2
- package/dist/cjs/infrastructure/index.d.ts +4 -5
- package/dist/cjs/infrastructure/llm/anthropic-llm.service.d.ts +14 -15
- package/dist/cjs/infrastructure/llm/anthropic-llm.service.js +25 -12
- package/dist/cjs/infrastructure/llm/anthropic-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.d.ts +23 -24
- package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.js +44 -35
- package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/llm/azure-openai-llm.service.d.ts +16 -17
- package/dist/cjs/infrastructure/llm/azure-openai-llm.service.js +29 -16
- package/dist/cjs/infrastructure/llm/azure-openai-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/llm/google-llm.service.d.ts +16 -17
- package/dist/cjs/infrastructure/llm/google-llm.service.js +27 -14
- package/dist/cjs/infrastructure/llm/google-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/llm/index.d.ts +6 -7
- package/dist/cjs/infrastructure/llm/ollama-llm.service.d.ts +16 -17
- package/dist/cjs/infrastructure/llm/ollama-llm.service.js +39 -21
- package/dist/cjs/infrastructure/llm/ollama-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/llm/openai-llm.service.d.ts +16 -17
- package/dist/cjs/infrastructure/llm/openai-llm.service.js +27 -14
- package/dist/cjs/infrastructure/llm/openai-llm.service.js.map +1 -1
- package/dist/cjs/infrastructure/service/cosmic-config.service.d.ts +20 -19
- package/dist/cjs/infrastructure/service/cosmic-config.service.js +17 -15
- package/dist/cjs/infrastructure/service/cosmic-config.service.js.map +1 -1
- package/dist/cjs/infrastructure/service/index.d.ts +4 -5
- package/dist/cjs/infrastructure/service/node-command.service.d.ts +14 -13
- package/dist/cjs/infrastructure/service/node-command.service.js +12 -10
- package/dist/cjs/infrastructure/service/node-command.service.js.map +1 -1
- package/dist/cjs/infrastructure/service/node-file-system.service.d.ts +22 -23
- package/dist/cjs/infrastructure/service/node-file-system.service.js +21 -21
- package/dist/cjs/infrastructure/service/prompts-cli-interface.service.d.ts +39 -37
- package/dist/cjs/infrastructure/service/prompts-cli-interface.service.js +37 -34
- package/dist/cjs/infrastructure/service/prompts-cli-interface.service.js.map +1 -1
- package/dist/cjs/presentation/commitizen.adapter.d.ts +7 -3
- package/dist/cjs/presentation/commitizen.adapter.js +23 -11
- package/dist/cjs/presentation/commitizen.adapter.js.map +1 -1
- package/dist/cjs/presentation/index.d.ts +1 -2
- package/dist/esm/application/constant/config-file-directory.constant.d.ts +0 -1
- package/dist/esm/application/constant/config-module-name.constant.d.ts +0 -1
- package/dist/esm/application/constant/index.d.ts +2 -3
- package/dist/esm/application/index.d.ts +2 -3
- package/dist/esm/application/interface/cli-interface-service-select-options.interface.d.ts +0 -1
- package/dist/esm/application/interface/cli-interface-service.interface.d.ts +1 -2
- package/dist/esm/application/interface/command-service.interface.d.ts +0 -1
- package/dist/esm/application/interface/commit-repository.interface.d.ts +1 -2
- package/dist/esm/application/interface/commit-validator.interface.d.ts +2 -3
- package/dist/esm/application/interface/config-service.interface.d.ts +2 -3
- package/dist/esm/application/interface/config.interface.d.ts +2 -3
- package/dist/esm/application/interface/file-system-service.interface.d.ts +0 -1
- package/dist/esm/application/interface/index.d.ts +9 -10
- package/dist/esm/application/interface/llm-service.interface.d.ts +2 -3
- package/dist/esm/application/use-case/configure-llm.use-case.d.ts +11 -11
- package/dist/esm/application/use-case/configure-llm.use-case.js +25 -19
- package/dist/esm/application/use-case/configure-llm.use-case.js.map +1 -1
- package/dist/esm/application/use-case/generate-commit-message.use-case.d.ts +8 -9
- package/dist/esm/application/use-case/generate-commit-message.use-case.js +5 -5
- package/dist/esm/application/use-case/index.d.ts +4 -5
- package/dist/esm/application/use-case/manual-commit.use-case.d.ts +5 -6
- package/dist/esm/application/use-case/manual-commit.use-case.js +4 -2
- package/dist/esm/application/use-case/manual-commit.use-case.js.map +1 -1
- package/dist/esm/application/use-case/validate-commit-message.use-case.d.ts +11 -12
- package/dist/esm/application/use-case/validate-commit-message.use-case.js +9 -8
- package/dist/esm/application/use-case/validate-commit-message.use-case.js.map +1 -1
- package/dist/esm/domain/constant/index.d.ts +1 -2
- package/dist/esm/domain/constant/numeric.constant.d.ts +0 -1
- package/dist/esm/domain/entity/commit-message.entity.d.ts +19 -7
- package/dist/esm/domain/entity/commit-message.entity.js +19 -4
- package/dist/esm/domain/entity/commit-message.entity.js.map +1 -1
- package/dist/esm/domain/entity/index.d.ts +2 -3
- package/dist/esm/domain/entity/llm-configuration.entity.d.ts +25 -18
- package/dist/esm/domain/entity/llm-configuration.entity.js +27 -16
- package/dist/esm/domain/entity/llm-configuration.entity.js.map +1 -1
- package/dist/esm/domain/enum/anthropic-model.enum.d.ts +0 -1
- package/dist/esm/domain/enum/aws-bedrock-model.enum.d.ts +0 -1
- package/dist/esm/domain/enum/azure-openai-model.enum.d.ts +0 -1
- package/dist/esm/domain/enum/commit-mode.enum.d.ts +0 -1
- package/dist/esm/domain/enum/google-model.enum.d.ts +0 -1
- package/dist/esm/domain/enum/index.d.ts +9 -10
- package/dist/esm/domain/enum/llm-provider.enum.d.ts +0 -1
- package/dist/esm/domain/enum/log-level.enum.d.ts +0 -1
- package/dist/esm/domain/enum/ollama-model.enum.d.ts +0 -1
- package/dist/esm/domain/enum/openai-model.enum.d.ts +0 -1
- package/dist/esm/domain/index.d.ts +3 -4
- package/dist/esm/domain/value-object/api-key.value-object.d.ts +5 -4
- package/dist/esm/domain/value-object/api-key.value-object.js +5 -3
- package/dist/esm/domain/value-object/api-key.value-object.js.map +1 -1
- package/dist/esm/domain/value-object/commit-body.value-object.d.ts +7 -1
- package/dist/esm/domain/value-object/commit-body.value-object.js +7 -0
- package/dist/esm/domain/value-object/commit-body.value-object.js.map +1 -1
- package/dist/esm/domain/value-object/commit-header.value-object.d.ts +6 -1
- package/dist/esm/domain/value-object/commit-header.value-object.js +6 -0
- package/dist/esm/domain/value-object/commit-header.value-object.js.map +1 -1
- package/dist/esm/domain/value-object/index.d.ts +3 -4
- package/dist/esm/index.d.ts +15 -4
- package/dist/esm/index.js +15 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.d.ts +15 -16
- package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.js +13 -13
- package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.js.map +1 -1
- package/dist/esm/infrastructure/commit-validator/index.d.ts +1 -2
- package/dist/esm/infrastructure/di/container.d.ts +1 -2
- package/dist/esm/infrastructure/di/container.js +1 -1
- package/dist/esm/infrastructure/di/index.d.ts +1 -2
- package/dist/esm/infrastructure/git/git-commit.repository.d.ts +9 -10
- package/dist/esm/infrastructure/git/git-commit.repository.js +6 -6
- package/dist/esm/infrastructure/git/index.d.ts +1 -2
- package/dist/esm/infrastructure/index.d.ts +4 -5
- package/dist/esm/infrastructure/llm/anthropic-llm.service.d.ts +14 -15
- package/dist/esm/infrastructure/llm/anthropic-llm.service.js +25 -12
- package/dist/esm/infrastructure/llm/anthropic-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.d.ts +23 -24
- package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.js +37 -28
- package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/llm/azure-openai-llm.service.d.ts +16 -17
- package/dist/esm/infrastructure/llm/azure-openai-llm.service.js +29 -16
- package/dist/esm/infrastructure/llm/azure-openai-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/llm/google-llm.service.d.ts +16 -17
- package/dist/esm/infrastructure/llm/google-llm.service.js +27 -14
- package/dist/esm/infrastructure/llm/google-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/llm/index.d.ts +6 -7
- package/dist/esm/infrastructure/llm/ollama-llm.service.d.ts +16 -17
- package/dist/esm/infrastructure/llm/ollama-llm.service.js +39 -21
- package/dist/esm/infrastructure/llm/ollama-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/llm/openai-llm.service.d.ts +16 -17
- package/dist/esm/infrastructure/llm/openai-llm.service.js +27 -14
- package/dist/esm/infrastructure/llm/openai-llm.service.js.map +1 -1
- package/dist/esm/infrastructure/service/cosmic-config.service.d.ts +20 -19
- package/dist/esm/infrastructure/service/cosmic-config.service.js +17 -15
- package/dist/esm/infrastructure/service/cosmic-config.service.js.map +1 -1
- package/dist/esm/infrastructure/service/index.d.ts +4 -5
- package/dist/esm/infrastructure/service/node-command.service.d.ts +14 -13
- package/dist/esm/infrastructure/service/node-command.service.js +12 -10
- package/dist/esm/infrastructure/service/node-command.service.js.map +1 -1
- package/dist/esm/infrastructure/service/node-file-system.service.d.ts +22 -23
- package/dist/esm/infrastructure/service/node-file-system.service.js +21 -21
- package/dist/esm/infrastructure/service/prompts-cli-interface.service.d.ts +39 -37
- package/dist/esm/infrastructure/service/prompts-cli-interface.service.js +37 -34
- package/dist/esm/infrastructure/service/prompts-cli-interface.service.js.map +1 -1
- package/dist/esm/package.json +19 -0
- package/dist/esm/presentation/commitizen.adapter.d.ts +7 -3
- package/dist/esm/presentation/commitizen.adapter.js +23 -11
- package/dist/esm/presentation/commitizen.adapter.js.map +1 -1
- package/dist/esm/presentation/index.d.ts +1 -2
- package/package.json +11 -3
- package/dist/cjs/application/constant/config-file-directory.constant.d.ts.map +0 -1
- package/dist/cjs/application/constant/config-module-name.constant.d.ts.map +0 -1
- package/dist/cjs/application/constant/index.d.ts.map +0 -1
- package/dist/cjs/application/index.d.ts.map +0 -1
- package/dist/cjs/application/interface/cli-interface-service-select-options.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/cli-interface-service.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/command-service.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/commit-repository.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/commit-validator.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/config-service.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/config.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/file-system-service.interface.d.ts.map +0 -1
- package/dist/cjs/application/interface/index.d.ts.map +0 -1
- package/dist/cjs/application/interface/llm-service.interface.d.ts.map +0 -1
- package/dist/cjs/application/use-case/configure-llm.use-case.d.ts.map +0 -1
- package/dist/cjs/application/use-case/generate-commit-message.use-case.d.ts.map +0 -1
- package/dist/cjs/application/use-case/index.d.ts.map +0 -1
- package/dist/cjs/application/use-case/manual-commit.use-case.d.ts.map +0 -1
- package/dist/cjs/application/use-case/validate-commit-message.use-case.d.ts.map +0 -1
- package/dist/cjs/domain/constant/index.d.ts.map +0 -1
- package/dist/cjs/domain/constant/numeric.constant.d.ts.map +0 -1
- package/dist/cjs/domain/entity/commit-message.entity.d.ts.map +0 -1
- package/dist/cjs/domain/entity/index.d.ts.map +0 -1
- package/dist/cjs/domain/entity/llm-configuration.entity.d.ts.map +0 -1
- package/dist/cjs/domain/enum/anthropic-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/aws-bedrock-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/azure-openai-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/commit-mode.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/google-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/index.d.ts.map +0 -1
- package/dist/cjs/domain/enum/llm-provider.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/log-level.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/ollama-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/enum/openai-model.enum.d.ts.map +0 -1
- package/dist/cjs/domain/index.d.ts.map +0 -1
- package/dist/cjs/domain/value-object/api-key.value-object.d.ts.map +0 -1
- package/dist/cjs/domain/value-object/commit-body.value-object.d.ts.map +0 -1
- package/dist/cjs/domain/value-object/commit-header.value-object.d.ts.map +0 -1
- package/dist/cjs/domain/value-object/index.d.ts.map +0 -1
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/commit-validator/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/di/container.d.ts.map +0 -1
- package/dist/cjs/infrastructure/di/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/git/git-commit.repository.d.ts.map +0 -1
- package/dist/cjs/infrastructure/git/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/anthropic-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/azure-openai-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/google-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/ollama-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/llm/openai-llm.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/service/cosmic-config.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/service/index.d.ts.map +0 -1
- package/dist/cjs/infrastructure/service/node-command.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/service/node-file-system.service.d.ts.map +0 -1
- package/dist/cjs/infrastructure/service/prompts-cli-interface.service.d.ts.map +0 -1
- package/dist/cjs/presentation/commitizen.adapter.d.ts.map +0 -1
- package/dist/cjs/presentation/index.d.ts.map +0 -1
- package/dist/esm/application/constant/config-file-directory.constant.d.ts.map +0 -1
- package/dist/esm/application/constant/config-module-name.constant.d.ts.map +0 -1
- package/dist/esm/application/constant/index.d.ts.map +0 -1
- package/dist/esm/application/index.d.ts.map +0 -1
- package/dist/esm/application/interface/cli-interface-service-select-options.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/cli-interface-service.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/command-service.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/commit-repository.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/commit-validator.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/config-service.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/config.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/file-system-service.interface.d.ts.map +0 -1
- package/dist/esm/application/interface/index.d.ts.map +0 -1
- package/dist/esm/application/interface/llm-service.interface.d.ts.map +0 -1
- package/dist/esm/application/use-case/configure-llm.use-case.d.ts.map +0 -1
- package/dist/esm/application/use-case/generate-commit-message.use-case.d.ts.map +0 -1
- package/dist/esm/application/use-case/index.d.ts.map +0 -1
- package/dist/esm/application/use-case/manual-commit.use-case.d.ts.map +0 -1
- package/dist/esm/application/use-case/validate-commit-message.use-case.d.ts.map +0 -1
- package/dist/esm/domain/constant/index.d.ts.map +0 -1
- package/dist/esm/domain/constant/numeric.constant.d.ts.map +0 -1
- package/dist/esm/domain/entity/commit-message.entity.d.ts.map +0 -1
- package/dist/esm/domain/entity/index.d.ts.map +0 -1
- package/dist/esm/domain/entity/llm-configuration.entity.d.ts.map +0 -1
- package/dist/esm/domain/enum/anthropic-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/aws-bedrock-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/azure-openai-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/commit-mode.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/google-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/index.d.ts.map +0 -1
- package/dist/esm/domain/enum/llm-provider.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/log-level.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/ollama-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/enum/openai-model.enum.d.ts.map +0 -1
- package/dist/esm/domain/index.d.ts.map +0 -1
- package/dist/esm/domain/value-object/api-key.value-object.d.ts.map +0 -1
- package/dist/esm/domain/value-object/commit-body.value-object.d.ts.map +0 -1
- package/dist/esm/domain/value-object/commit-header.value-object.d.ts.map +0 -1
- package/dist/esm/domain/value-object/index.d.ts.map +0 -1
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/commit-validator/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/di/container.d.ts.map +0 -1
- package/dist/esm/infrastructure/di/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/git/git-commit.repository.d.ts.map +0 -1
- package/dist/esm/infrastructure/git/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/anthropic-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/azure-openai-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/google-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/ollama-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/llm/openai-llm.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/service/cosmic-config.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/service/index.d.ts.map +0 -1
- package/dist/esm/infrastructure/service/node-command.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/service/node-file-system.service.d.ts.map +0 -1
- package/dist/esm/infrastructure/service/prompts-cli-interface.service.d.ts.map +0 -1
- package/dist/esm/presentation/commitizen.adapter.d.ts.map +0 -1
- package/dist/esm/presentation/index.d.ts.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import type { ILlmPromptContext, ILlmService } from
|
|
2
|
-
import type { LLMConfiguration } from
|
|
3
|
-
import { CommitMessage } from
|
|
1
|
+
import type { ILlmPromptContext, ILlmService } from '../../application/interface/llm-service.interface';
|
|
2
|
+
import type { LLMConfiguration } from '../../domain/entity/llm-configuration.entity';
|
|
3
|
+
import { CommitMessage } from '../../domain/entity/commit-message.entity';
|
|
4
4
|
/**
|
|
5
5
|
* OpenAI implementation of the LLM service
|
|
6
6
|
*/
|
|
7
7
|
export declare class OpenAILlmService implements ILlmService {
|
|
8
8
|
/**
|
|
9
9
|
* Generate a commit message using OpenAI
|
|
10
|
-
* @param context - The context for generating the commit message
|
|
11
|
-
* @param configuration - The LLM configuration
|
|
12
|
-
* @returns Promise resolving to the generated commit message
|
|
10
|
+
* @param {ILlmPromptContext} context - The context for generating the commit message
|
|
11
|
+
* @param {LLMConfiguration} configuration - The LLM configuration
|
|
12
|
+
* @returns {Promise<CommitMessage>} Promise resolving to the generated commit message
|
|
13
13
|
*/
|
|
14
14
|
generateCommitMessage(context: ILlmPromptContext, configuration: LLMConfiguration): Promise<CommitMessage>;
|
|
15
15
|
/**
|
|
16
16
|
* Check if the service supports the given configuration
|
|
17
|
-
* @param configuration - The LLM configuration to check
|
|
18
|
-
* @returns True if the service supports the configuration
|
|
17
|
+
* @param {LLMConfiguration} configuration - The LLM configuration to check
|
|
18
|
+
* @returns {boolean} True if the service supports the configuration
|
|
19
19
|
*/
|
|
20
20
|
supports(configuration: LLMConfiguration): boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Build the system prompt for OpenAI
|
|
23
|
-
* @param context - The prompt context
|
|
24
|
-
* @returns The system prompt
|
|
23
|
+
* @param {ILlmPromptContext} context - The prompt context
|
|
24
|
+
* @returns {string} The system prompt
|
|
25
25
|
*/
|
|
26
26
|
private buildSystemPrompt;
|
|
27
27
|
/**
|
|
28
28
|
* Build the user prompt for OpenAI
|
|
29
|
-
* @param context - The prompt context
|
|
30
|
-
* @returns The user prompt
|
|
29
|
+
* @param {ILlmPromptContext} context - The prompt context
|
|
30
|
+
* @returns {string} The user prompt
|
|
31
31
|
*/
|
|
32
32
|
private buildUserPrompt;
|
|
33
33
|
/**
|
|
34
34
|
* Format commitlint rules into human-readable instructions
|
|
35
|
-
* @param rules - The commitlint rules object
|
|
36
|
-
* @returns Formatted rules as string
|
|
35
|
+
* @param {Record<string, unknown>} rules - The commitlint rules object
|
|
36
|
+
* @returns {string} Formatted rules as string
|
|
37
37
|
*/
|
|
38
38
|
private formatCommitlintRules;
|
|
39
39
|
/**
|
|
40
40
|
* Parse the commit message from the LLM response
|
|
41
|
-
* @param content - The response content
|
|
42
|
-
* @returns The parsed commit message
|
|
41
|
+
* @param {string} content - The response content
|
|
42
|
+
* @returns {CommitMessage} The parsed commit message
|
|
43
43
|
*/
|
|
44
44
|
private parseCommitMessage;
|
|
45
45
|
}
|
|
46
|
-
//# sourceMappingURL=openai-llm.service.d.ts.map
|
|
@@ -11,9 +11,9 @@ import { CommitHeader } from '../../domain/value-object/commit-header.value-obje
|
|
|
11
11
|
class OpenAILlmService {
|
|
12
12
|
/**
|
|
13
13
|
* Generate a commit message using OpenAI
|
|
14
|
-
* @param context - The context for generating the commit message
|
|
15
|
-
* @param configuration - The LLM configuration
|
|
16
|
-
* @returns Promise resolving to the generated commit message
|
|
14
|
+
* @param {ILlmPromptContext} context - The context for generating the commit message
|
|
15
|
+
* @param {LLMConfiguration} configuration - The LLM configuration
|
|
16
|
+
* @returns {Promise<CommitMessage>} Promise resolving to the generated commit message
|
|
17
17
|
*/
|
|
18
18
|
async generateCommitMessage(context, configuration) {
|
|
19
19
|
const openai = new OpenAI({
|
|
@@ -38,16 +38,16 @@ class OpenAILlmService {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Check if the service supports the given configuration
|
|
41
|
-
* @param configuration - The LLM configuration to check
|
|
42
|
-
* @returns True if the service supports the configuration
|
|
41
|
+
* @param {LLMConfiguration} configuration - The LLM configuration to check
|
|
42
|
+
* @returns {boolean} True if the service supports the configuration
|
|
43
43
|
*/
|
|
44
44
|
supports(configuration) {
|
|
45
45
|
return configuration.getProvider() === "openai";
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Build the system prompt for OpenAI
|
|
49
|
-
* @param context - The prompt context
|
|
50
|
-
* @returns The system prompt
|
|
49
|
+
* @param {ILlmPromptContext} context - The prompt context
|
|
50
|
+
* @returns {string} The system prompt
|
|
51
51
|
*/
|
|
52
52
|
buildSystemPrompt(context) {
|
|
53
53
|
let prompt = "";
|
|
@@ -127,8 +127,8 @@ class OpenAILlmService {
|
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* Build the user prompt for OpenAI
|
|
130
|
-
* @param context - The prompt context
|
|
131
|
-
* @returns The user prompt
|
|
130
|
+
* @param {ILlmPromptContext} context - The prompt context
|
|
131
|
+
* @returns {string} The user prompt
|
|
132
132
|
*/
|
|
133
133
|
buildUserPrompt(context) {
|
|
134
134
|
let prompt = "";
|
|
@@ -167,8 +167,8 @@ class OpenAILlmService {
|
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Format commitlint rules into human-readable instructions
|
|
170
|
-
* @param rules - The commitlint rules object
|
|
171
|
-
* @returns Formatted rules as string
|
|
170
|
+
* @param {Record<string, unknown>} rules - The commitlint rules object
|
|
171
|
+
* @returns {string} Formatted rules as string
|
|
172
172
|
*/
|
|
173
173
|
formatCommitlintRules(rules) {
|
|
174
174
|
const formattedRules = [];
|
|
@@ -262,8 +262,8 @@ class OpenAILlmService {
|
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* Parse the commit message from the LLM response
|
|
265
|
-
* @param content - The response content
|
|
266
|
-
* @returns The parsed commit message
|
|
265
|
+
* @param {string} content - The response content
|
|
266
|
+
* @returns {CommitMessage} The parsed commit message
|
|
267
267
|
*/
|
|
268
268
|
parseCommitMessage(content) {
|
|
269
269
|
try {
|
|
@@ -294,19 +294,32 @@ class OpenAILlmService {
|
|
|
294
294
|
catch {
|
|
295
295
|
// Fallback: try to parse as plain text
|
|
296
296
|
const lines = content.trim().split("\n");
|
|
297
|
+
if (lines.length === 0 || !lines[0]) {
|
|
298
|
+
throw new Error("No content to parse");
|
|
299
|
+
}
|
|
297
300
|
const headerLine = lines[0];
|
|
298
301
|
// Parse header: type(scope): subject
|
|
299
302
|
const headerMatch = /^(\w+)(?:\(([^)]+)\))?: (.+)$/.exec(headerLine);
|
|
300
303
|
if (!headerMatch) {
|
|
301
304
|
throw new Error(`Invalid commit message format. Could not parse: "${headerLine}"`);
|
|
302
305
|
}
|
|
303
|
-
const
|
|
306
|
+
const HEADER_TYPE_INDEX = 1;
|
|
307
|
+
const HEADER_SCOPE_INDEX = 2;
|
|
308
|
+
const HEADER_SUBJECT_INDEX = 3;
|
|
309
|
+
const type = headerMatch[HEADER_TYPE_INDEX];
|
|
310
|
+
const scope = headerMatch[HEADER_SCOPE_INDEX];
|
|
311
|
+
const subject = headerMatch[HEADER_SUBJECT_INDEX];
|
|
312
|
+
if (!type || !subject) {
|
|
313
|
+
throw new Error("Missing required fields: type and subject");
|
|
314
|
+
}
|
|
304
315
|
const header = new CommitHeader(type, subject, scope);
|
|
305
316
|
// Parse body and breaking changes
|
|
306
317
|
let bodyContent = "";
|
|
307
318
|
let breakingChange;
|
|
308
319
|
for (let index = 1; index < lines.length; index++) {
|
|
309
320
|
const line = lines[index];
|
|
321
|
+
if (!line)
|
|
322
|
+
continue;
|
|
310
323
|
if (line.startsWith("BREAKING CHANGE:")) {
|
|
311
324
|
breakingChange = line.slice("BREAKING CHANGE:".length).trim();
|
|
312
325
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-llm.service.js","sources":["../../../../../src/infrastructure/llm/openai-llm.service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAcA;;AAEG;MACU,gBAAgB,CAAA;AAC5B;;;;;AAKG;AACH,IAAA,MAAM,qBAAqB,CAAC,OAA0B,EAAE,aAA+B,EAAA;AACtF,QAAA,MAAM,MAAM,GAAW,IAAI,MAAM,CAAC;AACjC,YAAA,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE;AAC5C,SAAA,CAAC;QAEF,MAAM,YAAY,GAAW,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAC5D,MAAM,UAAU,GAAW,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;QAExD,MAAM,QAAQ,GAAmB,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;AACrE,YAAA,UAAU,EAAE,iBAAiB;AAC7B,YAAA,QAAQ,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;AACzC,gBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;AACrC,aAAA;YACD,KAAK,EAAE,aAAa,CAAC,QAAQ,EAAE,IAAI,YAAY,CAAC,MAAM;AACtD,YAAA,WAAW,EAAE,kBAAkB;AAC/B,SAAA,CAAC;AAEF,QAAA,MAAM,OAAO,GAA8B,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO;QAEhF,IAAI,CAAC,OAAO,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;;AAG3C,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;;AAGxC;;;;AAIG;AACH,IAAA,QAAQ,CAAC,aAA+B,EAAA;AACvC,QAAA,OA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B,KAAK,CAAC,KAAK,CAAC;AAE7C,gBAAA,IAAI,CAAC,IAAI;oBAAE;AAEX,gBAAA,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;AACxC,oBAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE;;AACvD,qBAAA,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;AACvB,oBAAA,WAAW,IAAI,IAAI,GAAG,IAAI;;;AAI5B,YAAA,MAAM,IAAI,GAAe,IAAI,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,SAAS,EAAE,cAAc,CAAC;AAExF,YAAA,OAAO,IAAI,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC;;;AAGxC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IConfigService } from
|
|
2
|
-
import type { IConfig } from
|
|
3
|
-
import type { IFileSystemService } from
|
|
1
|
+
import type { IConfigService } from '../../application/interface/config-service.interface';
|
|
2
|
+
import type { IConfig } from '../../application/interface/config.interface';
|
|
3
|
+
import type { IFileSystemService } from '../../application/interface/file-system-service.interface';
|
|
4
4
|
/**
|
|
5
5
|
* Implementation of ConfigService that uses cosmiconfig for configuration management.
|
|
6
6
|
* Cosmiconfig searches for configuration in standard locations and formats.
|
|
@@ -12,7 +12,7 @@ export declare class CosmicConfigService implements IConfigService {
|
|
|
12
12
|
private readonly EXPLORER;
|
|
13
13
|
/**
|
|
14
14
|
* Initializes a new instance of the CosmicConfigService.
|
|
15
|
-
* @param fileSystemService
|
|
15
|
+
* @param {IFileSystemService} fileSystemService - The file system service for file operations
|
|
16
16
|
*/
|
|
17
17
|
constructor(fileSystemService: IFileSystemService);
|
|
18
18
|
/**
|
|
@@ -21,45 +21,46 @@ export declare class CosmicConfigService implements IConfigService {
|
|
|
21
21
|
clearCaches(): void;
|
|
22
22
|
/**
|
|
23
23
|
* Checks if the configuration exists.
|
|
24
|
-
* @returns Promise resolving to true if the configuration exists, false otherwise
|
|
24
|
+
* @returns {Promise<boolean>} Promise resolving to true if the configuration exists, false otherwise
|
|
25
25
|
*/
|
|
26
26
|
exists(): Promise<boolean>;
|
|
27
27
|
/**
|
|
28
28
|
* Retrieves the current configuration.
|
|
29
|
-
* @returns Promise resolving to the configuration object
|
|
29
|
+
* @returns {Promise<IConfig>} Promise resolving to the configuration object
|
|
30
30
|
*/
|
|
31
31
|
get(): Promise<IConfig>;
|
|
32
32
|
/**
|
|
33
33
|
* Gets a specific property from the configuration.
|
|
34
|
-
* @param property - The property key to retrieve
|
|
35
|
-
* @returns Promise resolving to the value of the specified property
|
|
34
|
+
* @param {K} property - The property key to retrieve
|
|
35
|
+
* @returns {Promise<IConfig[K]>} Promise resolving to the value of the specified property
|
|
36
|
+
* @template K - The type of the property key
|
|
36
37
|
*/
|
|
37
38
|
getProperty<K extends keyof IConfig>(property: K): Promise<IConfig[K]>;
|
|
38
39
|
/**
|
|
39
40
|
* Merges partial configuration with the existing configuration.
|
|
40
|
-
* @param partial - Partial configuration to merge
|
|
41
|
-
* @returns Promise that resolves when the merged configuration is saved
|
|
41
|
+
* @param {Partial<IConfig>} partial - Partial configuration to merge
|
|
42
|
+
* @returns {Promise<void>} Promise that resolves when the merged configuration is saved
|
|
42
43
|
*/
|
|
43
44
|
merge(partial: Partial<IConfig>): Promise<void>;
|
|
44
45
|
/**
|
|
45
46
|
* Saves the entire configuration.
|
|
46
|
-
* @param config - The complete configuration to save
|
|
47
|
-
* @returns Promise that resolves when the configuration is saved
|
|
47
|
+
* @param {IConfig} config - The complete configuration to save
|
|
48
|
+
* @returns {Promise<void>} Promise that resolves when the configuration is saved
|
|
48
49
|
*/
|
|
49
50
|
set(config: IConfig): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* Sets a specific property in the configuration.
|
|
52
|
-
* @param property - The property key to set
|
|
53
|
-
* @param value - The value to assign to the property
|
|
54
|
-
* @returns Promise that resolves when the updated configuration is saved
|
|
53
|
+
* @param {K} property - The property key to set
|
|
54
|
+
* @param {IConfig[K]} value - The value to assign to the property
|
|
55
|
+
* @returns {Promise<void>} Promise that resolves when the updated configuration is saved
|
|
56
|
+
* @template K - The type of the property key
|
|
55
57
|
*/
|
|
56
58
|
setProperty<K extends keyof IConfig>(property: K, value: IConfig[K]): Promise<void>;
|
|
57
59
|
/**
|
|
58
60
|
* Writes configuration to a file.
|
|
59
|
-
* @param filepath - Path to write the configuration to
|
|
60
|
-
* @param config - Configuration to write
|
|
61
|
-
* @returns Promise that resolves when the file is written
|
|
61
|
+
* @param {string} filepath - Path to write the configuration to
|
|
62
|
+
* @param {IConfig} config - Configuration to write
|
|
63
|
+
* @returns {Promise<void>} Promise that resolves when the file is written
|
|
62
64
|
*/
|
|
63
65
|
private writeFile;
|
|
64
66
|
}
|
|
65
|
-
//# sourceMappingURL=cosmic-config.service.d.ts.map
|
|
@@ -15,7 +15,7 @@ class CosmicConfigService {
|
|
|
15
15
|
EXPLORER;
|
|
16
16
|
/**
|
|
17
17
|
* Initializes a new instance of the CosmicConfigService.
|
|
18
|
-
* @param fileSystemService
|
|
18
|
+
* @param {IFileSystemService} fileSystemService - The file system service for file operations
|
|
19
19
|
*/
|
|
20
20
|
constructor(fileSystemService) {
|
|
21
21
|
this.FILE_SYSTEM_SERVICE = fileSystemService;
|
|
@@ -47,7 +47,7 @@ class CosmicConfigService {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Checks if the configuration exists.
|
|
50
|
-
* @returns Promise resolving to true if the configuration exists, false otherwise
|
|
50
|
+
* @returns {Promise<boolean>} Promise resolving to true if the configuration exists, false otherwise
|
|
51
51
|
*/
|
|
52
52
|
async exists() {
|
|
53
53
|
const result = await this.EXPLORER.search();
|
|
@@ -55,7 +55,7 @@ class CosmicConfigService {
|
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Retrieves the current configuration.
|
|
58
|
-
* @returns Promise resolving to the configuration object
|
|
58
|
+
* @returns {Promise<IConfig>} Promise resolving to the configuration object
|
|
59
59
|
*/
|
|
60
60
|
async get() {
|
|
61
61
|
if (this.cachedConfig) {
|
|
@@ -70,8 +70,9 @@ class CosmicConfigService {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Gets a specific property from the configuration.
|
|
73
|
-
* @param property - The property key to retrieve
|
|
74
|
-
* @returns Promise resolving to the value of the specified property
|
|
73
|
+
* @param {K} property - The property key to retrieve
|
|
74
|
+
* @returns {Promise<IConfig[K]>} Promise resolving to the value of the specified property
|
|
75
|
+
* @template K - The type of the property key
|
|
75
76
|
*/
|
|
76
77
|
async getProperty(property) {
|
|
77
78
|
const config = await this.get();
|
|
@@ -79,8 +80,8 @@ class CosmicConfigService {
|
|
|
79
80
|
}
|
|
80
81
|
/**
|
|
81
82
|
* Merges partial configuration with the existing configuration.
|
|
82
|
-
* @param partial - Partial configuration to merge
|
|
83
|
-
* @returns Promise that resolves when the merged configuration is saved
|
|
83
|
+
* @param {Partial<IConfig>} partial - Partial configuration to merge
|
|
84
|
+
* @returns {Promise<void>} Promise that resolves when the merged configuration is saved
|
|
84
85
|
*/
|
|
85
86
|
async merge(partial) {
|
|
86
87
|
try {
|
|
@@ -95,8 +96,8 @@ class CosmicConfigService {
|
|
|
95
96
|
}
|
|
96
97
|
/**
|
|
97
98
|
* Saves the entire configuration.
|
|
98
|
-
* @param config - The complete configuration to save
|
|
99
|
-
* @returns Promise that resolves when the configuration is saved
|
|
99
|
+
* @param {IConfig} config - The complete configuration to save
|
|
100
|
+
* @returns {Promise<void>} Promise that resolves when the configuration is saved
|
|
100
101
|
*/
|
|
101
102
|
async set(config) {
|
|
102
103
|
try {
|
|
@@ -113,9 +114,10 @@ class CosmicConfigService {
|
|
|
113
114
|
}
|
|
114
115
|
/**
|
|
115
116
|
* Sets a specific property in the configuration.
|
|
116
|
-
* @param property - The property key to set
|
|
117
|
-
* @param value - The value to assign to the property
|
|
118
|
-
* @returns Promise that resolves when the updated configuration is saved
|
|
117
|
+
* @param {K} property - The property key to set
|
|
118
|
+
* @param {IConfig[K]} value - The value to assign to the property
|
|
119
|
+
* @returns {Promise<void>} Promise that resolves when the updated configuration is saved
|
|
120
|
+
* @template K - The type of the property key
|
|
119
121
|
*/
|
|
120
122
|
async setProperty(property, value) {
|
|
121
123
|
const config = await this.get();
|
|
@@ -124,9 +126,9 @@ class CosmicConfigService {
|
|
|
124
126
|
}
|
|
125
127
|
/**
|
|
126
128
|
* Writes configuration to a file.
|
|
127
|
-
* @param filepath - Path to write the configuration to
|
|
128
|
-
* @param config - Configuration to write
|
|
129
|
-
* @returns Promise that resolves when the file is written
|
|
129
|
+
* @param {string} filepath - Path to write the configuration to
|
|
130
|
+
* @param {IConfig} config - Configuration to write
|
|
131
|
+
* @returns {Promise<void>} Promise that resolves when the file is written
|
|
130
132
|
*/
|
|
131
133
|
async writeFile(filepath, config) {
|
|
132
134
|
const extension = this.FILE_SYSTEM_SERVICE.getExtensionFromFilePath(filepath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmic-config.service.js","sources":["../../../../../src/infrastructure/service/cosmic-config.service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAcA;;;AAGG;MACU,mBAAmB,CAAA;;AAEtB,IAAA,mBAAmB;IAEpB,YAAY,GAAmB,IAAI;AAE1B,IAAA,QAAQ;AAEzB;;;AAGG;AACH,IAAA,WAAA,CAAY,iBAAqC,EAAA;AAChD,QAAA,IAAI,CAAC,mBAAmB,GAAG,iBAAiB;AAE5C,QAAA,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,kBAAkB,EAAE;AAC/C,YAAA,WAAW,EAAE,CAAA,EAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAI,CAAA,EAAA,kBAAkB,CAAE,CAAA;AAC9E,YAAA,YAAY,EAAE;gBACb,cAAc;gBACd,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA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YAAY,EAAE;YACtB,OAAO,IAAI,CAAC,YAAY;;QAGzB,MAAM,MAAM,GAAoE,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;AAE5G,QAAA,IAAI,MAAM,EAAE,MAAM,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM;YAEjC,OAAO,IAAI,CAAC,YAAY;;AAGzB,QAAA,OAAO,EAAa;;AAGrB
|
|
1
|
+
{"version":3,"file":"cosmic-config.service.js","sources":["../../../../../src/infrastructure/service/cosmic-config.service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAcA;;;AAGG;MACU,mBAAmB,CAAA;;AAEtB,IAAA,mBAAmB;IAEpB,YAAY,GAAmB,IAAI;AAE1B,IAAA,QAAQ;AAEzB;;;AAGG;AACH,IAAA,WAAA,CAAY,iBAAqC,EAAA;AAChD,QAAA,IAAI,CAAC,mBAAmB,GAAG,iBAAiB;AAE5C,QAAA,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,kBAAkB,EAAE;AAC/C,YAAA,WAAW,EAAE,CAAA,EAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAI,CAAA,EAAA,kBAAkB,CAAE,CAAA;AAC9E,YAAA,YAAY,EAAE;gBACb,cAAc;gBACd,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,CAAI,EAAA,CAAA;gBACnD,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,CAAS,OAAA,CAAA;gBACxD,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,CAAS,OAAA,CAAA;gBACxD,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,CAAQ,MAAA,CAAA;gBACvD,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,CAAO,KAAA,CAAA;gBACtD,CAAG,EAAA,qBAAqB,CAAK,EAAA,EAAA,kBAAkB,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M,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;AAGrF,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;;AAEpE;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './cosmic-config.service';
|
|
2
|
+
export * from './node-command.service';
|
|
3
|
+
export * from './node-file-system.service';
|
|
4
|
+
export * from './prompts-cli-interface.service';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ICliInterfaceService } from
|
|
2
|
-
import type { ICommandService } from
|
|
1
|
+
import type { ICliInterfaceService } from '../../application/interface/cli-interface-service.interface';
|
|
2
|
+
import type { ICommandService } from '../../application/interface/command-service.interface';
|
|
3
3
|
/**
|
|
4
4
|
* Implementation of the command service using Node.js child_process.
|
|
5
5
|
* Provides functionality to execute shell commands.
|
|
@@ -12,33 +12,34 @@ export declare class NodeCommandService implements ICommandService {
|
|
|
12
12
|
* Allows for async/await usage of command execution.
|
|
13
13
|
*/
|
|
14
14
|
private readonly EXEC_ASYNC;
|
|
15
|
+
/**
|
|
16
|
+
* @param {ICliInterfaceService} cliInterfaceService - The CLI interface service for user interactions
|
|
17
|
+
*/
|
|
15
18
|
constructor(cliInterfaceService: ICliInterfaceService);
|
|
16
19
|
/**
|
|
17
20
|
* Executes a shell command.
|
|
18
|
-
* @param command - The shell command to execute
|
|
19
|
-
* @returns Promise that resolves when the command completes successfully
|
|
21
|
+
* @param {string} command - The shell command to execute
|
|
22
|
+
* @returns {Promise<void>} Promise that resolves when the command completes successfully
|
|
20
23
|
* @throws Will throw an error if the command execution fails, except for npm install which offers retry options
|
|
21
24
|
*/
|
|
22
25
|
execute(command: string): Promise<void>;
|
|
23
26
|
/**
|
|
24
27
|
* Execute a command and return its output
|
|
25
|
-
* @param command - The command to execute
|
|
26
|
-
* @returns Promise that resolves to the command output
|
|
28
|
+
* @param {string} command - The command to execute
|
|
29
|
+
* @returns {Promise<string>} Promise that resolves to the command output
|
|
27
30
|
*/
|
|
28
31
|
executeWithOutput(command: string): Promise<string>;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param command - The original npm command that failed
|
|
32
|
-
* @param error - Error npm object
|
|
33
|
-
* @returns void
|
|
33
|
+
* Format and parse npm error to readable format
|
|
34
|
+
* @param {string} command - The original npm command that failed
|
|
35
|
+
* @param {INodeError} error - Error npm object
|
|
34
36
|
*/
|
|
35
37
|
private formatAndParseNpmError;
|
|
36
38
|
/**
|
|
37
39
|
* Handles npm install command failures by offering retry options to the user.
|
|
38
|
-
* @param originalCommand - The original npm command that failed
|
|
39
|
-
* @returns Promise that resolves when the chosen action completes
|
|
40
|
+
* @param {string} originalCommand - The original npm command that failed
|
|
41
|
+
* @returns {Promise<void>} Promise that resolves when the chosen action completes
|
|
40
42
|
* @throws Will throw an error if the user chooses to cancel or if retried command still fails
|
|
41
43
|
*/
|
|
42
44
|
private handleNpmInstallFailure;
|
|
43
45
|
}
|
|
44
|
-
//# sourceMappingURL=node-command.service.d.ts.map
|
|
@@ -14,13 +14,16 @@ class NodeCommandService {
|
|
|
14
14
|
* Allows for async/await usage of command execution.
|
|
15
15
|
*/
|
|
16
16
|
EXEC_ASYNC = promisify(exec);
|
|
17
|
+
/**
|
|
18
|
+
* @param {ICliInterfaceService} cliInterfaceService - The CLI interface service for user interactions
|
|
19
|
+
*/
|
|
17
20
|
constructor(cliInterfaceService) {
|
|
18
21
|
this.CLI_INTERFACE_SERVICE = cliInterfaceService;
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* Executes a shell command.
|
|
22
|
-
* @param command - The shell command to execute
|
|
23
|
-
* @returns Promise that resolves when the command completes successfully
|
|
25
|
+
* @param {string} command - The shell command to execute
|
|
26
|
+
* @returns {Promise<void>} Promise that resolves when the command completes successfully
|
|
24
27
|
* @throws Will throw an error if the command execution fails, except for npm install which offers retry options
|
|
25
28
|
*/
|
|
26
29
|
async execute(command) {
|
|
@@ -41,8 +44,8 @@ class NodeCommandService {
|
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* Execute a command and return its output
|
|
44
|
-
* @param command - The command to execute
|
|
45
|
-
* @returns Promise that resolves to the command output
|
|
47
|
+
* @param {string} command - The command to execute
|
|
48
|
+
* @returns {Promise<string>} Promise that resolves to the command output
|
|
46
49
|
*/
|
|
47
50
|
async executeWithOutput(command) {
|
|
48
51
|
try {
|
|
@@ -55,10 +58,9 @@ class NodeCommandService {
|
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @param command - The original npm command that failed
|
|
60
|
-
* @param error - Error npm object
|
|
61
|
-
* @returns void
|
|
61
|
+
* Format and parse npm error to readable format
|
|
62
|
+
* @param {string} command - The original npm command that failed
|
|
63
|
+
* @param {INodeError} error - Error npm object
|
|
62
64
|
*/
|
|
63
65
|
formatAndParseNpmError(command, error) {
|
|
64
66
|
// Форматируем и выводим ошибку
|
|
@@ -110,8 +112,8 @@ class NodeCommandService {
|
|
|
110
112
|
}
|
|
111
113
|
/**
|
|
112
114
|
* Handles npm install command failures by offering retry options to the user.
|
|
113
|
-
* @param originalCommand - The original npm command that failed
|
|
114
|
-
* @returns Promise that resolves when the chosen action completes
|
|
115
|
+
* @param {string} originalCommand - The original npm command that failed
|
|
116
|
+
* @returns {Promise<void>} Promise that resolves when the chosen action completes
|
|
115
117
|
* @throws Will throw an error if the user chooses to cancel or if retried command still fails
|
|
116
118
|
*/
|
|
117
119
|
async handleNpmInstallFailure(originalCommand) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-command.service.js","sources":["../../../../../src/infrastructure/service/node-command.service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAkBA;;;AAGG;MACU,kBAAkB,CAAA;;AAErB,IAAA,qBAAqB;AAE9B;;;AAGG;AACc,IAAA,UAAU,GAAuE,SAAS,CAAC,IAAI,CAAC;AAEjH,IAAA,WAAA,CAAY,mBAAyC,EAAA;AACpD,QAAA,IAAI,CAAC,qBAAqB,GAAG,mBAAmB;;AAGjD;;;;;AAKG;IACH,MAAM,OAAO,CAAC,OAAe,EAAA;AAC5B,QAAA,IAAI;AACH,YAAA,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;;QAC7B,OAAO,KAAK,EAAE;;AAEf,YAAA,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;AAC7K,gBAAA,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,KAAmB,CAAC;AACzD,gBAAA,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;;iBACrC;;AAEN,gBAAA,MAAM,KAAK;;;;AAKd;;;;AAIG;IACH,MAAM,iBAAiB,CAAC,OAAe,EAAA;AACtC,QAAA,IAAI;YACH,MAAM,EAAE,MAAM,EAAE,GAAuB,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAErE,YAAA,OAAO,MAAM,CAAC,IAAI,EAAE;;QACnB,OAAO,KAAK,EAAE;YACf,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAA8B,2BAAA,EAAA,OAAO,CAAE,CAAA,EAAE,KAAK,CAAC;AAEtF,YAAA,MAAM,KAAK;;;AAIb
|
|
1
|
+
{"version":3,"file":"node-command.service.js","sources":["../../../../../src/infrastructure/service/node-command.service.ts"],"sourcesContent":[null],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AA8B,CAAC;AAE/D,QAAA,MAAM,OAAO,GAA6C;AACzD,YAAA,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/C,YAAA,EAAE,KAAK,EAAE,+BAA+B,EAAE,KAAK,EAAE,kBAAkB,EAAE;AACrE,YAAA,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,QAAQ,EAAE;SACtD;AAED,QAAA,MAAM,MAAM,GAAW,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAS,gCAAgC,EAAE,OAAO,CAAC;QAEjH,QAAQ,MAAM;YACb,KAAK,OAAO,EAAE;AACb,gBAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,+BAA+B,CAAC;gBAChE,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,eAAe,CAAA,QAAA,CAAU,CAAC;AACnD,gBAAA,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,wCAAwC,CAAC;gBAE5E;;YAGD,KAAK,kBAAkB,EAAE;AACxB,gBAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,0CAA0C,CAAC;gBAC3E,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,eAAe,CAAA,mBAAA,CAAqB,CAAC;AAC9D,gBAAA,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,mDAAmD,CAAC;gBAEvF;;YAGD,KAAK,QAAQ,EAAE;AACd,gBAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,8BAA8B,CAAC;AAE/D,gBAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;;YAGhE,SAAS;AACR,gBAAA,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC;;;;AAI9C;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IFileSystemService } from
|
|
1
|
+
import type { IFileSystemService } from '../../application/interface/file-system-service.interface';
|
|
2
2
|
/**
|
|
3
3
|
* Implementation of the file system service using Node.js fs/promises API.
|
|
4
4
|
* Provides methods for managing files and directories.
|
|
@@ -6,58 +6,57 @@ import type { IFileSystemService } from "../../application/interface/file-system
|
|
|
6
6
|
export declare class NodeFileSystemService implements IFileSystemService {
|
|
7
7
|
/**
|
|
8
8
|
* Creates a directory at the specified path.
|
|
9
|
-
* @param directoryPath - The path to the directory to create
|
|
10
|
-
* @param options - Optional configuration for directory creation
|
|
11
|
-
* @param options.isRecursive - Whether to create parent directories if they don't exist
|
|
12
|
-
* @returns Promise that resolves when the directory is created
|
|
9
|
+
* @param {string} directoryPath - The path to the directory to create
|
|
10
|
+
* @param {{ isRecursive: boolean }} options - Optional configuration for directory creation
|
|
11
|
+
* @param {boolean} options.isRecursive - Whether to create parent directories if they don't exist
|
|
12
|
+
* @returns {Promise<void>} Promise that resolves when the directory is created
|
|
13
13
|
*/
|
|
14
14
|
createDirectory(directoryPath: string, options?: {
|
|
15
15
|
isRecursive: boolean;
|
|
16
16
|
}): Promise<void>;
|
|
17
17
|
/**
|
|
18
18
|
* Deletes a file at the specified path.
|
|
19
|
-
* @param filePath - The path to the file to delete
|
|
20
|
-
* @returns Promise that resolves when the file is deleted
|
|
19
|
+
* @param {string} filePath - The path to the file to delete
|
|
20
|
+
* @returns {Promise<void>} Promise that resolves when the file is deleted
|
|
21
21
|
*/
|
|
22
22
|
deleteFile(filePath: string): Promise<void>;
|
|
23
23
|
/**
|
|
24
24
|
* Gets the directory name from a file path.
|
|
25
|
-
* @param filePath
|
|
26
|
-
* @returns The directory name
|
|
25
|
+
* @param {string} filePath - The file path to extract the directory from
|
|
26
|
+
* @returns {string} The directory name
|
|
27
27
|
*/
|
|
28
28
|
getDirectoryNameFromFilePath(filePath: string): string;
|
|
29
29
|
/**
|
|
30
30
|
* Gets the extension from a file path.
|
|
31
|
-
* @param filePath
|
|
32
|
-
* @returns The file extension
|
|
31
|
+
* @param {string} filePath - The file path to extract the extension from
|
|
32
|
+
* @returns {string} The file extension
|
|
33
33
|
*/
|
|
34
34
|
getExtensionFromFilePath(filePath: string): string;
|
|
35
35
|
/**
|
|
36
36
|
* Checks if any of the provided paths exist and returns the first existing path.
|
|
37
|
-
* @param paths - Array of paths to check
|
|
38
|
-
* @returns Promise that resolves to the first existing path or undefined if none exist
|
|
37
|
+
* @param {Array<string>} paths - Array of paths to check
|
|
38
|
+
* @returns {Promise<string | undefined>} Promise that resolves to the first existing path or undefined if none exist
|
|
39
39
|
*/
|
|
40
40
|
isOneOfPathsExists(paths: Array<string>): Promise<string | undefined>;
|
|
41
41
|
/**
|
|
42
42
|
* Checks if a file or directory exists at the specified path.
|
|
43
|
-
* @param filePath - The path to check
|
|
44
|
-
* @returns Promise that resolves to true if the path exists, false otherwise
|
|
43
|
+
* @param {string} filePath - The path to check
|
|
44
|
+
* @returns {Promise<boolean>} Promise that resolves to true if the path exists, false otherwise
|
|
45
45
|
*/
|
|
46
46
|
isPathExists(filePath: string): Promise<boolean>;
|
|
47
47
|
/**
|
|
48
48
|
* Reads the contents of a file.
|
|
49
|
-
* @param filePath - The path to the file to read
|
|
50
|
-
* @param encoding - The encoding to use when reading the file, defaults to "utf8"
|
|
51
|
-
* @returns Promise that resolves to the file contents as a string
|
|
49
|
+
* @param {string} filePath - The path to the file to read
|
|
50
|
+
* @param {string} encoding - The encoding to use when reading the file, defaults to "utf8"
|
|
51
|
+
* @returns {Promise<string>} Promise that resolves to the file contents as a string
|
|
52
52
|
*/
|
|
53
53
|
readFile(filePath: string, encoding?: BufferEncoding): Promise<string>;
|
|
54
54
|
/**
|
|
55
55
|
* Writes content to a file, creating the file and parent directories if they don't exist.
|
|
56
|
-
* @param filePath - The path to the file to write
|
|
57
|
-
* @param content - The content to write to the file
|
|
58
|
-
* @param encoding - The encoding to use when writing the file, defaults to "utf8"
|
|
59
|
-
* @returns Promise that resolves when the file is written
|
|
56
|
+
* @param {string} filePath - The path to the file to write
|
|
57
|
+
* @param {string} content - The content to write to the file
|
|
58
|
+
* @param {string} encoding - The encoding to use when writing the file, defaults to "utf8"
|
|
59
|
+
* @returns {Promise<void>} Promise that resolves when the file is written
|
|
60
60
|
*/
|
|
61
61
|
writeFile(filePath: string, content: string, encoding?: BufferEncoding): Promise<void>;
|
|
62
62
|
}
|
|
63
|
-
//# sourceMappingURL=node-file-system.service.d.ts.map
|