@sk8metal/michi-cli 0.14.1 → 0.19.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.
Files changed (614) hide show
  1. package/CHANGELOG.md +268 -2
  2. package/README.md +27 -2
  3. package/dist/scripts/config/config-schema.d.ts +5 -333
  4. package/dist/scripts/config/config-schema.d.ts.map +1 -1
  5. package/dist/scripts/config/config-schema.js +6 -233
  6. package/dist/scripts/config/config-schema.js.map +1 -1
  7. package/dist/scripts/config-global.d.ts.map +1 -1
  8. package/dist/scripts/config-global.js +3 -2
  9. package/dist/scripts/config-global.js.map +1 -1
  10. package/dist/scripts/confluence-sync.d.ts +5 -73
  11. package/dist/scripts/confluence-sync.d.ts.map +1 -1
  12. package/dist/scripts/confluence-sync.js +14 -392
  13. package/dist/scripts/confluence-sync.js.map +1 -1
  14. package/dist/scripts/constants/environments.d.ts +3 -30
  15. package/dist/scripts/constants/environments.d.ts.map +1 -1
  16. package/dist/scripts/constants/environments.js +3 -41
  17. package/dist/scripts/constants/environments.js.map +1 -1
  18. package/dist/scripts/constants/languages.d.ts +3 -20
  19. package/dist/scripts/constants/languages.d.ts.map +1 -1
  20. package/dist/scripts/constants/languages.js +3 -50
  21. package/dist/scripts/constants/languages.js.map +1 -1
  22. package/dist/scripts/constants/test-commands.d.ts +3 -33
  23. package/dist/scripts/constants/test-commands.d.ts.map +1 -1
  24. package/dist/scripts/constants/test-commands.js +3 -67
  25. package/dist/scripts/constants/test-commands.js.map +1 -1
  26. package/dist/scripts/dev-tools/mermaid-converter.d.ts.map +1 -0
  27. package/dist/scripts/dev-tools/mermaid-converter.js.map +1 -0
  28. package/dist/scripts/dev-tools/test-interactive.d.ts.map +1 -0
  29. package/dist/scripts/{test-interactive.js → dev-tools/test-interactive.js} +4 -3
  30. package/dist/scripts/dev-tools/test-interactive.js.map +1 -0
  31. package/dist/scripts/github-actions-client.d.ts +5 -75
  32. package/dist/scripts/github-actions-client.d.ts.map +1 -1
  33. package/dist/scripts/github-actions-client.js +4 -178
  34. package/dist/scripts/github-actions-client.js.map +1 -1
  35. package/dist/scripts/jira-sync.d.ts +3 -121
  36. package/dist/scripts/jira-sync.d.ts.map +1 -1
  37. package/dist/scripts/jira-sync.js +5 -879
  38. package/dist/scripts/jira-sync.js.map +1 -1
  39. package/dist/scripts/markdown-to-confluence.d.ts.map +1 -1
  40. package/dist/scripts/markdown-to-confluence.js +2 -2
  41. package/dist/scripts/markdown-to-confluence.js.map +1 -1
  42. package/dist/scripts/multi-project-estimate.d.ts.map +1 -1
  43. package/dist/scripts/multi-project-estimate.js +3 -2
  44. package/dist/scripts/multi-project-estimate.js.map +1 -1
  45. package/dist/scripts/phase-runner.d.ts.map +1 -1
  46. package/dist/scripts/phase-runner.js +34 -18
  47. package/dist/scripts/phase-runner.js.map +1 -1
  48. package/dist/scripts/pre-flight-check.d.ts.map +1 -1
  49. package/dist/scripts/pre-flight-check.js +27 -11
  50. package/dist/scripts/pre-flight-check.js.map +1 -1
  51. package/dist/scripts/template/multi-repo-renderer.js +2 -2
  52. package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
  53. package/dist/scripts/test-execution-generator.d.ts.map +1 -1
  54. package/dist/scripts/test-execution-generator.js +5 -4
  55. package/dist/scripts/test-execution-generator.js.map +1 -1
  56. package/dist/scripts/utils/aidlc-parser.d.ts +5 -82
  57. package/dist/scripts/utils/aidlc-parser.d.ts.map +1 -1
  58. package/dist/scripts/utils/aidlc-parser.js +4 -204
  59. package/dist/scripts/utils/aidlc-parser.js.map +1 -1
  60. package/dist/scripts/utils/ci-generator.d.ts.map +1 -1
  61. package/dist/scripts/utils/ci-generator.js +4 -3
  62. package/dist/scripts/utils/ci-generator.js.map +1 -1
  63. package/dist/scripts/utils/config-loader.d.ts.map +1 -1
  64. package/dist/scripts/utils/config-loader.js +46 -49
  65. package/dist/scripts/utils/config-loader.js.map +1 -1
  66. package/dist/scripts/utils/config-validator.d.ts +9 -10
  67. package/dist/scripts/utils/config-validator.d.ts.map +1 -1
  68. package/dist/scripts/utils/config-validator.js +68 -70
  69. package/dist/scripts/utils/config-validator.js.map +1 -1
  70. package/dist/scripts/utils/docker-requirement-detector.d.ts.map +1 -1
  71. package/dist/scripts/utils/docker-requirement-detector.js +5 -4
  72. package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
  73. package/dist/scripts/utils/env-config.d.ts.map +1 -1
  74. package/dist/scripts/utils/env-config.js +55 -38
  75. package/dist/scripts/utils/env-config.js.map +1 -1
  76. package/dist/scripts/utils/feature-name-validator.d.ts +4 -9
  77. package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -1
  78. package/dist/scripts/utils/feature-name-validator.js +12 -21
  79. package/dist/scripts/utils/feature-name-validator.js.map +1 -1
  80. package/dist/scripts/utils/interactive-helpers.d.ts +5 -29
  81. package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -1
  82. package/dist/scripts/utils/interactive-helpers.js +5 -89
  83. package/dist/scripts/utils/interactive-helpers.js.map +1 -1
  84. package/dist/scripts/utils/language-detector.d.ts.map +1 -1
  85. package/dist/scripts/utils/language-detector.js +4 -3
  86. package/dist/scripts/utils/language-detector.js.map +1 -1
  87. package/dist/scripts/utils/markdown-parser.d.ts +6 -52
  88. package/dist/scripts/utils/markdown-parser.d.ts.map +1 -1
  89. package/dist/scripts/utils/markdown-parser.js +5 -286
  90. package/dist/scripts/utils/markdown-parser.js.map +1 -1
  91. package/dist/scripts/utils/multi-repo-validator.d.ts +9 -10
  92. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  93. package/dist/scripts/utils/multi-repo-validator.js +15 -17
  94. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  95. package/dist/scripts/utils/project-analyzer.d.ts +120 -0
  96. package/dist/scripts/utils/project-analyzer.d.ts.map +1 -0
  97. package/dist/scripts/utils/project-analyzer.js +358 -0
  98. package/dist/scripts/utils/project-analyzer.js.map +1 -0
  99. package/dist/scripts/utils/project-detector.d.ts.map +1 -1
  100. package/dist/scripts/utils/project-detector.js +6 -5
  101. package/dist/scripts/utils/project-detector.js.map +1 -1
  102. package/dist/scripts/utils/project-finder.d.ts +1 -21
  103. package/dist/scripts/utils/project-finder.d.ts.map +1 -1
  104. package/dist/scripts/utils/project-finder.js +2 -121
  105. package/dist/scripts/utils/project-finder.js.map +1 -1
  106. package/dist/scripts/utils/project-meta.d.ts +4 -27
  107. package/dist/scripts/utils/project-meta.d.ts.map +1 -1
  108. package/dist/scripts/utils/project-meta.js +3 -67
  109. package/dist/scripts/utils/project-meta.js.map +1 -1
  110. package/dist/scripts/utils/safe-file-reader.d.ts +84 -0
  111. package/dist/scripts/utils/safe-file-reader.d.ts.map +1 -0
  112. package/dist/scripts/utils/safe-file-reader.js +122 -0
  113. package/dist/scripts/utils/safe-file-reader.js.map +1 -0
  114. package/dist/scripts/utils/security-validator.d.ts +8 -19
  115. package/dist/scripts/utils/security-validator.d.ts.map +1 -1
  116. package/dist/scripts/utils/security-validator.js +28 -58
  117. package/dist/scripts/utils/security-validator.js.map +1 -1
  118. package/dist/scripts/utils/spec-archiver.d.ts.map +1 -1
  119. package/dist/scripts/utils/spec-archiver.js +7 -6
  120. package/dist/scripts/utils/spec-archiver.js.map +1 -1
  121. package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
  122. package/dist/scripts/utils/spec-updater.js +10 -7
  123. package/dist/scripts/utils/spec-updater.js.map +1 -1
  124. package/dist/scripts/utils/tasks-converter.js +2 -2
  125. package/dist/scripts/utils/tasks-converter.js.map +1 -1
  126. package/dist/scripts/utils/tasks-format-validator.js +4 -4
  127. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  128. package/dist/scripts/utils/template-applier.d.ts.map +1 -1
  129. package/dist/scripts/utils/template-applier.js +4 -3
  130. package/dist/scripts/utils/template-applier.js.map +1 -1
  131. package/dist/scripts/utils/types/validation.d.ts +57 -0
  132. package/dist/scripts/utils/types/validation.d.ts.map +1 -0
  133. package/dist/scripts/utils/types/validation.js +50 -0
  134. package/dist/scripts/utils/types/validation.js.map +1 -0
  135. package/dist/scripts/validate-phase.d.ts +6 -1
  136. package/dist/scripts/validate-phase.d.ts.map +1 -1
  137. package/dist/scripts/validate-phase.js +42 -20
  138. package/dist/scripts/validate-phase.js.map +1 -1
  139. package/dist/scripts/workflow-orchestrator.d.ts +4 -40
  140. package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
  141. package/dist/scripts/workflow-orchestrator.js +7 -194
  142. package/dist/scripts/workflow-orchestrator.js.map +1 -1
  143. package/dist/src/application/interfaces/config-provider.d.ts +89 -0
  144. package/dist/src/application/interfaces/config-provider.d.ts.map +1 -0
  145. package/dist/src/application/interfaces/config-provider.js +8 -0
  146. package/dist/src/application/interfaces/config-provider.js.map +1 -0
  147. package/dist/src/application/interfaces/external-api.d.ts +80 -0
  148. package/dist/src/application/interfaces/external-api.d.ts.map +1 -0
  149. package/dist/src/application/interfaces/external-api.js +8 -0
  150. package/dist/src/application/interfaces/external-api.js.map +1 -0
  151. package/dist/src/application/interfaces/spec-repository.d.ts +52 -0
  152. package/dist/src/application/interfaces/spec-repository.d.ts.map +1 -0
  153. package/dist/src/application/interfaces/spec-repository.js +8 -0
  154. package/dist/src/application/interfaces/spec-repository.js.map +1 -0
  155. package/dist/src/application/services/spec-service.d.ts +49 -0
  156. package/dist/src/application/services/spec-service.d.ts.map +1 -0
  157. package/dist/src/application/services/spec-service.js +94 -0
  158. package/dist/src/application/services/spec-service.js.map +1 -0
  159. package/dist/src/application/services/workflow-service.d.ts +58 -0
  160. package/dist/src/application/services/workflow-service.d.ts.map +1 -0
  161. package/dist/src/application/services/workflow-service.js +125 -0
  162. package/dist/src/application/services/workflow-service.js.map +1 -0
  163. package/dist/src/application/templates/processor.d.ts +31 -0
  164. package/dist/src/application/templates/processor.d.ts.map +1 -0
  165. package/dist/src/application/templates/processor.js +58 -0
  166. package/dist/src/application/templates/processor.js.map +1 -0
  167. package/dist/src/application/use-cases/spec/archive-spec.d.ts +34 -0
  168. package/dist/src/application/use-cases/spec/archive-spec.d.ts.map +1 -0
  169. package/dist/src/application/use-cases/spec/archive-spec.js +56 -0
  170. package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -0
  171. package/dist/src/application/use-cases/spec/generate-design.d.ts +34 -0
  172. package/dist/src/application/use-cases/spec/generate-design.d.ts.map +1 -0
  173. package/dist/src/application/use-cases/spec/generate-design.js +58 -0
  174. package/dist/src/application/use-cases/spec/generate-design.js.map +1 -0
  175. package/dist/src/application/use-cases/spec/generate-requirements.d.ts +34 -0
  176. package/dist/src/application/use-cases/spec/generate-requirements.d.ts.map +1 -0
  177. package/dist/src/application/use-cases/spec/generate-requirements.js +58 -0
  178. package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -0
  179. package/dist/src/application/use-cases/spec/generate-tasks.d.ts +34 -0
  180. package/dist/src/application/use-cases/spec/generate-tasks.d.ts.map +1 -0
  181. package/dist/src/application/use-cases/spec/generate-tasks.js +58 -0
  182. package/dist/src/application/use-cases/spec/generate-tasks.js.map +1 -0
  183. package/dist/src/application/use-cases/spec/init-spec.d.ts +48 -0
  184. package/dist/src/application/use-cases/spec/init-spec.d.ts.map +1 -0
  185. package/dist/src/application/use-cases/spec/init-spec.js +121 -0
  186. package/dist/src/application/use-cases/spec/init-spec.js.map +1 -0
  187. package/dist/src/cli.d.ts +6 -7
  188. package/dist/src/cli.d.ts.map +1 -1
  189. package/dist/src/cli.js +6 -745
  190. package/dist/src/cli.js.map +1 -1
  191. package/dist/src/commands/config-validate.js +2 -2
  192. package/dist/src/commands/init.d.ts +6 -21
  193. package/dist/src/commands/init.d.ts.map +1 -1
  194. package/dist/src/commands/init.js +5 -508
  195. package/dist/src/commands/init.js.map +1 -1
  196. package/dist/src/commands/migrate.js +4 -3
  197. package/dist/src/commands/migrate.js.map +1 -1
  198. package/dist/src/commands/spec-archive.d.ts +6 -13
  199. package/dist/src/commands/spec-archive.d.ts.map +1 -1
  200. package/dist/src/commands/spec-archive.js +5 -36
  201. package/dist/src/commands/spec-archive.js.map +1 -1
  202. package/dist/src/commands/spec-list.d.ts +6 -11
  203. package/dist/src/commands/spec-list.d.ts.map +1 -1
  204. package/dist/src/commands/spec-list.js +5 -51
  205. package/dist/src/commands/spec-list.js.map +1 -1
  206. package/dist/src/domain/constants/approval.d.ts +18 -0
  207. package/dist/src/domain/constants/approval.d.ts.map +1 -0
  208. package/dist/src/domain/constants/approval.js +23 -0
  209. package/dist/src/domain/constants/approval.js.map +1 -0
  210. package/dist/src/domain/constants/environments.d.ts +33 -0
  211. package/dist/src/domain/constants/environments.d.ts.map +1 -0
  212. package/dist/src/domain/constants/environments.js +44 -0
  213. package/dist/src/domain/constants/environments.js.map +1 -0
  214. package/dist/src/domain/constants/index.d.ts +12 -0
  215. package/dist/src/domain/constants/index.d.ts.map +1 -0
  216. package/dist/src/domain/constants/index.js +18 -0
  217. package/dist/src/domain/constants/index.js.map +1 -0
  218. package/dist/src/domain/constants/languages.d.ts +23 -0
  219. package/dist/src/domain/constants/languages.d.ts.map +1 -0
  220. package/dist/src/domain/constants/languages.js +53 -0
  221. package/dist/src/domain/constants/languages.js.map +1 -0
  222. package/dist/src/domain/constants/phases.d.ts +32 -0
  223. package/dist/src/domain/constants/phases.d.ts.map +1 -0
  224. package/dist/src/domain/constants/phases.js +52 -0
  225. package/dist/src/domain/constants/phases.js.map +1 -0
  226. package/dist/src/domain/constants/test-commands.d.ts +36 -0
  227. package/dist/src/domain/constants/test-commands.d.ts.map +1 -0
  228. package/dist/src/domain/constants/test-commands.js +70 -0
  229. package/dist/src/domain/constants/test-commands.js.map +1 -0
  230. package/dist/src/domain/constants/validation-rules.d.ts +32 -0
  231. package/dist/src/domain/constants/validation-rules.d.ts.map +1 -0
  232. package/dist/src/domain/constants/validation-rules.js +51 -0
  233. package/dist/src/domain/constants/validation-rules.js.map +1 -0
  234. package/dist/src/domain/entities/spec.d.ts +66 -0
  235. package/dist/src/domain/entities/spec.d.ts.map +1 -0
  236. package/dist/src/domain/entities/spec.js +112 -0
  237. package/dist/src/domain/entities/spec.js.map +1 -0
  238. package/dist/src/domain/entities/task.d.ts +43 -0
  239. package/dist/src/domain/entities/task.d.ts.map +1 -0
  240. package/dist/src/domain/entities/task.js +65 -0
  241. package/dist/src/domain/entities/task.js.map +1 -0
  242. package/dist/src/domain/services/spec-validator.d.ts +46 -0
  243. package/dist/src/domain/services/spec-validator.d.ts.map +1 -0
  244. package/dist/src/domain/services/spec-validator.js +99 -0
  245. package/dist/src/domain/services/spec-validator.js.map +1 -0
  246. package/dist/src/domain/value-objects/feature-name.d.ts +24 -0
  247. package/dist/src/domain/value-objects/feature-name.d.ts.map +1 -0
  248. package/dist/src/domain/value-objects/feature-name.js +36 -0
  249. package/dist/src/domain/value-objects/feature-name.js.map +1 -0
  250. package/dist/src/domain/value-objects/index.d.ts +7 -0
  251. package/dist/src/domain/value-objects/index.d.ts.map +1 -0
  252. package/dist/src/domain/value-objects/index.js +7 -0
  253. package/dist/src/domain/value-objects/index.js.map +1 -0
  254. package/dist/src/infrastructure/config/index.d.ts +5 -0
  255. package/dist/src/infrastructure/config/index.d.ts.map +1 -0
  256. package/dist/src/infrastructure/config/index.js +6 -0
  257. package/dist/src/infrastructure/config/index.js.map +1 -0
  258. package/dist/src/infrastructure/config/schema.d.ts +337 -0
  259. package/dist/src/infrastructure/config/schema.d.ts.map +1 -0
  260. package/dist/src/infrastructure/config/schema.js +237 -0
  261. package/dist/src/infrastructure/config/schema.js.map +1 -0
  262. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts +14 -0
  263. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts.map +1 -0
  264. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js +102 -0
  265. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js.map +1 -0
  266. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts +23 -0
  267. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts.map +1 -0
  268. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js +192 -0
  269. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js.map +1 -0
  270. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts +48 -0
  271. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts.map +1 -0
  272. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +531 -0
  273. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -0
  274. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts +10 -0
  275. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts.map +1 -0
  276. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js +12 -0
  277. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js.map +1 -0
  278. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts +13 -0
  279. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts.map +1 -0
  280. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +129 -0
  281. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -0
  282. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts +113 -0
  283. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts.map +1 -0
  284. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js +5 -0
  285. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js.map +1 -0
  286. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts +15 -0
  287. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts.map +1 -0
  288. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js +141 -0
  289. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js.map +1 -0
  290. package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts +50 -0
  291. package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts.map +1 -0
  292. package/dist/src/infrastructure/external-apis/atlassian/jira/client.js +226 -0
  293. package/dist/src/infrastructure/external-apis/atlassian/jira/client.js.map +1 -0
  294. package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts +12 -0
  295. package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts.map +1 -0
  296. package/dist/src/infrastructure/external-apis/atlassian/jira/index.js +16 -0
  297. package/dist/src/infrastructure/external-apis/atlassian/jira/index.js.map +1 -0
  298. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts +49 -0
  299. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts.map +1 -0
  300. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +165 -0
  301. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -0
  302. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts +14 -0
  303. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts.map +1 -0
  304. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js +110 -0
  305. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js.map +1 -0
  306. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts +32 -0
  307. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts.map +1 -0
  308. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +284 -0
  309. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -0
  310. package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts +114 -0
  311. package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts.map +1 -0
  312. package/dist/src/infrastructure/external-apis/atlassian/jira/types.js +7 -0
  313. package/dist/src/infrastructure/external-apis/atlassian/jira/types.js.map +1 -0
  314. package/dist/src/infrastructure/external-apis/github/client.d.ts +25 -0
  315. package/dist/src/infrastructure/external-apis/github/client.d.ts.map +1 -0
  316. package/dist/src/infrastructure/external-apis/github/client.js +109 -0
  317. package/dist/src/infrastructure/external-apis/github/client.js.map +1 -0
  318. package/dist/src/infrastructure/external-apis/github/index.d.ts +7 -0
  319. package/dist/src/infrastructure/external-apis/github/index.d.ts.map +1 -0
  320. package/dist/src/infrastructure/external-apis/github/index.js +8 -0
  321. package/dist/src/infrastructure/external-apis/github/index.js.map +1 -0
  322. package/dist/src/infrastructure/external-apis/github/types.d.ts +69 -0
  323. package/dist/src/infrastructure/external-apis/github/types.d.ts.map +1 -0
  324. package/dist/src/infrastructure/external-apis/github/types.js +5 -0
  325. package/dist/src/infrastructure/external-apis/github/types.js.map +1 -0
  326. package/dist/src/infrastructure/external-apis/github/utils.d.ts +18 -0
  327. package/dist/src/infrastructure/external-apis/github/utils.d.ts.map +1 -0
  328. package/dist/src/infrastructure/external-apis/github/utils.js +84 -0
  329. package/dist/src/infrastructure/external-apis/github/utils.js.map +1 -0
  330. package/dist/src/infrastructure/filesystem/index.d.ts +6 -0
  331. package/dist/src/infrastructure/filesystem/index.d.ts.map +1 -0
  332. package/dist/src/infrastructure/filesystem/index.js +5 -0
  333. package/dist/src/infrastructure/filesystem/index.js.map +1 -0
  334. package/dist/src/infrastructure/filesystem/project-meta.d.ts +32 -0
  335. package/dist/src/infrastructure/filesystem/project-meta.d.ts.map +1 -0
  336. package/dist/src/infrastructure/filesystem/project-meta.js +75 -0
  337. package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -0
  338. package/dist/src/infrastructure/parsers/aidlc-parser.d.ts +86 -0
  339. package/dist/src/infrastructure/parsers/aidlc-parser.d.ts.map +1 -0
  340. package/dist/src/infrastructure/parsers/aidlc-parser.js +208 -0
  341. package/dist/src/infrastructure/parsers/aidlc-parser.js.map +1 -0
  342. package/dist/src/infrastructure/parsers/index.d.ts +8 -0
  343. package/dist/src/infrastructure/parsers/index.d.ts.map +1 -0
  344. package/dist/src/infrastructure/parsers/index.js +6 -0
  345. package/dist/src/infrastructure/parsers/index.js.map +1 -0
  346. package/dist/src/infrastructure/parsers/markdown-parser.d.ts +51 -0
  347. package/dist/src/infrastructure/parsers/markdown-parser.d.ts.map +1 -0
  348. package/dist/src/infrastructure/parsers/markdown-parser.js +253 -0
  349. package/dist/src/infrastructure/parsers/markdown-parser.js.map +1 -0
  350. package/dist/src/presentation/cli/config.d.ts +12 -0
  351. package/dist/src/presentation/cli/config.d.ts.map +1 -0
  352. package/dist/src/presentation/cli/config.js +22 -0
  353. package/dist/src/presentation/cli/config.js.map +1 -0
  354. package/dist/src/presentation/cli/version.d.ts +10 -0
  355. package/dist/src/presentation/cli/version.d.ts.map +1 -0
  356. package/dist/src/presentation/cli/version.js +41 -0
  357. package/dist/src/presentation/cli/version.js.map +1 -0
  358. package/dist/src/presentation/cli.d.ts +22 -0
  359. package/dist/src/presentation/cli.d.ts.map +1 -0
  360. package/dist/src/presentation/cli.js +85 -0
  361. package/dist/src/presentation/cli.js.map +1 -0
  362. package/dist/src/presentation/commands/config/register.d.ts +11 -0
  363. package/dist/src/presentation/commands/config/register.d.ts.map +1 -0
  364. package/dist/src/presentation/commands/config/register.js +44 -0
  365. package/dist/src/presentation/commands/config/register.js.map +1 -0
  366. package/dist/src/presentation/commands/confluence/register.d.ts +11 -0
  367. package/dist/src/presentation/commands/confluence/register.d.ts.map +1 -0
  368. package/dist/src/presentation/commands/confluence/register.js +32 -0
  369. package/dist/src/presentation/commands/confluence/register.js.map +1 -0
  370. package/dist/src/presentation/commands/confluence/sync.d.ts +17 -0
  371. package/dist/src/presentation/commands/confluence/sync.d.ts.map +1 -0
  372. package/dist/src/presentation/commands/confluence/sync.js +25 -0
  373. package/dist/src/presentation/commands/confluence/sync.js.map +1 -0
  374. package/dist/src/presentation/commands/init/handler.d.ts +10 -0
  375. package/dist/src/presentation/commands/init/handler.d.ts.map +1 -0
  376. package/dist/src/presentation/commands/init/handler.js +64 -0
  377. package/dist/src/presentation/commands/init/handler.js.map +1 -0
  378. package/dist/src/presentation/commands/init/prompts.d.ts +41 -0
  379. package/dist/src/presentation/commands/init/prompts.d.ts.map +1 -0
  380. package/dist/src/presentation/commands/init/prompts.js +119 -0
  381. package/dist/src/presentation/commands/init/prompts.js.map +1 -0
  382. package/dist/src/presentation/commands/init/register.d.ts +11 -0
  383. package/dist/src/presentation/commands/init/register.d.ts.map +1 -0
  384. package/dist/src/presentation/commands/init/register.js +141 -0
  385. package/dist/src/presentation/commands/init/register.js.map +1 -0
  386. package/dist/src/presentation/commands/init/setup.d.ts +26 -0
  387. package/dist/src/presentation/commands/init/setup.d.ts.map +1 -0
  388. package/dist/src/presentation/commands/init/setup.js +196 -0
  389. package/dist/src/presentation/commands/init/setup.js.map +1 -0
  390. package/dist/src/presentation/commands/init/templates.d.ts +19 -0
  391. package/dist/src/presentation/commands/init/templates.d.ts.map +1 -0
  392. package/dist/src/presentation/commands/init/templates.js +140 -0
  393. package/dist/src/presentation/commands/init/templates.js.map +1 -0
  394. package/dist/src/presentation/commands/init/validation.d.ts +21 -0
  395. package/dist/src/presentation/commands/init/validation.d.ts.map +1 -0
  396. package/dist/src/presentation/commands/init/validation.js +65 -0
  397. package/dist/src/presentation/commands/init/validation.js.map +1 -0
  398. package/dist/src/presentation/commands/jira/register.d.ts +11 -0
  399. package/dist/src/presentation/commands/jira/register.d.ts.map +1 -0
  400. package/dist/src/presentation/commands/jira/register.js +75 -0
  401. package/dist/src/presentation/commands/jira/register.js.map +1 -0
  402. package/dist/src/presentation/commands/jira/sync.d.ts +29 -0
  403. package/dist/src/presentation/commands/jira/sync.d.ts.map +1 -0
  404. package/dist/src/presentation/commands/jira/sync.js +37 -0
  405. package/dist/src/presentation/commands/jira/sync.js.map +1 -0
  406. package/dist/src/{commands/multi-repo-add-repo.d.ts → presentation/commands/multi-repo/add-repo.d.ts} +1 -1
  407. package/dist/src/presentation/commands/multi-repo/add-repo.d.ts.map +1 -0
  408. package/dist/src/{commands/multi-repo-add-repo.js → presentation/commands/multi-repo/add-repo.js} +4 -4
  409. package/dist/src/presentation/commands/multi-repo/add-repo.js.map +1 -0
  410. package/dist/src/{commands/multi-repo-ci-status.d.ts → presentation/commands/multi-repo/ci-status.d.ts} +2 -2
  411. package/dist/src/presentation/commands/multi-repo/ci-status.d.ts.map +1 -0
  412. package/dist/src/{commands/multi-repo-ci-status.js → presentation/commands/multi-repo/ci-status.js} +95 -81
  413. package/dist/src/presentation/commands/multi-repo/ci-status.js.map +1 -0
  414. package/dist/src/{commands/multi-repo-confluence-sync.d.ts → presentation/commands/multi-repo/confluence-sync.d.ts} +1 -1
  415. package/dist/src/presentation/commands/multi-repo/confluence-sync.d.ts.map +1 -0
  416. package/dist/src/{commands/multi-repo-confluence-sync.js → presentation/commands/multi-repo/confluence-sync.js} +7 -6
  417. package/dist/src/presentation/commands/multi-repo/confluence-sync.js.map +1 -0
  418. package/dist/src/{commands/multi-repo-init.d.ts → presentation/commands/multi-repo/init.d.ts} +1 -1
  419. package/dist/src/presentation/commands/multi-repo/init.d.ts.map +1 -0
  420. package/dist/src/{commands/multi-repo-init.js → presentation/commands/multi-repo/init.js} +6 -6
  421. package/dist/src/presentation/commands/multi-repo/init.js.map +1 -0
  422. package/dist/src/{commands/multi-repo-list.d.ts → presentation/commands/multi-repo/list.d.ts} +1 -1
  423. package/dist/src/presentation/commands/multi-repo/list.d.ts.map +1 -0
  424. package/dist/src/{commands/multi-repo-list.js → presentation/commands/multi-repo/list.js} +2 -2
  425. package/dist/src/presentation/commands/multi-repo/list.js.map +1 -0
  426. package/dist/src/presentation/commands/multi-repo/register.d.ts +12 -0
  427. package/dist/src/presentation/commands/multi-repo/register.d.ts.map +1 -0
  428. package/dist/src/presentation/commands/multi-repo/register.js +249 -0
  429. package/dist/src/presentation/commands/multi-repo/register.js.map +1 -0
  430. package/dist/src/{commands/multi-repo-test.d.ts → presentation/commands/multi-repo/test.d.ts} +1 -1
  431. package/dist/src/presentation/commands/multi-repo/test.d.ts.map +1 -0
  432. package/dist/src/{commands/multi-repo-test.js → presentation/commands/multi-repo/test.js} +4 -4
  433. package/dist/src/presentation/commands/multi-repo/test.js.map +1 -0
  434. package/dist/src/presentation/commands/phase/register.d.ts +11 -0
  435. package/dist/src/presentation/commands/phase/register.d.ts.map +1 -0
  436. package/dist/src/presentation/commands/phase/register.js +97 -0
  437. package/dist/src/presentation/commands/phase/register.js.map +1 -0
  438. package/dist/src/presentation/commands/spec/archive.d.ts +17 -0
  439. package/dist/src/presentation/commands/spec/archive.d.ts.map +1 -0
  440. package/dist/src/presentation/commands/spec/archive.js +40 -0
  441. package/dist/src/presentation/commands/spec/archive.js.map +1 -0
  442. package/dist/src/presentation/commands/spec/list.d.ts +15 -0
  443. package/dist/src/presentation/commands/spec/list.d.ts.map +1 -0
  444. package/dist/src/presentation/commands/spec/list.js +55 -0
  445. package/dist/src/presentation/commands/spec/list.js.map +1 -0
  446. package/dist/src/presentation/commands/spec/register.d.ts +11 -0
  447. package/dist/src/presentation/commands/spec/register.d.ts.map +1 -0
  448. package/dist/src/presentation/commands/spec/register.js +45 -0
  449. package/dist/src/presentation/commands/spec/register.js.map +1 -0
  450. package/dist/src/presentation/commands/workflow/orchestrator.d.ts +50 -0
  451. package/dist/src/presentation/commands/workflow/orchestrator.d.ts.map +1 -0
  452. package/dist/src/presentation/commands/workflow/orchestrator.js +174 -0
  453. package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -0
  454. package/dist/src/presentation/commands/workflow/register.d.ts +11 -0
  455. package/dist/src/presentation/commands/workflow/register.d.ts.map +1 -0
  456. package/dist/src/presentation/commands/workflow/register.js +58 -0
  457. package/dist/src/presentation/commands/workflow/register.js.map +1 -0
  458. package/dist/src/presentation/formatters/error-formatter.d.ts +79 -0
  459. package/dist/src/presentation/formatters/error-formatter.d.ts.map +1 -0
  460. package/dist/src/presentation/formatters/error-formatter.js +150 -0
  461. package/dist/src/presentation/formatters/error-formatter.js.map +1 -0
  462. package/dist/src/presentation/formatters/index.d.ts +8 -0
  463. package/dist/src/presentation/formatters/index.d.ts.map +1 -0
  464. package/dist/src/presentation/formatters/index.js +11 -0
  465. package/dist/src/presentation/formatters/index.js.map +1 -0
  466. package/dist/src/presentation/formatters/output-formatter.d.ts +98 -0
  467. package/dist/src/presentation/formatters/output-formatter.d.ts.map +1 -0
  468. package/dist/src/presentation/formatters/output-formatter.js +165 -0
  469. package/dist/src/presentation/formatters/output-formatter.js.map +1 -0
  470. package/dist/src/presentation/formatters/progress-formatter.d.ts +121 -0
  471. package/dist/src/presentation/formatters/progress-formatter.d.ts.map +1 -0
  472. package/dist/src/presentation/formatters/progress-formatter.js +235 -0
  473. package/dist/src/presentation/formatters/progress-formatter.js.map +1 -0
  474. package/dist/src/presentation/interactive/confirmation.d.ts +24 -0
  475. package/dist/src/presentation/interactive/confirmation.d.ts.map +1 -0
  476. package/dist/src/presentation/interactive/confirmation.js +54 -0
  477. package/dist/src/presentation/interactive/confirmation.js.map +1 -0
  478. package/dist/src/presentation/interactive/index.d.ts +8 -0
  479. package/dist/src/presentation/interactive/index.d.ts.map +1 -0
  480. package/dist/src/presentation/interactive/index.js +11 -0
  481. package/dist/src/presentation/interactive/index.js.map +1 -0
  482. package/dist/src/presentation/interactive/prompts.d.ts +31 -0
  483. package/dist/src/presentation/interactive/prompts.d.ts.map +1 -0
  484. package/dist/src/presentation/interactive/prompts.js +71 -0
  485. package/dist/src/presentation/interactive/prompts.js.map +1 -0
  486. package/dist/src/presentation/interactive/selection.d.ts +31 -0
  487. package/dist/src/presentation/interactive/selection.d.ts.map +1 -0
  488. package/dist/src/presentation/interactive/selection.js +138 -0
  489. package/dist/src/presentation/interactive/selection.js.map +1 -0
  490. package/dist/src/shared/types/errors.d.ts +132 -0
  491. package/dist/src/shared/types/errors.d.ts.map +1 -0
  492. package/dist/src/shared/types/errors.js +61 -0
  493. package/dist/src/shared/types/errors.js.map +1 -0
  494. package/dist/src/shared/types/result.d.ts +53 -0
  495. package/dist/src/shared/types/result.d.ts.map +1 -0
  496. package/dist/src/shared/types/result.js +42 -0
  497. package/dist/src/shared/types/result.js.map +1 -0
  498. package/dist/test-confluence-auth.d.ts +6 -0
  499. package/dist/test-confluence-auth.d.ts.map +1 -0
  500. package/dist/test-confluence-auth.js +128 -0
  501. package/dist/test-confluence-auth.js.map +1 -0
  502. package/docs/MIGRATION.md +513 -0
  503. package/docs/architecture.md +774 -0
  504. package/docs/guides/comprehensive-verification-guide.md +1926 -0
  505. package/docs/onion-architecture-phase0-complete.md +91 -0
  506. package/package.json +6 -6
  507. package/scripts/README.md +148 -0
  508. package/scripts/__tests__/jira-transitions.test.ts +44 -30
  509. package/scripts/__tests__/mermaid-converter.test.ts +2 -2
  510. package/scripts/__tests__/multi-repo-validator.test.ts +62 -62
  511. package/scripts/__tests__/spec-archiver.test.ts +12 -0
  512. package/scripts/__tests__/validate-phase.test.ts +6 -6
  513. package/scripts/build/README.md +24 -0
  514. package/scripts/{copy-static-assets.js → build/copy-static-assets.js} +1 -1
  515. package/scripts/{set-permissions.js → build/set-permissions.js} +1 -1
  516. package/scripts/config/config-schema.ts +43 -302
  517. package/scripts/config-global.ts +3 -2
  518. package/scripts/confluence-sync.ts +17 -538
  519. package/scripts/constants/environments.ts +3 -53
  520. package/scripts/constants/languages.ts +3 -68
  521. package/scripts/constants/test-commands.ts +3 -94
  522. package/scripts/dev-tools/README.md +22 -0
  523. package/scripts/{test-interactive.ts → dev-tools/test-interactive.ts} +4 -3
  524. package/scripts/github-actions-client.ts +18 -256
  525. package/scripts/jira-sync.ts +5 -1270
  526. package/scripts/markdown-to-confluence.ts +5 -5
  527. package/scripts/multi-project-estimate.ts +3 -2
  528. package/scripts/phase-runner.ts +41 -19
  529. package/scripts/pre-flight-check.ts +27 -11
  530. package/scripts/template/__tests__/multi-repo-renderer.test.ts +12 -0
  531. package/scripts/template/multi-repo-renderer.ts +2 -2
  532. package/scripts/test-execution-generator.ts +5 -4
  533. package/scripts/utils/__tests__/config-validator.test.ts +19 -19
  534. package/scripts/utils/__tests__/feature-name-validator.test.ts +13 -13
  535. package/scripts/utils/__tests__/multi-repo-validator.test.ts +34 -34
  536. package/scripts/utils/__tests__/project-analyzer.test.ts +542 -0
  537. package/scripts/utils/__tests__/safe-file-reader.test.ts +208 -0
  538. package/scripts/utils/__tests__/security-validator.test.ts +33 -33
  539. package/scripts/utils/__tests__/validation-result.test.ts +112 -0
  540. package/scripts/utils/aidlc-parser.ts +18 -287
  541. package/scripts/utils/ci-generator.ts +4 -3
  542. package/scripts/utils/config-loader.ts +54 -50
  543. package/scripts/utils/config-validator.ts +89 -80
  544. package/scripts/utils/docker-requirement-detector.ts +5 -4
  545. package/scripts/utils/env-config.ts +59 -40
  546. package/scripts/utils/feature-name-validator.ts +25 -40
  547. package/scripts/utils/interactive-helpers.ts +24 -132
  548. package/scripts/utils/language-detector.ts +4 -3
  549. package/scripts/utils/markdown-parser.ts +18 -373
  550. package/scripts/utils/multi-repo-validator.ts +27 -28
  551. package/scripts/utils/project-analyzer.ts +429 -0
  552. package/scripts/utils/project-detector.ts +6 -5
  553. package/scripts/utils/project-finder.ts +2 -154
  554. package/scripts/utils/project-meta.ts +8 -91
  555. package/scripts/utils/safe-file-reader.ts +158 -0
  556. package/scripts/utils/security-validator.ts +42 -78
  557. package/scripts/utils/spec-archiver.ts +7 -6
  558. package/scripts/utils/spec-updater.ts +12 -6
  559. package/scripts/utils/tasks-converter.ts +2 -2
  560. package/scripts/utils/tasks-format-validator.ts +4 -4
  561. package/scripts/utils/template-applier.ts +4 -3
  562. package/scripts/utils/types/validation.ts +92 -0
  563. package/scripts/validate-phase.ts +51 -23
  564. package/scripts/workflow-orchestrator.ts +16 -251
  565. package/dist/scripts/mermaid-converter.d.ts.map +0 -1
  566. package/dist/scripts/mermaid-converter.js.map +0 -1
  567. package/dist/scripts/resource-dashboard.d.ts +0 -7
  568. package/dist/scripts/resource-dashboard.d.ts.map +0 -1
  569. package/dist/scripts/resource-dashboard.js +0 -157
  570. package/dist/scripts/resource-dashboard.js.map +0 -1
  571. package/dist/scripts/test-interactive.d.ts.map +0 -1
  572. package/dist/scripts/test-interactive.js.map +0 -1
  573. package/dist/scripts/test-new-features.d.ts +0 -5
  574. package/dist/scripts/test-new-features.d.ts.map +0 -1
  575. package/dist/scripts/test-new-features.js +0 -148
  576. package/dist/scripts/test-new-features.js.map +0 -1
  577. package/dist/scripts/test-spec-generator.d.ts +0 -29
  578. package/dist/scripts/test-spec-generator.d.ts.map +0 -1
  579. package/dist/scripts/test-spec-generator.js +0 -493
  580. package/dist/scripts/test-spec-generator.js.map +0 -1
  581. package/dist/scripts/utils/confluence-approval.d.ts +0 -46
  582. package/dist/scripts/utils/confluence-approval.d.ts.map +0 -1
  583. package/dist/scripts/utils/confluence-approval.js +0 -120
  584. package/dist/scripts/utils/confluence-approval.js.map +0 -1
  585. package/dist/scripts/utils/template-finder.d.ts +0 -37
  586. package/dist/scripts/utils/template-finder.d.ts.map +0 -1
  587. package/dist/scripts/utils/template-finder.js +0 -58
  588. package/dist/scripts/utils/template-finder.js.map +0 -1
  589. package/dist/src/commands/multi-repo-add-repo.d.ts.map +0 -1
  590. package/dist/src/commands/multi-repo-add-repo.js.map +0 -1
  591. package/dist/src/commands/multi-repo-ci-status.d.ts.map +0 -1
  592. package/dist/src/commands/multi-repo-ci-status.js.map +0 -1
  593. package/dist/src/commands/multi-repo-confluence-sync.d.ts.map +0 -1
  594. package/dist/src/commands/multi-repo-confluence-sync.js.map +0 -1
  595. package/dist/src/commands/multi-repo-init.d.ts.map +0 -1
  596. package/dist/src/commands/multi-repo-init.js.map +0 -1
  597. package/dist/src/commands/multi-repo-list.d.ts.map +0 -1
  598. package/dist/src/commands/multi-repo-list.js.map +0 -1
  599. package/dist/src/commands/multi-repo-test.d.ts.map +0 -1
  600. package/dist/src/commands/multi-repo-test.js.map +0 -1
  601. package/dist/src/commands/setup-existing.d.ts +0 -22
  602. package/dist/src/commands/setup-existing.d.ts.map +0 -1
  603. package/dist/src/commands/setup-existing.js +0 -606
  604. package/dist/src/commands/setup-existing.js.map +0 -1
  605. package/scripts/__tests__/setup-existing-project.test.ts +0 -244
  606. package/scripts/resource-dashboard.ts +0 -189
  607. package/scripts/test-new-features.ts +0 -171
  608. package/scripts/test-spec-generator.ts +0 -570
  609. package/scripts/utils/confluence-approval.ts +0 -169
  610. package/scripts/utils/template-finder.ts +0 -69
  611. /package/dist/scripts/{mermaid-converter.d.ts → dev-tools/mermaid-converter.d.ts} +0 -0
  612. /package/dist/scripts/{mermaid-converter.js → dev-tools/mermaid-converter.js} +0 -0
  613. /package/dist/scripts/{test-interactive.d.ts → dev-tools/test-interactive.d.ts} +0 -0
  614. /package/scripts/{mermaid-converter.ts → dev-tools/mermaid-converter.ts} +0 -0
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Confirmation - 確認機能
3
+ */
4
+ import * as readline from 'readline';
5
+ /**
6
+ * Yes/No質問
7
+ */
8
+ export declare function confirm(rl: readline.Interface, prompt: string, defaultValue?: boolean): Promise<boolean>;
9
+ /**
10
+ * 危険な操作の確認(二重確認)
11
+ */
12
+ export declare function confirmDangerous(rl: readline.Interface, prompt: string, confirmationText?: string): Promise<boolean>;
13
+ /**
14
+ * 複数の確認項目をチェック
15
+ */
16
+ export declare function confirmMultiple(rl: readline.Interface, items: Array<{
17
+ question: string;
18
+ defaultValue?: boolean;
19
+ }>): Promise<boolean[]>;
20
+ /**
21
+ * すべての項目に同意するまで繰り返す
22
+ */
23
+ export declare function confirmAll(rl: readline.Interface, items: string[], maxRetries?: number): Promise<boolean>;
24
+ //# sourceMappingURL=confirmation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../../../src/presentation/interactive/confirmation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,wBAAsB,OAAO,CAC3B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,OAAc,GAC3B,OAAO,CAAC,OAAO,CAAC,CASlB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,gBAAgB,GAAE,MAAc,GAC/B,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,KAAK,EAAE,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GACzD,OAAO,CAAC,OAAO,EAAE,CAAC,CASpB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,GAAE,MAAU,GACrB,OAAO,CAAC,OAAO,CAAC,CAkBlB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Confirmation - 確認機能
3
+ */
4
+ import { question } from './prompts.js';
5
+ /**
6
+ * Yes/No質問
7
+ */
8
+ export async function confirm(rl, prompt, defaultValue = true) {
9
+ const defaultText = defaultValue ? '[Y/n]' : '[y/N]';
10
+ const answer = await question(rl, `${prompt} ${defaultText}: `);
11
+ if (!answer) {
12
+ return defaultValue;
13
+ }
14
+ return answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes';
15
+ }
16
+ /**
17
+ * 危険な操作の確認(二重確認)
18
+ */
19
+ export async function confirmDangerous(rl, prompt, confirmationText = 'yes') {
20
+ console.log(`\n⚠️ 警告: ${prompt}`);
21
+ console.log(`この操作を実行するには "${confirmationText}" と入力してください。`);
22
+ const answer = await question(rl, '確認: ');
23
+ return answer === confirmationText;
24
+ }
25
+ /**
26
+ * 複数の確認項目をチェック
27
+ */
28
+ export async function confirmMultiple(rl, items) {
29
+ const results = [];
30
+ for (const item of items) {
31
+ const result = await confirm(rl, item.question, item.defaultValue ?? true);
32
+ results.push(result);
33
+ }
34
+ return results;
35
+ }
36
+ /**
37
+ * すべての項目に同意するまで繰り返す
38
+ */
39
+ export async function confirmAll(rl, items, maxRetries = 3) {
40
+ console.log('\n以下の項目を確認してください:');
41
+ items.forEach((item, index) => {
42
+ console.log(` ${index + 1}. ${item}`);
43
+ });
44
+ const answer = await question(rl, '\nすべての項目に同意しますか? [Y/n]: ');
45
+ if (!answer || answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
46
+ return true;
47
+ }
48
+ if (maxRetries > 0) {
49
+ console.log(`⚠️ 同意が必要です(残り試行回数: ${maxRetries})`);
50
+ return confirmAll(rl, items, maxRetries - 1);
51
+ }
52
+ return false;
53
+ }
54
+ //# sourceMappingURL=confirmation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmation.js","sourceRoot":"","sources":["../../../../src/presentation/interactive/confirmation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,EAAsB,EACtB,MAAc,EACd,eAAwB,IAAI;IAE5B,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IACrD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,GAAG,MAAM,IAAI,WAAW,IAAI,CAAC,CAAC;IAEhE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;AACxE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,EAAsB,EACtB,MAAc,EACd,mBAA2B,KAAK;IAEhC,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,C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AE,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Presentation Interactive
3
+ * すべての対話型UI機能をエクスポート
4
+ */
5
+ export { createInterface, question, password, numberInput, textInput, } from './prompts.js';
6
+ export { confirm, confirmDangerous, confirmMultiple, confirmAll, } from './confirmation.js';
7
+ export { select, multiSelect, searchableSelect, paginatedSelect, type Choice, } from './selection.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/interactive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,KAAK,MAAM,GACZ,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Presentation Interactive
3
+ * すべての対話型UI機能をエクスポート
4
+ */
5
+ // Prompts
6
+ export { createInterface, question, password, numberInput, textInput, } from './prompts.js';
7
+ // Confirmation
8
+ export { confirm, confirmDangerous, confirmMultiple, confirmAll, } from './confirmation.js';
9
+ // Selection
10
+ export { select, multiSelect, searchableSelect, paginatedSelect, } from './selection.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/presentation/interactive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU;AACV,OAAO,EACL,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,eAAe;AACf,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACZ,OAAO,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,eAAe,GAEhB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Prompts - 基本的な質問機能
3
+ */
4
+ import * as readline from 'readline';
5
+ /**
6
+ * readlineインターフェースを作成
7
+ */
8
+ export declare function createInterface(): readline.Interface;
9
+ /**
10
+ * 質問を表示して回答を取得
11
+ */
12
+ export declare function question(rl: readline.Interface, query: string): Promise<string>;
13
+ /**
14
+ * パスワードなど、非表示で入力を受け取る
15
+ * 注: Node.jsの標準機能ではパスワード入力を隠すことは難しいため、
16
+ * 実際のプロダクションでは inquirer や prompts などのライブラリを使用することを推奨
17
+ */
18
+ export declare function password(rl: readline.Interface, query: string): Promise<string>;
19
+ /**
20
+ * 数値入力を受け取る
21
+ */
22
+ export declare function numberInput(rl: readline.Interface, query: string, min?: number, max?: number, defaultValue?: number): Promise<number>;
23
+ /**
24
+ * テキスト入力を受け取る(バリデーション付き)
25
+ */
26
+ export declare function textInput(rl: readline.Interface, query: string, options?: {
27
+ defaultValue?: string;
28
+ validator?: (input: string) => boolean;
29
+ errorMessage?: string;
30
+ }): Promise<string>;
31
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/presentation/interactive/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,wBAAgB,eAAe,IAAI,QAAQ,CAAC,SAAS,CAKpD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAC5B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAIjB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GACA,OAAO,CAAC,MAAM,CAAC,CAajB"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Prompts - 基本的な質問機能
3
+ */
4
+ import * as readline from 'readline';
5
+ /**
6
+ * readlineインターフェースを作成
7
+ */
8
+ export function createInterface() {
9
+ return readline.createInterface({
10
+ input: process.stdin,
11
+ output: process.stdout,
12
+ });
13
+ }
14
+ /**
15
+ * 質問を表示して回答を取得
16
+ */
17
+ export function question(rl, query) {
18
+ return new Promise((resolve) => {
19
+ rl.question(query, (answer) => {
20
+ resolve(answer.trim());
21
+ });
22
+ });
23
+ }
24
+ /**
25
+ * パスワードなど、非表示で入力を受け取る
26
+ * 注: Node.jsの標準機能ではパスワード入力を隠すことは難しいため、
27
+ * 実際のプロダクションでは inquirer や prompts などのライブラリを使用することを推奨
28
+ */
29
+ export async function password(rl, query) {
30
+ // 基本的な実装として、通常の質問と同じ処理を行う
31
+ // TODO: より高度なパスワード入力機能が必要な場合は、外部ライブラリを検討
32
+ return question(rl, query);
33
+ }
34
+ /**
35
+ * 数値入力を受け取る
36
+ */
37
+ export async function numberInput(rl, query, min, max, defaultValue) {
38
+ const answer = await question(rl, query);
39
+ if (!answer && defaultValue !== undefined) {
40
+ return defaultValue;
41
+ }
42
+ const num = parseInt(answer, 10);
43
+ if (isNaN(num)) {
44
+ console.log('⚠️ 無効な数値です。もう一度入力してください。');
45
+ return numberInput(rl, query, min, max, defaultValue);
46
+ }
47
+ if (min !== undefined && num < min) {
48
+ console.log(`⚠️ ${min}以上の数値を入力してください。`);
49
+ return numberInput(rl, query, min, max, defaultValue);
50
+ }
51
+ if (max !== undefined && num > max) {
52
+ console.log(`⚠️ ${max}以下の数値を入力してください。`);
53
+ return numberInput(rl, query, min, max, defaultValue);
54
+ }
55
+ return num;
56
+ }
57
+ /**
58
+ * テキスト入力を受け取る(バリデーション付き)
59
+ */
60
+ export async function textInput(rl, query, options) {
61
+ const answer = await question(rl, query);
62
+ if (!answer && options?.defaultValue) {
63
+ return options.defaultValue;
64
+ }
65
+ if (options?.validator && !options.validator(answer)) {
66
+ console.log(`⚠️ ${options.errorMessage || '無効な入力です。もう一度入力してください。'}`);
67
+ return textInput(rl, query, options);
68
+ }
69
+ return answer;
70
+ }
71
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/presentation/interactive/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,QAAQ,CAAC,eAAe,CAAC;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAsB,EAAE,KAAa;IAC5D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B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AAG,iBAAiB,CAAC,CAAC;QACzC,OAAO,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,EAAsB,EACtB,KAAa,EACb,OAIC;IAED,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAEzC,IAAI,CAAC,MAAM,IAAI,OAAO,EAAE,YAAY,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,YAAY,CAAC;IAC9B,CAAC;IAED,IAAI,OAAO,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,CAAC,YAAY,IAAI,uBAAuB,EAAE,CAAC,CAAC;QACtE,OAAO,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Selection - 選択機能
3
+ */
4
+ import * as readline from 'readline';
5
+ /**
6
+ * 選択肢の型定義
7
+ */
8
+ export interface Choice {
9
+ value: string;
10
+ label: string;
11
+ description?: string;
12
+ }
13
+ /**
14
+ * 選択肢から選択
15
+ */
16
+ export declare function select(rl: readline.Interface, prompt: string, choices: Choice[], defaultValue?: string, maxRetries?: number): Promise<string>;
17
+ /**
18
+ * 複数選択
19
+ */
20
+ export declare function multiSelect(rl: readline.Interface, prompt: string, choices: Choice[], defaults?: string[]): Promise<string[]>;
21
+ /**
22
+ * 検索可能な選択
23
+ * 選択肢が多い場合に、フィルタリングしながら選択できる
24
+ */
25
+ export declare function searchableSelect(rl: readline.Interface, prompt: string, choices: Choice[], defaultValue?: string): Promise<string>;
26
+ /**
27
+ * ページネーション付き選択
28
+ * 選択肢が多い場合にページごとに表示
29
+ */
30
+ export declare function paginatedSelect(rl: readline.Interface, prompt: string, choices: Choice[], pageSize?: number, defaultValue?: string): Promise<string>;
31
+ //# sourceMappingURL=selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/interactive/selection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,MAAM,CAC1B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,GAAE,MAAU,GACrB,OAAO,CAAC,MAAM,CAAC,CA6CjB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,GAAE,MAAM,EAAO,GACtB,OAAO,CAAC,MAAM,EAAE,CAAC,CAyBnB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,GAAE,MAAW,EACrB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAoDjB"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Selection - 選択機能
3
+ */
4
+ import { question } from './prompts.js';
5
+ /**
6
+ * 選択肢から選択
7
+ */
8
+ export async function select(rl, prompt, choices, defaultValue, maxRetries = 3) {
9
+ if (choices.length === 0) {
10
+ throw new Error('select: choices must contain at least one option');
11
+ }
12
+ console.log(`\n${prompt}`);
13
+ choices.forEach((choice, index) => {
14
+ const defaultMark = defaultValue === choice.value ? ' (デフォルト)' : '';
15
+ const desc = choice.description ? ` - ${choice.description}` : '';
16
+ console.log(` ${index + 1}. ${choice.label}${desc}${defaultMark}`);
17
+ });
18
+ const answer = await question(rl, `\n選択してください [1-${choices.length}]: `);
19
+ if (!answer && defaultValue) {
20
+ return defaultValue;
21
+ }
22
+ const index = parseInt(answer, 10) - 1;
23
+ if (index >= 0 && index < choices.length) {
24
+ return choices[index].value;
25
+ }
26
+ if (defaultValue) {
27
+ return defaultValue;
28
+ }
29
+ // 無効な入力の場合は再試行(最大試行回数まで)
30
+ if (maxRetries > 0) {
31
+ console.log(`⚠️ 無効な選択です。もう一度入力してください(残り試行回数: ${maxRetries})。`);
32
+ return select(rl, prompt, choices, defaultValue, maxRetries - 1);
33
+ }
34
+ // 最大試行回数に達した場合はデフォルト値または最初の選択肢を返す
35
+ // 注: choices.length > 0 は関数冒頭で保証されている
36
+ const fallbackValue = defaultValue || choices[0].value;
37
+ console.log(`⚠️ 最大試行回数に達しました。デフォルト値を使用します: ${fallbackValue}`);
38
+ return fallbackValue;
39
+ }
40
+ /**
41
+ * 複数選択
42
+ */
43
+ export async function multiSelect(rl, prompt, choices, defaults = []) {
44
+ console.log(`\n${prompt}`);
45
+ choices.forEach((choice, index) => {
46
+ const checked = defaults.includes(choice.value) ? '[x]' : '[ ]';
47
+ console.log(` ${checked} ${index + 1}. ${choice.label}`);
48
+ });
49
+ const answer = await question(rl, '\n選択してください(カンマ区切り、例: 1,2,3): ');
50
+ if (!answer && defaults.length > 0) {
51
+ return defaults;
52
+ }
53
+ if (!answer) {
54
+ return [];
55
+ }
56
+ const indices = answer
57
+ .split(',')
58
+ .map((s) => parseInt(s.trim(), 10) - 1)
59
+ .filter((i) => i >= 0 && i < choices.length);
60
+ return indices.map((i) => choices[i].value);
61
+ }
62
+ /**
63
+ * 検索可能な選択
64
+ * 選択肢が多い場合に、フィルタリングしながら選択できる
65
+ */
66
+ export async function searchableSelect(rl, prompt, choices, defaultValue) {
67
+ if (choices.length === 0) {
68
+ throw new Error('searchableSelect: choices must contain at least one option');
69
+ }
70
+ // 選択肢が少ない場合は通常のselectを使用
71
+ if (choices.length <= 10) {
72
+ return select(rl, prompt, choices, defaultValue);
73
+ }
74
+ console.log(`\n${prompt}`);
75
+ console.log(`(${choices.length}個の選択肢があります。検索キーワードを入力してください)`);
76
+ const searchQuery = await question(rl, '検索: ');
77
+ if (!searchQuery) {
78
+ // 検索キーワードなしの場合は全て表示
79
+ return select(rl, prompt, choices, defaultValue);
80
+ }
81
+ const filteredChoices = choices.filter((choice) => choice.label.toLowerCase().includes(searchQuery.toLowerCase()) ||
82
+ choice.value.toLowerCase().includes(searchQuery.toLowerCase()) ||
83
+ (choice.description &&
84
+ choice.description.toLowerCase().includes(searchQuery.toLowerCase())));
85
+ if (filteredChoices.length === 0) {
86
+ console.log('⚠️ 該当する選択肢が見つかりませんでした。');
87
+ return searchableSelect(rl, prompt, choices, defaultValue);
88
+ }
89
+ console.log(`\n${filteredChoices.length}件の選択肢が見つかりました:`);
90
+ return select(rl, '', filteredChoices, defaultValue);
91
+ }
92
+ /**
93
+ * ページネーション付き選択
94
+ * 選択肢が多い場合にページごとに表示
95
+ */
96
+ export async function paginatedSelect(rl, prompt, choices, pageSize = 10, defaultValue) {
97
+ if (choices.length === 0) {
98
+ throw new Error('paginatedSelect: choices must contain at least one option');
99
+ }
100
+ // 選択肢が少ない場合は通常のselectを使用
101
+ if (choices.length <= pageSize) {
102
+ return select(rl, prompt, choices, defaultValue);
103
+ }
104
+ let currentPage = 0;
105
+ const totalPages = Math.ceil(choices.length / pageSize);
106
+ while (true) {
107
+ const startIndex = currentPage * pageSize;
108
+ const endIndex = Math.min(startIndex + pageSize, choices.length);
109
+ const pageChoices = choices.slice(startIndex, endIndex);
110
+ console.log(`\n${prompt}`);
111
+ console.log(`(ページ ${currentPage + 1}/${totalPages})`);
112
+ pageChoices.forEach((choice, index) => {
113
+ const actualIndex = startIndex + index;
114
+ const defaultMark = defaultValue === choice.value ? ' (デフォルト)' : '';
115
+ const desc = choice.description ? ` - ${choice.description}` : '';
116
+ console.log(` ${actualIndex + 1}. ${choice.label}${desc}${defaultMark}`);
117
+ });
118
+ console.log('\nコマンド: n=次ページ, p=前ページ, 数字=選択');
119
+ const answer = await question(rl, '選択: ');
120
+ if (answer.toLowerCase() === 'n' && currentPage < totalPages - 1) {
121
+ currentPage++;
122
+ continue;
123
+ }
124
+ if (answer.toLowerCase() === 'p' && currentPage > 0) {
125
+ currentPage--;
126
+ continue;
127
+ }
128
+ const index = parseInt(answer, 10) - 1;
129
+ if (index >= 0 && index < choices.length) {
130
+ return choices[index].value;
131
+ }
132
+ if (!answer && defaultValue) {
133
+ return defaultValue;
134
+ }
135
+ console.log('⚠️ 無効な選択です。もう一度入力してください。');
136
+ }
137
+ }
138
+ //# sourceMappingURL=selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.js","sourceRoot":"","sources":["../../../../src/presentation/interactive/selection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAWxC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,EAAsB,EACtB,MAAc,EACd,OAAiB,EACjB,YAAqB,EACrB,aAAqB,CAAC;IAEtB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC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C5B,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Error Type Hierarchy
3
+ *
4
+ * Domain-Driven Design error classification for Onion Architecture
5
+ */
6
+ /**
7
+ * Base Domain Error
8
+ */
9
+ export declare class DomainError extends Error {
10
+ constructor(message: string);
11
+ }
12
+ /**
13
+ * Validation Error (Domain Layer)
14
+ */
15
+ export declare class ValidationError extends DomainError {
16
+ field: string;
17
+ constraint: string;
18
+ constructor(field: string, constraint: string, message: string);
19
+ }
20
+ /**
21
+ * Base Application Error
22
+ */
23
+ export declare class ApplicationError extends Error {
24
+ constructor(message: string);
25
+ }
26
+ /**
27
+ * Resource Not Found Error (Application Layer)
28
+ */
29
+ export declare class ResourceNotFoundError extends ApplicationError {
30
+ resourceType: string;
31
+ resourceId: string;
32
+ constructor(resourceType: string, resourceId: string);
33
+ }
34
+ /**
35
+ * Base Infrastructure Error
36
+ */
37
+ export declare class InfrastructureError extends Error {
38
+ cause?: Error | undefined;
39
+ constructor(message: string, cause?: Error | undefined);
40
+ }
41
+ /**
42
+ * Repository Error Types (Application Layer Interface)
43
+ */
44
+ export type RepositoryError = {
45
+ type: 'NotFound';
46
+ featureName: string;
47
+ } | {
48
+ type: 'ReadError';
49
+ path: string;
50
+ cause: string;
51
+ } | {
52
+ type: 'WriteError';
53
+ path: string;
54
+ cause: string;
55
+ } | {
56
+ type: 'ParseError';
57
+ path: string;
58
+ cause: string;
59
+ };
60
+ /**
61
+ * File System Error Types (Infrastructure Layer)
62
+ */
63
+ export type FileSystemError = {
64
+ type: 'FileNotFound';
65
+ path: string;
66
+ } | {
67
+ type: 'PermissionDenied';
68
+ path: string;
69
+ } | {
70
+ type: 'ReadError';
71
+ path: string;
72
+ cause: Error;
73
+ };
74
+ /**
75
+ * Network Error Types (Infrastructure Layer)
76
+ */
77
+ export type NetworkError = {
78
+ type: 'Timeout';
79
+ url: string;
80
+ timeout: number;
81
+ } | {
82
+ type: 'ConnectionFailed';
83
+ url: string;
84
+ cause: string;
85
+ } | {
86
+ type: 'RequestFailed';
87
+ url: string;
88
+ status: number;
89
+ message: string;
90
+ };
91
+ /**
92
+ * Config Error Types (Infrastructure Layer)
93
+ */
94
+ export type ConfigError = {
95
+ type: 'FileNotFound';
96
+ path: string;
97
+ } | {
98
+ type: 'ParseError';
99
+ path: string;
100
+ cause: string;
101
+ } | {
102
+ type: 'ValidationError';
103
+ field: string;
104
+ message: string;
105
+ } | {
106
+ type: 'MissingRequired';
107
+ field: string;
108
+ };
109
+ /**
110
+ * Template Error Types (Application Layer)
111
+ */
112
+ export type TemplateError = {
113
+ type: 'TemplateNotFound';
114
+ path: string;
115
+ } | {
116
+ type: 'InvalidPlaceholder';
117
+ placeholder: string;
118
+ };
119
+ /**
120
+ * Use Case Error Types (Application Layer)
121
+ */
122
+ export type UseCaseError = {
123
+ type: 'InvalidInput';
124
+ message: string;
125
+ } | {
126
+ type: 'DuplicateFeatureName';
127
+ featureName: string;
128
+ } | {
129
+ type: 'RepositoryError';
130
+ cause: RepositoryError;
131
+ };
132
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAErC,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,MAAM;gBADlB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EACzB,OAAO,EAAE,MAAM;CAKlB;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,qBAAsB,S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AAI,EAAE,eAAe,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Error Type Hierarchy
3
+ *
4
+ * Domain-Driven Design error classification for Onion Architecture
5
+ */
6
+ /**
7
+ * Base Domain Error
8
+ */
9
+ export class DomainError extends Error {
10
+ constructor(message) {
11
+ super(message);
12
+ this.name = 'DomainError';
13
+ }
14
+ }
15
+ /**
16
+ * Validation Error (Domain Layer)
17
+ */
18
+ export class ValidationError extends DomainError {
19
+ field;
20
+ constraint;
21
+ constructor(field, constraint, message) {
22
+ super(message);
23
+ this.field = field;
24
+ this.constraint = constraint;
25
+ this.name = 'ValidationError';
26
+ }
27
+ }
28
+ /**
29
+ * Base Application Error
30
+ */
31
+ export class ApplicationError extends Error {
32
+ constructor(message) {
33
+ super(message);
34
+ this.name = 'ApplicationError';
35
+ }
36
+ }
37
+ /**
38
+ * Resource Not Found Error (Application Layer)
39
+ */
40
+ export class ResourceNotFoundError extends ApplicationError {
41
+ resourceType;
42
+ resourceId;
43
+ constructor(resourceType, resourceId) {
44
+ super(`${resourceType} not found: ${resourceId}`);
45
+ this.resourceType = resourceType;
46
+ this.resourceId = resourceId;
47
+ this.name = 'ResourceNotFoundError';
48
+ }
49
+ }
50
+ /**
51
+ * Base Infrastructure Error
52
+ */
53
+ export class InfrastructureError extends Error {
54
+ cause;
55
+ constructor(message, cause) {
56
+ super(message);
57
+ this.cause = cause;
58
+ this.name = 'InfrastructureError';
59
+ }
60
+ }
61
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/shared/types/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAErC;IACA;IAFT,YACS,KAAa,EACb,UAAkB,EACzB,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,UAAK,GAAL,KAAK,CAAQ;QACb,eAAU,GAAV,UAAU,CAAQ;QAIzB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,gBAAgB;IACtC;IAA6B;IAAhD,YAAmB,YAAoB,EAAS,UAAkB;QAChE,KAAK,CAAC,GAAG,YAAY,eAAe,UAAU,EAAE,CAAC,CAAC;QADjC,iBAAY,GAAZ,YAAY,CAAQ;QAAS,eAAU,GAAV,UAAU,CAAQ;QAEhE,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACR;IAApC,YAAY,OAAe,EAAS,KAAa;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,UAAK,GAAL,KAAK,CAAQ;QAE/C,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}