@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,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Sync Service
|
|
3
|
+
*
|
|
4
|
+
* tasks.mdからJIRA Epic/Story/Subtaskを自動作成するメインサービス
|
|
5
|
+
*
|
|
6
|
+
* 【重要】Epic Link について:
|
|
7
|
+
* JIRA Cloud では Story を Epic に紐付けるには、Epic Link カスタムフィールド
|
|
8
|
+
* (通常 customfield_10014)を使用する必要があります。
|
|
9
|
+
*
|
|
10
|
+
* 現在の実装では parent フィールドを使用していますが、これは Subtask 専用です。
|
|
11
|
+
* Story 作成時に 400 エラーが発生する可能性があります。
|
|
12
|
+
*
|
|
13
|
+
* 対処方法:
|
|
14
|
+
* 1. JIRA 管理画面で Epic Link のカスタムフィールドIDを確認
|
|
15
|
+
* 2. 環境変数 JIRA_EPIC_LINK_FIELD に設定(例: customfield_10014)
|
|
16
|
+
* 3. または、Story 作成後に手動で Epic Link を設定
|
|
17
|
+
*
|
|
18
|
+
* 参考: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
|
|
19
|
+
*/
|
|
20
|
+
import type { JIRAConfig } from './types.js';
|
|
21
|
+
/**
|
|
22
|
+
* JIRA認証設定を取得
|
|
23
|
+
*/
|
|
24
|
+
export declare function getJIRAConfig(): JIRAConfig;
|
|
25
|
+
/**
|
|
26
|
+
* JIRA同期メイン処理
|
|
27
|
+
* tasks.mdを解析してEpicとStoryをJIRAに作成
|
|
28
|
+
*
|
|
29
|
+
* @param featureName 機能名(例: "onion-architecture")
|
|
30
|
+
*/
|
|
31
|
+
export declare function syncTasksToJIRA(featureName: string): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=sync-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/sync-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAaH,OAAO,KAAK,EAAE,UAAU,EAA+B,MAAM,YAAY,CAAC;AAW1E;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAU1C;AAUD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqUxE"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Sync Service
|
|
3
|
+
*
|
|
4
|
+
* tasks.mdからJIRA Epic/Story/Subtaskを自動作成するメインサービス
|
|
5
|
+
*
|
|
6
|
+
* 【重要】Epic Link について:
|
|
7
|
+
* JIRA Cloud では Story を Epic に紐付けるには、Epic Link カスタムフィールド
|
|
8
|
+
* (通常 customfield_10014)を使用する必要があります。
|
|
9
|
+
*
|
|
10
|
+
* 現在の実装では parent フィールドを使用していますが、これは Subtask 専用です。
|
|
11
|
+
* Story 作成時に 400 エラーが発生する可能性があります。
|
|
12
|
+
*
|
|
13
|
+
* 対処方法:
|
|
14
|
+
* 1. JIRA 管理画面で Epic Link のカスタムフィールドIDを確認
|
|
15
|
+
* 2. 環境変数 JIRA_EPIC_LINK_FIELD に設定(例: customfield_10014)
|
|
16
|
+
* 3. または、Story 作成後に手動で Epic Link を設定
|
|
17
|
+
*
|
|
18
|
+
* 参考: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
|
|
19
|
+
*/
|
|
20
|
+
import { resolve } from 'path';
|
|
21
|
+
import { loadProjectMeta } from '../../../../../scripts/utils/project-meta.js';
|
|
22
|
+
import { validateFeatureNameOrThrow } from '../../../../../scripts/utils/feature-name-validator.js';
|
|
23
|
+
import { getConfig, getConfigPath } from '../../../../../scripts/utils/config-loader.js';
|
|
24
|
+
import { validateForJiraSyncAsync } from '../../../../../scripts/utils/config-validator.js';
|
|
25
|
+
import { updateSpecJsonAfterJiraSync, } from '../../../../../scripts/utils/spec-updater.js';
|
|
26
|
+
import { safeReadFileOrThrow } from '../../../../../scripts/utils/safe-file-reader.js';
|
|
27
|
+
import { JIRAClient } from './client.js';
|
|
28
|
+
import { createRichADF } from './adf-converter.js';
|
|
29
|
+
import { extractRepoName, createTitlePrefix, extractStoryDetails, getStoryIssueTypeId, getOrCreateEpic, } from './issue-builder.js';
|
|
30
|
+
import { detectPhaseLabel } from './status-mapper.js';
|
|
31
|
+
/**
|
|
32
|
+
* JIRA認証設定を取得
|
|
33
|
+
*/
|
|
34
|
+
export function getJIRAConfig() {
|
|
35
|
+
const url = process.env.ATLASSIAN_URL;
|
|
36
|
+
const email = process.env.ATLASSIAN_EMAIL;
|
|
37
|
+
const apiToken = process.env.ATLASSIAN_API_TOKEN;
|
|
38
|
+
if (!url || !email || !apiToken) {
|
|
39
|
+
throw new Error('Missing JIRA credentials in .env');
|
|
40
|
+
}
|
|
41
|
+
return { url, email, apiToken };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* リクエスト間の待機時間(ミリ秒)
|
|
45
|
+
* 環境変数 ATLASSIAN_REQUEST_DELAY で調整可能(デフォルト: 500ms)
|
|
46
|
+
*/
|
|
47
|
+
function getRequestDelay() {
|
|
48
|
+
return parseInt(process.env.ATLASSIAN_REQUEST_DELAY || '500', 10);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* JIRA同期メイン処理
|
|
52
|
+
* tasks.mdを解析してEpicとStoryをJIRAに作成
|
|
53
|
+
*
|
|
54
|
+
* @param featureName 機能名(例: "onion-architecture")
|
|
55
|
+
*/
|
|
56
|
+
export async function syncTasksToJIRA(featureName) {
|
|
57
|
+
console.log(`Syncing tasks for feature: ${featureName}`);
|
|
58
|
+
// feature名のバリデーション(必須)
|
|
59
|
+
validateFeatureNameOrThrow(featureName);
|
|
60
|
+
// 実行前の必須設定値チェック(非同期版:Issue Type IDの存在チェック付き)
|
|
61
|
+
const validation = await validateForJiraSyncAsync();
|
|
62
|
+
if (validation.info.length > 0) {
|
|
63
|
+
validation.info.forEach((msg) => console.log(`ℹ️ ${msg}`));
|
|
64
|
+
}
|
|
65
|
+
if (validation.warnings.length > 0) {
|
|
66
|
+
console.warn('⚠️ Warnings:');
|
|
67
|
+
validation.warnings.forEach((warning) => console.warn(` ${warning}`));
|
|
68
|
+
}
|
|
69
|
+
if (validation.errors.length > 0) {
|
|
70
|
+
console.error('❌ Configuration errors:');
|
|
71
|
+
validation.errors.forEach((error) => console.error(` ${error}`));
|
|
72
|
+
const configPath = getConfigPath();
|
|
73
|
+
console.error(`\n設定ファイル: ${configPath}`);
|
|
74
|
+
throw new Error('JIRA同期に必要な設定値が不足しています。上記のエラーを確認して設定を修正してください。');
|
|
75
|
+
}
|
|
76
|
+
console.log(`⏳ Request delay: ${getRequestDelay()}ms (set ATLASSIAN_REQUEST_DELAY to adjust)`);
|
|
77
|
+
// 設定からissue type IDを取得(検索と作成の両方で使用)
|
|
78
|
+
const appConfig = getConfig();
|
|
79
|
+
const projectMeta = loadProjectMeta();
|
|
80
|
+
const config = getJIRAConfig();
|
|
81
|
+
const client = new JIRAClient(config);
|
|
82
|
+
// リポジトリ名を取得(タイトルプレフィックス用)
|
|
83
|
+
const repoName = extractRepoName(projectMeta.repository);
|
|
84
|
+
const titlePrefix = createTitlePrefix(repoName, featureName);
|
|
85
|
+
// StoryタイプのIDを取得
|
|
86
|
+
const storyIssueTypeId = await getStoryIssueTypeId(appConfig, projectMeta, client);
|
|
87
|
+
const tasksPath = resolve(`.kiro/specs/${featureName}/tasks.md`);
|
|
88
|
+
const tasksContent = safeReadFileOrThrow(tasksPath);
|
|
89
|
+
// spec.jsonを読み込んで既存のEpicキーを確認
|
|
90
|
+
const specPath = resolve(`.kiro/specs/${featureName}/spec.json`);
|
|
91
|
+
let spec = {};
|
|
92
|
+
try {
|
|
93
|
+
spec = JSON.parse(safeReadFileOrThrow(specPath));
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
console.error('spec.json not found or invalid');
|
|
97
|
+
}
|
|
98
|
+
// Epic を取得または作成
|
|
99
|
+
const epic = await getOrCreateEpic(featureName, spec, projectMeta, client);
|
|
100
|
+
// 既存のStoryを検索(重複防止)
|
|
101
|
+
// ラベルで検索(summary検索では "Story: タイトル" 形式に一致しないため)
|
|
102
|
+
// issuetype検索にはIDを使用(名前は言語依存のため)
|
|
103
|
+
const storyJql = `project = ${projectMeta.jiraProjectKey} AND issuetype = ${storyIssueTypeId} AND labels = "${featureName}"`;
|
|
104
|
+
let existingStories = [];
|
|
105
|
+
try {
|
|
106
|
+
existingStories = await client.searchIssues(storyJql);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
console.error('❌ Failed to search existing Stories:', error instanceof Error ? error.message : error);
|
|
110
|
+
console.error('⚠️ Cannot verify idempotency - Story creation may result in duplicates');
|
|
111
|
+
console.error('⚠️ Continuing with story creation (duplicates may be created)...');
|
|
112
|
+
// 検索失敗時も処理を継続(既存ストーリーなしとして扱う)
|
|
113
|
+
existingStories = [];
|
|
114
|
+
}
|
|
115
|
+
const existingStorySummaries = new Set(existingStories
|
|
116
|
+
.filter((s) => s?.fields?.summary)
|
|
117
|
+
.map((s) => s.fields.summary));
|
|
118
|
+
const existingStoryKeys = new Set(existingStories
|
|
119
|
+
.filter((s) => s?.key)
|
|
120
|
+
.map((s) => s.key));
|
|
121
|
+
console.log(`Found ${existingStories.length} existing stories for this feature`);
|
|
122
|
+
// フェーズラベル検出用の正規表現
|
|
123
|
+
// Phase X: フェーズ名(ラベル)の形式を検出
|
|
124
|
+
// Phase番号: 数字(0, 1, 2...)、ドット付き数字(0.1, 0.2...)、英字(A, B)に対応
|
|
125
|
+
const phasePattern = /## Phase [\d.A-Z]+:\s*(.+?)(?:((.+?)))?/;
|
|
126
|
+
// Story作成(フェーズ検出付きパーサー)
|
|
127
|
+
const lines = tasksContent.split('\n');
|
|
128
|
+
let currentPhaseLabel = 'implementation'; // デフォルトは実装フェーズ
|
|
129
|
+
const createdStories = [];
|
|
130
|
+
for (let i = 0; i < lines.length; i++) {
|
|
131
|
+
const line = lines[i];
|
|
132
|
+
// フェーズ検出
|
|
133
|
+
const detectedPhase = detectPhaseLabel(line);
|
|
134
|
+
if (detectedPhase) {
|
|
135
|
+
currentPhaseLabel = detectedPhase;
|
|
136
|
+
// ログ出力用にphaseTitle と phaseNumber を抽出
|
|
137
|
+
const phaseMatch = line.match(phasePattern);
|
|
138
|
+
const phaseTitle = phaseMatch ? phaseMatch[1] : '';
|
|
139
|
+
const phaseNumberMatch = line.match(/## Phase ([\d.A-Z]+):/);
|
|
140
|
+
const phaseNumber = phaseNumberMatch ? phaseNumberMatch[1] : '';
|
|
141
|
+
console.log(`📌 Phase detected: ${phaseTitle} (number: ${phaseNumber}, label: ${currentPhaseLabel})`);
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
// Story検出
|
|
145
|
+
const storyMatch = line.match(/### Story [\d.]+: (.+)/);
|
|
146
|
+
if (!storyMatch)
|
|
147
|
+
continue;
|
|
148
|
+
const storyTitle = storyMatch[1];
|
|
149
|
+
const storySummary = `${titlePrefix} Story: ${storyTitle}`;
|
|
150
|
+
// 既に同じタイトルのStoryが存在するかチェック
|
|
151
|
+
if (existingStorySummaries.has(storySummary)) {
|
|
152
|
+
console.log(`Skipping Story (already exists): ${storyTitle}`);
|
|
153
|
+
const existing = existingStories.find((s) => s?.fields?.summary === storySummary);
|
|
154
|
+
if (existing) {
|
|
155
|
+
createdStories.push(existing.key);
|
|
156
|
+
existingStoryKeys.add(existing.key);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
console.warn(`⚠️ Warning: Story "${storyTitle}" is in summary set but not found in existingStories array`);
|
|
160
|
+
}
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
console.log(`Creating Story: ${storyTitle} [${currentPhaseLabel}]`);
|
|
164
|
+
try {
|
|
165
|
+
// Storyの詳細情報を抽出(新しい実装を使用)
|
|
166
|
+
const storyDetails = extractStoryDetails(tasksContent, storyTitle);
|
|
167
|
+
// GitHubリンク
|
|
168
|
+
const githubUrl = `${projectMeta.repository}/tree/main/.kiro/specs/${featureName}/tasks.md`;
|
|
169
|
+
// リッチなADF形式で説明文を生成
|
|
170
|
+
const richDescription = createRichADF(storyDetails, currentPhaseLabel, githubUrl);
|
|
171
|
+
// 優先度のマッピング(デフォルト: Medium)
|
|
172
|
+
const priorityMap = {
|
|
173
|
+
High: 'High',
|
|
174
|
+
Medium: 'Medium',
|
|
175
|
+
Low: 'Low',
|
|
176
|
+
};
|
|
177
|
+
const priority = storyDetails.priority && priorityMap[storyDetails.priority]
|
|
178
|
+
? priorityMap[storyDetails.priority]
|
|
179
|
+
: 'Medium';
|
|
180
|
+
// 見積もり(Story Points)を取得
|
|
181
|
+
let storyPoints;
|
|
182
|
+
if (storyDetails.estimate) {
|
|
183
|
+
const spMatch = storyDetails.estimate.match(/(\d+)\s*SP/);
|
|
184
|
+
if (spMatch) {
|
|
185
|
+
storyPoints = parseInt(spMatch[1], 10);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// JIRAペイロードを作成(issue type IDは既に取得済み)
|
|
189
|
+
const storyPayload = {
|
|
190
|
+
fields: {
|
|
191
|
+
project: { key: projectMeta.jiraProjectKey },
|
|
192
|
+
summary: storySummary,
|
|
193
|
+
description: richDescription, // リッチなADF形式
|
|
194
|
+
issuetype: { id: storyIssueTypeId },
|
|
195
|
+
labels: [
|
|
196
|
+
...projectMeta.confluenceLabels,
|
|
197
|
+
featureName,
|
|
198
|
+
currentPhaseLabel,
|
|
199
|
+
],
|
|
200
|
+
priority: { name: priority },
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
// 期限(Due Date)を設定
|
|
204
|
+
if (storyDetails.dueDate) {
|
|
205
|
+
storyPayload.fields.duedate = storyDetails.dueDate; // YYYY-MM-DD形式
|
|
206
|
+
}
|
|
207
|
+
// Story Pointsを設定(カスタムフィールド)
|
|
208
|
+
// 注意: JIRAプロジェクトによってカスタムフィールドIDが異なる場合があります
|
|
209
|
+
// 環境変数 JIRA_STORY_POINTS_FIELD で設定可能(例: customfield_10016)
|
|
210
|
+
if (storyPoints !== undefined) {
|
|
211
|
+
const storyPointsField = process.env.JIRA_STORY_POINTS_FIELD || 'customfield_10016';
|
|
212
|
+
storyPayload.fields[storyPointsField] = storyPoints;
|
|
213
|
+
}
|
|
214
|
+
// 担当者を設定(アカウントIDが必要な場合があるため、オプション)
|
|
215
|
+
// 注意: JIRAのアカウントIDが必要な場合があります
|
|
216
|
+
// if (storyInfo?.assignee) {
|
|
217
|
+
// storyPayload.fields.assignee = { name: storyInfo.assignee };
|
|
218
|
+
// }
|
|
219
|
+
const story = await client.createIssue(storyPayload);
|
|
220
|
+
console.log(` ✅ Story created: ${story.key} [${currentPhaseLabel}]`);
|
|
221
|
+
// 期限とStory Pointsの情報を表示
|
|
222
|
+
if (storyDetails.dueDate) {
|
|
223
|
+
console.log(` 期限: ${storyDetails.dueDate}`);
|
|
224
|
+
}
|
|
225
|
+
if (storyDetails.estimate) {
|
|
226
|
+
console.log(` 見積もり: ${storyDetails.estimate}`);
|
|
227
|
+
}
|
|
228
|
+
if (storyPoints !== undefined) {
|
|
229
|
+
console.log(` Story Points: ${storyPoints} SP`);
|
|
230
|
+
}
|
|
231
|
+
createdStories.push(story.key);
|
|
232
|
+
// 進捗表示(大量作成時の見通し向上)
|
|
233
|
+
if (createdStories.length % 5 === 0) {
|
|
234
|
+
console.log(` 📊 Progress: ${createdStories.length} stories created so far...`);
|
|
235
|
+
}
|
|
236
|
+
// Epic Linkは手動設定が必要(JIRA Cloudの制約)
|
|
237
|
+
console.log(` ℹ️ Epic: ${epic.key} に手動でリンクしてください`);
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
console.error(` ❌ Failed to create Story "${storyTitle}":`, error instanceof Error ? error.message : error);
|
|
241
|
+
// JIRA APIエラーの詳細を表示
|
|
242
|
+
const errorObj = error;
|
|
243
|
+
if (errorObj.response?.data) {
|
|
244
|
+
console.error(' 📋 JIRA API Error Details:', JSON.stringify(errorObj.response.data, null, 2));
|
|
245
|
+
// Story Pointsフィールドのエラーの場合、警告を表示
|
|
246
|
+
if (errorObj.response.data.errors &&
|
|
247
|
+
Object.keys(errorObj.response.data.errors).some((key) => key.includes('customfield'))) {
|
|
248
|
+
console.error(' ⚠️ Story Pointsフィールドの設定に失敗しました。');
|
|
249
|
+
console.error(' 💡 環境変数 JIRA_STORY_POINTS_FIELD を正しいカスタムフィールドIDに設定してください。');
|
|
250
|
+
console.error(' 💡 JIRA管理画面でStory PointsのカスタムフィールドIDを確認してください。');
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// エラーがあっても他のStoryの作成は継続
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// 新規作成数と再利用数を正確に計算
|
|
257
|
+
const newStoryCount = createdStories.filter((key) => !existingStoryKeys.has(key)).length;
|
|
258
|
+
const reusedStoryCount = createdStories.filter((key) => existingStoryKeys.has(key)).length;
|
|
259
|
+
console.log('\n✅ JIRA sync completed');
|
|
260
|
+
console.log(` Epic: ${epic.key}`);
|
|
261
|
+
console.log(` Stories: ${createdStories.length} processed (${newStoryCount} new, ${reusedStoryCount} reused)`);
|
|
262
|
+
// spec.json を更新(配列クリア前に実行)
|
|
263
|
+
const jiraBaseUrl = process.env.ATLASSIAN_URL || '';
|
|
264
|
+
try {
|
|
265
|
+
updateSpecJsonAfterJiraSync(featureName, {
|
|
266
|
+
projectKey: projectMeta.jiraProjectKey,
|
|
267
|
+
epicKey: epic.key,
|
|
268
|
+
epicUrl: `${jiraBaseUrl}/browse/${epic.key}`,
|
|
269
|
+
storyKeys: createdStories,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
console.warn(`⚠️ Failed to update spec.json after JIRA sync: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
274
|
+
// spec.json更新の失敗はスクリプト全体の失敗とはしない(JIRA同期は成功しているため)
|
|
275
|
+
}
|
|
276
|
+
// メモリリーク対策: 配列をクリア
|
|
277
|
+
existingStories.length = 0;
|
|
278
|
+
createdStories.length = 0;
|
|
279
|
+
existingStorySummaries.clear();
|
|
280
|
+
existingStoryKeys.clear();
|
|
281
|
+
// JIRAClientのリソースをクリーンアップ
|
|
282
|
+
client.dispose();
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=sync-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-service.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/sync-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EACL,2BAA2B,GAE5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,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AC3B,CAAC,MAAM,CAAC;IAET,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CACT,eAAe,cAAc,CAAC,MAAM,eAAe,aAAa,SAAS,gBAAgB,UAAU,CACpG,CAAC;IAEF,2BAA2B;IAC3B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;IACpD,IAAI,CAAC;QACH,2BAA2B,CAAC,WAAW,EAAE;YACvC,UAAU,EAAE,WAAW,CAAC,cAAc;YACtC,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,OAAO,EAAE,GAAG,WAAW,WAAW,IAAI,CAAC,GAAG,EAAE;YAC5C,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CACV,mDAAmD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAC9G,CAAC;QACF,kDAAkD;IACpD,CAAC;IAED,mBAAmB;IACnB,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,sBAAsB,CAAC,KAAK,EAAE,CAAC;IAC/B,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAE1B,0BAA0B;IAC1B,MAAM,CAAC,OAAO,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Integration Types
|
|
3
|
+
*
|
|
4
|
+
* JIRA API用の型定義を集約したファイル
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Atlassian Document Format (ADF) の型定義
|
|
8
|
+
*/
|
|
9
|
+
export interface ADFNode {
|
|
10
|
+
type: string;
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
content?: ADFNode[];
|
|
13
|
+
text?: string;
|
|
14
|
+
marks?: Array<{
|
|
15
|
+
type: string;
|
|
16
|
+
attrs?: Record<string, unknown>;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface ADFDocument {
|
|
20
|
+
version: number;
|
|
21
|
+
type: 'doc';
|
|
22
|
+
content: ADFNode[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* JIRA Issue基本型
|
|
26
|
+
*/
|
|
27
|
+
export interface JiraIssue {
|
|
28
|
+
id: string;
|
|
29
|
+
key: string;
|
|
30
|
+
fields?: {
|
|
31
|
+
summary?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* JIRA Issue型定義(必要最小限)
|
|
37
|
+
*/
|
|
38
|
+
export interface JIRAIssue {
|
|
39
|
+
id: string;
|
|
40
|
+
key: string;
|
|
41
|
+
self: string;
|
|
42
|
+
fields: {
|
|
43
|
+
summary: string;
|
|
44
|
+
issuetype?: {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
status?: {
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* JIRA Issue作成/更新ペイロード型
|
|
56
|
+
*/
|
|
57
|
+
export interface JIRAIssuePayload {
|
|
58
|
+
fields: {
|
|
59
|
+
project: {
|
|
60
|
+
key: string;
|
|
61
|
+
};
|
|
62
|
+
summary: string;
|
|
63
|
+
description?: ADFDocument;
|
|
64
|
+
issuetype: {
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
67
|
+
labels?: string[];
|
|
68
|
+
parent?: {
|
|
69
|
+
key: string;
|
|
70
|
+
};
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
update?: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* JIRA Issue作成レスポンス型
|
|
77
|
+
*/
|
|
78
|
+
export interface JIRAIssueCreateResponse {
|
|
79
|
+
id: string;
|
|
80
|
+
key: string;
|
|
81
|
+
self: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* JIRA Issue Type型
|
|
85
|
+
*/
|
|
86
|
+
export interface JIRAIssueType {
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
subtask: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* JIRA認証設定
|
|
94
|
+
*/
|
|
95
|
+
export interface JIRAConfig {
|
|
96
|
+
url: string;
|
|
97
|
+
email: string;
|
|
98
|
+
apiToken: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Storyの詳細情報を抽出
|
|
102
|
+
*/
|
|
103
|
+
export interface StoryDetails {
|
|
104
|
+
title: string;
|
|
105
|
+
description?: string;
|
|
106
|
+
acceptanceCriteria?: string[];
|
|
107
|
+
subtasks?: string[];
|
|
108
|
+
dependencies?: string;
|
|
109
|
+
priority?: string;
|
|
110
|
+
estimate?: string;
|
|
111
|
+
assignee?: string;
|
|
112
|
+
dueDate?: string;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MA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AE,MAAM,CAAA;SAAE,CAAC;QACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/external-apis/atlassian/jira/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Actions Client
|
|
3
|
+
* GitHub Actions APIへのアクセスを抽象化し、Workflow Runsの取得とレート制限対策を提供
|
|
4
|
+
*/
|
|
5
|
+
import type { IGitHubWorkflowRun, GitHubAPIError, Result } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* GitHub Actions Client
|
|
8
|
+
*/
|
|
9
|
+
export declare class GitHubActionsClient {
|
|
10
|
+
private octokit;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* リポジトリの最新Workflow Runを取得
|
|
14
|
+
* @param owner リポジトリオーナー
|
|
15
|
+
* @param repo リポジトリ名
|
|
16
|
+
* @param branch ブランチ名
|
|
17
|
+
* @returns Workflow Run情報(成功/失敗)
|
|
18
|
+
*/
|
|
19
|
+
getLatestWorkflowRun(owner: string, repo: string, branch: string): Promise<Result<IGitHubWorkflowRun, GitHubAPIError>>;
|
|
20
|
+
/**
|
|
21
|
+
* リソースをクリーンアップ
|
|
22
|
+
*/
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/external-apis/github/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAgB,MAAM,EAAE,MAAM,YAAY,CAAC;AAG3F;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,OAAO,CAAU;;IAazB;;;;;;OAMG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;IA4EtD;;OAEG;IACH,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Actions Client
|
|
3
|
+
* GitHub Actions APIへのアクセスを抽象化し、Workflow Runsの取得とレート制限対策を提供
|
|
4
|
+
*/
|
|
5
|
+
import { Octokit } from '@octokit/rest';
|
|
6
|
+
import { exponentialBackoff } from './utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* GitHub Actions Client
|
|
9
|
+
*/
|
|
10
|
+
export class GitHubActionsClient {
|
|
11
|
+
octokit;
|
|
12
|
+
constructor() {
|
|
13
|
+
const token = process.env.GITHUB_TOKEN;
|
|
14
|
+
if (!token) {
|
|
15
|
+
throw new Error('GITHUB_TOKENが設定されていません');
|
|
16
|
+
}
|
|
17
|
+
this.octokit = new Octokit({
|
|
18
|
+
auth: token,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* リポジトリの最新Workflow Runを取得
|
|
23
|
+
* @param owner リポジトリオーナー
|
|
24
|
+
* @param repo リポジトリ名
|
|
25
|
+
* @param branch ブランチ名
|
|
26
|
+
* @returns Workflow Run情報(成功/失敗)
|
|
27
|
+
*/
|
|
28
|
+
async getLatestWorkflowRun(owner, repo, branch) {
|
|
29
|
+
try {
|
|
30
|
+
const response = await exponentialBackoff(async () => {
|
|
31
|
+
return await this.octokit.actions.listWorkflowRunsForRepo({
|
|
32
|
+
owner,
|
|
33
|
+
repo,
|
|
34
|
+
branch,
|
|
35
|
+
status: 'completed',
|
|
36
|
+
per_page: 1,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
if (!response.data.workflow_runs ||
|
|
40
|
+
response.data.workflow_runs.length === 0) {
|
|
41
|
+
return {
|
|
42
|
+
success: false,
|
|
43
|
+
error: {
|
|
44
|
+
type: 'NOT_FOUND',
|
|
45
|
+
message: `リポジトリ ${owner}/${repo} のWorkflow Runが見つかりません`,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const run = response.data.workflow_runs[0];
|
|
50
|
+
return {
|
|
51
|
+
success: true,
|
|
52
|
+
data: run,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
// エラーハンドリング
|
|
57
|
+
const octokitError = error;
|
|
58
|
+
if (octokitError.status === 404) {
|
|
59
|
+
return {
|
|
60
|
+
success: false,
|
|
61
|
+
error: {
|
|
62
|
+
type: 'NOT_FOUND',
|
|
63
|
+
message: octokitError.message || 'リポジトリが見つかりません',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
else if (octokitError.status === 403) {
|
|
68
|
+
// レート制限
|
|
69
|
+
const resetTime = octokitError.response?.headers?.['x-ratelimit-reset'];
|
|
70
|
+
const retryAfter = resetTime
|
|
71
|
+
? parseInt(resetTime, 10) - Math.floor(Date.now() / 1000)
|
|
72
|
+
: 3600;
|
|
73
|
+
return {
|
|
74
|
+
success: false,
|
|
75
|
+
error: {
|
|
76
|
+
type: 'RATE_LIMIT_EXCEEDED',
|
|
77
|
+
retryAfter: Math.max(retryAfter, 0),
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
else if (octokitError.status === 401) {
|
|
82
|
+
return {
|
|
83
|
+
success: false,
|
|
84
|
+
error: {
|
|
85
|
+
type: 'UNAUTHORIZED',
|
|
86
|
+
message: octokitError.message || '認証エラー',
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return {
|
|
92
|
+
success: false,
|
|
93
|
+
error: {
|
|
94
|
+
type: 'SERVER_ERROR',
|
|
95
|
+
message: octokitError.message || 'サーバーエラー',
|
|
96
|
+
statusCode: octokitError.status || 500,
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* リソースをクリーンアップ
|
|
104
|
+
*/
|
|
105
|
+
destroy() {
|
|
106
|
+
// Octokitは特にクリーンアップ不要だが、将来的な拡張のためにメソッドを用意
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/infrastructure/external-apis/github/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,mBAAmB;IACtB,OAAO,CAAU;IAEzB;QACE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC;YACzB,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,KAAa,EACb,IAAY,EACZ,MAAc;QAEd,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,KAAK,IAAI,EAAE;gBACnD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC;oBACxD,KAAK;oBACL,IAAI;oBACJ,MAAM;oBACN,MAAM,EAAE,WAAW;oBACnB,QAAQ,EAAE,CAAC;iBACZ,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IACE,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;gBAC5B,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,EACxC,CAAC;gBACD,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,IAAI,EAAE,WAAW;wBACjB,OAAO,EAAE,SAAS,KAAK,IAAI,IAAI,wBAAwB;qBACxD;iBACF,CAAC;YACJ,CAAC;YAED,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC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pB,OAAO,EAAE,YAAY,CAAC,OAAO,IAAI,SAAS;wBAC1C,UAAU,EAAE,YAAY,CAAC,MAAM,IAAI,GAAG;qBACvC;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,0CAA0C;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub API Integration Module
|
|
3
|
+
*/
|
|
4
|
+
export { GitHubActionsClient } from './client.js';
|
|
5
|
+
export type { IGitHubWorkflowRun, IRepositoryCIStatus, GitHubAPIError, OctokitError, Result, } from './types.js';
|
|
6
|
+
export { exponentialBackoff, parseGitHubWorkflowRun } from './utils.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/external-apis/github/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/infrastructure/external-apis/github/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAWlD,QAAQ;AACR,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC"}
|