@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
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA API Client
|
|
3
|
+
*
|
|
4
|
+
* JIRA REST API v3 との通信を担当するクライアントクラス
|
|
5
|
+
*/
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
import { Agent as HttpAgent } from 'http';
|
|
8
|
+
import { Agent as HttpsAgent } from 'https';
|
|
9
|
+
/**
|
|
10
|
+
* リクエスト間のスリープ処理(レートリミット対策)
|
|
11
|
+
*/
|
|
12
|
+
function sleep(ms) {
|
|
13
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* リクエスト間の待機時間(ミリ秒)
|
|
17
|
+
* 環境変数 ATLASSIAN_REQUEST_DELAY で調整可能(デフォルト: 500ms)
|
|
18
|
+
*/
|
|
19
|
+
function getRequestDelay() {
|
|
20
|
+
return parseInt(process.env.ATLASSIAN_REQUEST_DELAY || '500', 10);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* JIRA API クライアント
|
|
24
|
+
* HTTP通信、認証、レートリミット制御を担当
|
|
25
|
+
*/
|
|
26
|
+
export class JIRAClient {
|
|
27
|
+
baseUrl;
|
|
28
|
+
auth;
|
|
29
|
+
requestDelay;
|
|
30
|
+
axiosInstance;
|
|
31
|
+
httpAgent;
|
|
32
|
+
constructor(config) {
|
|
33
|
+
this.baseUrl = `${config.url}/rest/api/3`;
|
|
34
|
+
this.auth = Buffer.from(`${config.email}:${config.apiToken}`).toString('base64');
|
|
35
|
+
this.requestDelay = getRequestDelay();
|
|
36
|
+
// HTTPエージェントを作成(Keep-Alive接続プーリング)
|
|
37
|
+
const isHttps = config.url.startsWith('https');
|
|
38
|
+
this.httpAgent = isHttps
|
|
39
|
+
? new HttpsAgent({ keepAlive: true, maxSockets: 10 })
|
|
40
|
+
: new HttpAgent({ keepAlive: true, maxSockets: 10 });
|
|
41
|
+
// 共有axiosインスタンスを作成
|
|
42
|
+
this.axiosInstance = axios.create({
|
|
43
|
+
httpAgent: isHttps ? undefined : this.httpAgent,
|
|
44
|
+
httpsAgent: isHttps ? this.httpAgent : undefined,
|
|
45
|
+
timeout: 30000,
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization: `Basic ${this.auth}`,
|
|
48
|
+
'Content-Type': 'application/json',
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* リソースをクリーンアップ
|
|
54
|
+
*/
|
|
55
|
+
dispose() {
|
|
56
|
+
this.auth = '';
|
|
57
|
+
this.httpAgent.destroy();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* JQL検索でIssueを検索
|
|
61
|
+
* @throws 検索エラー時は例外を再スロー(呼び出し元で処理)
|
|
62
|
+
*/
|
|
63
|
+
async searchIssues(jql) {
|
|
64
|
+
// レートリミット対策: リクエスト前に待機
|
|
65
|
+
await sleep(this.requestDelay);
|
|
66
|
+
try {
|
|
67
|
+
// JIRA API v3の検索エンドポイントを使用
|
|
68
|
+
// GET /rest/api/3/search でJQL検索を実行(GETメソッドが推奨)
|
|
69
|
+
const response = await this.axiosInstance.get(`${this.baseUrl}/search`, {
|
|
70
|
+
params: {
|
|
71
|
+
jql,
|
|
72
|
+
maxResults: 100,
|
|
73
|
+
fields: 'summary,issuetype,status,key',
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
return response.data.issues || [];
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
// エラーハンドリング改善
|
|
80
|
+
if (axios.isAxiosError(error)) {
|
|
81
|
+
const status = error.response?.status;
|
|
82
|
+
const errorMessages = error.response?.data?.errorMessages || [];
|
|
83
|
+
const message = errorMessages.join(', ') || error.message;
|
|
84
|
+
console.error(`Error searching issues (HTTP ${status}): ${message}`);
|
|
85
|
+
if (status === 410) {
|
|
86
|
+
console.error('💡 Hint: The search API endpoint returned 410 (Gone).');
|
|
87
|
+
console.error(' This may indicate the endpoint has been deprecated or disabled.');
|
|
88
|
+
console.error(' Check JIRA instance configuration or try alternative search methods.');
|
|
89
|
+
}
|
|
90
|
+
else if (status === 401) {
|
|
91
|
+
console.error('💡 Hint: Authentication failed. Check ATLASSIAN_API_TOKEN in .env');
|
|
92
|
+
}
|
|
93
|
+
else if (status === 403) {
|
|
94
|
+
console.error('💡 Hint: Permission denied. Check API token permissions in JIRA.');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
console.error('Error searching issues:', error instanceof Error ? error.message : error);
|
|
99
|
+
}
|
|
100
|
+
throw error; // エラーを再スローして呼び出し元で処理
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async createIssue(payload) {
|
|
104
|
+
// レートリミット対策: リクエスト前に待機
|
|
105
|
+
await sleep(this.requestDelay);
|
|
106
|
+
const response = await this.axiosInstance.post(`${this.baseUrl}/issue`, payload);
|
|
107
|
+
return response.data;
|
|
108
|
+
}
|
|
109
|
+
async updateIssue(issueKey, payload) {
|
|
110
|
+
// レートリミット対策: リクエスト前に待機
|
|
111
|
+
await sleep(this.requestDelay);
|
|
112
|
+
await this.axiosInstance.put(`${this.baseUrl}/issue/${issueKey}`, payload);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* JIRAチケットのステータスを変更(トランジション実行)
|
|
116
|
+
* @param issueKey JIRAチケットキー (例: "PROJ-123")
|
|
117
|
+
* @param transitionName 遷移先ステータス名 (例: "In Progress", "Ready for Review")
|
|
118
|
+
* @throws トランジションが見つからない場合はエラー
|
|
119
|
+
*/
|
|
120
|
+
async transitionIssue(issueKey, transitionName) {
|
|
121
|
+
// レートリミット対策: リクエスト前に待機
|
|
122
|
+
await sleep(this.requestDelay);
|
|
123
|
+
try {
|
|
124
|
+
// 1. 利用可能なトランジションを取得
|
|
125
|
+
const transitionsResponse = await this.axiosInstance.get(`${this.baseUrl}/issue/${issueKey}/transitions`);
|
|
126
|
+
const transitions = transitionsResponse.data.transitions || [];
|
|
127
|
+
// 2. transitionNameに一致するトランジションIDを特定
|
|
128
|
+
// 名前の完全一致または部分一致で検索
|
|
129
|
+
const transition = transitions.find((t) => t.name.toLowerCase() === transitionName.toLowerCase() ||
|
|
130
|
+
t.name.toLowerCase().includes(transitionName.toLowerCase()));
|
|
131
|
+
if (!transition) {
|
|
132
|
+
const availableTransitions = transitions
|
|
133
|
+
.map((t) => t.name)
|
|
134
|
+
.join(', ');
|
|
135
|
+
throw new Error(`Transition "${transitionName}" not found for issue ${issueKey}. ` +
|
|
136
|
+
`Available transitions: ${availableTransitions || 'none'}`);
|
|
137
|
+
}
|
|
138
|
+
// レートリミット対策: リクエスト前に待機
|
|
139
|
+
await sleep(this.requestDelay);
|
|
140
|
+
// 3. トランジションを実行
|
|
141
|
+
await this.axiosInstance.post(`${this.baseUrl}/issue/${issueKey}/transitions`, {
|
|
142
|
+
transition: { id: transition.id },
|
|
143
|
+
});
|
|
144
|
+
console.log(`✅ ${issueKey} のステータスを「${transition.name}」に変更しました`);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (axios.isAxiosError(error)) {
|
|
148
|
+
const status = error.response?.status;
|
|
149
|
+
const errorMessages = error.response?.data?.errorMessages || [];
|
|
150
|
+
const message = errorMessages.join(', ') || error.message;
|
|
151
|
+
console.error(`Error transitioning issue ${issueKey} (HTTP ${status}): ${message}`);
|
|
152
|
+
if (status === 404) {
|
|
153
|
+
console.error(`💡 Hint: Issue ${issueKey} was not found. Check the issue key.`);
|
|
154
|
+
}
|
|
155
|
+
else if (status === 400) {
|
|
156
|
+
console.error('💡 Hint: The transition may not be valid from the current status.');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* JIRAチケットにコメントを追加
|
|
164
|
+
* @param issueKey JIRAチケットキー
|
|
165
|
+
* @param commentText コメント内容
|
|
166
|
+
*/
|
|
167
|
+
async addComment(issueKey, commentText) {
|
|
168
|
+
// レートリミット対策: リクエスト前に待機
|
|
169
|
+
await sleep(this.requestDelay);
|
|
170
|
+
try {
|
|
171
|
+
// Atlassian Document Format (ADF) でコメントを作成
|
|
172
|
+
const commentBody = {
|
|
173
|
+
type: 'doc',
|
|
174
|
+
version: 1,
|
|
175
|
+
content: [
|
|
176
|
+
{
|
|
177
|
+
type: 'paragraph',
|
|
178
|
+
content: [
|
|
179
|
+
{
|
|
180
|
+
type: 'text',
|
|
181
|
+
text: commentText,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
await this.axiosInstance.post(`${this.baseUrl}/issue/${issueKey}/comment`, {
|
|
188
|
+
body: commentBody,
|
|
189
|
+
});
|
|
190
|
+
console.log(`✅ ${issueKey} にコメントを追加しました`);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
if (axios.isAxiosError(error)) {
|
|
194
|
+
const status = error.response?.status;
|
|
195
|
+
const errorMessages = error.response?.data?.errorMessages || [];
|
|
196
|
+
const message = errorMessages.join(', ') || error.message;
|
|
197
|
+
console.error(`Error adding comment to ${issueKey} (HTTP ${status}): ${message}`);
|
|
198
|
+
if (status === 404) {
|
|
199
|
+
console.error(`💡 Hint: Issue ${issueKey} was not found. Check the issue key.`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
throw error;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* プロジェクトのIssue Type IDを取得
|
|
207
|
+
* @param projectKey プロジェクトキー
|
|
208
|
+
* @param issueTypeName Issue Type名(例: "Epic", "Story")
|
|
209
|
+
* @returns Issue Type ID
|
|
210
|
+
*/
|
|
211
|
+
async getIssueTypeId(projectKey, issueTypeName) {
|
|
212
|
+
await sleep(this.requestDelay);
|
|
213
|
+
try {
|
|
214
|
+
const response = await this.axiosInstance.get(`${this.baseUrl}/project/${projectKey}`);
|
|
215
|
+
const issueTypes = (response.data.issueTypes || []);
|
|
216
|
+
const issueType = issueTypes.find((it) => it.name.toLowerCase() === issueTypeName.toLowerCase() ||
|
|
217
|
+
it.name === issueTypeName);
|
|
218
|
+
return issueType ? issueType.id : null;
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
console.error(`Error getting issue type ID for ${issueTypeName}:`, error instanceof Error ? error.message : error);
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAU5C;;GAEG;AACH,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE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AO,CAAC,KAAK,CACX,mCAAmC,aAAa,GAAG,EACnD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Integration Module
|
|
3
|
+
*
|
|
4
|
+
* このモジュールはJIRA API統合のすべての機能をエクスポートします
|
|
5
|
+
*/
|
|
6
|
+
export { JIRAClient } from './client.js';
|
|
7
|
+
export type { ADFNode, ADFDocument, JiraIssue, JIRAIssue, JIRAIssuePayload, JIRAIssueCreateResponse, JIRAIssueType, JIRAConfig, StoryDetails, } from './types.js';
|
|
8
|
+
export { textToADF, createRichADF } from './adf-converter.js';
|
|
9
|
+
export { extractRepoName, createTitlePrefix, extractStoryDetails, getStoryIssueTypeId, getOrCreateEpic, } from './issue-builder.js';
|
|
10
|
+
export { detectPhaseLabel } from './status-mapper.js';
|
|
11
|
+
export { syncTasksToJIRA, getJIRAConfig } from './sync-service.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,YAAY,EACV,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Integration Module
|
|
3
|
+
*
|
|
4
|
+
* このモジュールはJIRA API統合のすべての機能をエクスポートします
|
|
5
|
+
*/
|
|
6
|
+
// Client
|
|
7
|
+
export { JIRAClient } from './client.js';
|
|
8
|
+
// ADF Converter
|
|
9
|
+
export { textToADF, createRichADF } from './adf-converter.js';
|
|
10
|
+
// Issue Builder
|
|
11
|
+
export { extractRepoName, createTitlePrefix, extractStoryDetails, getStoryIssueTypeId, getOrCreateEpic, } from './issue-builder.js';
|
|
12
|
+
// Status Mapper
|
|
13
|
+
export { detectPhaseLabel } from './status-mapper.js';
|
|
14
|
+
// Sync Service
|
|
15
|
+
export { syncTasksToJIRA, getJIRAConfig } from './sync-service.js';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,SAAS;AACT,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAezC,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9D,gBAAgB;AAChB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,gBAAgB;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue Builder
|
|
3
|
+
*
|
|
4
|
+
* JIRAのIssue(Epic、Story)を作成するためのヘルパー関数を提供
|
|
5
|
+
*/
|
|
6
|
+
import type { StoryDetails } from './types.js';
|
|
7
|
+
import type { JIRAClient } from './client.js';
|
|
8
|
+
import type { SpecJson } from '../../../../../scripts/utils/spec-updater.js';
|
|
9
|
+
/**
|
|
10
|
+
* リポジトリ名を抽出
|
|
11
|
+
* @param repository GitHub repository URL
|
|
12
|
+
* @returns リポジトリ名(例: "michi")
|
|
13
|
+
*/
|
|
14
|
+
export declare function extractRepoName(repository: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* タイトルプレフィックスを作成
|
|
17
|
+
* @param repoName リポジトリ名
|
|
18
|
+
* @param featureName 機能名
|
|
19
|
+
* @returns プレフィックス(例: "[michi][feature-name]")
|
|
20
|
+
*/
|
|
21
|
+
export declare function createTitlePrefix(repoName: string, featureName: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Storyの詳細情報を抽出
|
|
24
|
+
*/
|
|
25
|
+
export declare function extractStoryDetails(tasksContent: string, storyTitle: string): StoryDetails;
|
|
26
|
+
/**
|
|
27
|
+
* StoryタイプのIDを取得
|
|
28
|
+
*/
|
|
29
|
+
export declare function getStoryIssueTypeId(appConfig: {
|
|
30
|
+
jira?: {
|
|
31
|
+
issueTypes?: {
|
|
32
|
+
story?: string | null;
|
|
33
|
+
};
|
|
34
|
+
} & Record<string, unknown>;
|
|
35
|
+
} & Record<string, unknown>, projectMeta: {
|
|
36
|
+
jiraProjectKey: string;
|
|
37
|
+
}, client: JIRAClient): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Epicを取得または作成
|
|
40
|
+
*/
|
|
41
|
+
export declare function getOrCreateEpic(featureName: string, spec: SpecJson, projectMeta: {
|
|
42
|
+
projectName: string;
|
|
43
|
+
jiraProjectKey: string;
|
|
44
|
+
repository: string;
|
|
45
|
+
confluenceLabels: string[];
|
|
46
|
+
}, client: JIRAClient): Promise<{
|
|
47
|
+
key: string;
|
|
48
|
+
}>;
|
|
49
|
+
//# sourceMappingURL=issue-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-builder.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/issue-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAW1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,YAAY,CAoEd;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE;IAAE,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpH,WAAW,EAAE;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,EACvC,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,EAC5G,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAqE1B"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue Builder
|
|
3
|
+
*
|
|
4
|
+
* JIRAのIssue(Epic、Story)を作成するためのヘルパー関数を提供
|
|
5
|
+
*/
|
|
6
|
+
import { textToADF } from './adf-converter.js';
|
|
7
|
+
/**
|
|
8
|
+
* リポジトリ名を抽出
|
|
9
|
+
* @param repository GitHub repository URL
|
|
10
|
+
* @returns リポジトリ名(例: "michi")
|
|
11
|
+
*/
|
|
12
|
+
export function extractRepoName(repository) {
|
|
13
|
+
// owner/repo 形式を抽出
|
|
14
|
+
const match = repository.match(/github\.com[:/]([\w.-]+\/[\w.-]+)(\.git)?/);
|
|
15
|
+
if (!match) {
|
|
16
|
+
// フォールバック: repository 全体を使用
|
|
17
|
+
return 'repo';
|
|
18
|
+
}
|
|
19
|
+
const ownerRepo = match[1]; // 例: sk8metalme/michi
|
|
20
|
+
const parts = ownerRepo.split('/');
|
|
21
|
+
return parts[1] || parts[0]; // repo部分のみ返す
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* タイトルプレフィックスを作成
|
|
25
|
+
* @param repoName リポジトリ名
|
|
26
|
+
* @param featureName 機能名
|
|
27
|
+
* @returns プレフィックス(例: "[michi][feature-name]")
|
|
28
|
+
*/
|
|
29
|
+
export function createTitlePrefix(repoName, featureName) {
|
|
30
|
+
return `[${repoName}][${featureName}]`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Storyの詳細情報を抽出
|
|
34
|
+
*/
|
|
35
|
+
export function extractStoryDetails(tasksContent, storyTitle) {
|
|
36
|
+
const details = { title: storyTitle };
|
|
37
|
+
// Story セクションを抽出(ReDoS対策: [\s\S]*? → [^]*? に変更)
|
|
38
|
+
const escapedTitle = storyTitle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
39
|
+
const storyPattern = new RegExp(`### Story [\\d.]+: ${escapedTitle}\\n([^]*?)(?=\\n### Story|\\n## Phase|$)`, 'i');
|
|
40
|
+
const storyMatch = tasksContent.match(storyPattern);
|
|
41
|
+
if (!storyMatch)
|
|
42
|
+
return details;
|
|
43
|
+
const storySection = storyMatch[1];
|
|
44
|
+
// 優先度抽出
|
|
45
|
+
const priorityMatch = storySection.match(/\*\*優先度\*\*:\s*(.+)/);
|
|
46
|
+
if (priorityMatch)
|
|
47
|
+
details.priority = priorityMatch[1].trim();
|
|
48
|
+
// 見積もり抽出
|
|
49
|
+
const estimateMatch = storySection.match(/\*\*見積もり\*\*:\s*(.+)/);
|
|
50
|
+
if (estimateMatch)
|
|
51
|
+
details.estimate = estimateMatch[1].trim();
|
|
52
|
+
// 担当抽出
|
|
53
|
+
const assigneeMatch = storySection.match(/\*\*担当\*\*:\s*(.+)/);
|
|
54
|
+
if (assigneeMatch)
|
|
55
|
+
details.assignee = assigneeMatch[1].trim();
|
|
56
|
+
// 期限抽出
|
|
57
|
+
const dueDateMatch = storySection.match(/\*\*期限\*\*:\s*(\d{4}-\d{2}-\d{2})/);
|
|
58
|
+
if (dueDateMatch)
|
|
59
|
+
details.dueDate = dueDateMatch[1];
|
|
60
|
+
// 説明抽出(改行あり・なし両方に対応)
|
|
61
|
+
const descriptionMatch = storySection.match(/\*\*説明\*\*:\s*\n?(.+?)(?=\n\*\*|$)/s);
|
|
62
|
+
if (descriptionMatch)
|
|
63
|
+
details.description = descriptionMatch[1].trim();
|
|
64
|
+
// 完了条件抽出
|
|
65
|
+
const criteriaMatch = storySection.match(/\*\*完了条件\*\*:\s*\n((?:- \[.\].*\n?)+)/);
|
|
66
|
+
if (criteriaMatch) {
|
|
67
|
+
details.acceptanceCriteria = criteriaMatch[1]
|
|
68
|
+
.split('\n')
|
|
69
|
+
.filter((line) => line.trim().startsWith('- ['))
|
|
70
|
+
.map((line) => line.replace(/^- \[.\]\s*/, '').trim())
|
|
71
|
+
.filter((line) => line.length > 0);
|
|
72
|
+
}
|
|
73
|
+
// サブタスク抽出
|
|
74
|
+
const subtasksMatch = storySection.match(/\*\*サブタスク\*\*:\s*\n((?:- \[.\].*\n?)+)/);
|
|
75
|
+
if (subtasksMatch) {
|
|
76
|
+
details.subtasks = subtasksMatch[1]
|
|
77
|
+
.split('\n')
|
|
78
|
+
.filter((line) => line.trim().startsWith('- ['))
|
|
79
|
+
.map((line) => line.replace(/^- \[.\]\s*/, '').trim())
|
|
80
|
+
.filter((line) => line.length > 0);
|
|
81
|
+
}
|
|
82
|
+
// 依存関係抽出
|
|
83
|
+
const dependenciesMatch = storySection.match(/\*\*依存関係\*\*:\s*(.+)/);
|
|
84
|
+
if (dependenciesMatch)
|
|
85
|
+
details.dependencies = dependenciesMatch[1].trim();
|
|
86
|
+
return details;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* StoryタイプのIDを取得
|
|
90
|
+
*/
|
|
91
|
+
export async function getStoryIssueTypeId(appConfig, projectMeta, client) {
|
|
92
|
+
// StoryタイプのIDを動的に取得(日本語JIRAでは "ストーリー" という名前の場合がある)
|
|
93
|
+
let storyIssueTypeId = appConfig.jira?.issueTypes?.story || process.env.JIRA_ISSUE_TYPE_STORY;
|
|
94
|
+
console.log(`📋 Story Issue Type ID from config/env: ${storyIssueTypeId || 'not found'}`);
|
|
95
|
+
if (!storyIssueTypeId) {
|
|
96
|
+
console.log('🔍 Attempting to find Story issue type dynamically...');
|
|
97
|
+
const foundId = (await client.getIssueTypeId(projectMeta.jiraProjectKey, 'Story')) ||
|
|
98
|
+
(await client.getIssueTypeId(projectMeta.jiraProjectKey, 'ストーリー'));
|
|
99
|
+
storyIssueTypeId = foundId ?? undefined;
|
|
100
|
+
console.log(`📋 Story Issue Type ID from API: ${storyIssueTypeId || 'not found'}`);
|
|
101
|
+
}
|
|
102
|
+
if (!storyIssueTypeId) {
|
|
103
|
+
throw new Error('JIRA Story issue type ID is not configured and could not be found in project. ' +
|
|
104
|
+
'Please set JIRA_ISSUE_TYPE_STORY environment variable or configure it in .michi/config.json. ' +
|
|
105
|
+
'You can find the issue type ID in JIRA UI (Settings > Issues > Issue types) or via REST API: ' +
|
|
106
|
+
'GET https://your-domain.atlassian.net/rest/api/3/project/{projectKey}');
|
|
107
|
+
}
|
|
108
|
+
console.log(`✅ Using Story Issue Type ID: ${storyIssueTypeId}`);
|
|
109
|
+
return storyIssueTypeId;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Epicを取得または作成
|
|
113
|
+
*/
|
|
114
|
+
export async function getOrCreateEpic(featureName, spec, projectMeta, client) {
|
|
115
|
+
// 既存のEpicをチェック
|
|
116
|
+
if (spec.jira?.epicKey) {
|
|
117
|
+
console.log(`Existing Epic found: ${spec.jira.epicKey}`);
|
|
118
|
+
console.log('Skipping Epic creation (already exists)');
|
|
119
|
+
return { key: spec.jira.epicKey };
|
|
120
|
+
}
|
|
121
|
+
// Epic作成
|
|
122
|
+
console.log('Creating Epic...');
|
|
123
|
+
const repoName = extractRepoName(projectMeta.repository);
|
|
124
|
+
const titlePrefix = createTitlePrefix(repoName, featureName);
|
|
125
|
+
const epicSummary = `${titlePrefix} ${projectMeta.projectName}`;
|
|
126
|
+
// 同じタイトルのEpicがすでに存在するかJQLで検索
|
|
127
|
+
const jql = `project = ${projectMeta.jiraProjectKey} AND issuetype = Epic AND summary ~ "${featureName}"`;
|
|
128
|
+
let existingEpics = [];
|
|
129
|
+
try {
|
|
130
|
+
existingEpics = await client.searchIssues(jql);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error('❌ Failed to search existing Epics:', error instanceof Error ? error.message : error);
|
|
134
|
+
console.error('⚠️ Cannot verify idempotency - proceeding with Epic creation');
|
|
135
|
+
console.error(' If Epic already exists, manual cleanup may be required');
|
|
136
|
+
// 検索失敗時はフォールバック: 新規作成を試みる(重複リスクあり)
|
|
137
|
+
existingEpics = [];
|
|
138
|
+
}
|
|
139
|
+
if (existingEpics.length > 0) {
|
|
140
|
+
console.log(`Found existing Epic with similar title: ${existingEpics[0].key}`);
|
|
141
|
+
console.log('Using existing Epic instead of creating new one');
|
|
142
|
+
return existingEpics[0];
|
|
143
|
+
}
|
|
144
|
+
// EpicタイプのIDを取得(日本語JIRAでは "エピック" という名前の場合がある)
|
|
145
|
+
const epicTypeId = (await client.getIssueTypeId(projectMeta.jiraProjectKey, 'Epic')) ||
|
|
146
|
+
(await client.getIssueTypeId(projectMeta.jiraProjectKey, 'エピック'));
|
|
147
|
+
if (!epicTypeId) {
|
|
148
|
+
throw new Error('Epic issue type not found in project. ' +
|
|
149
|
+
'Please ensure the project has Epic issue type enabled.');
|
|
150
|
+
}
|
|
151
|
+
const epicDescription = `機能: ${featureName}\nGitHub: ${projectMeta.repository}/tree/main/.kiro/specs/${featureName}`;
|
|
152
|
+
const epicPayload = {
|
|
153
|
+
fields: {
|
|
154
|
+
project: { key: projectMeta.jiraProjectKey },
|
|
155
|
+
summary: epicSummary,
|
|
156
|
+
description: textToADF(epicDescription), // ADF形式に変換
|
|
157
|
+
issuetype: { id: epicTypeId }, // IDを使用(nameではなく)
|
|
158
|
+
labels: projectMeta.confluenceLabels,
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
const epic = await client.createIssue(epicPayload);
|
|
162
|
+
console.log(`✅ Epic created: ${epic.key}`);
|
|
163
|
+
return epic;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=issue-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-builder.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/issue-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UA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YACpD,SAAS,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,kBAAkB;YACjD,MAAM,EAAE,WAAW,CAAC,gBAAgB;SACrC;KACF,CAAC;IAEF,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Mapper
|
|
3
|
+
*
|
|
4
|
+
* tasks.mdのフェーズ情報をJIRAラベルにマッピングする機能を提供
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* フェーズラベル検出
|
|
8
|
+
* tasks.mdのPhase行からフェーズラベルを抽出
|
|
9
|
+
*
|
|
10
|
+
* @param line tasks.mdの行
|
|
11
|
+
* @returns フェーズラベル(例: 'requirements', 'design', 'implementation')
|
|
12
|
+
*/
|
|
13
|
+
export declare function detectPhaseLabel(line: string): string | null;
|
|
14
|
+
//# sourceMappingURL=status-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-mapper.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/status-mapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkH5D"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Mapper
|
|
3
|
+
*
|
|
4
|
+
* tasks.mdのフェーズ情報をJIRAラベルにマッピングする機能を提供
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* フェーズラベル検出
|
|
8
|
+
* tasks.mdのPhase行からフェーズラベルを抽出
|
|
9
|
+
*
|
|
10
|
+
* @param line tasks.mdの行
|
|
11
|
+
* @returns フェーズラベル(例: 'requirements', 'design', 'implementation')
|
|
12
|
+
*/
|
|
13
|
+
export function detectPhaseLabel(line) {
|
|
14
|
+
const phasePattern = /## Phase [\d.A-Z]+:\s*(.+?)(?:((.+?)))?/;
|
|
15
|
+
const phaseMatch = line.match(phasePattern);
|
|
16
|
+
if (!phaseMatch)
|
|
17
|
+
return null;
|
|
18
|
+
const phaseTitle = phaseMatch[1]; // フェーズタイトル全体
|
|
19
|
+
const phaseName = phaseMatch[2] || phaseTitle; // 括弧内のラベル(例: Requirements)または全体
|
|
20
|
+
// Phase番号を抽出(例: "0.1", "2", "A")
|
|
21
|
+
const phaseNumberMatch = line.match(/## Phase ([\d.A-Z]+):/);
|
|
22
|
+
const phaseNumber = phaseNumberMatch ? phaseNumberMatch[1] : '';
|
|
23
|
+
// フェーズ番号またはフェーズ名からラベルを決定
|
|
24
|
+
if (phaseNumber === '0.0' ||
|
|
25
|
+
phaseName.includes('初期化') ||
|
|
26
|
+
phaseName.toLowerCase().includes('init')) {
|
|
27
|
+
return 'spec-init';
|
|
28
|
+
}
|
|
29
|
+
else if (phaseNumber === '0.1' ||
|
|
30
|
+
phaseName.includes('要件定義') ||
|
|
31
|
+
phaseName.toLowerCase().includes('requirements')) {
|
|
32
|
+
return 'requirements';
|
|
33
|
+
}
|
|
34
|
+
else if (phaseNumber === '0.2' ||
|
|
35
|
+
phaseName.includes('設計') ||
|
|
36
|
+
phaseName.toLowerCase().includes('design')) {
|
|
37
|
+
return 'design';
|
|
38
|
+
}
|
|
39
|
+
else if (phaseNumber === '0.3' ||
|
|
40
|
+
phaseName.includes('テストタイプ') ||
|
|
41
|
+
phaseName.toLowerCase().includes('test-type') ||
|
|
42
|
+
phaseName.toLowerCase().includes('test type')) {
|
|
43
|
+
return 'test-type-selection';
|
|
44
|
+
}
|
|
45
|
+
else if (phaseNumber === '0.4' ||
|
|
46
|
+
phaseName.includes('テスト仕様') ||
|
|
47
|
+
phaseName.toLowerCase().includes('test-spec') ||
|
|
48
|
+
phaseName.toLowerCase().includes('test spec')) {
|
|
49
|
+
return 'test-spec';
|
|
50
|
+
}
|
|
51
|
+
else if (phaseNumber === '0.5' ||
|
|
52
|
+
phaseName.includes('タスク分割') ||
|
|
53
|
+
phaseName.toLowerCase().includes('tasks') ||
|
|
54
|
+
phaseName.toLowerCase().includes('task breakdown')) {
|
|
55
|
+
return 'spec-tasks';
|
|
56
|
+
}
|
|
57
|
+
else if (phaseNumber === '0.6' ||
|
|
58
|
+
phaseName.includes('JIRA') ||
|
|
59
|
+
phaseName.toLowerCase().includes('jira')) {
|
|
60
|
+
return 'jira-sync';
|
|
61
|
+
}
|
|
62
|
+
else if (phaseNumber === '1' ||
|
|
63
|
+
phaseName.includes('環境構築') ||
|
|
64
|
+
phaseName.toLowerCase().includes('environment') ||
|
|
65
|
+
phaseName.toLowerCase().includes('setup')) {
|
|
66
|
+
return 'environment-setup';
|
|
67
|
+
}
|
|
68
|
+
else if (phaseNumber === '2' ||
|
|
69
|
+
phaseName.includes('実装') ||
|
|
70
|
+
phaseName.includes('TDD') ||
|
|
71
|
+
phaseName.toLowerCase().includes('implementation')) {
|
|
72
|
+
return 'implementation';
|
|
73
|
+
}
|
|
74
|
+
else if (phaseNumber === 'A' ||
|
|
75
|
+
phaseNumber.toLowerCase() === 'a' ||
|
|
76
|
+
phaseName.includes('PR前') ||
|
|
77
|
+
phaseName.toLowerCase().includes('pr-test') ||
|
|
78
|
+
phaseName.toLowerCase().includes('pr test')) {
|
|
79
|
+
return 'phase-a';
|
|
80
|
+
}
|
|
81
|
+
else if (phaseNumber === '3' ||
|
|
82
|
+
phaseName.includes('追加QA') ||
|
|
83
|
+
phaseName.includes('QA') ||
|
|
84
|
+
phaseName.includes('試験') ||
|
|
85
|
+
phaseName.toLowerCase().includes('testing') ||
|
|
86
|
+
phaseName.toLowerCase().includes('additional qa')) {
|
|
87
|
+
return 'additional-qa';
|
|
88
|
+
}
|
|
89
|
+
else if (phaseNumber === 'B' ||
|
|
90
|
+
phaseNumber.toLowerCase() === 'b' ||
|
|
91
|
+
phaseName.includes('リリース準備テスト') ||
|
|
92
|
+
phaseName.toLowerCase().includes('release-test') ||
|
|
93
|
+
phaseName.toLowerCase().includes('release test')) {
|
|
94
|
+
return 'phase-b';
|
|
95
|
+
}
|
|
96
|
+
else if (phaseNumber === '4' ||
|
|
97
|
+
phaseName.includes('リリース準備') ||
|
|
98
|
+
phaseName.toLowerCase().includes('release-prep') ||
|
|
99
|
+
phaseName.toLowerCase().includes('release preparation')) {
|
|
100
|
+
return 'release-prep';
|
|
101
|
+
}
|
|
102
|
+
else if (phaseNumber === '5' ||
|
|
103
|
+
(phaseName.includes('リリース') && !phaseName.includes('準備')) ||
|
|
104
|
+
(phaseName.toLowerCase().includes('release') &&
|
|
105
|
+
!phaseName.toLowerCase().includes('prep'))) {
|
|
106
|
+
return 'release';
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=status-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-mapper.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/status-mapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,YAAY,GAAG,yCAAyC,CAAC;IAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAE7B,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa;IAC/C,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,gCAAgC;IAE/E,iCAAiC;IACjC,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,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