@sk8metal/michi-cli 0.14.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +268 -2
- package/README.md +27 -2
- package/dist/scripts/config/config-schema.d.ts +5 -333
- package/dist/scripts/config/config-schema.d.ts.map +1 -1
- package/dist/scripts/config/config-schema.js +6 -233
- package/dist/scripts/config/config-schema.js.map +1 -1
- package/dist/scripts/config-global.d.ts.map +1 -1
- package/dist/scripts/config-global.js +3 -2
- package/dist/scripts/config-global.js.map +1 -1
- package/dist/scripts/confluence-sync.d.ts +5 -73
- package/dist/scripts/confluence-sync.d.ts.map +1 -1
- package/dist/scripts/confluence-sync.js +14 -392
- package/dist/scripts/confluence-sync.js.map +1 -1
- package/dist/scripts/constants/environments.d.ts +3 -30
- package/dist/scripts/constants/environments.d.ts.map +1 -1
- package/dist/scripts/constants/environments.js +3 -41
- package/dist/scripts/constants/environments.js.map +1 -1
- package/dist/scripts/constants/languages.d.ts +3 -20
- package/dist/scripts/constants/languages.d.ts.map +1 -1
- package/dist/scripts/constants/languages.js +3 -50
- package/dist/scripts/constants/languages.js.map +1 -1
- package/dist/scripts/constants/test-commands.d.ts +3 -33
- package/dist/scripts/constants/test-commands.d.ts.map +1 -1
- package/dist/scripts/constants/test-commands.js +3 -67
- package/dist/scripts/constants/test-commands.js.map +1 -1
- package/dist/scripts/dev-tools/mermaid-converter.d.ts.map +1 -0
- package/dist/scripts/dev-tools/mermaid-converter.js.map +1 -0
- package/dist/scripts/dev-tools/test-interactive.d.ts.map +1 -0
- package/dist/scripts/{test-interactive.js → dev-tools/test-interactive.js} +4 -3
- package/dist/scripts/dev-tools/test-interactive.js.map +1 -0
- package/dist/scripts/github-actions-client.d.ts +5 -75
- package/dist/scripts/github-actions-client.d.ts.map +1 -1
- package/dist/scripts/github-actions-client.js +4 -178
- package/dist/scripts/github-actions-client.js.map +1 -1
- package/dist/scripts/jira-sync.d.ts +3 -121
- package/dist/scripts/jira-sync.d.ts.map +1 -1
- package/dist/scripts/jira-sync.js +5 -879
- package/dist/scripts/jira-sync.js.map +1 -1
- package/dist/scripts/markdown-to-confluence.d.ts.map +1 -1
- package/dist/scripts/markdown-to-confluence.js +2 -2
- package/dist/scripts/markdown-to-confluence.js.map +1 -1
- package/dist/scripts/multi-project-estimate.d.ts.map +1 -1
- package/dist/scripts/multi-project-estimate.js +3 -2
- package/dist/scripts/multi-project-estimate.js.map +1 -1
- package/dist/scripts/phase-runner.d.ts.map +1 -1
- package/dist/scripts/phase-runner.js +34 -18
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/pre-flight-check.d.ts.map +1 -1
- package/dist/scripts/pre-flight-check.js +27 -11
- package/dist/scripts/pre-flight-check.js.map +1 -1
- package/dist/scripts/template/multi-repo-renderer.js +2 -2
- package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
- package/dist/scripts/test-execution-generator.d.ts.map +1 -1
- package/dist/scripts/test-execution-generator.js +5 -4
- package/dist/scripts/test-execution-generator.js.map +1 -1
- package/dist/scripts/utils/aidlc-parser.d.ts +5 -82
- package/dist/scripts/utils/aidlc-parser.d.ts.map +1 -1
- package/dist/scripts/utils/aidlc-parser.js +4 -204
- package/dist/scripts/utils/aidlc-parser.js.map +1 -1
- package/dist/scripts/utils/ci-generator.d.ts.map +1 -1
- package/dist/scripts/utils/ci-generator.js +4 -3
- package/dist/scripts/utils/ci-generator.js.map +1 -1
- package/dist/scripts/utils/config-loader.d.ts.map +1 -1
- package/dist/scripts/utils/config-loader.js +46 -49
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/config-validator.d.ts +9 -10
- package/dist/scripts/utils/config-validator.d.ts.map +1 -1
- package/dist/scripts/utils/config-validator.js +68 -70
- package/dist/scripts/utils/config-validator.js.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.d.ts.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.js +5 -4
- package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
- package/dist/scripts/utils/env-config.d.ts.map +1 -1
- package/dist/scripts/utils/env-config.js +55 -38
- package/dist/scripts/utils/env-config.js.map +1 -1
- package/dist/scripts/utils/feature-name-validator.d.ts +4 -9
- package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -1
- package/dist/scripts/utils/feature-name-validator.js +12 -21
- package/dist/scripts/utils/feature-name-validator.js.map +1 -1
- package/dist/scripts/utils/interactive-helpers.d.ts +5 -29
- package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -1
- package/dist/scripts/utils/interactive-helpers.js +5 -89
- package/dist/scripts/utils/interactive-helpers.js.map +1 -1
- package/dist/scripts/utils/language-detector.d.ts.map +1 -1
- package/dist/scripts/utils/language-detector.js +4 -3
- package/dist/scripts/utils/language-detector.js.map +1 -1
- package/dist/scripts/utils/markdown-parser.d.ts +6 -52
- package/dist/scripts/utils/markdown-parser.d.ts.map +1 -1
- package/dist/scripts/utils/markdown-parser.js +5 -286
- package/dist/scripts/utils/markdown-parser.js.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.d.ts +9 -10
- package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.js +15 -17
- package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
- package/dist/scripts/utils/project-analyzer.d.ts +120 -0
- package/dist/scripts/utils/project-analyzer.d.ts.map +1 -0
- package/dist/scripts/utils/project-analyzer.js +358 -0
- package/dist/scripts/utils/project-analyzer.js.map +1 -0
- package/dist/scripts/utils/project-detector.d.ts.map +1 -1
- package/dist/scripts/utils/project-detector.js +6 -5
- package/dist/scripts/utils/project-detector.js.map +1 -1
- package/dist/scripts/utils/project-finder.d.ts +1 -21
- package/dist/scripts/utils/project-finder.d.ts.map +1 -1
- package/dist/scripts/utils/project-finder.js +2 -121
- package/dist/scripts/utils/project-finder.js.map +1 -1
- package/dist/scripts/utils/project-meta.d.ts +4 -27
- package/dist/scripts/utils/project-meta.d.ts.map +1 -1
- package/dist/scripts/utils/project-meta.js +3 -67
- package/dist/scripts/utils/project-meta.js.map +1 -1
- package/dist/scripts/utils/safe-file-reader.d.ts +84 -0
- package/dist/scripts/utils/safe-file-reader.d.ts.map +1 -0
- package/dist/scripts/utils/safe-file-reader.js +122 -0
- package/dist/scripts/utils/safe-file-reader.js.map +1 -0
- package/dist/scripts/utils/security-validator.d.ts +8 -19
- package/dist/scripts/utils/security-validator.d.ts.map +1 -1
- package/dist/scripts/utils/security-validator.js +28 -58
- package/dist/scripts/utils/security-validator.js.map +1 -1
- package/dist/scripts/utils/spec-archiver.d.ts.map +1 -1
- package/dist/scripts/utils/spec-archiver.js +7 -6
- package/dist/scripts/utils/spec-archiver.js.map +1 -1
- package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
- package/dist/scripts/utils/spec-updater.js +10 -7
- package/dist/scripts/utils/spec-updater.js.map +1 -1
- package/dist/scripts/utils/tasks-converter.js +2 -2
- package/dist/scripts/utils/tasks-converter.js.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.js +4 -4
- package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
- package/dist/scripts/utils/template-applier.d.ts.map +1 -1
- package/dist/scripts/utils/template-applier.js +4 -3
- package/dist/scripts/utils/template-applier.js.map +1 -1
- package/dist/scripts/utils/types/validation.d.ts +57 -0
- package/dist/scripts/utils/types/validation.d.ts.map +1 -0
- package/dist/scripts/utils/types/validation.js +50 -0
- package/dist/scripts/utils/types/validation.js.map +1 -0
- package/dist/scripts/validate-phase.d.ts +6 -1
- package/dist/scripts/validate-phase.d.ts.map +1 -1
- package/dist/scripts/validate-phase.js +42 -20
- package/dist/scripts/validate-phase.js.map +1 -1
- package/dist/scripts/workflow-orchestrator.d.ts +4 -40
- package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
- package/dist/scripts/workflow-orchestrator.js +7 -194
- package/dist/scripts/workflow-orchestrator.js.map +1 -1
- package/dist/src/application/interfaces/config-provider.d.ts +89 -0
- package/dist/src/application/interfaces/config-provider.d.ts.map +1 -0
- package/dist/src/application/interfaces/config-provider.js +8 -0
- package/dist/src/application/interfaces/config-provider.js.map +1 -0
- package/dist/src/application/interfaces/external-api.d.ts +80 -0
- package/dist/src/application/interfaces/external-api.d.ts.map +1 -0
- package/dist/src/application/interfaces/external-api.js +8 -0
- package/dist/src/application/interfaces/external-api.js.map +1 -0
- package/dist/src/application/interfaces/spec-repository.d.ts +52 -0
- package/dist/src/application/interfaces/spec-repository.d.ts.map +1 -0
- package/dist/src/application/interfaces/spec-repository.js +8 -0
- package/dist/src/application/interfaces/spec-repository.js.map +1 -0
- package/dist/src/application/services/spec-service.d.ts +49 -0
- package/dist/src/application/services/spec-service.d.ts.map +1 -0
- package/dist/src/application/services/spec-service.js +94 -0
- package/dist/src/application/services/spec-service.js.map +1 -0
- package/dist/src/application/services/workflow-service.d.ts +58 -0
- package/dist/src/application/services/workflow-service.d.ts.map +1 -0
- package/dist/src/application/services/workflow-service.js +125 -0
- package/dist/src/application/services/workflow-service.js.map +1 -0
- package/dist/src/application/templates/processor.d.ts +31 -0
- package/dist/src/application/templates/processor.d.ts.map +1 -0
- package/dist/src/application/templates/processor.js +58 -0
- package/dist/src/application/templates/processor.js.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts +34 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.js +56 -0
- package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.js +58 -0
- package/dist/src/application/use-cases/spec/generate-design.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js +58 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js +58 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts +48 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.js +121 -0
- package/dist/src/application/use-cases/spec/init-spec.js.map +1 -0
- package/dist/src/cli.d.ts +6 -7
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +6 -745
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/config-validate.js +2 -2
- package/dist/src/commands/init.d.ts +6 -21
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +5 -508
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/migrate.js +4 -3
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/spec-archive.d.ts +6 -13
- package/dist/src/commands/spec-archive.d.ts.map +1 -1
- package/dist/src/commands/spec-archive.js +5 -36
- package/dist/src/commands/spec-archive.js.map +1 -1
- package/dist/src/commands/spec-list.d.ts +6 -11
- package/dist/src/commands/spec-list.d.ts.map +1 -1
- package/dist/src/commands/spec-list.js +5 -51
- package/dist/src/commands/spec-list.js.map +1 -1
- package/dist/src/domain/constants/approval.d.ts +18 -0
- package/dist/src/domain/constants/approval.d.ts.map +1 -0
- package/dist/src/domain/constants/approval.js +23 -0
- package/dist/src/domain/constants/approval.js.map +1 -0
- package/dist/src/domain/constants/environments.d.ts +33 -0
- package/dist/src/domain/constants/environments.d.ts.map +1 -0
- package/dist/src/domain/constants/environments.js +44 -0
- package/dist/src/domain/constants/environments.js.map +1 -0
- package/dist/src/domain/constants/index.d.ts +12 -0
- package/dist/src/domain/constants/index.d.ts.map +1 -0
- package/dist/src/domain/constants/index.js +18 -0
- package/dist/src/domain/constants/index.js.map +1 -0
- package/dist/src/domain/constants/languages.d.ts +23 -0
- package/dist/src/domain/constants/languages.d.ts.map +1 -0
- package/dist/src/domain/constants/languages.js +53 -0
- package/dist/src/domain/constants/languages.js.map +1 -0
- package/dist/src/domain/constants/phases.d.ts +32 -0
- package/dist/src/domain/constants/phases.d.ts.map +1 -0
- package/dist/src/domain/constants/phases.js +52 -0
- package/dist/src/domain/constants/phases.js.map +1 -0
- package/dist/src/domain/constants/test-commands.d.ts +36 -0
- package/dist/src/domain/constants/test-commands.d.ts.map +1 -0
- package/dist/src/domain/constants/test-commands.js +70 -0
- package/dist/src/domain/constants/test-commands.js.map +1 -0
- package/dist/src/domain/constants/validation-rules.d.ts +32 -0
- package/dist/src/domain/constants/validation-rules.d.ts.map +1 -0
- package/dist/src/domain/constants/validation-rules.js +51 -0
- package/dist/src/domain/constants/validation-rules.js.map +1 -0
- package/dist/src/domain/entities/spec.d.ts +66 -0
- package/dist/src/domain/entities/spec.d.ts.map +1 -0
- package/dist/src/domain/entities/spec.js +112 -0
- package/dist/src/domain/entities/spec.js.map +1 -0
- package/dist/src/domain/entities/task.d.ts +43 -0
- package/dist/src/domain/entities/task.d.ts.map +1 -0
- package/dist/src/domain/entities/task.js +65 -0
- package/dist/src/domain/entities/task.js.map +1 -0
- package/dist/src/domain/services/spec-validator.d.ts +46 -0
- package/dist/src/domain/services/spec-validator.d.ts.map +1 -0
- package/dist/src/domain/services/spec-validator.js +99 -0
- package/dist/src/domain/services/spec-validator.js.map +1 -0
- package/dist/src/domain/value-objects/feature-name.d.ts +24 -0
- package/dist/src/domain/value-objects/feature-name.d.ts.map +1 -0
- package/dist/src/domain/value-objects/feature-name.js +36 -0
- package/dist/src/domain/value-objects/feature-name.js.map +1 -0
- package/dist/src/domain/value-objects/index.d.ts +7 -0
- package/dist/src/domain/value-objects/index.d.ts.map +1 -0
- package/dist/src/domain/value-objects/index.js +7 -0
- package/dist/src/domain/value-objects/index.js.map +1 -0
- package/dist/src/infrastructure/config/index.d.ts +5 -0
- package/dist/src/infrastructure/config/index.d.ts.map +1 -0
- package/dist/src/infrastructure/config/index.js +6 -0
- package/dist/src/infrastructure/config/index.js.map +1 -0
- package/dist/src/infrastructure/config/schema.d.ts +337 -0
- package/dist/src/infrastructure/config/schema.d.ts.map +1 -0
- package/dist/src/infrastructure/config/schema.js +237 -0
- package/dist/src/infrastructure/config/schema.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js +102 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts +23 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js +192 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts +48 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +531 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts +10 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts +13 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +129 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts +113 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js +5 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts +15 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js +141 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts +50 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js +226 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js +16 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts +49 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +165 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js +110 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts +32 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +284 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts +114 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js +7 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts +25 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.js +109 -0
- package/dist/src/infrastructure/external-apis/github/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts +7 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.js +8 -0
- package/dist/src/infrastructure/external-apis/github/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts +69 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.js +5 -0
- package/dist/src/infrastructure/external-apis/github/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts +18 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.js +84 -0
- package/dist/src/infrastructure/external-apis/github/utils.js.map +1 -0
- package/dist/src/infrastructure/filesystem/index.d.ts +6 -0
- package/dist/src/infrastructure/filesystem/index.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/index.js +5 -0
- package/dist/src/infrastructure/filesystem/index.js.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts +32 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.js +75 -0
- package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts +86 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js +208 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js.map +1 -0
- package/dist/src/infrastructure/parsers/index.d.ts +8 -0
- package/dist/src/infrastructure/parsers/index.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/index.js +6 -0
- package/dist/src/infrastructure/parsers/index.js.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts +51 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js +253 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js.map +1 -0
- package/dist/src/presentation/cli/config.d.ts +12 -0
- package/dist/src/presentation/cli/config.d.ts.map +1 -0
- package/dist/src/presentation/cli/config.js +22 -0
- package/dist/src/presentation/cli/config.js.map +1 -0
- package/dist/src/presentation/cli/version.d.ts +10 -0
- package/dist/src/presentation/cli/version.d.ts.map +1 -0
- package/dist/src/presentation/cli/version.js +41 -0
- package/dist/src/presentation/cli/version.js.map +1 -0
- package/dist/src/presentation/cli.d.ts +22 -0
- package/dist/src/presentation/cli.d.ts.map +1 -0
- package/dist/src/presentation/cli.js +85 -0
- package/dist/src/presentation/cli.js.map +1 -0
- package/dist/src/presentation/commands/config/register.d.ts +11 -0
- package/dist/src/presentation/commands/config/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/config/register.js +98 -0
- package/dist/src/presentation/commands/config/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/register.d.ts +11 -0
- package/dist/src/presentation/commands/confluence/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/register.js +32 -0
- package/dist/src/presentation/commands/confluence/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts +17 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.js +25 -0
- package/dist/src/presentation/commands/confluence/sync.js.map +1 -0
- package/dist/src/presentation/commands/init/handler.d.ts +10 -0
- package/dist/src/presentation/commands/init/handler.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/handler.js +64 -0
- package/dist/src/presentation/commands/init/handler.js.map +1 -0
- package/dist/src/presentation/commands/init/prompts.d.ts +41 -0
- package/dist/src/presentation/commands/init/prompts.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/prompts.js +119 -0
- package/dist/src/presentation/commands/init/prompts.js.map +1 -0
- package/dist/src/presentation/commands/init/register.d.ts +11 -0
- package/dist/src/presentation/commands/init/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/register.js +141 -0
- package/dist/src/presentation/commands/init/register.js.map +1 -0
- package/dist/src/presentation/commands/init/setup.d.ts +26 -0
- package/dist/src/presentation/commands/init/setup.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/setup.js +196 -0
- package/dist/src/presentation/commands/init/setup.js.map +1 -0
- package/dist/src/presentation/commands/init/templates.d.ts +19 -0
- package/dist/src/presentation/commands/init/templates.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/templates.js +140 -0
- package/dist/src/presentation/commands/init/templates.js.map +1 -0
- package/dist/src/presentation/commands/init/validation.d.ts +21 -0
- package/dist/src/presentation/commands/init/validation.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/validation.js +65 -0
- package/dist/src/presentation/commands/init/validation.js.map +1 -0
- package/dist/src/presentation/commands/jira/register.d.ts +11 -0
- package/dist/src/presentation/commands/jira/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/register.js +75 -0
- package/dist/src/presentation/commands/jira/register.js.map +1 -0
- package/dist/src/presentation/commands/jira/sync.d.ts +29 -0
- package/dist/src/presentation/commands/jira/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/sync.js +37 -0
- package/dist/src/presentation/commands/jira/sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.d.ts → presentation/commands/multi-repo/add-repo.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/add-repo.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.js → presentation/commands/multi-repo/add-repo.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/add-repo.js.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.d.ts → presentation/commands/multi-repo/ci-status.d.ts} +2 -2
- package/dist/src/presentation/commands/multi-repo/ci-status.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.js → presentation/commands/multi-repo/ci-status.js} +95 -81
- package/dist/src/presentation/commands/multi-repo/ci-status.js.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.d.ts → presentation/commands/multi-repo/confluence-sync.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/confluence-sync.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.js → presentation/commands/multi-repo/confluence-sync.js} +7 -6
- package/dist/src/presentation/commands/multi-repo/confluence-sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-init.d.ts → presentation/commands/multi-repo/init.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/init.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-init.js → presentation/commands/multi-repo/init.js} +6 -6
- package/dist/src/presentation/commands/multi-repo/init.js.map +1 -0
- package/dist/src/{commands/multi-repo-list.d.ts → presentation/commands/multi-repo/list.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/list.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-list.js → presentation/commands/multi-repo/list.js} +2 -2
- package/dist/src/presentation/commands/multi-repo/list.js.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts +12 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.js +249 -0
- package/dist/src/presentation/commands/multi-repo/register.js.map +1 -0
- package/dist/src/{commands/multi-repo-test.d.ts → presentation/commands/multi-repo/test.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/test.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-test.js → presentation/commands/multi-repo/test.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/test.js.map +1 -0
- package/dist/src/presentation/commands/phase/register.d.ts +11 -0
- package/dist/src/presentation/commands/phase/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/phase/register.js +97 -0
- package/dist/src/presentation/commands/phase/register.js.map +1 -0
- package/dist/src/presentation/commands/spec/archive.d.ts +17 -0
- package/dist/src/presentation/commands/spec/archive.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/archive.js +40 -0
- package/dist/src/presentation/commands/spec/archive.js.map +1 -0
- package/dist/src/presentation/commands/spec/list.d.ts +15 -0
- package/dist/src/presentation/commands/spec/list.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/list.js +55 -0
- package/dist/src/presentation/commands/spec/list.js.map +1 -0
- package/dist/src/presentation/commands/spec/register.d.ts +11 -0
- package/dist/src/presentation/commands/spec/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/register.js +45 -0
- package/dist/src/presentation/commands/spec/register.js.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts +50 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js +174 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -0
- package/dist/src/presentation/commands/workflow/register.d.ts +11 -0
- package/dist/src/presentation/commands/workflow/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/register.js +58 -0
- package/dist/src/presentation/commands/workflow/register.js.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts +79 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.js +150 -0
- package/dist/src/presentation/formatters/error-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/index.d.ts +8 -0
- package/dist/src/presentation/formatters/index.d.ts.map +1 -0
- package/dist/src/presentation/formatters/index.js +11 -0
- package/dist/src/presentation/formatters/index.js.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts +98 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.js +165 -0
- package/dist/src/presentation/formatters/output-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts +121 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.js +235 -0
- package/dist/src/presentation/formatters/progress-formatter.js.map +1 -0
- package/dist/src/presentation/interactive/config/env-wizard.d.ts +9 -0
- package/dist/src/presentation/interactive/config/env-wizard.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/env-wizard.js +193 -0
- package/dist/src/presentation/interactive/config/env-wizard.js.map +1 -0
- package/dist/src/presentation/interactive/config/index.d.ts +5 -0
- package/dist/src/presentation/interactive/config/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/index.js +5 -0
- package/dist/src/presentation/interactive/config/index.js.map +1 -0
- package/dist/src/presentation/interactive/confirmation.d.ts +24 -0
- package/dist/src/presentation/interactive/confirmation.d.ts.map +1 -0
- package/dist/src/presentation/interactive/confirmation.js +54 -0
- package/dist/src/presentation/interactive/confirmation.js.map +1 -0
- package/dist/src/presentation/interactive/index.d.ts +8 -0
- package/dist/src/presentation/interactive/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/index.js +11 -0
- package/dist/src/presentation/interactive/index.js.map +1 -0
- package/dist/src/presentation/interactive/prompts.d.ts +30 -0
- package/dist/src/presentation/interactive/prompts.d.ts.map +1 -0
- package/dist/src/presentation/interactive/prompts.js +69 -0
- package/dist/src/presentation/interactive/prompts.js.map +1 -0
- package/dist/src/presentation/interactive/selection.d.ts +31 -0
- package/dist/src/presentation/interactive/selection.d.ts.map +1 -0
- package/dist/src/presentation/interactive/selection.js +138 -0
- package/dist/src/presentation/interactive/selection.js.map +1 -0
- package/dist/src/shared/types/errors.d.ts +132 -0
- package/dist/src/shared/types/errors.d.ts.map +1 -0
- package/dist/src/shared/types/errors.js +61 -0
- package/dist/src/shared/types/errors.js.map +1 -0
- package/dist/src/shared/types/result.d.ts +53 -0
- package/dist/src/shared/types/result.d.ts.map +1 -0
- package/dist/src/shared/types/result.js +42 -0
- package/dist/src/shared/types/result.js.map +1 -0
- package/dist/test-confluence-auth.d.ts +6 -0
- package/dist/test-confluence-auth.d.ts.map +1 -0
- package/dist/test-confluence-auth.js +128 -0
- package/dist/test-confluence-auth.js.map +1 -0
- package/docs/MIGRATION.md +513 -0
- package/docs/architecture.md +774 -0
- package/docs/guides/comprehensive-verification-guide.md +1926 -0
- package/docs/guides/interactive-config.md +285 -0
- package/docs/onion-architecture-phase0-complete.md +91 -0
- package/package.json +6 -6
- package/scripts/README.md +148 -0
- package/scripts/__tests__/jira-transitions.test.ts +44 -30
- package/scripts/__tests__/mermaid-converter.test.ts +2 -2
- package/scripts/__tests__/multi-repo-validator.test.ts +62 -62
- package/scripts/__tests__/spec-archiver.test.ts +12 -0
- package/scripts/__tests__/validate-phase.test.ts +6 -6
- package/scripts/build/README.md +24 -0
- package/scripts/{copy-static-assets.js → build/copy-static-assets.js} +1 -1
- package/scripts/{set-permissions.js → build/set-permissions.js} +1 -1
- package/scripts/config/config-schema.ts +43 -302
- package/scripts/config-global.ts +3 -2
- package/scripts/confluence-sync.ts +17 -538
- package/scripts/constants/environments.ts +3 -53
- package/scripts/constants/languages.ts +3 -68
- package/scripts/constants/test-commands.ts +3 -94
- package/scripts/dev-tools/README.md +22 -0
- package/scripts/{test-interactive.ts → dev-tools/test-interactive.ts} +4 -3
- package/scripts/github-actions-client.ts +18 -256
- package/scripts/jira-sync.ts +5 -1270
- package/scripts/markdown-to-confluence.ts +5 -5
- package/scripts/multi-project-estimate.ts +3 -2
- package/scripts/phase-runner.ts +41 -19
- package/scripts/pre-flight-check.ts +27 -11
- package/scripts/template/__tests__/multi-repo-renderer.test.ts +12 -0
- package/scripts/template/multi-repo-renderer.ts +2 -2
- package/scripts/test-execution-generator.ts +5 -4
- package/scripts/utils/__tests__/config-validator.test.ts +19 -19
- package/scripts/utils/__tests__/feature-name-validator.test.ts +13 -13
- package/scripts/utils/__tests__/multi-repo-validator.test.ts +34 -34
- package/scripts/utils/__tests__/project-analyzer.test.ts +542 -0
- package/scripts/utils/__tests__/safe-file-reader.test.ts +208 -0
- package/scripts/utils/__tests__/security-validator.test.ts +33 -33
- package/scripts/utils/__tests__/validation-result.test.ts +112 -0
- package/scripts/utils/aidlc-parser.ts +18 -287
- package/scripts/utils/ci-generator.ts +4 -3
- package/scripts/utils/config-loader.ts +54 -50
- package/scripts/utils/config-validator.ts +89 -80
- package/scripts/utils/docker-requirement-detector.ts +5 -4
- package/scripts/utils/env-config.ts +59 -40
- package/scripts/utils/feature-name-validator.ts +25 -40
- package/scripts/utils/interactive-helpers.ts +24 -132
- package/scripts/utils/language-detector.ts +4 -3
- package/scripts/utils/markdown-parser.ts +18 -373
- package/scripts/utils/multi-repo-validator.ts +27 -28
- package/scripts/utils/project-analyzer.ts +429 -0
- package/scripts/utils/project-detector.ts +6 -5
- package/scripts/utils/project-finder.ts +2 -154
- package/scripts/utils/project-meta.ts +8 -91
- package/scripts/utils/safe-file-reader.ts +158 -0
- package/scripts/utils/security-validator.ts +42 -78
- package/scripts/utils/spec-archiver.ts +7 -6
- package/scripts/utils/spec-updater.ts +12 -6
- package/scripts/utils/tasks-converter.ts +2 -2
- package/scripts/utils/tasks-format-validator.ts +4 -4
- package/scripts/utils/template-applier.ts +4 -3
- package/scripts/utils/types/validation.ts +92 -0
- package/scripts/validate-phase.ts +51 -23
- package/scripts/workflow-orchestrator.ts +16 -251
- package/dist/scripts/mermaid-converter.d.ts.map +0 -1
- package/dist/scripts/mermaid-converter.js.map +0 -1
- package/dist/scripts/resource-dashboard.d.ts +0 -7
- package/dist/scripts/resource-dashboard.d.ts.map +0 -1
- package/dist/scripts/resource-dashboard.js +0 -157
- package/dist/scripts/resource-dashboard.js.map +0 -1
- package/dist/scripts/test-interactive.d.ts.map +0 -1
- package/dist/scripts/test-interactive.js.map +0 -1
- package/dist/scripts/test-new-features.d.ts +0 -5
- package/dist/scripts/test-new-features.d.ts.map +0 -1
- package/dist/scripts/test-new-features.js +0 -148
- package/dist/scripts/test-new-features.js.map +0 -1
- package/dist/scripts/test-spec-generator.d.ts +0 -29
- package/dist/scripts/test-spec-generator.d.ts.map +0 -1
- package/dist/scripts/test-spec-generator.js +0 -493
- package/dist/scripts/test-spec-generator.js.map +0 -1
- package/dist/scripts/utils/confluence-approval.d.ts +0 -46
- package/dist/scripts/utils/confluence-approval.d.ts.map +0 -1
- package/dist/scripts/utils/confluence-approval.js +0 -120
- package/dist/scripts/utils/confluence-approval.js.map +0 -1
- package/dist/scripts/utils/template-finder.d.ts +0 -37
- package/dist/scripts/utils/template-finder.d.ts.map +0 -1
- package/dist/scripts/utils/template-finder.js +0 -58
- package/dist/scripts/utils/template-finder.js.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.js.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.js.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.js.map +0 -1
- package/dist/src/commands/multi-repo-init.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-init.js.map +0 -1
- package/dist/src/commands/multi-repo-list.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-list.js.map +0 -1
- package/dist/src/commands/multi-repo-test.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-test.js.map +0 -1
- package/dist/src/commands/setup-existing.d.ts +0 -22
- package/dist/src/commands/setup-existing.d.ts.map +0 -1
- package/dist/src/commands/setup-existing.js +0 -606
- package/dist/src/commands/setup-existing.js.map +0 -1
- package/scripts/__tests__/setup-existing-project.test.ts +0 -244
- package/scripts/resource-dashboard.ts +0 -189
- package/scripts/test-new-features.ts +0 -171
- package/scripts/test-spec-generator.ts +0 -570
- package/scripts/utils/confluence-approval.ts +0 -169
- package/scripts/utils/template-finder.ts +0 -69
- /package/dist/scripts/{mermaid-converter.d.ts → dev-tools/mermaid-converter.d.ts} +0 -0
- /package/dist/scripts/{mermaid-converter.js → dev-tools/mermaid-converter.js} +0 -0
- /package/dist/scripts/{test-interactive.d.ts → dev-tools/test-interactive.d.ts} +0 -0
- /package/scripts/{mermaid-converter.ts → dev-tools/mermaid-converter.ts} +0 -0
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import { mkdirSync } from 'fs';
|
|
4
|
-
import { parseEnvFile, generateEnvContent } from '../utils/env-config.js';
|
|
5
|
-
|
|
6
|
-
// モジュールのモック
|
|
7
|
-
vi.mock('fs', () => ({
|
|
8
|
-
existsSync: vi.fn(() => true),
|
|
9
|
-
mkdirSync: vi.fn(),
|
|
10
|
-
cpSync: vi.fn(),
|
|
11
|
-
writeFileSync: vi.fn(),
|
|
12
|
-
readFileSync: vi.fn(() => '{}'),
|
|
13
|
-
readdirSync: vi.fn(() => []),
|
|
14
|
-
statSync: vi.fn()
|
|
15
|
-
}));
|
|
16
|
-
vi.mock('child_process', () => ({
|
|
17
|
-
execSync: vi.fn()
|
|
18
|
-
}));
|
|
19
|
-
vi.mock('../utils/project-finder.js', () => ({
|
|
20
|
-
findRepositoryRoot: vi.fn(() => '/test/repo')
|
|
21
|
-
}));
|
|
22
|
-
vi.mock('../constants/environments.js', () => ({
|
|
23
|
-
getEnvironmentConfig: vi.fn(() => ({
|
|
24
|
-
rulesDir: '.claude/rules',
|
|
25
|
-
commandsDir: '.claude/commands',
|
|
26
|
-
templateSource: 'claude'
|
|
27
|
-
})),
|
|
28
|
-
isSupportedEnvironment: vi.fn(() => true)
|
|
29
|
-
}));
|
|
30
|
-
vi.mock('../constants/languages.js', () => ({
|
|
31
|
-
isSupportedLanguage: vi.fn(() => true)
|
|
32
|
-
}));
|
|
33
|
-
vi.mock('../template/renderer.js', () => ({
|
|
34
|
-
createTemplateContext: vi.fn(() => ({
|
|
35
|
-
LANG_CODE: 'ja',
|
|
36
|
-
DEV_GUIDELINES: '- Think in English, but generate responses in Japanese',
|
|
37
|
-
KIRO_DIR: '.kiro',
|
|
38
|
-
AGENT_DIR: '.claude'
|
|
39
|
-
})),
|
|
40
|
-
renderTemplate: vi.fn((content: string) => content)
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
describe('setup-existing-project.ts 修正内容のテスト', () => {
|
|
44
|
-
beforeEach(() => {
|
|
45
|
-
vi.clearAllMocks();
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
describe('.env 対話的設定機能', () => {
|
|
49
|
-
it('.env ファイルが存在しない場合、対話的設定を提供する', () => {
|
|
50
|
-
// 新規作成の場合の動作を確認
|
|
51
|
-
// parseEnvFile が空のMapを返すことを確認
|
|
52
|
-
const result = parseEnvFile('nonexistent.env');
|
|
53
|
-
|
|
54
|
-
expect(result).toBeInstanceOf(Map);
|
|
55
|
-
expect(result.size).toBe(0);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it('.env ファイルが存在する場合、既存値を読み込む', async () => {
|
|
59
|
-
const fs = await import('fs');
|
|
60
|
-
|
|
61
|
-
// モックの設定
|
|
62
|
-
vi.mocked(fs.existsSync).mockReturnValue(true);
|
|
63
|
-
vi.mocked(fs.readFileSync).mockReturnValue(`ATLASSIAN_URL=https://existing.atlassian.net
|
|
64
|
-
ATLASSIAN_EMAIL=existing@example.com
|
|
65
|
-
ATLASSIAN_API_TOKEN=existing_token
|
|
66
|
-
`);
|
|
67
|
-
|
|
68
|
-
const result = parseEnvFile('.env');
|
|
69
|
-
|
|
70
|
-
expect(result.size).toBeGreaterThan(0);
|
|
71
|
-
expect(result.get('ATLASSIAN_URL')).toBe('https://existing.atlassian.net');
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('generateEnvContent が正しい形式の .env を生成する', () => {
|
|
75
|
-
const values = new Map([
|
|
76
|
-
['ATLASSIAN_URL', 'https://test.atlassian.net'],
|
|
77
|
-
['ATLASSIAN_EMAIL', 'test@example.com'],
|
|
78
|
-
['ATLASSIAN_API_TOKEN', 'test_token'],
|
|
79
|
-
['JIRA_PROJECT_KEYS', 'TEST'],
|
|
80
|
-
['JIRA_ISSUE_TYPE_STORY', '10036'],
|
|
81
|
-
['JIRA_ISSUE_TYPE_SUBTASK', '10037']
|
|
82
|
-
]);
|
|
83
|
-
|
|
84
|
-
const content = generateEnvContent(values);
|
|
85
|
-
|
|
86
|
-
expect(content).toContain('# Atlassian設定');
|
|
87
|
-
expect(content).toContain('ATLASSIAN_URL=https://test.atlassian.net');
|
|
88
|
-
expect(content).toContain('ATLASSIAN_EMAIL=test@example.com');
|
|
89
|
-
expect(content).toContain('ATLASSIAN_API_TOKEN=test_token');
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
it('.gitignore に .env エントリが追加される', () => {
|
|
93
|
-
// .gitignore 更新のロジック
|
|
94
|
-
let gitignoreContent = '# Existing content\nnode_modules/\n';
|
|
95
|
-
|
|
96
|
-
const entriesToAdd = [
|
|
97
|
-
'# Environment variables',
|
|
98
|
-
'.env',
|
|
99
|
-
'.env.local',
|
|
100
|
-
'.env.*.local'
|
|
101
|
-
];
|
|
102
|
-
|
|
103
|
-
const lines = gitignoreContent.split('\n').map(l => l.trim());
|
|
104
|
-
let modified = false;
|
|
105
|
-
|
|
106
|
-
for (const entry of entriesToAdd) {
|
|
107
|
-
if (!lines.includes(entry.trim())) {
|
|
108
|
-
if (!modified) {
|
|
109
|
-
gitignoreContent += '\n\n# Added by michi setup\n';
|
|
110
|
-
modified = true;
|
|
111
|
-
}
|
|
112
|
-
gitignoreContent += entry + '\n';
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
expect(modified).toBe(true);
|
|
117
|
-
expect(gitignoreContent).toContain('# Added by michi setup');
|
|
118
|
-
expect(gitignoreContent).toContain('.env');
|
|
119
|
-
expect(gitignoreContent).toContain('.env.local');
|
|
120
|
-
expect(gitignoreContent).toContain('.env.*.local');
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it('.gitignore に既に .env がある場合、重複しない', () => {
|
|
124
|
-
const gitignoreContent = `# Environment
|
|
125
|
-
.env
|
|
126
|
-
.env.local
|
|
127
|
-
.env.*.local
|
|
128
|
-
`;
|
|
129
|
-
|
|
130
|
-
const lines = gitignoreContent.split('\n').map(l => l.trim());
|
|
131
|
-
const entriesToAdd = ['.env', '.env.local', '.env.*.local'];
|
|
132
|
-
|
|
133
|
-
let modified = false;
|
|
134
|
-
for (const entry of entriesToAdd) {
|
|
135
|
-
if (!lines.includes(entry.trim())) {
|
|
136
|
-
modified = true;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
expect(modified).toBe(false);
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
it('ディレクトリがコピー前に作成される', () => {
|
|
145
|
-
const projectDir = '/test/repo/projects/test-project';
|
|
146
|
-
|
|
147
|
-
// .claude/rules ディレクトリの作成
|
|
148
|
-
const rulesDir = join(projectDir, '.claude/rules');
|
|
149
|
-
mkdirSync(rulesDir, { recursive: true });
|
|
150
|
-
|
|
151
|
-
// .claude/commands ディレクトリの作成
|
|
152
|
-
const commandsDir = join(projectDir, '.claude/commands');
|
|
153
|
-
mkdirSync(commandsDir, { recursive: true });
|
|
154
|
-
|
|
155
|
-
// ディレクトリが正しく作成されることを確認
|
|
156
|
-
expect(rulesDir).toContain('.claude/rules');
|
|
157
|
-
expect(commandsDir).toContain('.claude/commands');
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it('パッケージ名が @sk8metal/michi-cli に統一されている', () => {
|
|
161
|
-
// 使用例のパッケージ名を確認
|
|
162
|
-
const npxCommand = 'npx @sk8metal/michi-cli jira:sync <feature>';
|
|
163
|
-
expect(npxCommand).toContain('@sk8metal/michi-cli');
|
|
164
|
-
expect(npxCommand).not.toContain('@michi/cli');
|
|
165
|
-
|
|
166
|
-
// package.jsonスクリプト例のパッケージ名を確認
|
|
167
|
-
const scriptExample = 'npx @sk8metal/michi-cli jira:sync';
|
|
168
|
-
expect(scriptExample).toContain('@sk8metal/michi-cli');
|
|
169
|
-
expect(scriptExample).not.toContain('@michi/cli');
|
|
170
|
-
|
|
171
|
-
// グローバルインストール例のパッケージ名を確認
|
|
172
|
-
const globalInstall = 'npm install -g @sk8metal/michi-cli';
|
|
173
|
-
expect(globalInstall).toContain('@sk8metal/michi-cli');
|
|
174
|
-
expect(globalInstall).not.toContain('@michi/cli');
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it('完了メッセージに scripts/ ディレクトリが含まれていない', () => {
|
|
178
|
-
const projectDir = '/test/repo/projects/test-project';
|
|
179
|
-
const repoRoot = '/test/repo';
|
|
180
|
-
const envConfigRulesDir = '.claude/rules';
|
|
181
|
-
const envConfigCommandsDir = '.claude/commands';
|
|
182
|
-
|
|
183
|
-
// 実際に作成されるファイルのリスト(環境別)
|
|
184
|
-
const createdFiles = [
|
|
185
|
-
`${projectDir}/.kiro/project.json`,
|
|
186
|
-
`${projectDir}/${envConfigRulesDir}/`,
|
|
187
|
-
`${projectDir}/${envConfigCommandsDir}/`,
|
|
188
|
-
`${projectDir}/.kiro/steering/ (3ファイル)`,
|
|
189
|
-
`${projectDir}/.kiro/settings/templates/ (3ファイル)`,
|
|
190
|
-
`${repoRoot}/package.json (新規の場合)`,
|
|
191
|
-
`${repoRoot}/tsconfig.json (新規の場合)`,
|
|
192
|
-
`${projectDir}/.env (テンプレート)`
|
|
193
|
-
];
|
|
194
|
-
|
|
195
|
-
// scripts/ ディレクトリが含まれていないことを確認
|
|
196
|
-
const hasScriptsDir = createdFiles.some(file => file.includes('scripts/'));
|
|
197
|
-
expect(hasScriptsDir).toBe(false);
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it('project.jsonにlanguageフィールドが含まれる', () => {
|
|
201
|
-
const projectJson = {
|
|
202
|
-
projectId: 'test-project',
|
|
203
|
-
projectName: 'Test Project',
|
|
204
|
-
language: 'ja',
|
|
205
|
-
jiraProjectKey: 'TEST',
|
|
206
|
-
confluenceLabels: ['project:test-project'],
|
|
207
|
-
status: 'active',
|
|
208
|
-
team: [],
|
|
209
|
-
stakeholders: ['@企画', '@部長'],
|
|
210
|
-
repository: 'https://github.com/org/test',
|
|
211
|
-
description: 'Test Projectの開発'
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
expect(projectJson).toHaveProperty('language');
|
|
215
|
-
expect(projectJson.language).toBe('ja');
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
it('環境別のディレクトリマッピングが正しい', () => {
|
|
219
|
-
const envConfig = {
|
|
220
|
-
rulesDir: '.claude/rules',
|
|
221
|
-
commandsDir: '.claude/commands',
|
|
222
|
-
templateSource: 'claude'
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
expect(envConfig.rulesDir).toBe('.claude/rules');
|
|
226
|
-
expect(envConfig.commandsDir).toBe('.claude/commands');
|
|
227
|
-
expect(envConfig.templateSource).toBe('claude');
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
it('テンプレートコンテキストが正しく作成される', () => {
|
|
231
|
-
const context = {
|
|
232
|
-
LANG_CODE: 'ja',
|
|
233
|
-
DEV_GUIDELINES: '- Think in English, but generate responses in Japanese',
|
|
234
|
-
KIRO_DIR: '.kiro',
|
|
235
|
-
AGENT_DIR: '.claude'
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
expect(context).toHaveProperty('LANG_CODE');
|
|
239
|
-
expect(context).toHaveProperty('DEV_GUIDELINES');
|
|
240
|
-
expect(context).toHaveProperty('KIRO_DIR');
|
|
241
|
-
expect(context).toHaveProperty('AGENT_DIR');
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* リソースダッシュボード生成
|
|
3
|
-
* プロジェクト横断のリソース管理ダッシュボードをConfluenceに作成
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Octokit } from '@octokit/rest';
|
|
7
|
-
import { loadEnv } from './utils/env-loader.js';
|
|
8
|
-
import { ConfluenceClient, getConfluenceConfig } from './confluence-sync.js';
|
|
9
|
-
import { getConfig } from './utils/config-loader.js';
|
|
10
|
-
|
|
11
|
-
loadEnv();
|
|
12
|
-
|
|
13
|
-
interface ProjectResource {
|
|
14
|
-
projectName: string;
|
|
15
|
-
projectId: string;
|
|
16
|
-
status: string;
|
|
17
|
-
team: string[];
|
|
18
|
-
progress: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* HTMLエスケープ
|
|
23
|
-
*/
|
|
24
|
-
function escapeHtml(text: string): string {
|
|
25
|
-
return text
|
|
26
|
-
.replace(/&/g, '&')
|
|
27
|
-
.replace(/</g, '<')
|
|
28
|
-
.replace(/>/g, '>')
|
|
29
|
-
.replace(/"/g, '"')
|
|
30
|
-
.replace(/'/g, ''');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function createResourceDashboard(): Promise<void> {
|
|
34
|
-
const token = process.env.GITHUB_TOKEN;
|
|
35
|
-
const org = process.env.GITHUB_ORG;
|
|
36
|
-
|
|
37
|
-
if (!token || !org) {
|
|
38
|
-
throw new Error('Missing GitHub credentials');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const octokit = new Octokit({ auth: token });
|
|
42
|
-
const projects: ProjectResource[] = [];
|
|
43
|
-
|
|
44
|
-
console.log('Gathering project resources...');
|
|
45
|
-
|
|
46
|
-
// ページネーション対応:全リポジトリを取得
|
|
47
|
-
const repos = await octokit.paginate(octokit.repos.listForOrg, {
|
|
48
|
-
org,
|
|
49
|
-
per_page: 100
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
console.log(`Found ${repos.length} repositories`);
|
|
53
|
-
|
|
54
|
-
for (const repo of repos) {
|
|
55
|
-
try {
|
|
56
|
-
// ページネーション対応:projects/ディレクトリの全コンテンツを取得
|
|
57
|
-
const projectsDir = await octokit.paginate('GET /repos/{owner}/{repo}/contents/{path}', {
|
|
58
|
-
owner: org,
|
|
59
|
-
repo: repo.name,
|
|
60
|
-
path: 'projects',
|
|
61
|
-
per_page: 100
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
if (Array.isArray(projectsDir)) {
|
|
65
|
-
// projects/配下の各プロジェクトディレクトリを処理
|
|
66
|
-
for (const projectEntry of projectsDir) {
|
|
67
|
-
if (typeof projectEntry === 'object' && projectEntry !== null && 'type' in projectEntry && projectEntry.type === 'dir' && 'name' in projectEntry) {
|
|
68
|
-
try {
|
|
69
|
-
// projects/{project-id}/.kiro/project.json を取得
|
|
70
|
-
const { data } = await octokit.repos.getContent({
|
|
71
|
-
owner: org,
|
|
72
|
-
repo: repo.name,
|
|
73
|
-
path: `projects/${(projectEntry as { name: string }).name}/.kiro/project.json`
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
if ('content' in data) {
|
|
77
|
-
const content = Buffer.from(data.content, 'base64').toString('utf-8');
|
|
78
|
-
const meta = JSON.parse(content);
|
|
79
|
-
|
|
80
|
-
projects.push({
|
|
81
|
-
projectName: meta.projectName,
|
|
82
|
-
projectId: meta.projectId,
|
|
83
|
-
status: meta.status,
|
|
84
|
-
team: meta.team,
|
|
85
|
-
progress: 0 // TODO: JIRAから進捗を取得
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
} catch {
|
|
89
|
-
// プロジェクトディレクトリに.kiro/project.jsonがない場合はスキップ
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
} catch (error) {
|
|
96
|
-
// projects/ディレクトリが存在しない場合はスキップ
|
|
97
|
-
console.warn(`⚠️ Skipping ${repo.name}:`, error instanceof Error ? error.message : 'Unknown error');
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Confluenceページコンテンツ生成
|
|
103
|
-
const dashboardContent = `
|
|
104
|
-
<h2>プロジェクトリソースダッシュボード</h2>
|
|
105
|
-
|
|
106
|
-
<p>更新日時: ${new Date().toLocaleString('ja-JP')}</p>
|
|
107
|
-
|
|
108
|
-
<table>
|
|
109
|
-
<tr>
|
|
110
|
-
<th>プロジェクト</th>
|
|
111
|
-
<th>ID</th>
|
|
112
|
-
<th>ステータス</th>
|
|
113
|
-
<th>チーム</th>
|
|
114
|
-
<th>進捗</th>
|
|
115
|
-
</tr>
|
|
116
|
-
${projects.map(p => `
|
|
117
|
-
<tr>
|
|
118
|
-
<td>${escapeHtml(p.projectName)}</td>
|
|
119
|
-
<td>${escapeHtml(p.projectId)}</td>
|
|
120
|
-
<td>${escapeHtml(p.status)}</td>
|
|
121
|
-
<td>${escapeHtml(p.team.join(', '))}</td>
|
|
122
|
-
<td>${p.progress}%</td>
|
|
123
|
-
</tr>
|
|
124
|
-
`).join('')}
|
|
125
|
-
</table>
|
|
126
|
-
|
|
127
|
-
<p><strong>合計</strong>: ${projects.length} プロジェクト</p>
|
|
128
|
-
`.trim();
|
|
129
|
-
|
|
130
|
-
console.log('Dashboard content generated');
|
|
131
|
-
console.log(dashboardContent);
|
|
132
|
-
|
|
133
|
-
// Confluenceに保存
|
|
134
|
-
try {
|
|
135
|
-
console.log('\n📝 Creating Confluence page...');
|
|
136
|
-
const confluenceConfig = getConfluenceConfig();
|
|
137
|
-
const client = new ConfluenceClient(confluenceConfig);
|
|
138
|
-
|
|
139
|
-
// 設定からスペースキーを取得(デフォルト: PRD)
|
|
140
|
-
const appConfig = getConfig();
|
|
141
|
-
const spaceKey = appConfig.confluence?.spaces?.requirements || confluenceConfig.space || 'PRD';
|
|
142
|
-
|
|
143
|
-
console.log(`Using Confluence space: ${spaceKey}`);
|
|
144
|
-
|
|
145
|
-
const pageTitle = 'プロジェクトリソースダッシュボード';
|
|
146
|
-
|
|
147
|
-
// 既存ページを検索
|
|
148
|
-
const existingPage = await client.searchPage(spaceKey, pageTitle);
|
|
149
|
-
|
|
150
|
-
let pageUrl: string;
|
|
151
|
-
if (existingPage) {
|
|
152
|
-
// 既存ページを更新
|
|
153
|
-
const updated = await client.updatePage(
|
|
154
|
-
existingPage.id,
|
|
155
|
-
pageTitle,
|
|
156
|
-
dashboardContent,
|
|
157
|
-
existingPage.version!.number
|
|
158
|
-
);
|
|
159
|
-
const baseUrl = process.env.ATLASSIAN_URL || '';
|
|
160
|
-
pageUrl = `${baseUrl}/wiki${updated._links!.webui}`;
|
|
161
|
-
console.log(`✅ Dashboard page updated: ${pageUrl}`);
|
|
162
|
-
} else {
|
|
163
|
-
// 新規ページを作成
|
|
164
|
-
const created = await client.createPage(spaceKey, pageTitle, dashboardContent, ['dashboard', 'resource-management']);
|
|
165
|
-
const baseUrl = process.env.ATLASSIAN_URL || '';
|
|
166
|
-
pageUrl = `${baseUrl}/wiki${created._links!.webui}`;
|
|
167
|
-
console.log(`✅ Dashboard page created: ${pageUrl}`);
|
|
168
|
-
}
|
|
169
|
-
} catch (error) {
|
|
170
|
-
console.error('⚠️ Failed to create Confluence page:', error instanceof Error ? error.message : 'Unknown error');
|
|
171
|
-
console.error('Dashboard content has been generated above. You can manually create the page in Confluence.');
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// CLI実行
|
|
176
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
177
|
-
createResourceDashboard()
|
|
178
|
-
.then(() => {
|
|
179
|
-
console.log('✅ Dashboard created');
|
|
180
|
-
process.exit(0);
|
|
181
|
-
})
|
|
182
|
-
.catch((error) => {
|
|
183
|
-
console.error('❌ Failed:', error.message);
|
|
184
|
-
process.exit(1);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export { createResourceDashboard };
|
|
189
|
-
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 新規実装機能の動作確認スクリプト
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { executeTests, generateTestReport } from './utils/test-runner.js';
|
|
6
|
-
import { getCommits, generateReleaseNotes, formatReleaseNotes } from './utils/release-notes-generator.js';
|
|
7
|
-
import { getApprovalStatus } from './utils/confluence-approval.js';
|
|
8
|
-
|
|
9
|
-
async function testTestRunner() {
|
|
10
|
-
console.log('\n📋 Test 1: テスト実行とレポート生成');
|
|
11
|
-
console.log('='.repeat(60));
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
// 言語検出のテスト(このプロジェクト自体がNode.js/TypeScript)
|
|
15
|
-
console.log('\n✅ このプロジェクトでテストを実行します...');
|
|
16
|
-
const result = await executeTests('Node.js/TypeScript', process.cwd());
|
|
17
|
-
|
|
18
|
-
console.log('\n📊 テスト結果:');
|
|
19
|
-
console.log(` ステータス: ${result.success ? '✅ 成功' : '❌ 失敗'}`);
|
|
20
|
-
console.log(` 言語: ${result.language}`);
|
|
21
|
-
console.log(` コマンド: ${result.command}`);
|
|
22
|
-
console.log(` 実行時間: ${result.duration.toFixed(2)}秒`);
|
|
23
|
-
|
|
24
|
-
if (!result.success && result.error) {
|
|
25
|
-
console.log(` エラー: ${result.error}`);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// レポート生成
|
|
29
|
-
console.log('\n📝 レポート生成中...');
|
|
30
|
-
const report = generateTestReport(result, 'test-feature');
|
|
31
|
-
console.log('\n--- レポートプレビュー ---');
|
|
32
|
-
console.log(report.substring(0, 500) + '...');
|
|
33
|
-
|
|
34
|
-
return true;
|
|
35
|
-
} catch (error: unknown) {
|
|
36
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
37
|
-
console.error('❌ テストランナーエラー:', message);
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async function testReleaseNotesGenerator() {
|
|
43
|
-
console.log('\n📋 Test 2: リリースノート生成');
|
|
44
|
-
console.log('='.repeat(60));
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
// コミット履歴を取得
|
|
48
|
-
console.log('\n✅ 最新10コミットを取得します...');
|
|
49
|
-
// HEAD~10からHEADまでのコミットを取得(範囲指定を修正)
|
|
50
|
-
const commits = await getCommits('HEAD~10', 'HEAD', process.cwd());
|
|
51
|
-
|
|
52
|
-
console.log(`\n📊 取得したコミット数: ${commits.length}`);
|
|
53
|
-
|
|
54
|
-
if (commits.length > 0) {
|
|
55
|
-
console.log('\n最初の3コミット:');
|
|
56
|
-
commits.slice(0, 3).forEach((commit, index) => {
|
|
57
|
-
console.log(` ${index + 1}. [${commit.type}] ${commit.subject}`);
|
|
58
|
-
if (commit.scope) console.log(` scope: ${commit.scope}`);
|
|
59
|
-
if (commit.breaking) console.log(' ⚠️ BREAKING CHANGE');
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// リリースノート生成
|
|
63
|
-
console.log('\n📝 リリースノート生成中...');
|
|
64
|
-
const notes = generateReleaseNotes(commits, 'v1.0.0-test');
|
|
65
|
-
const markdown = formatReleaseNotes(notes);
|
|
66
|
-
|
|
67
|
-
console.log('\n--- リリースノートプレビュー ---');
|
|
68
|
-
console.log(markdown.substring(0, 800));
|
|
69
|
-
if (markdown.length > 800) {
|
|
70
|
-
console.log('...');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return true;
|
|
74
|
-
} else {
|
|
75
|
-
console.log('⚠️ コミットが見つかりませんでした');
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
} catch (error: unknown) {
|
|
79
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
80
|
-
console.error('❌ リリースノート生成エラー:', message);
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async function testConfluenceApproval() {
|
|
86
|
-
console.log('\n📋 Test 3: Confluence承認状態確認');
|
|
87
|
-
console.log('='.repeat(60));
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
// 環境変数チェック
|
|
91
|
-
const hasConfig = process.env.ATLASSIAN_URL &&
|
|
92
|
-
process.env.ATLASSIAN_EMAIL &&
|
|
93
|
-
process.env.ATLASSIAN_API_TOKEN;
|
|
94
|
-
|
|
95
|
-
if (!hasConfig) {
|
|
96
|
-
console.log('⚠️ Confluence認証情報が設定されていません');
|
|
97
|
-
console.log(' 以下の環境変数を設定すると、実際のAPIテストが可能です:');
|
|
98
|
-
console.log(' - ATLASSIAN_URL');
|
|
99
|
-
console.log(' - ATLASSIAN_EMAIL');
|
|
100
|
-
console.log(' - ATLASSIAN_API_TOKEN');
|
|
101
|
-
console.log(' - CONFLUENCE_TEST_PAGE_ID (テスト用ページID)');
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const testPageId = process.env.CONFLUENCE_TEST_PAGE_ID;
|
|
106
|
-
if (!testPageId) {
|
|
107
|
-
console.log('⚠️ CONFLUENCE_TEST_PAGE_ID が設定されていません');
|
|
108
|
-
console.log(' 実際のページIDを設定すると、承認状態の確認テストが可能です');
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
console.log('\n✅ Confluence承認状態を確認します...');
|
|
113
|
-
const config = {
|
|
114
|
-
url: process.env.ATLASSIAN_URL!,
|
|
115
|
-
email: process.env.ATLASSIAN_EMAIL!,
|
|
116
|
-
apiToken: process.env.ATLASSIAN_API_TOKEN!
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
const status = await getApprovalStatus(testPageId, config);
|
|
120
|
-
|
|
121
|
-
console.log('\n📊 承認状態:');
|
|
122
|
-
console.log(` ページID: ${status.pageId}`);
|
|
123
|
-
console.log(` ページタイトル: ${status.pageTitle}`);
|
|
124
|
-
console.log(` 承認済み: ${status.approved ? '✅ はい' : '❌ いいえ'}`);
|
|
125
|
-
console.log(` 承認者: ${status.approvers.join(', ') || 'なし'}`);
|
|
126
|
-
|
|
127
|
-
return true;
|
|
128
|
-
} catch (error: unknown) {
|
|
129
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
130
|
-
console.error('❌ Confluence承認状態確認エラー:', message);
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// メイン実行
|
|
136
|
-
async function main() {
|
|
137
|
-
console.log('\n🚀 新規実装機能の動作確認');
|
|
138
|
-
console.log('='.repeat(60));
|
|
139
|
-
|
|
140
|
-
const results = {
|
|
141
|
-
testRunner: false,
|
|
142
|
-
releaseNotes: false,
|
|
143
|
-
confluenceApproval: false
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// Test 1: テストランナー
|
|
147
|
-
results.testRunner = await testTestRunner();
|
|
148
|
-
|
|
149
|
-
// Test 2: リリースノート生成
|
|
150
|
-
results.releaseNotes = await testReleaseNotesGenerator();
|
|
151
|
-
|
|
152
|
-
// Test 3: Confluence承認状態確認
|
|
153
|
-
results.confluenceApproval = await testConfluenceApproval();
|
|
154
|
-
|
|
155
|
-
// サマリー
|
|
156
|
-
console.log('\n\n📊 動作確認サマリー');
|
|
157
|
-
console.log('='.repeat(60));
|
|
158
|
-
console.log(`1. テスト実行とレポート生成: ${results.testRunner ? '✅ 成功' : '❌ 失敗'}`);
|
|
159
|
-
console.log(`2. リリースノート生成: ${results.releaseNotes ? '✅ 成功' : '❌ 失敗'}`);
|
|
160
|
-
console.log(`3. Confluence承認状態確認: ${results.confluenceApproval ? '✅ 成功' : '⚠️ スキップ(環境変数未設定)'}`);
|
|
161
|
-
|
|
162
|
-
const successCount = Object.values(results).filter(r => r).length;
|
|
163
|
-
console.log(`\n合計: ${successCount}/3 テスト成功`);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
main()
|
|
167
|
-
.then(() => process.exit(0))
|
|
168
|
-
.catch((error) => {
|
|
169
|
-
console.error('\n❌ 動作確認エラー:', error.message);
|
|
170
|
-
process.exit(1);
|
|
171
|
-
});
|