@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 設定ファイルのバリデーション
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { existsSync
|
|
5
|
+
import { existsSync } from 'fs';
|
|
6
6
|
import { AppConfigSchema } from '../config/config-schema.js';
|
|
7
7
|
import type { ZodIssue } from 'zod';
|
|
8
8
|
import { getConfig, getConfigPath, getGlobalConfigPath } from './config-loader.js';
|
|
@@ -14,23 +14,51 @@ import {
|
|
|
14
14
|
filterStoryTypes,
|
|
15
15
|
filterSubtaskTypes,
|
|
16
16
|
} from './jira-issue-type-fetcher.js';
|
|
17
|
+
import type { Result } from './types/validation.js';
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
|
+
import { success, failure } from './types/validation.js';
|
|
20
|
+
import { safeReadFileOrThrow } from './safe-file-reader.js';
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Result型を拡張した情報メッセージ付きバリデーション結果
|
|
24
|
+
* config-validator固有の拡張型
|
|
20
25
|
*/
|
|
21
|
-
export interface
|
|
22
|
-
valid: boolean;
|
|
23
|
-
errors: string[];
|
|
24
|
-
warnings: string[];
|
|
26
|
+
export interface ResultWithInfo extends Result<boolean, string> {
|
|
25
27
|
info: string[];
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
/**
|
|
31
|
+
* ResultWithInfo を作成するヘルパー関数(成功)
|
|
32
|
+
*/
|
|
33
|
+
function successWithInfo(value: boolean, warnings: string[] = [], info: string[] = []): ResultWithInfo {
|
|
34
|
+
return {
|
|
35
|
+
success: true,
|
|
36
|
+
value,
|
|
37
|
+
errors: [],
|
|
38
|
+
warnings,
|
|
39
|
+
info,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* ResultWithInfo を作成するヘルパー関数(失敗)
|
|
45
|
+
*/
|
|
46
|
+
function failureWithInfo(errors: string[], warnings: string[] = [], info: string[] = []): ResultWithInfo {
|
|
47
|
+
return {
|
|
48
|
+
success: false,
|
|
49
|
+
value: undefined,
|
|
50
|
+
errors,
|
|
51
|
+
warnings,
|
|
52
|
+
info,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
28
56
|
/**
|
|
29
57
|
* プロジェクト設定ファイルをバリデーション
|
|
30
58
|
*/
|
|
31
59
|
export function validateProjectConfig(
|
|
32
60
|
projectRoot: string = process.cwd(),
|
|
33
|
-
):
|
|
61
|
+
): ResultWithInfo {
|
|
34
62
|
const errors: string[] = [];
|
|
35
63
|
const warnings: string[] = [];
|
|
36
64
|
const info: string[] = [];
|
|
@@ -40,16 +68,11 @@ export function validateProjectConfig(
|
|
|
40
68
|
if (!existsSync(configPath)) {
|
|
41
69
|
// 設定ファイルが存在しない場合は情報メッセージ(デフォルト設定を使用)
|
|
42
70
|
info.push('Project config file not found. Using default configuration.');
|
|
43
|
-
return
|
|
44
|
-
valid: true,
|
|
45
|
-
errors: [],
|
|
46
|
-
warnings: [],
|
|
47
|
-
info,
|
|
48
|
-
};
|
|
71
|
+
return successWithInfo(true, [], info);
|
|
49
72
|
}
|
|
50
73
|
|
|
51
74
|
try {
|
|
52
|
-
const content =
|
|
75
|
+
const content = safeReadFileOrThrow(configPath);
|
|
53
76
|
const parsed = JSON.parse(content);
|
|
54
77
|
|
|
55
78
|
// スキーマでバリデーション
|
|
@@ -61,12 +84,7 @@ export function validateProjectConfig(
|
|
|
61
84
|
errors.push(`${path}: ${error.message}`);
|
|
62
85
|
});
|
|
63
86
|
|
|
64
|
-
return
|
|
65
|
-
valid: false,
|
|
66
|
-
errors,
|
|
67
|
-
warnings: [],
|
|
68
|
-
info: [],
|
|
69
|
-
};
|
|
87
|
+
return failureWithInfo(errors, [], []);
|
|
70
88
|
}
|
|
71
89
|
|
|
72
90
|
// 追加のバリデーション
|
|
@@ -171,12 +189,11 @@ export function validateProjectConfig(
|
|
|
171
189
|
}
|
|
172
190
|
}
|
|
173
191
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
};
|
|
192
|
+
if (errors.length > 0) {
|
|
193
|
+
return failureWithInfo(errors, warnings, []);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return successWithInfo(true, warnings, []);
|
|
180
197
|
} catch (error) {
|
|
181
198
|
if (error instanceof SyntaxError) {
|
|
182
199
|
errors.push(`Invalid JSON: ${error.message}`);
|
|
@@ -186,12 +203,7 @@ export function validateProjectConfig(
|
|
|
186
203
|
);
|
|
187
204
|
}
|
|
188
205
|
|
|
189
|
-
return
|
|
190
|
-
valid: false,
|
|
191
|
-
errors,
|
|
192
|
-
warnings: [],
|
|
193
|
-
info: [],
|
|
194
|
-
};
|
|
206
|
+
return failureWithInfo(errors, [], []);
|
|
195
207
|
}
|
|
196
208
|
}
|
|
197
209
|
|
|
@@ -225,11 +237,11 @@ export function validateAndReport(
|
|
|
225
237
|
return false;
|
|
226
238
|
}
|
|
227
239
|
|
|
228
|
-
if (result.
|
|
240
|
+
if (result.success) {
|
|
229
241
|
console.log('✅ Configuration is valid');
|
|
230
242
|
}
|
|
231
243
|
|
|
232
|
-
return result.
|
|
244
|
+
return result.success;
|
|
233
245
|
}
|
|
234
246
|
|
|
235
247
|
/**
|
|
@@ -241,7 +253,7 @@ export function validateAndReport(
|
|
|
241
253
|
export function validateForConfluenceSync(
|
|
242
254
|
docType: 'requirements' | 'design' | 'tasks',
|
|
243
255
|
projectRoot: string = process.cwd(),
|
|
244
|
-
):
|
|
256
|
+
): ResultWithInfo {
|
|
245
257
|
const errors: string[] = [];
|
|
246
258
|
const warnings: string[] = [];
|
|
247
259
|
const info: string[] = [];
|
|
@@ -319,12 +331,11 @@ export function validateForConfluenceSync(
|
|
|
319
331
|
}
|
|
320
332
|
}
|
|
321
333
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
};
|
|
334
|
+
if (errors.length > 0) {
|
|
335
|
+
return failureWithInfo(errors, warnings, info);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return successWithInfo(true, warnings, info);
|
|
328
339
|
}
|
|
329
340
|
|
|
330
341
|
/**
|
|
@@ -334,7 +345,7 @@ export function validateForConfluenceSync(
|
|
|
334
345
|
*/
|
|
335
346
|
export function validateForJiraSync(
|
|
336
347
|
projectRoot: string = process.cwd(),
|
|
337
|
-
):
|
|
348
|
+
): ResultWithInfo {
|
|
338
349
|
const errors: string[] = [];
|
|
339
350
|
const warnings: string[] = [];
|
|
340
351
|
const info: string[] = [];
|
|
@@ -419,12 +430,11 @@ export function validateForJiraSync(
|
|
|
419
430
|
}
|
|
420
431
|
}
|
|
421
432
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
};
|
|
433
|
+
if (errors.length > 0) {
|
|
434
|
+
return failureWithInfo(errors, warnings, info);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return successWithInfo(true, warnings, info);
|
|
428
438
|
}
|
|
429
439
|
|
|
430
440
|
/**
|
|
@@ -434,10 +444,14 @@ export function validateForJiraSync(
|
|
|
434
444
|
*/
|
|
435
445
|
export async function validateForJiraSyncAsync(
|
|
436
446
|
projectRoot: string = process.cwd(),
|
|
437
|
-
): Promise<
|
|
447
|
+
): Promise<ResultWithInfo> {
|
|
438
448
|
// まず同期版のバリデーションを実行
|
|
439
449
|
const result = validateForJiraSync(projectRoot);
|
|
440
450
|
|
|
451
|
+
// 追加のエラーと警告を収集
|
|
452
|
+
const additionalErrors: string[] = [];
|
|
453
|
+
const additionalWarnings: string[] = [];
|
|
454
|
+
|
|
441
455
|
// JIRA認証情報とプロジェクトキーが設定されている場合、Issue Type IDの存在チェックを実行
|
|
442
456
|
if (hasJiraCredentials()) {
|
|
443
457
|
try {
|
|
@@ -467,7 +481,7 @@ export async function validateForJiraSyncAsync(
|
|
|
467
481
|
.join('\n')
|
|
468
482
|
: ' (Storyタイプが見つかりませんでした)';
|
|
469
483
|
|
|
470
|
-
|
|
484
|
+
additionalErrors.push(
|
|
471
485
|
`設定されたStory Issue Type ID (${storyId}) がプロジェクト '${projectKey}' に存在しません。\n` +
|
|
472
486
|
'\n利用可能なStoryタイプ:\n' +
|
|
473
487
|
suggestions +
|
|
@@ -478,7 +492,6 @@ export async function validateForJiraSyncAsync(
|
|
|
478
492
|
' 2. または、対話的設定を再実行:\n' +
|
|
479
493
|
' npm run setup:interactive',
|
|
480
494
|
);
|
|
481
|
-
result.valid = false;
|
|
482
495
|
}
|
|
483
496
|
}
|
|
484
497
|
|
|
@@ -493,7 +506,7 @@ export async function validateForJiraSyncAsync(
|
|
|
493
506
|
.join('\n')
|
|
494
507
|
: ' (Subtaskタイプが見つかりませんでした)';
|
|
495
508
|
|
|
496
|
-
|
|
509
|
+
additionalWarnings.push(
|
|
497
510
|
`設定されたSubtask Issue Type ID (${subtaskId}) がプロジェクト '${projectKey}' に存在しません。\n` +
|
|
498
511
|
'\n利用可能なSubtaskタイプ:\n' +
|
|
499
512
|
suggestions +
|
|
@@ -509,7 +522,7 @@ export async function validateForJiraSyncAsync(
|
|
|
509
522
|
} else {
|
|
510
523
|
// Issue Types取得に失敗した場合(認証エラー、ネットワークエラーなど)
|
|
511
524
|
// エラーにはしないが、警告として記録
|
|
512
|
-
|
|
525
|
+
additionalWarnings.push(
|
|
513
526
|
`JIRAプロジェクト '${projectKey}' のIssue Typesを取得できませんでした。` +
|
|
514
527
|
'設定されたIssue Type IDの存在確認をスキップします。',
|
|
515
528
|
);
|
|
@@ -518,20 +531,32 @@ export async function validateForJiraSyncAsync(
|
|
|
518
531
|
} catch (error) {
|
|
519
532
|
// プロジェクトメタデータの読み込みに失敗した場合など
|
|
520
533
|
// エラーにはしないが、警告として記録
|
|
521
|
-
|
|
534
|
+
additionalWarnings.push(
|
|
522
535
|
`プロジェクトメタデータの読み込みに失敗しました: ${error instanceof Error ? error.message : error}` +
|
|
523
536
|
'設定されたIssue Type IDの存在確認をスキップします。',
|
|
524
537
|
);
|
|
525
538
|
}
|
|
526
539
|
}
|
|
527
540
|
|
|
541
|
+
// 追加のエラーや警告があれば、新しいResultWithInfoを作成
|
|
542
|
+
if (additionalErrors.length > 0 || additionalWarnings.length > 0) {
|
|
543
|
+
const allErrors = [...result.errors, ...additionalErrors];
|
|
544
|
+
const allWarnings = [...result.warnings, ...additionalWarnings];
|
|
545
|
+
|
|
546
|
+
if (allErrors.length > 0) {
|
|
547
|
+
return failureWithInfo(allErrors, allWarnings, result.info);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
return successWithInfo(true, allWarnings, result.info);
|
|
551
|
+
}
|
|
552
|
+
|
|
528
553
|
return result;
|
|
529
554
|
}
|
|
530
555
|
|
|
531
556
|
/**
|
|
532
557
|
* グローバル設定ファイルをバリデーション
|
|
533
558
|
*/
|
|
534
|
-
export function validateGlobalConfig():
|
|
559
|
+
export function validateGlobalConfig(): ResultWithInfo {
|
|
535
560
|
const errors: string[] = [];
|
|
536
561
|
const warnings: string[] = [];
|
|
537
562
|
const info: string[] = [];
|
|
@@ -540,16 +565,11 @@ export function validateGlobalConfig(): ValidationResult {
|
|
|
540
565
|
|
|
541
566
|
if (!existsSync(globalConfigPath)) {
|
|
542
567
|
info.push('Global config file not found. This is optional.');
|
|
543
|
-
return
|
|
544
|
-
valid: true,
|
|
545
|
-
errors: [],
|
|
546
|
-
warnings: [],
|
|
547
|
-
info,
|
|
548
|
-
};
|
|
568
|
+
return successWithInfo(true, [], info);
|
|
549
569
|
}
|
|
550
570
|
|
|
551
571
|
try {
|
|
552
|
-
const content =
|
|
572
|
+
const content = safeReadFileOrThrow(globalConfigPath);
|
|
553
573
|
const parsed = JSON.parse(content);
|
|
554
574
|
|
|
555
575
|
// スキーマでバリデーション
|
|
@@ -561,20 +581,14 @@ export function validateGlobalConfig(): ValidationResult {
|
|
|
561
581
|
errors.push(`${path}: ${error.message}`);
|
|
562
582
|
});
|
|
563
583
|
|
|
564
|
-
return
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
};
|
|
584
|
+
return failureWithInfo(errors, [], []);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
if (errors.length > 0) {
|
|
588
|
+
return failureWithInfo(errors, warnings, []);
|
|
570
589
|
}
|
|
571
590
|
|
|
572
|
-
return
|
|
573
|
-
valid: errors.length === 0,
|
|
574
|
-
errors,
|
|
575
|
-
warnings,
|
|
576
|
-
info: [],
|
|
577
|
-
};
|
|
591
|
+
return successWithInfo(true, warnings, []);
|
|
578
592
|
} catch (error) {
|
|
579
593
|
if (error instanceof SyntaxError) {
|
|
580
594
|
errors.push(`Invalid JSON in global config: ${error.message}`);
|
|
@@ -584,12 +598,7 @@ export function validateGlobalConfig(): ValidationResult {
|
|
|
584
598
|
);
|
|
585
599
|
}
|
|
586
600
|
|
|
587
|
-
return
|
|
588
|
-
valid: false,
|
|
589
|
-
errors,
|
|
590
|
-
warnings: [],
|
|
591
|
-
info: [],
|
|
592
|
-
};
|
|
601
|
+
return failureWithInfo(errors, [], []);
|
|
593
602
|
}
|
|
594
603
|
}
|
|
595
604
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* design.md、requirements.md、test-type-selectionからDocker Composeの必要性を自動判断
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { safeReadFileOrThrow } from './safe-file-reader.js';
|
|
7
8
|
import { join } from 'path';
|
|
8
9
|
import { extractSection } from './markdown-parser.js';
|
|
9
10
|
|
|
@@ -25,7 +26,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
25
26
|
// design.mdを解析
|
|
26
27
|
const designPath = join(projectRoot, '.kiro', 'specs', feature, 'design.md');
|
|
27
28
|
if (existsSync(designPath)) {
|
|
28
|
-
const design =
|
|
29
|
+
const design = safeReadFileOrThrow(designPath, 'utf-8');
|
|
29
30
|
|
|
30
31
|
// Technology Stackセクションを確認
|
|
31
32
|
const techStack = extractSection(design, 'Technology Stack');
|
|
@@ -90,7 +91,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
90
91
|
const testSelectionPath = join(projectRoot, '.kiro', 'specs', feature, 'test-type-selection.json');
|
|
91
92
|
if (existsSync(testSelectionPath)) {
|
|
92
93
|
try {
|
|
93
|
-
const testSelection = JSON.parse(
|
|
94
|
+
const testSelection = JSON.parse(safeReadFileOrThrow(testSelectionPath, 'utf-8'));
|
|
94
95
|
const testTypes = testSelection.selectedTypes || [];
|
|
95
96
|
|
|
96
97
|
// 統合テストが選択されている
|
|
@@ -118,7 +119,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
118
119
|
// requirements.mdを解析
|
|
119
120
|
const requirementsPath = join(projectRoot, '.kiro', 'specs', feature, 'requirements.md');
|
|
120
121
|
if (existsSync(requirementsPath)) {
|
|
121
|
-
const requirements =
|
|
122
|
+
const requirements = safeReadFileOrThrow(requirementsPath, 'utf-8');
|
|
122
123
|
|
|
123
124
|
// データ永続化の要件
|
|
124
125
|
if (requirements.match(/データベース|database|永続化|persist/i)) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - .envファイルの生成
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { existsSync } from 'fs';
|
|
12
12
|
import * as readline from 'readline';
|
|
13
13
|
import {
|
|
14
14
|
getProjectIssueTypes,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
filterStoryTypes,
|
|
18
18
|
filterSubtaskTypes,
|
|
19
19
|
} from './jira-issue-type-fetcher.js';
|
|
20
|
+
import { safeReadFileOrThrow } from './safe-file-reader.js';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* 環境変数の設定項目定義
|
|
@@ -112,7 +113,7 @@ export function parseEnvFile(filePath: string): Map<string, string> {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
try {
|
|
115
|
-
const content =
|
|
116
|
+
const content = safeReadFileOrThrow(filePath);
|
|
116
117
|
const lines = content.split('\n');
|
|
117
118
|
|
|
118
119
|
for (const line of lines) {
|
|
@@ -316,28 +317,37 @@ async function promptJiraIssueTypeId(
|
|
|
316
317
|
? ' 値を入力(Enter=デフォルト): '
|
|
317
318
|
: ' 値を入力: ';
|
|
318
319
|
|
|
319
|
-
const
|
|
320
|
+
const MAX_RETRIES = 5;
|
|
321
|
+
let retryCount = 0;
|
|
320
322
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
323
|
+
while (true) {
|
|
324
|
+
const input = await question(rl, promptText);
|
|
325
|
+
|
|
326
|
+
// 入力が空の場合
|
|
327
|
+
if (!input) {
|
|
328
|
+
// 既存値があればそれを使用
|
|
329
|
+
if (existingValue) {
|
|
330
|
+
return existingValue;
|
|
331
|
+
}
|
|
332
|
+
// デフォルト値があればそれを使用
|
|
333
|
+
if (config.defaultValue) {
|
|
334
|
+
return config.defaultValue;
|
|
335
|
+
}
|
|
336
|
+
// 必須項目で値がない場合はエラー
|
|
337
|
+
if (config.required) {
|
|
338
|
+
retryCount++;
|
|
339
|
+
if (retryCount >= MAX_RETRIES) {
|
|
340
|
+
throw new Error(`必須項目 ${config.key} の入力が ${MAX_RETRIES} 回失敗しました`);
|
|
341
|
+
}
|
|
342
|
+
console.log(` ⚠️ 必須項目です。値を入力してください。(残り ${MAX_RETRIES - retryCount} 回)`);
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
// オプション項目は空文字を返す
|
|
346
|
+
return '';
|
|
335
347
|
}
|
|
336
|
-
// オプション項目は空文字を返す
|
|
337
|
-
return '';
|
|
338
|
-
}
|
|
339
348
|
|
|
340
|
-
|
|
349
|
+
return input;
|
|
350
|
+
}
|
|
341
351
|
}
|
|
342
352
|
|
|
343
353
|
/**
|
|
@@ -384,28 +394,37 @@ export async function promptEnvValue(
|
|
|
384
394
|
? ' 値を入力(Enter=デフォルト): '
|
|
385
395
|
: ' 値を入力: ';
|
|
386
396
|
|
|
387
|
-
const
|
|
397
|
+
const MAX_RETRIES = 5;
|
|
398
|
+
let retryCount = 0;
|
|
388
399
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
while (true) {
|
|
401
|
+
const input = await question(rl, promptText);
|
|
402
|
+
|
|
403
|
+
// 入力が空の場合
|
|
404
|
+
if (!input) {
|
|
405
|
+
// 既存値があればそれを使用
|
|
406
|
+
if (existingValue) {
|
|
407
|
+
return existingValue;
|
|
408
|
+
}
|
|
409
|
+
// デフォルト値があればそれを使用
|
|
410
|
+
if (config.defaultValue) {
|
|
411
|
+
return config.defaultValue;
|
|
412
|
+
}
|
|
413
|
+
// 必須項目で値がない場合はエラー
|
|
414
|
+
if (config.required) {
|
|
415
|
+
retryCount++;
|
|
416
|
+
if (retryCount >= MAX_RETRIES) {
|
|
417
|
+
throw new Error(`必須項目 ${config.key} の入力が ${MAX_RETRIES} 回失敗しました`);
|
|
418
|
+
}
|
|
419
|
+
console.log(` ⚠️ 必須項目です。値を入力してください。(残り ${MAX_RETRIES - retryCount} 回)`);
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
// オプション項目は空文字を返す
|
|
423
|
+
return '';
|
|
403
424
|
}
|
|
404
|
-
// オプション項目は空文字を返す
|
|
405
|
-
return '';
|
|
406
|
-
}
|
|
407
425
|
|
|
408
|
-
|
|
426
|
+
return input;
|
|
427
|
+
}
|
|
409
428
|
}
|
|
410
429
|
|
|
411
430
|
/**
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* kebab-case形式を強制
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
errors: string[];
|
|
9
|
-
}
|
|
6
|
+
import type { Result } from './types/validation.js';
|
|
7
|
+
import { success, failure } from './types/validation.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* kebab-case形式の正規表現
|
|
@@ -19,23 +17,26 @@ const KEBAB_CASE_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
|
19
17
|
|
|
20
18
|
/**
|
|
21
19
|
* feature名がkebab-case形式か検証
|
|
20
|
+
*
|
|
21
|
+
* @returns Result<boolean, string> - 成功時は true、失敗時は false
|
|
22
22
|
*/
|
|
23
|
-
export function validateFeatureName(featureName: string):
|
|
23
|
+
export function validateFeatureName(featureName: string): Result<boolean, string> {
|
|
24
24
|
const errors: string[] = [];
|
|
25
|
-
|
|
25
|
+
const warnings: string[] = [];
|
|
26
|
+
|
|
26
27
|
// 空文字チェック
|
|
27
28
|
if (!featureName || featureName.trim().length === 0) {
|
|
28
29
|
errors.push('❌ feature名が空です');
|
|
29
|
-
return
|
|
30
|
+
return failure(errors);
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
|
|
32
33
|
const trimmed = featureName.trim();
|
|
33
|
-
|
|
34
|
+
|
|
34
35
|
// kebab-case形式チェック
|
|
35
36
|
if (!KEBAB_CASE_PATTERN.test(trimmed)) {
|
|
36
37
|
errors.push(`❌ feature名が無効な形式です: "${trimmed}"`);
|
|
37
38
|
errors.push(' 必須形式: 英語、kebab-case(ハイフン区切り)、小文字のみ');
|
|
38
|
-
|
|
39
|
+
|
|
39
40
|
// 具体的な問題を特定
|
|
40
41
|
if (/[A-Z]/.test(trimmed)) {
|
|
41
42
|
errors.push(' → 大文字が含まれています(小文字に変換してください)');
|
|
@@ -59,29 +60,30 @@ export function validateFeatureName(featureName: string): ValidationResult {
|
|
|
59
60
|
const invalidChars = trimmed.match(/[^a-z0-9-]/g);
|
|
60
61
|
errors.push(` → 使用できない文字が含まれています: ${[...new Set(invalidChars)].join(', ')}`);
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
|
|
63
64
|
// 修正案を提示
|
|
64
65
|
const suggestion = suggestFeatureName(trimmed);
|
|
65
66
|
if (suggestion && suggestion !== trimmed) {
|
|
66
67
|
errors.push(` 💡 修正案: "${suggestion}"`);
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
|
|
70
71
|
// 長さチェック(推奨)
|
|
71
72
|
if (trimmed.length > 50) {
|
|
72
|
-
|
|
73
|
+
warnings.push(`⚠️ feature名が長すぎます(${trimmed.length}文字)。50文字以内を推奨`);
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
|
|
75
76
|
// 単語数チェック(推奨)
|
|
76
77
|
const wordCount = trimmed.split('-').length;
|
|
77
78
|
if (wordCount > 5) {
|
|
78
|
-
|
|
79
|
+
warnings.push(`⚠️ 単語数が多すぎます(${wordCount}単語)。2-4単語を推奨`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (errors.length > 0) {
|
|
83
|
+
return failure(errors, warnings);
|
|
79
84
|
}
|
|
80
|
-
|
|
81
|
-
return
|
|
82
|
-
valid: errors.length === 0,
|
|
83
|
-
errors
|
|
84
|
-
};
|
|
85
|
+
|
|
86
|
+
return success(true, warnings);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
/**
|
|
@@ -103,8 +105,8 @@ export function suggestFeatureName(input: string): string {
|
|
|
103
105
|
*/
|
|
104
106
|
export function validateFeatureNameOrThrow(featureName: string): void {
|
|
105
107
|
const result = validateFeatureName(featureName);
|
|
106
|
-
|
|
107
|
-
if (!result.
|
|
108
|
+
|
|
109
|
+
if (!result.success) {
|
|
108
110
|
const errorMessage = [
|
|
109
111
|
`Invalid feature name: "${featureName}"`,
|
|
110
112
|
'',
|
|
@@ -112,24 +114,7 @@ export function validateFeatureNameOrThrow(featureName: string): void {
|
|
|
112
114
|
'',
|
|
113
115
|
'ヘルプ: README.md#機能名(feature)の命名規則 を参照してください'
|
|
114
116
|
].join('\n');
|
|
115
|
-
|
|
116
|
-
throw new Error(errorMessage);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
* feature名をバリデートし、警告を表示(続行可能)
|
|
122
|
-
*/
|
|
123
|
-
export function validateFeatureNameWithWarning(featureName: string): boolean {
|
|
124
|
-
const result = validateFeatureName(featureName);
|
|
125
|
-
|
|
126
|
-
if (!result.valid) {
|
|
127
|
-
console.error('\n⚠️ Feature name validation failed:');
|
|
128
|
-
result.errors.forEach(err => console.error(err));
|
|
129
|
-
console.error('\nヘルプ: README.md#機能名(feature)の命名規則 を参照してください\n');
|
|
130
|
-
return false;
|
|
118
|
+
throw new Error(errorMessage);
|
|
131
119
|
}
|
|
132
|
-
|
|
133
|
-
return true;
|
|
134
120
|
}
|
|
135
|
-
|