@sk8metal/michi-cli 0.14.1 → 0.20.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/CHANGELOG.md +268 -2
- package/README.md +27 -2
- package/dist/scripts/config/config-schema.d.ts +5 -333
- package/dist/scripts/config/config-schema.d.ts.map +1 -1
- package/dist/scripts/config/config-schema.js +6 -233
- package/dist/scripts/config/config-schema.js.map +1 -1
- package/dist/scripts/config-global.d.ts.map +1 -1
- package/dist/scripts/config-global.js +3 -2
- package/dist/scripts/config-global.js.map +1 -1
- package/dist/scripts/confluence-sync.d.ts +5 -73
- package/dist/scripts/confluence-sync.d.ts.map +1 -1
- package/dist/scripts/confluence-sync.js +14 -392
- package/dist/scripts/confluence-sync.js.map +1 -1
- package/dist/scripts/constants/environments.d.ts +3 -30
- package/dist/scripts/constants/environments.d.ts.map +1 -1
- package/dist/scripts/constants/environments.js +3 -41
- package/dist/scripts/constants/environments.js.map +1 -1
- package/dist/scripts/constants/languages.d.ts +3 -20
- package/dist/scripts/constants/languages.d.ts.map +1 -1
- package/dist/scripts/constants/languages.js +3 -50
- package/dist/scripts/constants/languages.js.map +1 -1
- package/dist/scripts/constants/test-commands.d.ts +3 -33
- package/dist/scripts/constants/test-commands.d.ts.map +1 -1
- package/dist/scripts/constants/test-commands.js +3 -67
- package/dist/scripts/constants/test-commands.js.map +1 -1
- package/dist/scripts/dev-tools/mermaid-converter.d.ts.map +1 -0
- package/dist/scripts/dev-tools/mermaid-converter.js.map +1 -0
- package/dist/scripts/dev-tools/test-interactive.d.ts.map +1 -0
- package/dist/scripts/{test-interactive.js → dev-tools/test-interactive.js} +4 -3
- package/dist/scripts/dev-tools/test-interactive.js.map +1 -0
- package/dist/scripts/github-actions-client.d.ts +5 -75
- package/dist/scripts/github-actions-client.d.ts.map +1 -1
- package/dist/scripts/github-actions-client.js +4 -178
- package/dist/scripts/github-actions-client.js.map +1 -1
- package/dist/scripts/jira-sync.d.ts +3 -121
- package/dist/scripts/jira-sync.d.ts.map +1 -1
- package/dist/scripts/jira-sync.js +5 -879
- package/dist/scripts/jira-sync.js.map +1 -1
- package/dist/scripts/markdown-to-confluence.d.ts.map +1 -1
- package/dist/scripts/markdown-to-confluence.js +2 -2
- package/dist/scripts/markdown-to-confluence.js.map +1 -1
- package/dist/scripts/multi-project-estimate.d.ts.map +1 -1
- package/dist/scripts/multi-project-estimate.js +3 -2
- package/dist/scripts/multi-project-estimate.js.map +1 -1
- package/dist/scripts/phase-runner.d.ts.map +1 -1
- package/dist/scripts/phase-runner.js +34 -18
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/pre-flight-check.d.ts.map +1 -1
- package/dist/scripts/pre-flight-check.js +27 -11
- package/dist/scripts/pre-flight-check.js.map +1 -1
- package/dist/scripts/template/multi-repo-renderer.js +2 -2
- package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
- package/dist/scripts/test-execution-generator.d.ts.map +1 -1
- package/dist/scripts/test-execution-generator.js +5 -4
- package/dist/scripts/test-execution-generator.js.map +1 -1
- package/dist/scripts/utils/aidlc-parser.d.ts +5 -82
- package/dist/scripts/utils/aidlc-parser.d.ts.map +1 -1
- package/dist/scripts/utils/aidlc-parser.js +4 -204
- package/dist/scripts/utils/aidlc-parser.js.map +1 -1
- package/dist/scripts/utils/ci-generator.d.ts.map +1 -1
- package/dist/scripts/utils/ci-generator.js +4 -3
- package/dist/scripts/utils/ci-generator.js.map +1 -1
- package/dist/scripts/utils/config-loader.d.ts.map +1 -1
- package/dist/scripts/utils/config-loader.js +46 -49
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/config-validator.d.ts +9 -10
- package/dist/scripts/utils/config-validator.d.ts.map +1 -1
- package/dist/scripts/utils/config-validator.js +68 -70
- package/dist/scripts/utils/config-validator.js.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.d.ts.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.js +5 -4
- package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
- package/dist/scripts/utils/env-config.d.ts.map +1 -1
- package/dist/scripts/utils/env-config.js +55 -38
- package/dist/scripts/utils/env-config.js.map +1 -1
- package/dist/scripts/utils/feature-name-validator.d.ts +4 -9
- package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -1
- package/dist/scripts/utils/feature-name-validator.js +12 -21
- package/dist/scripts/utils/feature-name-validator.js.map +1 -1
- package/dist/scripts/utils/interactive-helpers.d.ts +5 -29
- package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -1
- package/dist/scripts/utils/interactive-helpers.js +5 -89
- package/dist/scripts/utils/interactive-helpers.js.map +1 -1
- package/dist/scripts/utils/language-detector.d.ts.map +1 -1
- package/dist/scripts/utils/language-detector.js +4 -3
- package/dist/scripts/utils/language-detector.js.map +1 -1
- package/dist/scripts/utils/markdown-parser.d.ts +6 -52
- package/dist/scripts/utils/markdown-parser.d.ts.map +1 -1
- package/dist/scripts/utils/markdown-parser.js +5 -286
- package/dist/scripts/utils/markdown-parser.js.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.d.ts +9 -10
- package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.js +15 -17
- package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
- package/dist/scripts/utils/project-analyzer.d.ts +120 -0
- package/dist/scripts/utils/project-analyzer.d.ts.map +1 -0
- package/dist/scripts/utils/project-analyzer.js +358 -0
- package/dist/scripts/utils/project-analyzer.js.map +1 -0
- package/dist/scripts/utils/project-detector.d.ts.map +1 -1
- package/dist/scripts/utils/project-detector.js +6 -5
- package/dist/scripts/utils/project-detector.js.map +1 -1
- package/dist/scripts/utils/project-finder.d.ts +1 -21
- package/dist/scripts/utils/project-finder.d.ts.map +1 -1
- package/dist/scripts/utils/project-finder.js +2 -121
- package/dist/scripts/utils/project-finder.js.map +1 -1
- package/dist/scripts/utils/project-meta.d.ts +4 -27
- package/dist/scripts/utils/project-meta.d.ts.map +1 -1
- package/dist/scripts/utils/project-meta.js +3 -67
- package/dist/scripts/utils/project-meta.js.map +1 -1
- package/dist/scripts/utils/safe-file-reader.d.ts +84 -0
- package/dist/scripts/utils/safe-file-reader.d.ts.map +1 -0
- package/dist/scripts/utils/safe-file-reader.js +122 -0
- package/dist/scripts/utils/safe-file-reader.js.map +1 -0
- package/dist/scripts/utils/security-validator.d.ts +8 -19
- package/dist/scripts/utils/security-validator.d.ts.map +1 -1
- package/dist/scripts/utils/security-validator.js +28 -58
- package/dist/scripts/utils/security-validator.js.map +1 -1
- package/dist/scripts/utils/spec-archiver.d.ts.map +1 -1
- package/dist/scripts/utils/spec-archiver.js +7 -6
- package/dist/scripts/utils/spec-archiver.js.map +1 -1
- package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
- package/dist/scripts/utils/spec-updater.js +10 -7
- package/dist/scripts/utils/spec-updater.js.map +1 -1
- package/dist/scripts/utils/tasks-converter.js +2 -2
- package/dist/scripts/utils/tasks-converter.js.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.js +4 -4
- package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
- package/dist/scripts/utils/template-applier.d.ts.map +1 -1
- package/dist/scripts/utils/template-applier.js +4 -3
- package/dist/scripts/utils/template-applier.js.map +1 -1
- package/dist/scripts/utils/types/validation.d.ts +57 -0
- package/dist/scripts/utils/types/validation.d.ts.map +1 -0
- package/dist/scripts/utils/types/validation.js +50 -0
- package/dist/scripts/utils/types/validation.js.map +1 -0
- package/dist/scripts/validate-phase.d.ts +6 -1
- package/dist/scripts/validate-phase.d.ts.map +1 -1
- package/dist/scripts/validate-phase.js +42 -20
- package/dist/scripts/validate-phase.js.map +1 -1
- package/dist/scripts/workflow-orchestrator.d.ts +4 -40
- package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
- package/dist/scripts/workflow-orchestrator.js +7 -194
- package/dist/scripts/workflow-orchestrator.js.map +1 -1
- package/dist/src/application/interfaces/config-provider.d.ts +89 -0
- package/dist/src/application/interfaces/config-provider.d.ts.map +1 -0
- package/dist/src/application/interfaces/config-provider.js +8 -0
- package/dist/src/application/interfaces/config-provider.js.map +1 -0
- package/dist/src/application/interfaces/external-api.d.ts +80 -0
- package/dist/src/application/interfaces/external-api.d.ts.map +1 -0
- package/dist/src/application/interfaces/external-api.js +8 -0
- package/dist/src/application/interfaces/external-api.js.map +1 -0
- package/dist/src/application/interfaces/spec-repository.d.ts +52 -0
- package/dist/src/application/interfaces/spec-repository.d.ts.map +1 -0
- package/dist/src/application/interfaces/spec-repository.js +8 -0
- package/dist/src/application/interfaces/spec-repository.js.map +1 -0
- package/dist/src/application/services/spec-service.d.ts +49 -0
- package/dist/src/application/services/spec-service.d.ts.map +1 -0
- package/dist/src/application/services/spec-service.js +94 -0
- package/dist/src/application/services/spec-service.js.map +1 -0
- package/dist/src/application/services/workflow-service.d.ts +58 -0
- package/dist/src/application/services/workflow-service.d.ts.map +1 -0
- package/dist/src/application/services/workflow-service.js +125 -0
- package/dist/src/application/services/workflow-service.js.map +1 -0
- package/dist/src/application/templates/processor.d.ts +31 -0
- package/dist/src/application/templates/processor.d.ts.map +1 -0
- package/dist/src/application/templates/processor.js +58 -0
- package/dist/src/application/templates/processor.js.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts +34 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.js +56 -0
- package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.js +58 -0
- package/dist/src/application/use-cases/spec/generate-design.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js +58 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js +58 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts +48 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.js +121 -0
- package/dist/src/application/use-cases/spec/init-spec.js.map +1 -0
- package/dist/src/cli.d.ts +6 -7
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +6 -745
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/config-validate.js +2 -2
- package/dist/src/commands/init.d.ts +6 -21
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +5 -508
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/migrate.js +4 -3
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/spec-archive.d.ts +6 -13
- package/dist/src/commands/spec-archive.d.ts.map +1 -1
- package/dist/src/commands/spec-archive.js +5 -36
- package/dist/src/commands/spec-archive.js.map +1 -1
- package/dist/src/commands/spec-list.d.ts +6 -11
- package/dist/src/commands/spec-list.d.ts.map +1 -1
- package/dist/src/commands/spec-list.js +5 -51
- package/dist/src/commands/spec-list.js.map +1 -1
- package/dist/src/domain/constants/approval.d.ts +18 -0
- package/dist/src/domain/constants/approval.d.ts.map +1 -0
- package/dist/src/domain/constants/approval.js +23 -0
- package/dist/src/domain/constants/approval.js.map +1 -0
- package/dist/src/domain/constants/environments.d.ts +33 -0
- package/dist/src/domain/constants/environments.d.ts.map +1 -0
- package/dist/src/domain/constants/environments.js +44 -0
- package/dist/src/domain/constants/environments.js.map +1 -0
- package/dist/src/domain/constants/index.d.ts +12 -0
- package/dist/src/domain/constants/index.d.ts.map +1 -0
- package/dist/src/domain/constants/index.js +18 -0
- package/dist/src/domain/constants/index.js.map +1 -0
- package/dist/src/domain/constants/languages.d.ts +23 -0
- package/dist/src/domain/constants/languages.d.ts.map +1 -0
- package/dist/src/domain/constants/languages.js +53 -0
- package/dist/src/domain/constants/languages.js.map +1 -0
- package/dist/src/domain/constants/phases.d.ts +32 -0
- package/dist/src/domain/constants/phases.d.ts.map +1 -0
- package/dist/src/domain/constants/phases.js +52 -0
- package/dist/src/domain/constants/phases.js.map +1 -0
- package/dist/src/domain/constants/test-commands.d.ts +36 -0
- package/dist/src/domain/constants/test-commands.d.ts.map +1 -0
- package/dist/src/domain/constants/test-commands.js +70 -0
- package/dist/src/domain/constants/test-commands.js.map +1 -0
- package/dist/src/domain/constants/validation-rules.d.ts +32 -0
- package/dist/src/domain/constants/validation-rules.d.ts.map +1 -0
- package/dist/src/domain/constants/validation-rules.js +51 -0
- package/dist/src/domain/constants/validation-rules.js.map +1 -0
- package/dist/src/domain/entities/spec.d.ts +66 -0
- package/dist/src/domain/entities/spec.d.ts.map +1 -0
- package/dist/src/domain/entities/spec.js +112 -0
- package/dist/src/domain/entities/spec.js.map +1 -0
- package/dist/src/domain/entities/task.d.ts +43 -0
- package/dist/src/domain/entities/task.d.ts.map +1 -0
- package/dist/src/domain/entities/task.js +65 -0
- package/dist/src/domain/entities/task.js.map +1 -0
- package/dist/src/domain/services/spec-validator.d.ts +46 -0
- package/dist/src/domain/services/spec-validator.d.ts.map +1 -0
- package/dist/src/domain/services/spec-validator.js +99 -0
- package/dist/src/domain/services/spec-validator.js.map +1 -0
- package/dist/src/domain/value-objects/feature-name.d.ts +24 -0
- package/dist/src/domain/value-objects/feature-name.d.ts.map +1 -0
- package/dist/src/domain/value-objects/feature-name.js +36 -0
- package/dist/src/domain/value-objects/feature-name.js.map +1 -0
- package/dist/src/domain/value-objects/index.d.ts +7 -0
- package/dist/src/domain/value-objects/index.d.ts.map +1 -0
- package/dist/src/domain/value-objects/index.js +7 -0
- package/dist/src/domain/value-objects/index.js.map +1 -0
- package/dist/src/infrastructure/config/index.d.ts +5 -0
- package/dist/src/infrastructure/config/index.d.ts.map +1 -0
- package/dist/src/infrastructure/config/index.js +6 -0
- package/dist/src/infrastructure/config/index.js.map +1 -0
- package/dist/src/infrastructure/config/schema.d.ts +337 -0
- package/dist/src/infrastructure/config/schema.d.ts.map +1 -0
- package/dist/src/infrastructure/config/schema.js +237 -0
- package/dist/src/infrastructure/config/schema.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js +102 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts +23 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js +192 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts +48 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +531 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts +10 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts +13 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +129 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts +113 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js +5 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts +15 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js +141 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts +50 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js +226 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js +16 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts +49 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +165 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js +110 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts +32 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +284 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts +114 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js +7 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts +25 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.js +109 -0
- package/dist/src/infrastructure/external-apis/github/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts +7 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.js +8 -0
- package/dist/src/infrastructure/external-apis/github/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts +69 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.js +5 -0
- package/dist/src/infrastructure/external-apis/github/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts +18 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.js +84 -0
- package/dist/src/infrastructure/external-apis/github/utils.js.map +1 -0
- package/dist/src/infrastructure/filesystem/index.d.ts +6 -0
- package/dist/src/infrastructure/filesystem/index.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/index.js +5 -0
- package/dist/src/infrastructure/filesystem/index.js.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts +32 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.js +75 -0
- package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts +86 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js +208 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js.map +1 -0
- package/dist/src/infrastructure/parsers/index.d.ts +8 -0
- package/dist/src/infrastructure/parsers/index.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/index.js +6 -0
- package/dist/src/infrastructure/parsers/index.js.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts +51 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js +253 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js.map +1 -0
- package/dist/src/presentation/cli/config.d.ts +12 -0
- package/dist/src/presentation/cli/config.d.ts.map +1 -0
- package/dist/src/presentation/cli/config.js +22 -0
- package/dist/src/presentation/cli/config.js.map +1 -0
- package/dist/src/presentation/cli/version.d.ts +10 -0
- package/dist/src/presentation/cli/version.d.ts.map +1 -0
- package/dist/src/presentation/cli/version.js +41 -0
- package/dist/src/presentation/cli/version.js.map +1 -0
- package/dist/src/presentation/cli.d.ts +22 -0
- package/dist/src/presentation/cli.d.ts.map +1 -0
- package/dist/src/presentation/cli.js +85 -0
- package/dist/src/presentation/cli.js.map +1 -0
- package/dist/src/presentation/commands/config/register.d.ts +11 -0
- package/dist/src/presentation/commands/config/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/config/register.js +98 -0
- package/dist/src/presentation/commands/config/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/register.d.ts +11 -0
- package/dist/src/presentation/commands/confluence/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/register.js +32 -0
- package/dist/src/presentation/commands/confluence/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts +17 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.js +25 -0
- package/dist/src/presentation/commands/confluence/sync.js.map +1 -0
- package/dist/src/presentation/commands/init/handler.d.ts +10 -0
- package/dist/src/presentation/commands/init/handler.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/handler.js +64 -0
- package/dist/src/presentation/commands/init/handler.js.map +1 -0
- package/dist/src/presentation/commands/init/prompts.d.ts +41 -0
- package/dist/src/presentation/commands/init/prompts.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/prompts.js +119 -0
- package/dist/src/presentation/commands/init/prompts.js.map +1 -0
- package/dist/src/presentation/commands/init/register.d.ts +11 -0
- package/dist/src/presentation/commands/init/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/register.js +141 -0
- package/dist/src/presentation/commands/init/register.js.map +1 -0
- package/dist/src/presentation/commands/init/setup.d.ts +26 -0
- package/dist/src/presentation/commands/init/setup.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/setup.js +196 -0
- package/dist/src/presentation/commands/init/setup.js.map +1 -0
- package/dist/src/presentation/commands/init/templates.d.ts +19 -0
- package/dist/src/presentation/commands/init/templates.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/templates.js +140 -0
- package/dist/src/presentation/commands/init/templates.js.map +1 -0
- package/dist/src/presentation/commands/init/validation.d.ts +21 -0
- package/dist/src/presentation/commands/init/validation.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/validation.js +65 -0
- package/dist/src/presentation/commands/init/validation.js.map +1 -0
- package/dist/src/presentation/commands/jira/register.d.ts +11 -0
- package/dist/src/presentation/commands/jira/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/register.js +75 -0
- package/dist/src/presentation/commands/jira/register.js.map +1 -0
- package/dist/src/presentation/commands/jira/sync.d.ts +29 -0
- package/dist/src/presentation/commands/jira/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/sync.js +37 -0
- package/dist/src/presentation/commands/jira/sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.d.ts → presentation/commands/multi-repo/add-repo.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/add-repo.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.js → presentation/commands/multi-repo/add-repo.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/add-repo.js.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.d.ts → presentation/commands/multi-repo/ci-status.d.ts} +2 -2
- package/dist/src/presentation/commands/multi-repo/ci-status.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.js → presentation/commands/multi-repo/ci-status.js} +95 -81
- package/dist/src/presentation/commands/multi-repo/ci-status.js.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.d.ts → presentation/commands/multi-repo/confluence-sync.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/confluence-sync.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.js → presentation/commands/multi-repo/confluence-sync.js} +7 -6
- package/dist/src/presentation/commands/multi-repo/confluence-sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-init.d.ts → presentation/commands/multi-repo/init.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/init.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-init.js → presentation/commands/multi-repo/init.js} +6 -6
- package/dist/src/presentation/commands/multi-repo/init.js.map +1 -0
- package/dist/src/{commands/multi-repo-list.d.ts → presentation/commands/multi-repo/list.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/list.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-list.js → presentation/commands/multi-repo/list.js} +2 -2
- package/dist/src/presentation/commands/multi-repo/list.js.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts +12 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.js +249 -0
- package/dist/src/presentation/commands/multi-repo/register.js.map +1 -0
- package/dist/src/{commands/multi-repo-test.d.ts → presentation/commands/multi-repo/test.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/test.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-test.js → presentation/commands/multi-repo/test.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/test.js.map +1 -0
- package/dist/src/presentation/commands/phase/register.d.ts +11 -0
- package/dist/src/presentation/commands/phase/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/phase/register.js +97 -0
- package/dist/src/presentation/commands/phase/register.js.map +1 -0
- package/dist/src/presentation/commands/spec/archive.d.ts +17 -0
- package/dist/src/presentation/commands/spec/archive.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/archive.js +40 -0
- package/dist/src/presentation/commands/spec/archive.js.map +1 -0
- package/dist/src/presentation/commands/spec/list.d.ts +15 -0
- package/dist/src/presentation/commands/spec/list.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/list.js +55 -0
- package/dist/src/presentation/commands/spec/list.js.map +1 -0
- package/dist/src/presentation/commands/spec/register.d.ts +11 -0
- package/dist/src/presentation/commands/spec/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/register.js +45 -0
- package/dist/src/presentation/commands/spec/register.js.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts +50 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js +174 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -0
- package/dist/src/presentation/commands/workflow/register.d.ts +11 -0
- package/dist/src/presentation/commands/workflow/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/register.js +58 -0
- package/dist/src/presentation/commands/workflow/register.js.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts +79 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.js +150 -0
- package/dist/src/presentation/formatters/error-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/index.d.ts +8 -0
- package/dist/src/presentation/formatters/index.d.ts.map +1 -0
- package/dist/src/presentation/formatters/index.js +11 -0
- package/dist/src/presentation/formatters/index.js.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts +98 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.js +165 -0
- package/dist/src/presentation/formatters/output-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts +121 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.js +235 -0
- package/dist/src/presentation/formatters/progress-formatter.js.map +1 -0
- package/dist/src/presentation/interactive/config/env-wizard.d.ts +9 -0
- package/dist/src/presentation/interactive/config/env-wizard.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/env-wizard.js +193 -0
- package/dist/src/presentation/interactive/config/env-wizard.js.map +1 -0
- package/dist/src/presentation/interactive/config/index.d.ts +5 -0
- package/dist/src/presentation/interactive/config/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/index.js +5 -0
- package/dist/src/presentation/interactive/config/index.js.map +1 -0
- package/dist/src/presentation/interactive/confirmation.d.ts +24 -0
- package/dist/src/presentation/interactive/confirmation.d.ts.map +1 -0
- package/dist/src/presentation/interactive/confirmation.js +54 -0
- package/dist/src/presentation/interactive/confirmation.js.map +1 -0
- package/dist/src/presentation/interactive/index.d.ts +8 -0
- package/dist/src/presentation/interactive/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/index.js +11 -0
- package/dist/src/presentation/interactive/index.js.map +1 -0
- package/dist/src/presentation/interactive/prompts.d.ts +30 -0
- package/dist/src/presentation/interactive/prompts.d.ts.map +1 -0
- package/dist/src/presentation/interactive/prompts.js +69 -0
- package/dist/src/presentation/interactive/prompts.js.map +1 -0
- package/dist/src/presentation/interactive/selection.d.ts +31 -0
- package/dist/src/presentation/interactive/selection.d.ts.map +1 -0
- package/dist/src/presentation/interactive/selection.js +138 -0
- package/dist/src/presentation/interactive/selection.js.map +1 -0
- package/dist/src/shared/types/errors.d.ts +132 -0
- package/dist/src/shared/types/errors.d.ts.map +1 -0
- package/dist/src/shared/types/errors.js +61 -0
- package/dist/src/shared/types/errors.js.map +1 -0
- package/dist/src/shared/types/result.d.ts +53 -0
- package/dist/src/shared/types/result.d.ts.map +1 -0
- package/dist/src/shared/types/result.js +42 -0
- package/dist/src/shared/types/result.js.map +1 -0
- package/dist/test-confluence-auth.d.ts +6 -0
- package/dist/test-confluence-auth.d.ts.map +1 -0
- package/dist/test-confluence-auth.js +128 -0
- package/dist/test-confluence-auth.js.map +1 -0
- package/docs/MIGRATION.md +513 -0
- package/docs/architecture.md +774 -0
- package/docs/guides/comprehensive-verification-guide.md +1926 -0
- package/docs/guides/interactive-config.md +285 -0
- package/docs/onion-architecture-phase0-complete.md +91 -0
- package/package.json +6 -6
- package/scripts/README.md +148 -0
- package/scripts/__tests__/jira-transitions.test.ts +44 -30
- package/scripts/__tests__/mermaid-converter.test.ts +2 -2
- package/scripts/__tests__/multi-repo-validator.test.ts +62 -62
- package/scripts/__tests__/spec-archiver.test.ts +12 -0
- package/scripts/__tests__/validate-phase.test.ts +6 -6
- package/scripts/build/README.md +24 -0
- package/scripts/{copy-static-assets.js → build/copy-static-assets.js} +1 -1
- package/scripts/{set-permissions.js → build/set-permissions.js} +1 -1
- package/scripts/config/config-schema.ts +43 -302
- package/scripts/config-global.ts +3 -2
- package/scripts/confluence-sync.ts +17 -538
- package/scripts/constants/environments.ts +3 -53
- package/scripts/constants/languages.ts +3 -68
- package/scripts/constants/test-commands.ts +3 -94
- package/scripts/dev-tools/README.md +22 -0
- package/scripts/{test-interactive.ts → dev-tools/test-interactive.ts} +4 -3
- package/scripts/github-actions-client.ts +18 -256
- package/scripts/jira-sync.ts +5 -1270
- package/scripts/markdown-to-confluence.ts +5 -5
- package/scripts/multi-project-estimate.ts +3 -2
- package/scripts/phase-runner.ts +41 -19
- package/scripts/pre-flight-check.ts +27 -11
- package/scripts/template/__tests__/multi-repo-renderer.test.ts +12 -0
- package/scripts/template/multi-repo-renderer.ts +2 -2
- package/scripts/test-execution-generator.ts +5 -4
- package/scripts/utils/__tests__/config-validator.test.ts +19 -19
- package/scripts/utils/__tests__/feature-name-validator.test.ts +13 -13
- package/scripts/utils/__tests__/multi-repo-validator.test.ts +34 -34
- package/scripts/utils/__tests__/project-analyzer.test.ts +542 -0
- package/scripts/utils/__tests__/safe-file-reader.test.ts +208 -0
- package/scripts/utils/__tests__/security-validator.test.ts +33 -33
- package/scripts/utils/__tests__/validation-result.test.ts +112 -0
- package/scripts/utils/aidlc-parser.ts +18 -287
- package/scripts/utils/ci-generator.ts +4 -3
- package/scripts/utils/config-loader.ts +54 -50
- package/scripts/utils/config-validator.ts +89 -80
- package/scripts/utils/docker-requirement-detector.ts +5 -4
- package/scripts/utils/env-config.ts +59 -40
- package/scripts/utils/feature-name-validator.ts +25 -40
- package/scripts/utils/interactive-helpers.ts +24 -132
- package/scripts/utils/language-detector.ts +4 -3
- package/scripts/utils/markdown-parser.ts +18 -373
- package/scripts/utils/multi-repo-validator.ts +27 -28
- package/scripts/utils/project-analyzer.ts +429 -0
- package/scripts/utils/project-detector.ts +6 -5
- package/scripts/utils/project-finder.ts +2 -154
- package/scripts/utils/project-meta.ts +8 -91
- package/scripts/utils/safe-file-reader.ts +158 -0
- package/scripts/utils/security-validator.ts +42 -78
- package/scripts/utils/spec-archiver.ts +7 -6
- package/scripts/utils/spec-updater.ts +12 -6
- package/scripts/utils/tasks-converter.ts +2 -2
- package/scripts/utils/tasks-format-validator.ts +4 -4
- package/scripts/utils/template-applier.ts +4 -3
- package/scripts/utils/types/validation.ts +92 -0
- package/scripts/validate-phase.ts +51 -23
- package/scripts/workflow-orchestrator.ts +16 -251
- package/dist/scripts/mermaid-converter.d.ts.map +0 -1
- package/dist/scripts/mermaid-converter.js.map +0 -1
- package/dist/scripts/resource-dashboard.d.ts +0 -7
- package/dist/scripts/resource-dashboard.d.ts.map +0 -1
- package/dist/scripts/resource-dashboard.js +0 -157
- package/dist/scripts/resource-dashboard.js.map +0 -1
- package/dist/scripts/test-interactive.d.ts.map +0 -1
- package/dist/scripts/test-interactive.js.map +0 -1
- package/dist/scripts/test-new-features.d.ts +0 -5
- package/dist/scripts/test-new-features.d.ts.map +0 -1
- package/dist/scripts/test-new-features.js +0 -148
- package/dist/scripts/test-new-features.js.map +0 -1
- package/dist/scripts/test-spec-generator.d.ts +0 -29
- package/dist/scripts/test-spec-generator.d.ts.map +0 -1
- package/dist/scripts/test-spec-generator.js +0 -493
- package/dist/scripts/test-spec-generator.js.map +0 -1
- package/dist/scripts/utils/confluence-approval.d.ts +0 -46
- package/dist/scripts/utils/confluence-approval.d.ts.map +0 -1
- package/dist/scripts/utils/confluence-approval.js +0 -120
- package/dist/scripts/utils/confluence-approval.js.map +0 -1
- package/dist/scripts/utils/template-finder.d.ts +0 -37
- package/dist/scripts/utils/template-finder.d.ts.map +0 -1
- package/dist/scripts/utils/template-finder.js +0 -58
- package/dist/scripts/utils/template-finder.js.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.js.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.js.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.js.map +0 -1
- package/dist/src/commands/multi-repo-init.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-init.js.map +0 -1
- package/dist/src/commands/multi-repo-list.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-list.js.map +0 -1
- package/dist/src/commands/multi-repo-test.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-test.js.map +0 -1
- package/dist/src/commands/setup-existing.d.ts +0 -22
- package/dist/src/commands/setup-existing.d.ts.map +0 -1
- package/dist/src/commands/setup-existing.js +0 -606
- package/dist/src/commands/setup-existing.js.map +0 -1
- package/scripts/__tests__/setup-existing-project.test.ts +0 -244
- package/scripts/resource-dashboard.ts +0 -189
- package/scripts/test-new-features.ts +0 -171
- package/scripts/test-spec-generator.ts +0 -570
- package/scripts/utils/confluence-approval.ts +0 -169
- package/scripts/utils/template-finder.ts +0 -69
- /package/dist/scripts/{mermaid-converter.d.ts → dev-tools/mermaid-converter.d.ts} +0 -0
- /package/dist/scripts/{mermaid-converter.js → dev-tools/mermaid-converter.js} +0 -0
- /package/dist/scripts/{test-interactive.d.ts → dev-tools/test-interactive.d.ts} +0 -0
- /package/scripts/{mermaid-converter.ts → dev-tools/mermaid-converter.ts} +0 -0
|
@@ -1,135 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Interactive Helpers - Entry Point
|
|
3
|
+
* The actual logic has been moved to src/presentation/interactive/
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 選択肢から選択
|
|
30
|
-
*/
|
|
31
|
-
export async function select(
|
|
32
|
-
rl: readline.Interface,
|
|
33
|
-
prompt: string,
|
|
34
|
-
choices: Array<{ value: string; label: string; description?: string }>,
|
|
35
|
-
defaultValue?: string,
|
|
36
|
-
maxRetries: number = 3,
|
|
37
|
-
): Promise<string> {
|
|
38
|
-
if (choices.length === 0) {
|
|
39
|
-
throw new Error('select: choices must contain at least one option');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
console.log(`\n${prompt}`);
|
|
43
|
-
choices.forEach((choice, index) => {
|
|
44
|
-
const defaultMark = defaultValue === choice.value ? ' (デフォルト)' : '';
|
|
45
|
-
const desc = choice.description ? ` - ${choice.description}` : '';
|
|
46
|
-
console.log(` ${index + 1}. ${choice.label}${desc}${defaultMark}`);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const answer = await question(
|
|
50
|
-
rl,
|
|
51
|
-
`\n選択してください [1-${choices.length}]: `,
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
if (!answer && defaultValue) {
|
|
55
|
-
return defaultValue;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const index = parseInt(answer, 10) - 1;
|
|
59
|
-
if (index >= 0 && index < choices.length) {
|
|
60
|
-
return choices[index].value;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (defaultValue) {
|
|
64
|
-
return defaultValue;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 無効な入力の場合は再試行(最大試行回数まで)
|
|
68
|
-
if (maxRetries > 0) {
|
|
69
|
-
console.log(
|
|
70
|
-
`⚠️ 無効な選択です。もう一度入力してください(残り試行回数: ${maxRetries})。`,
|
|
71
|
-
);
|
|
72
|
-
return select(rl, prompt, choices, defaultValue, maxRetries - 1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// 最大試行回数に達した場合はデフォルト値または最初の選択肢を返す
|
|
76
|
-
// 注: choices.length > 0 は関数冒頭で保証されている
|
|
77
|
-
const fallbackValue = defaultValue || choices[0].value;
|
|
78
|
-
console.log(
|
|
79
|
-
`⚠️ 最大試行回数に達しました。デフォルト値を使用します: ${fallbackValue}`,
|
|
80
|
-
);
|
|
81
|
-
return fallbackValue;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Yes/No質問
|
|
86
|
-
*/
|
|
87
|
-
export async function confirm(
|
|
88
|
-
rl: readline.Interface,
|
|
89
|
-
prompt: string,
|
|
90
|
-
defaultValue: boolean = true,
|
|
91
|
-
): Promise<boolean> {
|
|
92
|
-
const defaultText = defaultValue ? '[Y/n]' : '[y/N]';
|
|
93
|
-
const answer = await question(rl, `${prompt} ${defaultText}: `);
|
|
94
|
-
|
|
95
|
-
if (!answer) {
|
|
96
|
-
return defaultValue;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes';
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* 複数選択
|
|
104
|
-
*/
|
|
105
|
-
export async function multiSelect(
|
|
106
|
-
rl: readline.Interface,
|
|
107
|
-
prompt: string,
|
|
108
|
-
choices: Array<{ value: string; label: string }>,
|
|
109
|
-
defaults: string[] = [],
|
|
110
|
-
): Promise<string[]> {
|
|
111
|
-
console.log(`\n${prompt}`);
|
|
112
|
-
choices.forEach((choice, index) => {
|
|
113
|
-
const checked = defaults.includes(choice.value) ? '[x]' : '[ ]';
|
|
114
|
-
console.log(` ${checked} ${index + 1}. ${choice.label}`);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const answer = await question(
|
|
118
|
-
rl,
|
|
119
|
-
'\n選択してください(カンマ区切り、例: 1,2,3): ',
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
if (!answer && defaults.length > 0) {
|
|
123
|
-
return defaults;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!answer) {
|
|
127
|
-
return [];
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const indices = answer
|
|
131
|
-
.split(',')
|
|
132
|
-
.map((s) => parseInt(s.trim(), 10) - 1)
|
|
133
|
-
.filter((i) => i >= 0 && i < choices.length);
|
|
134
|
-
return indices.map((i) => choices[i].value);
|
|
135
|
-
}
|
|
6
|
+
export {
|
|
7
|
+
createInterface,
|
|
8
|
+
question,
|
|
9
|
+
password,
|
|
10
|
+
numberInput,
|
|
11
|
+
textInput,
|
|
12
|
+
} from '../../src/presentation/interactive/prompts.js';
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
confirm,
|
|
16
|
+
confirmDangerous,
|
|
17
|
+
confirmMultiple,
|
|
18
|
+
confirmAll,
|
|
19
|
+
} from '../../src/presentation/interactive/confirmation.js';
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
select,
|
|
23
|
+
multiSelect,
|
|
24
|
+
searchableSelect,
|
|
25
|
+
paginatedSelect,
|
|
26
|
+
type Choice,
|
|
27
|
+
} from '../../src/presentation/interactive/selection.js';
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* design.md、requirements.mdから実装言語を自動推論
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { safeReadFileOrThrow } from './safe-file-reader.js';
|
|
7
8
|
import { join } from 'path';
|
|
8
9
|
import { extractSection } from './markdown-parser.js';
|
|
9
10
|
|
|
@@ -30,7 +31,7 @@ export function analyzeLanguage(feature: string, projectRoot: string = process.c
|
|
|
30
31
|
// design.mdを解析
|
|
31
32
|
const designPath = join(projectRoot, '.kiro', 'specs', feature, 'design.md');
|
|
32
33
|
if (existsSync(designPath)) {
|
|
33
|
-
const design =
|
|
34
|
+
const design = safeReadFileOrThrow(designPath, 'utf-8');
|
|
34
35
|
|
|
35
36
|
// Technology Stackセクションを確認
|
|
36
37
|
const techStack = extractSection(design, 'Technology Stack');
|
|
@@ -94,7 +95,7 @@ export function analyzeLanguage(feature: string, projectRoot: string = process.c
|
|
|
94
95
|
// requirements.mdを解析
|
|
95
96
|
const requirementsPath = join(projectRoot, '.kiro', 'specs', feature, 'requirements.md');
|
|
96
97
|
if (existsSync(requirementsPath)) {
|
|
97
|
-
const requirements =
|
|
98
|
+
const requirements = safeReadFileOrThrow(requirementsPath, 'utf-8');
|
|
98
99
|
|
|
99
100
|
// APIやWebアプリケーションの言及
|
|
100
101
|
if (requirements.match(/REST API|GraphQL API/i)) {
|
|
@@ -1,376 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Markdown
|
|
3
|
-
*
|
|
2
|
+
* Markdownパーサー
|
|
3
|
+
*
|
|
4
|
+
* このファイルは後方互換性のための再エクスポートです。
|
|
5
|
+
* 実装は src/infrastructure/parsers/markdown-parser.ts に移行されました。
|
|
4
6
|
*/
|
|
5
7
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface Parameter {
|
|
23
|
-
name: string;
|
|
24
|
-
type: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Flow {
|
|
28
|
-
name: string;
|
|
29
|
-
type: 'sequence' | 'process' | 'data';
|
|
30
|
-
mermaidCode: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface Requirement {
|
|
35
|
-
id: string;
|
|
36
|
-
title: string;
|
|
37
|
-
objective: string;
|
|
38
|
-
acceptanceCriteria: string[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Markdownから特定の見出しセクションを抽出
|
|
43
|
-
*/
|
|
44
|
-
export function extractSection(content: string, heading: string): string {
|
|
45
|
-
const lines = content.split('\n');
|
|
46
|
-
const headingRegex = new RegExp(`^#+\\s+${heading}`, 'i');
|
|
47
|
-
|
|
48
|
-
let startIndex = -1;
|
|
49
|
-
let endIndex = lines.length;
|
|
50
|
-
let headingLevel = 0;
|
|
51
|
-
|
|
52
|
-
// 開始位置を検索
|
|
53
|
-
for (let i = 0; i < lines.length; i++) {
|
|
54
|
-
if (headingRegex.test(lines[i])) {
|
|
55
|
-
startIndex = i;
|
|
56
|
-
const match = lines[i].match(/^(#+)/);
|
|
57
|
-
headingLevel = match ? match[1].length : 0;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (startIndex === -1) {
|
|
63
|
-
return '';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// 同じレベルまたは上位レベルの見出しまで抽出
|
|
67
|
-
for (let i = startIndex + 1; i < lines.length; i++) {
|
|
68
|
-
const match = lines[i].match(/^(#+)\s/);
|
|
69
|
-
if (match && match[1].length <= headingLevel) {
|
|
70
|
-
endIndex = i;
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return lines.slice(startIndex, endIndex).join('\n');
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* design.mdからコンポーネント情報を抽出
|
|
80
|
-
*/
|
|
81
|
-
export function extractComponents(designMd: string): Component[] {
|
|
82
|
-
const components: Component[] = [];
|
|
83
|
-
const componentsSection = extractSection(designMd, 'Components and Interfaces');
|
|
84
|
-
|
|
85
|
-
if (!componentsSection) {
|
|
86
|
-
return components;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// コンポーネントサマリーテーブルを解析
|
|
90
|
-
const summaryTableMatch = componentsSection.match(/\|\s*Component\s*\|.*?\n\|[-\s|]+\n((?:\|.*?\n)+)/i);
|
|
91
|
-
if (summaryTableMatch) {
|
|
92
|
-
const rows = summaryTableMatch[1].trim().split('\n');
|
|
93
|
-
for (const row of rows) {
|
|
94
|
-
const cells = row.split('|').map(c => c.trim()).filter(c => c);
|
|
95
|
-
if (cells.length >= 3) {
|
|
96
|
-
components.push({
|
|
97
|
-
name: cells[0],
|
|
98
|
-
domain: cells[1] || '',
|
|
99
|
-
intent: cells[2] || '',
|
|
100
|
-
requirements: [],
|
|
101
|
-
methods: []
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// 各コンポーネントの詳細セクションからインターフェースを抽出
|
|
108
|
-
const lines = componentsSection.split('\n');
|
|
109
|
-
let currentComponent: Component | null = null;
|
|
110
|
-
|
|
111
|
-
for (let i = 0; i < lines.length; i++) {
|
|
112
|
-
const line = lines[i];
|
|
113
|
-
|
|
114
|
-
// コンポーネント見出しを検索(#### Component Name)
|
|
115
|
-
const componentMatch = line.match(/^####\s+(.+)/);
|
|
116
|
-
if (componentMatch) {
|
|
117
|
-
const componentName = componentMatch[1].trim();
|
|
118
|
-
currentComponent = components.find(c => c.name === componentName) || null;
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Service Interfaceセクションを検索
|
|
123
|
-
if (line.includes('##### Service Interface') && currentComponent) {
|
|
124
|
-
// TypeScriptコードブロックを抽出
|
|
125
|
-
let inCodeBlock = false;
|
|
126
|
-
let codeContent = '';
|
|
127
|
-
|
|
128
|
-
for (let j = i + 1; j < lines.length; j++) {
|
|
129
|
-
if (lines[j].startsWith('```typescript') || lines[j].startsWith('```ts')) {
|
|
130
|
-
inCodeBlock = true;
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
if (lines[j].startsWith('```') && inCodeBlock) {
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
if (inCodeBlock) {
|
|
137
|
-
codeContent += lines[j] + '\n';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// インターフェースからメソッドを抽出
|
|
142
|
-
const methods = extractMethodsFromInterface(codeContent);
|
|
143
|
-
currentComponent.methods = methods;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return components;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* TypeScriptインターフェースからメソッドを抽出
|
|
152
|
-
*/
|
|
153
|
-
function extractMethodsFromInterface(interfaceCode: string): Method[] {
|
|
154
|
-
const methods: Method[] = [];
|
|
155
|
-
const lines = interfaceCode.split('\n');
|
|
156
|
-
|
|
157
|
-
for (const line of lines) {
|
|
158
|
-
// メソッドシグネチャを検索(例: methodName(param: Type): ReturnType)
|
|
159
|
-
const methodMatch = line.match(/^\s*(\w+)\s*\(([^)]*)\)\s*:\s*(.+?)\s*;?\s*$/);
|
|
160
|
-
if (methodMatch) {
|
|
161
|
-
const methodName = methodMatch[1];
|
|
162
|
-
const paramsStr = methodMatch[2];
|
|
163
|
-
const returnType = methodMatch[3];
|
|
164
|
-
|
|
165
|
-
// パラメータを解析
|
|
166
|
-
const parameters: Parameter[] = [];
|
|
167
|
-
if (paramsStr.trim()) {
|
|
168
|
-
const paramParts = paramsStr.split(',');
|
|
169
|
-
for (const part of paramParts) {
|
|
170
|
-
const paramMatch = part.trim().match(/(\w+)\??:\s*(.+)/);
|
|
171
|
-
if (paramMatch) {
|
|
172
|
-
parameters.push({
|
|
173
|
-
name: paramMatch[1],
|
|
174
|
-
type: paramMatch[2].trim()
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
methods.push({
|
|
181
|
-
name: methodName,
|
|
182
|
-
signature: line.trim(),
|
|
183
|
-
parameters,
|
|
184
|
-
returnType: returnType.trim()
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return methods;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* design.mdからシステムフローを抽出
|
|
194
|
-
*/
|
|
195
|
-
export function extractFlows(designMd: string): Flow[] {
|
|
196
|
-
const flows: Flow[] = [];
|
|
197
|
-
const flowsSection = extractSection(designMd, 'System Flows');
|
|
198
|
-
|
|
199
|
-
if (!flowsSection) {
|
|
200
|
-
return flows;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const lines = flowsSection.split('\n');
|
|
204
|
-
let currentFlowName = '';
|
|
205
|
-
let currentFlowType: 'sequence' | 'process' | 'data' = 'sequence';
|
|
206
|
-
|
|
207
|
-
for (let i = 0; i < lines.length; i++) {
|
|
208
|
-
const line = lines[i];
|
|
209
|
-
|
|
210
|
-
// フロー見出しを検索(### Flow Name)
|
|
211
|
-
const flowMatch = line.match(/^###\s+(.+)/);
|
|
212
|
-
if (flowMatch) {
|
|
213
|
-
currentFlowName = flowMatch[1].trim();
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Mermaidコードブロックを検索
|
|
218
|
-
if (line.startsWith('```mermaid') && currentFlowName) {
|
|
219
|
-
let mermaidCode = '';
|
|
220
|
-
|
|
221
|
-
for (let j = i + 1; j < lines.length; j++) {
|
|
222
|
-
if (lines[j].startsWith('```')) {
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
mermaidCode += lines[j] + '\n';
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// フロータイプを判定
|
|
229
|
-
if (mermaidCode.includes('sequenceDiagram')) {
|
|
230
|
-
currentFlowType = 'sequence';
|
|
231
|
-
} else if (mermaidCode.includes('graph') || mermaidCode.includes('flowchart')) {
|
|
232
|
-
currentFlowType = 'process';
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
flows.push({
|
|
236
|
-
name: currentFlowName,
|
|
237
|
-
type: currentFlowType,
|
|
238
|
-
mermaidCode: mermaidCode.trim()
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
currentFlowName = '';
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return flows;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* requirements.mdから要件を抽出
|
|
250
|
-
*/
|
|
251
|
-
export function extractRequirements(requirementsMd: string): Requirement[] {
|
|
252
|
-
const requirements: Requirement[] = [];
|
|
253
|
-
const lines = requirementsMd.split('\n');
|
|
254
|
-
|
|
255
|
-
let currentRequirement: Requirement | null = null;
|
|
256
|
-
let inAcceptanceCriteria = false;
|
|
257
|
-
|
|
258
|
-
for (let i = 0; i < lines.length; i++) {
|
|
259
|
-
const line = lines[i];
|
|
260
|
-
|
|
261
|
-
// 要件見出しを検索(### Requirement N: Title)
|
|
262
|
-
const reqMatch = line.match(/^###\s+Requirement\s+(\d+):\s+(.+)/i);
|
|
263
|
-
if (reqMatch) {
|
|
264
|
-
// 前の要件を保存
|
|
265
|
-
if (currentRequirement) {
|
|
266
|
-
requirements.push(currentRequirement);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
currentRequirement = {
|
|
270
|
-
id: reqMatch[1],
|
|
271
|
-
title: reqMatch[2].trim(),
|
|
272
|
-
objective: '',
|
|
273
|
-
acceptanceCriteria: []
|
|
274
|
-
};
|
|
275
|
-
inAcceptanceCriteria = false;
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// NFR(非機能要件)も同様に抽出
|
|
280
|
-
const nfrMatch = line.match(/^###\s+(NFR-\d+):\s+(.+)/i);
|
|
281
|
-
if (nfrMatch) {
|
|
282
|
-
if (currentRequirement) {
|
|
283
|
-
requirements.push(currentRequirement);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
currentRequirement = {
|
|
287
|
-
id: nfrMatch[1],
|
|
288
|
-
title: nfrMatch[2].trim(),
|
|
289
|
-
objective: '',
|
|
290
|
-
acceptanceCriteria: []
|
|
291
|
-
};
|
|
292
|
-
inAcceptanceCriteria = false;
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// Objectiveを抽出
|
|
297
|
-
if (currentRequirement && line.includes('**Objective:**')) {
|
|
298
|
-
const objectiveMatch = line.match(/\*\*Objective:\*\*\s*(.+)/);
|
|
299
|
-
if (objectiveMatch) {
|
|
300
|
-
currentRequirement.objective = objectiveMatch[1].trim();
|
|
301
|
-
}
|
|
302
|
-
continue;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// Acceptance Criteriaセクションの開始
|
|
306
|
-
if (currentRequirement && line.includes('#### Acceptance Criteria')) {
|
|
307
|
-
inAcceptanceCriteria = true;
|
|
308
|
-
continue;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// Acceptance Criteriaを抽出
|
|
312
|
-
if (currentRequirement && inAcceptanceCriteria) {
|
|
313
|
-
const criteriaMatch = line.match(/^\d+\.\s+(.+)/);
|
|
314
|
-
if (criteriaMatch) {
|
|
315
|
-
currentRequirement.acceptanceCriteria.push(criteriaMatch[1].trim());
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// 次のセクションに到達したら終了
|
|
319
|
-
if (line.match(/^##[#]?\s+/)) {
|
|
320
|
-
inAcceptanceCriteria = false;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// 最後の要件を保存
|
|
326
|
-
if (currentRequirement) {
|
|
327
|
-
requirements.push(currentRequirement);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
return requirements;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* design.mdからインターフェース定義を抽出
|
|
335
|
-
*/
|
|
336
|
-
export function extractInterfaces(designMd: string): Record<string, string> {
|
|
337
|
-
const interfaces: Record<string, string> = {};
|
|
338
|
-
const lines = designMd.split('\n');
|
|
339
|
-
|
|
340
|
-
let inCodeBlock = false;
|
|
341
|
-
let currentInterface = '';
|
|
342
|
-
let interfaceCode = '';
|
|
343
|
-
|
|
344
|
-
for (let i = 0; i < lines.length; i++) {
|
|
345
|
-
const line = lines[i];
|
|
346
|
-
|
|
347
|
-
if (line.startsWith('```typescript') || line.startsWith('```ts')) {
|
|
348
|
-
inCodeBlock = true;
|
|
349
|
-
interfaceCode = '';
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
if (line.startsWith('```') && inCodeBlock) {
|
|
354
|
-
inCodeBlock = false;
|
|
355
|
-
if (currentInterface && interfaceCode) {
|
|
356
|
-
interfaces[currentInterface] = interfaceCode.trim();
|
|
357
|
-
}
|
|
358
|
-
currentInterface = '';
|
|
359
|
-
interfaceCode = '';
|
|
360
|
-
continue;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
if (inCodeBlock) {
|
|
364
|
-
interfaceCode += line + '\n';
|
|
365
|
-
|
|
366
|
-
// インターフェース名を抽出
|
|
367
|
-
const interfaceMatch = line.match(/interface\s+(\w+)/);
|
|
368
|
-
if (interfaceMatch && !currentInterface) {
|
|
369
|
-
currentInterface = interfaceMatch[1];
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
return interfaces;
|
|
375
|
-
}
|
|
376
|
-
|
|
8
|
+
export type {
|
|
9
|
+
Requirement,
|
|
10
|
+
Component,
|
|
11
|
+
Method,
|
|
12
|
+
Parameter,
|
|
13
|
+
Flow,
|
|
14
|
+
} from '../../src/infrastructure/parsers/markdown-parser.js';
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
extractSection,
|
|
18
|
+
extractRequirements,
|
|
19
|
+
extractComponents,
|
|
20
|
+
extractFlows,
|
|
21
|
+
} from '../../src/infrastructure/parsers/markdown-parser.js';
|
|
@@ -9,20 +9,19 @@ import * as fs from 'fs';
|
|
|
9
9
|
import * as path from 'path';
|
|
10
10
|
import { execSync } from 'child_process';
|
|
11
11
|
import type { Repository } from '../config/config-schema.js';
|
|
12
|
+
import type { Result } from './types/validation.js';
|
|
13
|
+
import { success, failure } from './types/validation.js';
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* LocalPathバリデーション結果(詳細情報付き)
|
|
17
|
+
*
|
|
18
|
+
* Note: This is a specialized validation result type for local path validation.
|
|
19
|
+
* It includes additional metadata beyond the standard Result<T, E> pattern.
|
|
15
20
|
*/
|
|
16
|
-
export interface
|
|
21
|
+
export interface LocalPathValidationResult {
|
|
17
22
|
isValid: boolean;
|
|
18
23
|
errors: string[];
|
|
19
24
|
warnings: string[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* LocalPathバリデーション結果(詳細情報付き)
|
|
24
|
-
*/
|
|
25
|
-
export interface LocalPathValidationResult extends ValidationResult {
|
|
26
25
|
exists: boolean;
|
|
27
26
|
isGitRepository: boolean;
|
|
28
27
|
currentBranch: string | null;
|
|
@@ -36,7 +35,7 @@ export interface LocalPathValidationResult extends ValidationResult {
|
|
|
36
35
|
* プロジェクト名のバリデーション
|
|
37
36
|
* セキュリティ対策: パストラバーサル、相対パス、制御文字をチェック
|
|
38
37
|
*/
|
|
39
|
-
export function validateProjectName(name: string):
|
|
38
|
+
export function validateProjectName(name: string): Result<boolean, string> {
|
|
40
39
|
const errors: string[] = [];
|
|
41
40
|
const warnings: string[] = [];
|
|
42
41
|
|
|
@@ -66,18 +65,18 @@ export function validateProjectName(name: string): ValidationResult {
|
|
|
66
65
|
errors.push('Project name must not contain control characters');
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
if (errors.length > 0) {
|
|
69
|
+
return failure(errors, warnings);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return success(true, warnings);
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* JIRAキーのバリデーション
|
|
78
77
|
* 2-10文字の大文字英字のみ許可
|
|
79
78
|
*/
|
|
80
|
-
export function validateJiraKey(key: string):
|
|
79
|
+
export function validateJiraKey(key: string): Result<boolean, string> {
|
|
81
80
|
const errors: string[] = [];
|
|
82
81
|
const warnings: string[] = [];
|
|
83
82
|
|
|
@@ -88,25 +87,25 @@ export function validateJiraKey(key: string): ValidationResult {
|
|
|
88
87
|
errors.push('JIRA key must be 2-10 uppercase letters');
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
if (errors.length > 0) {
|
|
91
|
+
return failure(errors, warnings);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return success(true, warnings);
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
/**
|
|
99
98
|
* リポジトリURLのバリデーション
|
|
100
99
|
* GitHub HTTPS URL形式のみ許可
|
|
101
100
|
*/
|
|
102
|
-
export function validateRepositoryUrl(url: string):
|
|
101
|
+
export function validateRepositoryUrl(url: string): Result<boolean, string> {
|
|
103
102
|
const errors: string[] = [];
|
|
104
103
|
const warnings: string[] = [];
|
|
105
104
|
|
|
106
105
|
// 空文字列チェック
|
|
107
106
|
if (!url || url.trim() === '') {
|
|
108
107
|
errors.push('Repository URL is empty');
|
|
109
|
-
return
|
|
108
|
+
return failure(errors, warnings);
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
// SSH URL検出(git@github.com:形式)
|
|
@@ -114,7 +113,7 @@ export function validateRepositoryUrl(url: string): ValidationResult {
|
|
|
114
113
|
errors.push(
|
|
115
114
|
'Repository URL must be in GitHub format: https://github.com/{owner}/{repo}',
|
|
116
115
|
);
|
|
117
|
-
return
|
|
116
|
+
return failure(errors, warnings);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
// URL形式チェック
|
|
@@ -151,11 +150,11 @@ export function validateRepositoryUrl(url: string): ValidationResult {
|
|
|
151
150
|
errors.push('Repository URL format is invalid');
|
|
152
151
|
}
|
|
153
152
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
if (errors.length > 0) {
|
|
154
|
+
return failure(errors, warnings);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return success(true, warnings);
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
/**
|