@shirokuma-library/shirokuma-docs 0.1.0-alpha.10
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.
Potentially problematic release.
This version of @shirokuma-library/shirokuma-docs might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.en.md +346 -0
- package/README.md +346 -0
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/bin/shirokuma-docs +2 -0
- package/dist/analyzers/details-test-analysis.d.ts +31 -0
- package/dist/analyzers/details-test-analysis.d.ts.map +1 -0
- package/dist/analyzers/details-test-analysis.js +174 -0
- package/dist/analyzers/details-test-analysis.js.map +1 -0
- package/dist/analyzers/feature-map-builder.d.ts +20 -0
- package/dist/analyzers/feature-map-builder.d.ts.map +1 -0
- package/dist/analyzers/feature-map-builder.js +154 -0
- package/dist/analyzers/feature-map-builder.js.map +1 -0
- package/dist/analyzers/feature-map-references.d.ts +34 -0
- package/dist/analyzers/feature-map-references.d.ts.map +1 -0
- package/dist/analyzers/feature-map-references.js +249 -0
- package/dist/analyzers/feature-map-references.js.map +1 -0
- package/dist/analyzers/reference-analyzer.d.ts +95 -0
- package/dist/analyzers/reference-analyzer.d.ts.map +1 -0
- package/dist/analyzers/reference-analyzer.js +372 -0
- package/dist/analyzers/reference-analyzer.js.map +1 -0
- package/dist/commands/adr.d.ts +26 -0
- package/dist/commands/adr.d.ts.map +1 -0
- package/dist/commands/adr.js +129 -0
- package/dist/commands/adr.js.map +1 -0
- package/dist/commands/api-tools.d.ts +83 -0
- package/dist/commands/api-tools.d.ts.map +1 -0
- package/dist/commands/api-tools.js +775 -0
- package/dist/commands/api-tools.js.map +1 -0
- package/dist/commands/coverage.d.ts +139 -0
- package/dist/commands/coverage.d.ts.map +1 -0
- package/dist/commands/coverage.js +481 -0
- package/dist/commands/coverage.js.map +1 -0
- package/dist/commands/deps.d.ts +24 -0
- package/dist/commands/deps.d.ts.map +1 -0
- package/dist/commands/deps.js +211 -0
- package/dist/commands/deps.js.map +1 -0
- package/dist/commands/details-context.d.ts +38 -0
- package/dist/commands/details-context.d.ts.map +1 -0
- package/dist/commands/details-context.js +195 -0
- package/dist/commands/details-context.js.map +1 -0
- package/dist/commands/details-types.d.ts +315 -0
- package/dist/commands/details-types.d.ts.map +1 -0
- package/dist/commands/details-types.js +7 -0
- package/dist/commands/details-types.js.map +1 -0
- package/dist/commands/details.d.ts +24 -0
- package/dist/commands/details.d.ts.map +1 -0
- package/dist/commands/details.js +299 -0
- package/dist/commands/details.js.map +1 -0
- package/dist/commands/discussion-templates.d.ts +26 -0
- package/dist/commands/discussion-templates.d.ts.map +1 -0
- package/dist/commands/discussion-templates.js +270 -0
- package/dist/commands/discussion-templates.js.map +1 -0
- package/dist/commands/discussions.d.ts +31 -0
- package/dist/commands/discussions.d.ts.map +1 -0
- package/dist/commands/discussions.js +744 -0
- package/dist/commands/discussions.js.map +1 -0
- package/dist/commands/feature-map-types.d.ts +294 -0
- package/dist/commands/feature-map-types.d.ts.map +1 -0
- package/dist/commands/feature-map-types.js +8 -0
- package/dist/commands/feature-map-types.js.map +1 -0
- package/dist/commands/feature-map.d.ts +30 -0
- package/dist/commands/feature-map.d.ts.map +1 -0
- package/dist/commands/feature-map.js +137 -0
- package/dist/commands/feature-map.js.map +1 -0
- package/dist/commands/generate.d.ts +16 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +88 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/gh-discussions.d.ts +31 -0
- package/dist/commands/gh-discussions.d.ts.map +1 -0
- package/dist/commands/gh-discussions.js +743 -0
- package/dist/commands/gh-discussions.js.map +1 -0
- package/dist/commands/gh-issues-pr.d.ts +74 -0
- package/dist/commands/gh-issues-pr.d.ts.map +1 -0
- package/dist/commands/gh-issues-pr.js +417 -0
- package/dist/commands/gh-issues-pr.js.map +1 -0
- package/dist/commands/gh-issues.d.ts +90 -0
- package/dist/commands/gh-issues.d.ts.map +1 -0
- package/dist/commands/gh-issues.js +1297 -0
- package/dist/commands/gh-issues.js.map +1 -0
- package/dist/commands/gh-projects.d.ts +54 -0
- package/dist/commands/gh-projects.d.ts.map +1 -0
- package/dist/commands/gh-projects.js +966 -0
- package/dist/commands/gh-projects.js.map +1 -0
- package/dist/commands/gh-repo.d.ts +18 -0
- package/dist/commands/gh-repo.d.ts.map +1 -0
- package/dist/commands/gh-repo.js +253 -0
- package/dist/commands/gh-repo.js.map +1 -0
- package/dist/commands/github-data.d.ts +67 -0
- package/dist/commands/github-data.d.ts.map +1 -0
- package/dist/commands/github-data.js +361 -0
- package/dist/commands/github-data.js.map +1 -0
- package/dist/commands/i18n.d.ts +102 -0
- package/dist/commands/i18n.d.ts.map +1 -0
- package/dist/commands/i18n.js +829 -0
- package/dist/commands/i18n.js.map +1 -0
- package/dist/commands/impact.d.ts +14 -0
- package/dist/commands/impact.d.ts.map +1 -0
- package/dist/commands/impact.js +263 -0
- package/dist/commands/impact.js.map +1 -0
- package/dist/commands/init.d.ts +53 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +468 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/issues-pr.d.ts +83 -0
- package/dist/commands/issues-pr.d.ts.map +1 -0
- package/dist/commands/issues-pr.js +572 -0
- package/dist/commands/issues-pr.js.map +1 -0
- package/dist/commands/issues.d.ts +78 -0
- package/dist/commands/issues.d.ts.map +1 -0
- package/dist/commands/issues.js +1541 -0
- package/dist/commands/issues.js.map +1 -0
- package/dist/commands/link-docs.d.ts +21 -0
- package/dist/commands/link-docs.d.ts.map +1 -0
- package/dist/commands/link-docs.js +990 -0
- package/dist/commands/link-docs.js.map +1 -0
- package/dist/commands/lint-annotations.d.ts +28 -0
- package/dist/commands/lint-annotations.d.ts.map +1 -0
- package/dist/commands/lint-annotations.js +511 -0
- package/dist/commands/lint-annotations.js.map +1 -0
- package/dist/commands/lint-code.d.ts +26 -0
- package/dist/commands/lint-code.d.ts.map +1 -0
- package/dist/commands/lint-code.js +428 -0
- package/dist/commands/lint-code.js.map +1 -0
- package/dist/commands/lint-coverage.d.ts +33 -0
- package/dist/commands/lint-coverage.d.ts.map +1 -0
- package/dist/commands/lint-coverage.js +379 -0
- package/dist/commands/lint-coverage.js.map +1 -0
- package/dist/commands/lint-docs.d.ts +23 -0
- package/dist/commands/lint-docs.d.ts.map +1 -0
- package/dist/commands/lint-docs.js +338 -0
- package/dist/commands/lint-docs.js.map +1 -0
- package/dist/commands/lint-structure.d.ts +38 -0
- package/dist/commands/lint-structure.d.ts.map +1 -0
- package/dist/commands/lint-structure.js +350 -0
- package/dist/commands/lint-structure.js.map +1 -0
- package/dist/commands/lint-tests.d.ts +25 -0
- package/dist/commands/lint-tests.d.ts.map +1 -0
- package/dist/commands/lint-tests.js +105 -0
- package/dist/commands/lint-tests.js.map +1 -0
- package/dist/commands/lint-workflow.d.ts +36 -0
- package/dist/commands/lint-workflow.d.ts.map +1 -0
- package/dist/commands/lint-workflow.js +255 -0
- package/dist/commands/lint-workflow.js.map +1 -0
- package/dist/commands/overview.d.ts +21 -0
- package/dist/commands/overview.d.ts.map +1 -0
- package/dist/commands/overview.js +1300 -0
- package/dist/commands/overview.js.map +1 -0
- package/dist/commands/packages.d.ts +107 -0
- package/dist/commands/packages.d.ts.map +1 -0
- package/dist/commands/packages.js +308 -0
- package/dist/commands/packages.js.map +1 -0
- package/dist/commands/portal-nextjs.d.ts +23 -0
- package/dist/commands/portal-nextjs.d.ts.map +1 -0
- package/dist/commands/portal-nextjs.js +336 -0
- package/dist/commands/portal-nextjs.js.map +1 -0
- package/dist/commands/portal.d.ts +24 -0
- package/dist/commands/portal.d.ts.map +1 -0
- package/dist/commands/portal.js +16 -0
- package/dist/commands/portal.js.map +1 -0
- package/dist/commands/projects.d.ts +54 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +1191 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/repo-pairs.d.ts +19 -0
- package/dist/commands/repo-pairs.d.ts.map +1 -0
- package/dist/commands/repo-pairs.js +529 -0
- package/dist/commands/repo-pairs.js.map +1 -0
- package/dist/commands/repo.d.ts +18 -0
- package/dist/commands/repo.d.ts.map +1 -0
- package/dist/commands/repo.js +253 -0
- package/dist/commands/repo.js.map +1 -0
- package/dist/commands/schema.d.ts +49 -0
- package/dist/commands/schema.d.ts.map +1 -0
- package/dist/commands/schema.js +830 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/screenshots.d.ts +203 -0
- package/dist/commands/screenshots.d.ts.map +1 -0
- package/dist/commands/screenshots.js +1234 -0
- package/dist/commands/screenshots.js.map +1 -0
- package/dist/commands/search-index.d.ts +83 -0
- package/dist/commands/search-index.d.ts.map +1 -0
- package/dist/commands/search-index.js +389 -0
- package/dist/commands/search-index.js.map +1 -0
- package/dist/commands/search.d.ts +24 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +254 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/session.d.ts +159 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +1274 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/test-cases-types.d.ts +154 -0
- package/dist/commands/test-cases-types.d.ts.map +1 -0
- package/dist/commands/test-cases-types.js +7 -0
- package/dist/commands/test-cases-types.js.map +1 -0
- package/dist/commands/test-cases.d.ts +28 -0
- package/dist/commands/test-cases.d.ts.map +1 -0
- package/dist/commands/test-cases.js +192 -0
- package/dist/commands/test-cases.js.map +1 -0
- package/dist/commands/typedoc.d.ts +21 -0
- package/dist/commands/typedoc.d.ts.map +1 -0
- package/dist/commands/typedoc.js +192 -0
- package/dist/commands/typedoc.js.map +1 -0
- package/dist/commands/update-skills.d.ts +56 -0
- package/dist/commands/update-skills.d.ts.map +1 -0
- package/dist/commands/update-skills.js +626 -0
- package/dist/commands/update-skills.js.map +1 -0
- package/dist/generators/details-entity-pages.d.ts +40 -0
- package/dist/generators/details-entity-pages.d.ts.map +1 -0
- package/dist/generators/details-entity-pages.js +301 -0
- package/dist/generators/details-entity-pages.js.map +1 -0
- package/dist/generators/details-html.d.ts +23 -0
- package/dist/generators/details-html.d.ts.map +1 -0
- package/dist/generators/details-html.js +324 -0
- package/dist/generators/details-html.js.map +1 -0
- package/dist/generators/details-module-page.d.ts +33 -0
- package/dist/generators/details-module-page.d.ts.map +1 -0
- package/dist/generators/details-module-page.js +408 -0
- package/dist/generators/details-module-page.js.map +1 -0
- package/dist/generators/details-styles.d.ts +39 -0
- package/dist/generators/details-styles.d.ts.map +1 -0
- package/dist/generators/details-styles.js +409 -0
- package/dist/generators/details-styles.js.map +1 -0
- package/dist/generators/feature-map-html.d.ts +66 -0
- package/dist/generators/feature-map-html.d.ts.map +1 -0
- package/dist/generators/feature-map-html.js +569 -0
- package/dist/generators/feature-map-html.js.map +1 -0
- package/dist/generators/feature-map-styles.d.ts +39 -0
- package/dist/generators/feature-map-styles.d.ts.map +1 -0
- package/dist/generators/feature-map-styles.js +449 -0
- package/dist/generators/feature-map-styles.js.map +1 -0
- package/dist/generators/test-cases-hierarchy.d.ts +21 -0
- package/dist/generators/test-cases-hierarchy.d.ts.map +1 -0
- package/dist/generators/test-cases-hierarchy.js +336 -0
- package/dist/generators/test-cases-hierarchy.js.map +1 -0
- package/dist/generators/test-cases-main.d.ts +20 -0
- package/dist/generators/test-cases-main.d.ts.map +1 -0
- package/dist/generators/test-cases-main.js +439 -0
- package/dist/generators/test-cases-main.js.map +1 -0
- package/dist/generators/test-cases-styles.d.ts +64 -0
- package/dist/generators/test-cases-styles.d.ts.map +1 -0
- package/dist/generators/test-cases-styles.js +1277 -0
- package/dist/generators/test-cases-styles.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +600 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/annotation-lint.d.ts +198 -0
- package/dist/lint/annotation-lint.d.ts.map +1 -0
- package/dist/lint/annotation-lint.js +510 -0
- package/dist/lint/annotation-lint.js.map +1 -0
- package/dist/lint/annotation-types.d.ts +161 -0
- package/dist/lint/annotation-types.d.ts.map +1 -0
- package/dist/lint/annotation-types.js +31 -0
- package/dist/lint/annotation-types.js.map +1 -0
- package/dist/lint/code-types.d.ts +135 -0
- package/dist/lint/code-types.d.ts.map +1 -0
- package/dist/lint/code-types.js +25 -0
- package/dist/lint/code-types.js.map +1 -0
- package/dist/lint/coverage-types.d.ts +128 -0
- package/dist/lint/coverage-types.d.ts.map +1 -0
- package/dist/lint/coverage-types.js +24 -0
- package/dist/lint/coverage-types.js.map +1 -0
- package/dist/lint/docs-types.d.ts +214 -0
- package/dist/lint/docs-types.d.ts.map +1 -0
- package/dist/lint/docs-types.js +18 -0
- package/dist/lint/docs-types.js.map +1 -0
- package/dist/lint/formatters/index.d.ts +14 -0
- package/dist/lint/formatters/index.d.ts.map +1 -0
- package/dist/lint/formatters/index.js +28 -0
- package/dist/lint/formatters/index.js.map +1 -0
- package/dist/lint/formatters/json.d.ts +11 -0
- package/dist/lint/formatters/json.d.ts.map +1 -0
- package/dist/lint/formatters/json.js +12 -0
- package/dist/lint/formatters/json.js.map +1 -0
- package/dist/lint/formatters/summary.d.ts +11 -0
- package/dist/lint/formatters/summary.d.ts.map +1 -0
- package/dist/lint/formatters/summary.js +37 -0
- package/dist/lint/formatters/summary.js.map +1 -0
- package/dist/lint/formatters/terminal.d.ts +11 -0
- package/dist/lint/formatters/terminal.d.ts.map +1 -0
- package/dist/lint/formatters/terminal.js +99 -0
- package/dist/lint/formatters/terminal.js.map +1 -0
- package/dist/lint/index.d.ts +18 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +103 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/lint/rules/annotation-required.d.ts +35 -0
- package/dist/lint/rules/annotation-required.d.ts.map +1 -0
- package/dist/lint/rules/annotation-required.js +127 -0
- package/dist/lint/rules/annotation-required.js.map +1 -0
- package/dist/lint/rules/code-rules.d.ts +12 -0
- package/dist/lint/rules/code-rules.d.ts.map +1 -0
- package/dist/lint/rules/code-rules.js +11 -0
- package/dist/lint/rules/code-rules.js.map +1 -0
- package/dist/lint/rules/describe-coverage.d.ts +8 -0
- package/dist/lint/rules/describe-coverage.d.ts.map +1 -0
- package/dist/lint/rules/describe-coverage.js +43 -0
- package/dist/lint/rules/describe-coverage.js.map +1 -0
- package/dist/lint/rules/duplicate-testdoc.d.ts +8 -0
- package/dist/lint/rules/duplicate-testdoc.d.ts.map +1 -0
- package/dist/lint/rules/duplicate-testdoc.js +38 -0
- package/dist/lint/rules/duplicate-testdoc.js.map +1 -0
- package/dist/lint/rules/index.d.ts +29 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/index.js +55 -0
- package/dist/lint/rules/index.js.map +1 -0
- package/dist/lint/rules/server-action-structure.d.ts +37 -0
- package/dist/lint/rules/server-action-structure.d.ts.map +1 -0
- package/dist/lint/rules/server-action-structure.js +152 -0
- package/dist/lint/rules/server-action-structure.js.map +1 -0
- package/dist/lint/rules/skipped-test-report.d.ts +11 -0
- package/dist/lint/rules/skipped-test-report.d.ts.map +1 -0
- package/dist/lint/rules/skipped-test-report.js +31 -0
- package/dist/lint/rules/skipped-test-report.js.map +1 -0
- package/dist/lint/rules/structure-rules.d.ts +67 -0
- package/dist/lint/rules/structure-rules.d.ts.map +1 -0
- package/dist/lint/rules/structure-rules.js +617 -0
- package/dist/lint/rules/structure-rules.js.map +1 -0
- package/dist/lint/rules/testdoc-japanese.d.ts +8 -0
- package/dist/lint/rules/testdoc-japanese.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-japanese.js +31 -0
- package/dist/lint/rules/testdoc-japanese.js.map +1 -0
- package/dist/lint/rules/testdoc-min-length.d.ts +8 -0
- package/dist/lint/rules/testdoc-min-length.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-min-length.js +31 -0
- package/dist/lint/rules/testdoc-min-length.js.map +1 -0
- package/dist/lint/rules/testdoc-required.d.ts +8 -0
- package/dist/lint/rules/testdoc-required.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-required.js +27 -0
- package/dist/lint/rules/testdoc-required.js.map +1 -0
- package/dist/lint/rules/workflow-branch-naming.d.ts +20 -0
- package/dist/lint/rules/workflow-branch-naming.d.ts.map +1 -0
- package/dist/lint/rules/workflow-branch-naming.js +85 -0
- package/dist/lint/rules/workflow-branch-naming.js.map +1 -0
- package/dist/lint/rules/workflow-commit-format.d.ts +27 -0
- package/dist/lint/rules/workflow-commit-format.d.ts.map +1 -0
- package/dist/lint/rules/workflow-commit-format.js +92 -0
- package/dist/lint/rules/workflow-commit-format.js.map +1 -0
- package/dist/lint/rules/workflow-issue-fields.d.ts +24 -0
- package/dist/lint/rules/workflow-issue-fields.d.ts.map +1 -0
- package/dist/lint/rules/workflow-issue-fields.js +89 -0
- package/dist/lint/rules/workflow-issue-fields.js.map +1 -0
- package/dist/lint/rules/workflow-main-protection.d.ts +32 -0
- package/dist/lint/rules/workflow-main-protection.d.ts.map +1 -0
- package/dist/lint/rules/workflow-main-protection.js +114 -0
- package/dist/lint/rules/workflow-main-protection.js.map +1 -0
- package/dist/lint/structure-types.d.ts +216 -0
- package/dist/lint/structure-types.d.ts.map +1 -0
- package/dist/lint/structure-types.js +96 -0
- package/dist/lint/structure-types.js.map +1 -0
- package/dist/lint/types.d.ts +154 -0
- package/dist/lint/types.d.ts.map +1 -0
- package/dist/lint/types.js +21 -0
- package/dist/lint/types.js.map +1 -0
- package/dist/lint/workflow-types.d.ts +90 -0
- package/dist/lint/workflow-types.d.ts.map +1 -0
- package/dist/lint/workflow-types.js +7 -0
- package/dist/lint/workflow-types.js.map +1 -0
- package/dist/md/analyzer/index.d.ts +46 -0
- package/dist/md/analyzer/index.d.ts.map +1 -0
- package/dist/md/analyzer/index.js +288 -0
- package/dist/md/analyzer/index.js.map +1 -0
- package/dist/md/builder/index.d.ts +91 -0
- package/dist/md/builder/index.d.ts.map +1 -0
- package/dist/md/builder/index.js +446 -0
- package/dist/md/builder/index.js.map +1 -0
- package/dist/md/cli/analyze.d.ts +11 -0
- package/dist/md/cli/analyze.d.ts.map +1 -0
- package/dist/md/cli/analyze.js +118 -0
- package/dist/md/cli/analyze.js.map +1 -0
- package/dist/md/cli/build.d.ts +11 -0
- package/dist/md/cli/build.d.ts.map +1 -0
- package/dist/md/cli/build.js +74 -0
- package/dist/md/cli/build.js.map +1 -0
- package/dist/md/cli/extract.d.ts +25 -0
- package/dist/md/cli/extract.d.ts.map +1 -0
- package/dist/md/cli/extract.js +230 -0
- package/dist/md/cli/extract.js.map +1 -0
- package/dist/md/cli/index.d.ts +3 -0
- package/dist/md/cli/index.d.ts.map +1 -0
- package/dist/md/cli/index.js +99 -0
- package/dist/md/cli/index.js.map +1 -0
- package/dist/md/cli/lint.d.ts +11 -0
- package/dist/md/cli/lint.d.ts.map +1 -0
- package/dist/md/cli/lint.js +165 -0
- package/dist/md/cli/lint.js.map +1 -0
- package/dist/md/cli/list.d.ts +16 -0
- package/dist/md/cli/list.d.ts.map +1 -0
- package/dist/md/cli/list.js +85 -0
- package/dist/md/cli/list.js.map +1 -0
- package/dist/md/cli/program.d.ts +11 -0
- package/dist/md/cli/program.d.ts.map +1 -0
- package/dist/md/cli/program.js +104 -0
- package/dist/md/cli/program.js.map +1 -0
- package/dist/md/cli/validate.d.ts +8 -0
- package/dist/md/cli/validate.d.ts.map +1 -0
- package/dist/md/cli/validate.js +82 -0
- package/dist/md/cli/validate.js.map +1 -0
- package/dist/md/constants.d.ts +69 -0
- package/dist/md/constants.d.ts.map +1 -0
- package/dist/md/constants.js +69 -0
- package/dist/md/constants.js.map +1 -0
- package/dist/md/extractor/index.d.ts +57 -0
- package/dist/md/extractor/index.d.ts.map +1 -0
- package/dist/md/extractor/index.js +365 -0
- package/dist/md/extractor/index.js.map +1 -0
- package/dist/md/index.d.ts +26 -0
- package/dist/md/index.d.ts.map +1 -0
- package/dist/md/index.js +30 -0
- package/dist/md/index.js.map +1 -0
- package/dist/md/linter/index.d.ts +20 -0
- package/dist/md/linter/index.d.ts.map +1 -0
- package/dist/md/linter/index.js +421 -0
- package/dist/md/linter/index.js.map +1 -0
- package/dist/md/linter/token-optimizer.d.ts +66 -0
- package/dist/md/linter/token-optimizer.d.ts.map +1 -0
- package/dist/md/linter/token-optimizer.js +292 -0
- package/dist/md/linter/token-optimizer.js.map +1 -0
- package/dist/md/lister/index.d.ts +42 -0
- package/dist/md/lister/index.d.ts.map +1 -0
- package/dist/md/lister/index.js +317 -0
- package/dist/md/lister/index.js.map +1 -0
- package/dist/md/parser/heading-numbers.d.ts +43 -0
- package/dist/md/parser/heading-numbers.d.ts.map +1 -0
- package/dist/md/parser/heading-numbers.js +97 -0
- package/dist/md/parser/heading-numbers.js.map +1 -0
- package/dist/md/parser/section-meta.d.ts +50 -0
- package/dist/md/parser/section-meta.d.ts.map +1 -0
- package/dist/md/parser/section-meta.js +212 -0
- package/dist/md/parser/section-meta.js.map +1 -0
- package/dist/md/parser/template.d.ts +56 -0
- package/dist/md/parser/template.d.ts.map +1 -0
- package/dist/md/parser/template.js +122 -0
- package/dist/md/parser/template.js.map +1 -0
- package/dist/md/plugins/loader.d.ts +15 -0
- package/dist/md/plugins/loader.d.ts.map +1 -0
- package/dist/md/plugins/loader.js +80 -0
- package/dist/md/plugins/loader.js.map +1 -0
- package/dist/md/plugins/normalize-headings.d.ts +43 -0
- package/dist/md/plugins/normalize-headings.d.ts.map +1 -0
- package/dist/md/plugins/normalize-headings.js +51 -0
- package/dist/md/plugins/normalize-headings.js.map +1 -0
- package/dist/md/plugins/normalize-whitespace.d.ts +46 -0
- package/dist/md/plugins/normalize-whitespace.d.ts.map +1 -0
- package/dist/md/plugins/normalize-whitespace.js +86 -0
- package/dist/md/plugins/normalize-whitespace.js.map +1 -0
- package/dist/md/plugins/remove-badges.d.ts +36 -0
- package/dist/md/plugins/remove-badges.d.ts.map +1 -0
- package/dist/md/plugins/remove-badges.js +59 -0
- package/dist/md/plugins/remove-badges.js.map +1 -0
- package/dist/md/plugins/remove-comments.d.ts +27 -0
- package/dist/md/plugins/remove-comments.d.ts.map +1 -0
- package/dist/md/plugins/remove-comments.js +40 -0
- package/dist/md/plugins/remove-comments.js.map +1 -0
- package/dist/md/plugins/remove-duplicates.d.ts +40 -0
- package/dist/md/plugins/remove-duplicates.d.ts.map +1 -0
- package/dist/md/plugins/remove-duplicates.js +72 -0
- package/dist/md/plugins/remove-duplicates.js.map +1 -0
- package/dist/md/plugins/remove-internal-links.d.ts +38 -0
- package/dist/md/plugins/remove-internal-links.d.ts.map +1 -0
- package/dist/md/plugins/remove-internal-links.js +66 -0
- package/dist/md/plugins/remove-internal-links.js.map +1 -0
- package/dist/md/plugins/strip-heading-numbers.d.ts +35 -0
- package/dist/md/plugins/strip-heading-numbers.d.ts.map +1 -0
- package/dist/md/plugins/strip-heading-numbers.js +59 -0
- package/dist/md/plugins/strip-heading-numbers.js.map +1 -0
- package/dist/md/plugins/strip-section-meta.d.ts +37 -0
- package/dist/md/plugins/strip-section-meta.d.ts.map +1 -0
- package/dist/md/plugins/strip-section-meta.js +62 -0
- package/dist/md/plugins/strip-section-meta.js.map +1 -0
- package/dist/md/types/config.d.ts +260 -0
- package/dist/md/types/config.d.ts.map +1 -0
- package/dist/md/types/config.js +156 -0
- package/dist/md/types/config.js.map +1 -0
- package/dist/md/types/document.d.ts +37 -0
- package/dist/md/types/document.d.ts.map +1 -0
- package/dist/md/types/document.js +2 -0
- package/dist/md/types/document.js.map +1 -0
- package/dist/md/types/validation.d.ts +107 -0
- package/dist/md/types/validation.d.ts.map +1 -0
- package/dist/md/types/validation.js +2 -0
- package/dist/md/types/validation.js.map +1 -0
- package/dist/md/utils/code-blocks.d.ts +136 -0
- package/dist/md/utils/code-blocks.d.ts.map +1 -0
- package/dist/md/utils/code-blocks.js +178 -0
- package/dist/md/utils/code-blocks.js.map +1 -0
- package/dist/md/utils/config.d.ts +10 -0
- package/dist/md/utils/config.d.ts.map +1 -0
- package/dist/md/utils/config.js +99 -0
- package/dist/md/utils/config.js.map +1 -0
- package/dist/md/utils/file-collector.d.ts +78 -0
- package/dist/md/utils/file-collector.d.ts.map +1 -0
- package/dist/md/utils/file-collector.js +100 -0
- package/dist/md/utils/file-collector.js.map +1 -0
- package/dist/md/utils/markdown.d.ts +18 -0
- package/dist/md/utils/markdown.d.ts.map +1 -0
- package/dist/md/utils/markdown.js +93 -0
- package/dist/md/utils/markdown.js.map +1 -0
- package/dist/md/utils/remark.d.ts +91 -0
- package/dist/md/utils/remark.d.ts.map +1 -0
- package/dist/md/utils/remark.js +125 -0
- package/dist/md/utils/remark.js.map +1 -0
- package/dist/md/utils/tokens.d.ts +9 -0
- package/dist/md/utils/tokens.d.ts.map +1 -0
- package/dist/md/utils/tokens.js +31 -0
- package/dist/md/utils/tokens.js.map +1 -0
- package/dist/md/validator/index.d.ts +40 -0
- package/dist/md/validator/index.d.ts.map +1 -0
- package/dist/md/validator/index.js +299 -0
- package/dist/md/validator/index.js.map +1 -0
- package/dist/parsers/details-jsdoc.d.ts +42 -0
- package/dist/parsers/details-jsdoc.d.ts.map +1 -0
- package/dist/parsers/details-jsdoc.js +256 -0
- package/dist/parsers/details-jsdoc.js.map +1 -0
- package/dist/parsers/details-zod.d.ts +22 -0
- package/dist/parsers/details-zod.d.ts.map +1 -0
- package/dist/parsers/details-zod.js +146 -0
- package/dist/parsers/details-zod.js.map +1 -0
- package/dist/parsers/drizzle-schema.d.ts +92 -0
- package/dist/parsers/drizzle-schema.d.ts.map +1 -0
- package/dist/parsers/drizzle-schema.js +376 -0
- package/dist/parsers/drizzle-schema.js.map +1 -0
- package/dist/parsers/feature-map-tags.d.ts +45 -0
- package/dist/parsers/feature-map-tags.d.ts.map +1 -0
- package/dist/parsers/feature-map-tags.js +292 -0
- package/dist/parsers/feature-map-tags.js.map +1 -0
- package/dist/parsers/feature-map-type-extraction.d.ts +62 -0
- package/dist/parsers/feature-map-type-extraction.d.ts.map +1 -0
- package/dist/parsers/feature-map-type-extraction.js +347 -0
- package/dist/parsers/feature-map-type-extraction.js.map +1 -0
- package/dist/parsers/feature-map-utils.d.ts +34 -0
- package/dist/parsers/feature-map-utils.d.ts.map +1 -0
- package/dist/parsers/feature-map-utils.js +101 -0
- package/dist/parsers/feature-map-utils.js.map +1 -0
- package/dist/parsers/jsdoc-common.d.ts +209 -0
- package/dist/parsers/jsdoc-common.d.ts.map +1 -0
- package/dist/parsers/jsdoc-common.js +650 -0
- package/dist/parsers/jsdoc-common.js.map +1 -0
- package/dist/parsers/jsdoc.d.ts +76 -0
- package/dist/parsers/jsdoc.d.ts.map +1 -0
- package/dist/parsers/jsdoc.js +238 -0
- package/dist/parsers/jsdoc.js.map +1 -0
- package/dist/parsers/screenshot-annotations.d.ts +96 -0
- package/dist/parsers/screenshot-annotations.d.ts.map +1 -0
- package/dist/parsers/screenshot-annotations.js +227 -0
- package/dist/parsers/screenshot-annotations.js.map +1 -0
- package/dist/parsers/test-annotations.d.ts +46 -0
- package/dist/parsers/test-annotations.d.ts.map +1 -0
- package/dist/parsers/test-annotations.js +393 -0
- package/dist/parsers/test-annotations.js.map +1 -0
- package/dist/parsers/test-categorization.d.ts +42 -0
- package/dist/parsers/test-categorization.d.ts.map +1 -0
- package/dist/parsers/test-categorization.js +182 -0
- package/dist/parsers/test-categorization.js.map +1 -0
- package/dist/parsers/zod-schema.d.ts +105 -0
- package/dist/parsers/zod-schema.d.ts.map +1 -0
- package/dist/parsers/zod-schema.js +271 -0
- package/dist/parsers/zod-schema.js.map +1 -0
- package/dist/utils/action-inference.d.ts +23 -0
- package/dist/utils/action-inference.d.ts.map +1 -0
- package/dist/utils/action-inference.js +36 -0
- package/dist/utils/action-inference.js.map +1 -0
- package/dist/utils/app-inference.d.ts +31 -0
- package/dist/utils/app-inference.d.ts.map +1 -0
- package/dist/utils/app-inference.js +41 -0
- package/dist/utils/app-inference.js.map +1 -0
- package/dist/utils/auto-infer.d.ts +93 -0
- package/dist/utils/auto-infer.d.ts.map +1 -0
- package/dist/utils/auto-infer.js +184 -0
- package/dist/utils/auto-infer.js.map +1 -0
- package/dist/utils/config.d.ts +709 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +504 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/file.d.ts +46 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +103 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/formatters.d.ts +123 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +199 -0
- package/dist/utils/formatters.js.map +1 -0
- package/dist/utils/gh-config.d.ts +99 -0
- package/dist/utils/gh-config.d.ts.map +1 -0
- package/dist/utils/gh-config.js +247 -0
- package/dist/utils/gh-config.js.map +1 -0
- package/dist/utils/github.d.ts +108 -0
- package/dist/utils/github.d.ts.map +1 -0
- package/dist/utils/github.js +320 -0
- package/dist/utils/github.js.map +1 -0
- package/dist/utils/html.d.ts +107 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +376 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/i18n.d.ts +40 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +148 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/logger.d.ts +20 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +49 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/project-fields.d.ts +71 -0
- package/dist/utils/project-fields.d.ts.map +1 -0
- package/dist/utils/project-fields.js +318 -0
- package/dist/utils/project-fields.js.map +1 -0
- package/dist/utils/repo-pairs.d.ts +94 -0
- package/dist/utils/repo-pairs.d.ts.map +1 -0
- package/dist/utils/repo-pairs.js +196 -0
- package/dist/utils/repo-pairs.js.map +1 -0
- package/dist/utils/route-inference.d.ts +81 -0
- package/dist/utils/route-inference.d.ts.map +1 -0
- package/dist/utils/route-inference.js +137 -0
- package/dist/utils/route-inference.js.map +1 -0
- package/dist/utils/sanitize.d.ts +27 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +38 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/setup-check.d.ts +48 -0
- package/dist/utils/setup-check.d.ts.map +1 -0
- package/dist/utils/setup-check.js +226 -0
- package/dist/utils/setup-check.js.map +1 -0
- package/dist/utils/shirokumaignore.d.ts +55 -0
- package/dist/utils/shirokumaignore.d.ts.map +1 -0
- package/dist/utils/shirokumaignore.js +94 -0
- package/dist/utils/shirokumaignore.js.map +1 -0
- package/dist/utils/skills-repo.d.ts +353 -0
- package/dist/utils/skills-repo.d.ts.map +1 -0
- package/dist/utils/skills-repo.js +793 -0
- package/dist/utils/skills-repo.js.map +1 -0
- package/dist/utils/status-workflow.d.ts +54 -0
- package/dist/utils/status-workflow.d.ts.map +1 -0
- package/dist/utils/status-workflow.js +103 -0
- package/dist/utils/status-workflow.js.map +1 -0
- package/dist/validators/frontmatter.d.ts +41 -0
- package/dist/validators/frontmatter.d.ts.map +1 -0
- package/dist/validators/frontmatter.js +117 -0
- package/dist/validators/frontmatter.js.map +1 -0
- package/dist/validators/link-checker.d.ts +48 -0
- package/dist/validators/link-checker.d.ts.map +1 -0
- package/dist/validators/link-checker.js +108 -0
- package/dist/validators/link-checker.js.map +1 -0
- package/dist/validators/markdown-structure.d.ts +50 -0
- package/dist/validators/markdown-structure.d.ts.map +1 -0
- package/dist/validators/markdown-structure.js +253 -0
- package/dist/validators/markdown-structure.js.map +1 -0
- package/i18n/cli/en.json +164 -0
- package/i18n/cli/ja.json +164 -0
- package/i18n/discussion/en.json +191 -0
- package/i18n/discussion/ja.json +191 -0
- package/package.json +113 -0
- package/portal/app/api-tools/api-tools-client.tsx +411 -0
- package/portal/app/api-tools/api-tools-document.tsx +240 -0
- package/portal/app/api-tools/page.tsx +56 -0
- package/portal/app/api-tools/swagger-view.tsx +114 -0
- package/portal/app/apps/[appId]/[type]/[module]/[item]/item-tabs-client.tsx +71 -0
- package/portal/app/apps/[appId]/[type]/[module]/[item]/page.tsx +1422 -0
- package/portal/app/apps/[appId]/[type]/[module]/page.tsx +373 -0
- package/portal/app/apps/[appId]/feature-map/feature-map-app-document.tsx +298 -0
- package/portal/app/apps/[appId]/feature-map/page.tsx +224 -0
- package/portal/app/apps/[appId]/i18n/page.tsx +139 -0
- package/portal/app/apps/[appId]/test-cases/page.tsx +840 -0
- package/portal/app/apps/[appId]/tools/[tool]/page.tsx +351 -0
- package/portal/app/apps/[appId]/tools/api-tools-client.tsx +429 -0
- package/portal/app/apps/[appId]/tools/page.tsx +119 -0
- package/portal/app/db-schema/[db]/[table]/page.tsx +235 -0
- package/portal/app/db-schema/[db]/diagram/page.tsx +81 -0
- package/portal/app/db-schema/[db]/page.tsx +148 -0
- package/portal/app/db-schema/db-schema-document.tsx +100 -0
- package/portal/app/db-schema/diagram/client.tsx +211 -0
- package/portal/app/db-schema/diagram/page.tsx +20 -0
- package/portal/app/db-schema/page.tsx +145 -0
- package/portal/app/db-schema/table-detail-document.tsx +710 -0
- package/portal/app/db-schema/table-detail.tsx +747 -0
- package/portal/app/db-schema/table-list-document.tsx +224 -0
- package/portal/app/db-schema/table-list.tsx +247 -0
- package/portal/app/details/[type]/[module]/[item]/item-tabs-client.tsx +71 -0
- package/portal/app/details/[type]/[module]/[item]/page.tsx +1286 -0
- package/portal/app/details/[type]/[module]/page.tsx +884 -0
- package/portal/app/feature-map/feature-map-client.tsx +681 -0
- package/portal/app/feature-map/feature-map-document.tsx +313 -0
- package/portal/app/feature-map/page.tsx +438 -0
- package/portal/app/globals.css +205 -0
- package/portal/app/i18n/[...namespace]/page.tsx +190 -0
- package/portal/app/i18n/i18n-client.tsx +369 -0
- package/portal/app/i18n/page.tsx +339 -0
- package/portal/app/layout.tsx +37 -0
- package/portal/app/overview/page.tsx +65 -0
- package/portal/app/packages/[packageId]/page.tsx +201 -0
- package/portal/app/packages/page.tsx +148 -0
- package/portal/app/page.tsx +568 -0
- package/portal/app/test-cases/[file]/[line]/page.tsx +455 -0
- package/portal/app/test-cases/[file]/[line]/test-detail-document.tsx +335 -0
- package/portal/app/test-cases/[file]/page.tsx +323 -0
- package/portal/app/test-cases/[file]/test-file-document.tsx +335 -0
- package/portal/app/test-cases/page.tsx +546 -0
- package/portal/app/test-cases/test-cases-document.tsx +384 -0
- package/portal/components/code-block.tsx +57 -0
- package/portal/components/document/doc-params-table.tsx +71 -0
- package/portal/components/document/doc-section.tsx +133 -0
- package/portal/components/document/doc-table.tsx +119 -0
- package/portal/components/document/index.ts +9 -0
- package/portal/components/drawflow-er-diagram.tsx +607 -0
- package/portal/components/interactive-er-diagram.tsx +228 -0
- package/portal/components/layout/app-sidebar.tsx +490 -0
- package/portal/components/layout/er-sidebar.tsx +116 -0
- package/portal/components/layout/global-header.tsx +117 -0
- package/portal/components/layout/layout-content.tsx +48 -0
- package/portal/components/markdown-content.tsx +120 -0
- package/portal/components/mermaid-diagram.tsx +83 -0
- package/portal/components/reactflow-er-diagram.tsx +475 -0
- package/portal/components/search-dialog.tsx +268 -0
- package/portal/components/shared/coverage-score-bar.tsx +144 -0
- package/portal/components/swagger/endpoint-accordion.tsx +117 -0
- package/portal/components/swagger/index.ts +7 -0
- package/portal/components/swagger/method-badge.tsx +55 -0
- package/portal/components/swagger/params-table.tsx +78 -0
- package/portal/components/tabs-with-hash.tsx +43 -0
- package/portal/components/test/index.ts +2 -0
- package/portal/components/test/test-bdd-card.tsx +192 -0
- package/portal/components/test/test-matrix.tsx +242 -0
- package/portal/components/ui/accordion.tsx +66 -0
- package/portal/components/ui/badge.tsx +46 -0
- package/portal/components/ui/breadcrumb.tsx +109 -0
- package/portal/components/ui/button.tsx +62 -0
- package/portal/components/ui/card.tsx +92 -0
- package/portal/components/ui/collapsible.tsx +33 -0
- package/portal/components/ui/dialog.tsx +118 -0
- package/portal/components/ui/progress.tsx +28 -0
- package/portal/components/ui/scroll-area.tsx +58 -0
- package/portal/components/ui/sheet.tsx +139 -0
- package/portal/components/ui/table.tsx +116 -0
- package/portal/components/ui/tabs.tsx +66 -0
- package/portal/components.json +21 -0
- package/portal/lib/constants/test-categories.ts +186 -0
- package/portal/lib/data-loader.ts +1181 -0
- package/portal/lib/db-schema-utils.ts +182 -0
- package/portal/lib/format.ts +43 -0
- package/portal/lib/hooks/use-hash-tab.ts +144 -0
- package/portal/lib/path-utils.ts +25 -0
- package/portal/lib/search-index-generator.ts +214 -0
- package/portal/lib/search.ts +126 -0
- package/portal/lib/sidebar-context.tsx +111 -0
- package/portal/lib/types.ts +740 -0
- package/portal/lib/utils.ts +6 -0
- package/portal/next.config.ts +18 -0
- package/portal/package.json +45 -0
- package/portal/postcss.config.mjs +8 -0
- package/portal/tsconfig.json +42 -0
- package/portal/types/drawflow.d.ts +80 -0
- package/templates/README.md +73 -0
- package/templates/coverage.html +367 -0
- package/templates/dark-theme.css +443 -0
- package/templates/discussion/adr.yml.hbs +65 -0
- package/templates/discussion/handovers.yml.hbs +57 -0
- package/templates/discussion/knowledge.yml.hbs +60 -0
- package/templates/discussion/reports.yml.hbs +68 -0
- package/templates/discussion/research.yml.hbs +61 -0
|
@@ -0,0 +1,990 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* link-docs コマンド - API-テスト関連付け機能
|
|
3
|
+
*
|
|
4
|
+
* lint-coverage のデータを活用し、実装ファイルとテストファイルを
|
|
5
|
+
* 双方向にリンクする統合ビューを生成する
|
|
6
|
+
*/
|
|
7
|
+
import { resolve, relative, basename, dirname, join } from "node:path";
|
|
8
|
+
import { globSync } from "glob";
|
|
9
|
+
import { loadConfig, getOutputPath } from "../utils/config.js";
|
|
10
|
+
import { ensureDir, writeFile, readFile } from "../utils/file.js";
|
|
11
|
+
import { createLogger } from "../utils/logger.js";
|
|
12
|
+
import { wrapHtmlDocument, escapeHtml, icons } from "../utils/html.js";
|
|
13
|
+
import { defaultConventions, defaultExcludes, } from "../lint/coverage-types.js";
|
|
14
|
+
import { extractTestCases, collectJestFiles, collectPlaywrightFiles, } from "./test-cases.js";
|
|
15
|
+
/**
|
|
16
|
+
* link-docs コマンドハンドラ
|
|
17
|
+
*/
|
|
18
|
+
export async function linkDocsCommand(options) {
|
|
19
|
+
const logger = createLogger(options.verbose);
|
|
20
|
+
const projectPath = resolve(options.project);
|
|
21
|
+
logger.info("API-テスト関連付けドキュメントを生成中");
|
|
22
|
+
// 設定読み込み
|
|
23
|
+
const config = loadConfig(projectPath, options.config);
|
|
24
|
+
const coverageConfig = config.lintCoverage || {};
|
|
25
|
+
const testConfig = config.testCases;
|
|
26
|
+
// 規約マッピングを取得
|
|
27
|
+
const conventions = coverageConfig.conventions || defaultConventions;
|
|
28
|
+
const excludes = coverageConfig.exclude || defaultExcludes;
|
|
29
|
+
logger.info(`規約数: ${conventions.length}`);
|
|
30
|
+
// ソースファイルを収集
|
|
31
|
+
const sourceFiles = collectSourceFiles(projectPath, conventions, excludes);
|
|
32
|
+
logger.info(`ソースファイル数: ${sourceFiles.length}`);
|
|
33
|
+
// テストファイルとテストケースを収集
|
|
34
|
+
const jestFiles = await collectJestFiles(projectPath, testConfig?.jest);
|
|
35
|
+
const playwrightFiles = await collectPlaywrightFiles(projectPath, testConfig?.playwright);
|
|
36
|
+
logger.info(`Jest テストファイル数: ${jestFiles.length}`);
|
|
37
|
+
logger.info(`Playwright テストファイル数: ${playwrightFiles.length}`);
|
|
38
|
+
// テストケースを抽出
|
|
39
|
+
const allTestCases = [];
|
|
40
|
+
const testFileToTestCases = new Map();
|
|
41
|
+
for (const file of jestFiles) {
|
|
42
|
+
const content = readFile(file);
|
|
43
|
+
if (!content)
|
|
44
|
+
continue;
|
|
45
|
+
const relativePath = relative(projectPath, file);
|
|
46
|
+
const cases = extractTestCases(content, relativePath, "jest");
|
|
47
|
+
allTestCases.push(...cases);
|
|
48
|
+
testFileToTestCases.set(relativePath, cases);
|
|
49
|
+
}
|
|
50
|
+
for (const file of playwrightFiles) {
|
|
51
|
+
const content = readFile(file);
|
|
52
|
+
if (!content)
|
|
53
|
+
continue;
|
|
54
|
+
const relativePath = relative(projectPath, file);
|
|
55
|
+
const cases = extractTestCases(content, relativePath, "playwright");
|
|
56
|
+
allTestCases.push(...cases);
|
|
57
|
+
testFileToTestCases.set(relativePath, cases);
|
|
58
|
+
}
|
|
59
|
+
logger.info(`総テストケース数: ${allTestCases.length}`);
|
|
60
|
+
// リンク関係を構築
|
|
61
|
+
const report = buildLinkedReport(projectPath, sourceFiles, testFileToTestCases, conventions, coverageConfig.requireSkipReason ?? true);
|
|
62
|
+
logger.info(`カバレッジ: ${report.summary.coveragePercent}%`);
|
|
63
|
+
// 出力先
|
|
64
|
+
const portalDir = options.output
|
|
65
|
+
? resolve(options.output)
|
|
66
|
+
: getOutputPath(config, projectPath, "portal");
|
|
67
|
+
ensureDir(portalDir);
|
|
68
|
+
// HTML 出力
|
|
69
|
+
const htmlPath = resolve(portalDir, "linked-docs.html");
|
|
70
|
+
const htmlContent = generateLinkedDocsHtml(report, config.project.name);
|
|
71
|
+
writeFile(htmlPath, htmlContent);
|
|
72
|
+
logger.success(`統合ビュー HTML: ${htmlPath}`);
|
|
73
|
+
// JSON 出力 (オプション)
|
|
74
|
+
const jsonPath = resolve(portalDir, "linked-docs.json");
|
|
75
|
+
writeFile(jsonPath, JSON.stringify(report, null, 2));
|
|
76
|
+
logger.success(`JSON データ: ${jsonPath}`);
|
|
77
|
+
logger.success("API-テスト関連付けドキュメント生成完了");
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* ソースファイルを収集
|
|
81
|
+
*/
|
|
82
|
+
function collectSourceFiles(projectPath, conventions, excludes) {
|
|
83
|
+
const allFiles = new Set();
|
|
84
|
+
for (const conv of conventions) {
|
|
85
|
+
const pattern = join(projectPath, "**", conv.source);
|
|
86
|
+
const files = globSync(pattern, {
|
|
87
|
+
ignore: excludes.map((e) => join(projectPath, "**", e)),
|
|
88
|
+
nodir: true,
|
|
89
|
+
});
|
|
90
|
+
for (const file of files) {
|
|
91
|
+
allFiles.add(relative(projectPath, file));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return Array.from(allFiles).sort();
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @skip-test アノテーションを抽出
|
|
98
|
+
*/
|
|
99
|
+
function extractSkipTest(content) {
|
|
100
|
+
const skipTestMatch = content.match(/@skip-test\s+(.+?)(?:\n|\*\/)/);
|
|
101
|
+
if (!skipTestMatch)
|
|
102
|
+
return undefined;
|
|
103
|
+
const reason = skipTestMatch[1].trim();
|
|
104
|
+
const seeMatch = content.match(/@see\s+(\S+)/);
|
|
105
|
+
const seeReference = seeMatch ? seeMatch[1] : undefined;
|
|
106
|
+
return { reason, seeReference };
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* ソースパスから期待されるテストパスを生成
|
|
110
|
+
*/
|
|
111
|
+
function getExpectedTestPath(sourcePath, conventions) {
|
|
112
|
+
for (const conv of conventions) {
|
|
113
|
+
const sourcePattern = conv.source.replace(/\*\*/g, "(.*)").replace(/\*/g, "([^/]*)");
|
|
114
|
+
const sourceRegex = new RegExp(`^${sourcePattern}$`);
|
|
115
|
+
const match = sourcePath.match(sourceRegex);
|
|
116
|
+
if (match) {
|
|
117
|
+
let testPath = conv.test;
|
|
118
|
+
let index = 1;
|
|
119
|
+
testPath = testPath.replace(/\*\*/g, () => match[index++] || "");
|
|
120
|
+
testPath = testPath.replace(/\*/g, () => match[index++] || "");
|
|
121
|
+
const dir = dirname(testPath);
|
|
122
|
+
const name = basename(sourcePath, ".ts").replace(".tsx", "");
|
|
123
|
+
return join(dir, `${name}.test.ts`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* リンク付きレポートを構築
|
|
130
|
+
*/
|
|
131
|
+
function buildLinkedReport(projectPath, sourceFiles, testFileToTestCases, conventions, requireSkipReason) {
|
|
132
|
+
const linkedSources = [];
|
|
133
|
+
const matchedTestFiles = new Set();
|
|
134
|
+
const orphanTests = [];
|
|
135
|
+
// 各ソースファイルを処理
|
|
136
|
+
for (const sourcePath of sourceFiles) {
|
|
137
|
+
const fullPath = join(projectPath, sourcePath);
|
|
138
|
+
const content = readFile(fullPath) || "";
|
|
139
|
+
// @skip-test チェック
|
|
140
|
+
const skipTest = extractSkipTest(content);
|
|
141
|
+
if (skipTest) {
|
|
142
|
+
linkedSources.push({
|
|
143
|
+
path: sourcePath,
|
|
144
|
+
testCount: 0,
|
|
145
|
+
testCases: [],
|
|
146
|
+
status: "skipped",
|
|
147
|
+
skipReason: skipTest.reason,
|
|
148
|
+
});
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
// 期待されるテストパスを取得
|
|
152
|
+
const expectedTestPath = getExpectedTestPath(sourcePath, conventions);
|
|
153
|
+
let foundTestFile;
|
|
154
|
+
let foundTestCases = [];
|
|
155
|
+
if (expectedTestPath) {
|
|
156
|
+
// 完全一致を試す
|
|
157
|
+
for (const [testPath, cases] of testFileToTestCases) {
|
|
158
|
+
if (testPath === expectedTestPath || testPath.endsWith(basename(expectedTestPath))) {
|
|
159
|
+
foundTestFile = testPath;
|
|
160
|
+
foundTestCases = cases.map((tc) => ({ ...tc, sourceFile: sourcePath }));
|
|
161
|
+
matchedTestFiles.add(testPath);
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// 部分一致を試す (ファイル名ベース)
|
|
166
|
+
if (!foundTestFile) {
|
|
167
|
+
const sourceBaseName = basename(sourcePath, ".ts").replace(".tsx", "");
|
|
168
|
+
const expectedTestName = `${sourceBaseName}.test.ts`;
|
|
169
|
+
for (const [testPath, cases] of testFileToTestCases) {
|
|
170
|
+
if (basename(testPath) === expectedTestName || basename(testPath) === `${sourceBaseName}.test.tsx`) {
|
|
171
|
+
foundTestFile = testPath;
|
|
172
|
+
foundTestCases = cases.map((tc) => ({ ...tc, sourceFile: sourcePath }));
|
|
173
|
+
matchedTestFiles.add(testPath);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
linkedSources.push({
|
|
180
|
+
path: sourcePath,
|
|
181
|
+
testFile: foundTestFile,
|
|
182
|
+
testCount: foundTestCases.length,
|
|
183
|
+
testCases: foundTestCases,
|
|
184
|
+
status: foundTestFile ? "covered" : "missing",
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
// 孤立テストを収集
|
|
188
|
+
for (const [testPath, cases] of testFileToTestCases) {
|
|
189
|
+
if (!matchedTestFiles.has(testPath)) {
|
|
190
|
+
orphanTests.push(...cases.map((tc) => ({ ...tc, sourceFile: undefined })));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// サマリーを計算
|
|
194
|
+
const totalSources = linkedSources.length;
|
|
195
|
+
const coveredCount = linkedSources.filter((s) => s.status === "covered").length;
|
|
196
|
+
const skippedCount = linkedSources.filter((s) => s.status === "skipped").length;
|
|
197
|
+
const missingCount = linkedSources.filter((s) => s.status === "missing").length;
|
|
198
|
+
const totalTestCases = linkedSources.reduce((sum, s) => sum + s.testCases.length, 0);
|
|
199
|
+
const orphanTestCases = orphanTests.length;
|
|
200
|
+
const coveragePercent = totalSources > 0
|
|
201
|
+
? Math.round(((coveredCount + skippedCount) / totalSources) * 100)
|
|
202
|
+
: 100;
|
|
203
|
+
return {
|
|
204
|
+
linkedSources,
|
|
205
|
+
orphanTests,
|
|
206
|
+
summary: {
|
|
207
|
+
totalSources,
|
|
208
|
+
coveredCount,
|
|
209
|
+
skippedCount,
|
|
210
|
+
missingCount,
|
|
211
|
+
totalTestCases,
|
|
212
|
+
orphanTestCases,
|
|
213
|
+
coveragePercent,
|
|
214
|
+
},
|
|
215
|
+
generatedAt: new Date().toISOString(),
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* 統合ビュー HTML を生成
|
|
220
|
+
*/
|
|
221
|
+
function generateLinkedDocsHtml(report, projectName) {
|
|
222
|
+
// サイドバー HTML
|
|
223
|
+
const sidebarHtml = buildSidebar(report);
|
|
224
|
+
// メインコンテンツ HTML
|
|
225
|
+
const contentHtml = buildContent(report);
|
|
226
|
+
const styles = getStyles();
|
|
227
|
+
const scripts = getScripts();
|
|
228
|
+
const content = `
|
|
229
|
+
<div class="header">
|
|
230
|
+
<a href="index.html" class="back-link">
|
|
231
|
+
${icons.back}
|
|
232
|
+
ポータルに戻る
|
|
233
|
+
</a>
|
|
234
|
+
<div class="header-title">
|
|
235
|
+
<h1>API-テスト関連付けビュー</h1>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="search-box">
|
|
238
|
+
<input type="text" class="search-input" id="searchInput" placeholder="検索...">
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="main-container">
|
|
242
|
+
${sidebarHtml}
|
|
243
|
+
<main class="content">
|
|
244
|
+
${buildSummaryCard(report)}
|
|
245
|
+
${contentHtml}
|
|
246
|
+
</main>
|
|
247
|
+
</div>
|
|
248
|
+
`;
|
|
249
|
+
return wrapHtmlDocument({
|
|
250
|
+
title: `API-テスト関連付け - ${projectName}`,
|
|
251
|
+
content,
|
|
252
|
+
styles,
|
|
253
|
+
scripts,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* サイドバー HTML を生成
|
|
258
|
+
*/
|
|
259
|
+
function buildSidebar(report) {
|
|
260
|
+
const coveredSources = report.linkedSources.filter((s) => s.status === "covered");
|
|
261
|
+
const missingSources = report.linkedSources.filter((s) => s.status === "missing");
|
|
262
|
+
const skippedSources = report.linkedSources.filter((s) => s.status === "skipped");
|
|
263
|
+
const buildNavItems = (sources, statusClass) => {
|
|
264
|
+
return sources
|
|
265
|
+
.map((source) => {
|
|
266
|
+
const id = fileToId(source.path);
|
|
267
|
+
const name = basename(source.path);
|
|
268
|
+
return `
|
|
269
|
+
<li class="nav-item">
|
|
270
|
+
<a href="#${id}" class="nav-link ${statusClass}" title="${escapeHtml(source.path)}">
|
|
271
|
+
<span class="nav-status"></span>
|
|
272
|
+
${escapeHtml(name)}
|
|
273
|
+
${source.testCount > 0 ? `<span class="nav-count">${source.testCount}</span>` : ""}
|
|
274
|
+
</a>
|
|
275
|
+
</li>
|
|
276
|
+
`;
|
|
277
|
+
})
|
|
278
|
+
.join("\n");
|
|
279
|
+
};
|
|
280
|
+
return `
|
|
281
|
+
<aside class="sidebar">
|
|
282
|
+
<div class="sidebar-header">
|
|
283
|
+
<div class="sidebar-title">実装ファイル</div>
|
|
284
|
+
</div>
|
|
285
|
+
${coveredSources.length > 0
|
|
286
|
+
? `
|
|
287
|
+
<div class="nav-group">
|
|
288
|
+
<div class="nav-group-title">
|
|
289
|
+
<span class="badge badge-covered">テスト済み</span>
|
|
290
|
+
<span class="badge-count">${coveredSources.length}</span>
|
|
291
|
+
</div>
|
|
292
|
+
<ul class="nav-list">
|
|
293
|
+
${buildNavItems(coveredSources, "status-covered")}
|
|
294
|
+
</ul>
|
|
295
|
+
</div>
|
|
296
|
+
`
|
|
297
|
+
: ""}
|
|
298
|
+
${missingSources.length > 0
|
|
299
|
+
? `
|
|
300
|
+
<div class="nav-group">
|
|
301
|
+
<div class="nav-group-title">
|
|
302
|
+
<span class="badge badge-missing">未テスト</span>
|
|
303
|
+
<span class="badge-count">${missingSources.length}</span>
|
|
304
|
+
</div>
|
|
305
|
+
<ul class="nav-list">
|
|
306
|
+
${buildNavItems(missingSources, "status-missing")}
|
|
307
|
+
</ul>
|
|
308
|
+
</div>
|
|
309
|
+
`
|
|
310
|
+
: ""}
|
|
311
|
+
${skippedSources.length > 0
|
|
312
|
+
? `
|
|
313
|
+
<div class="nav-group">
|
|
314
|
+
<div class="nav-group-title">
|
|
315
|
+
<span class="badge badge-skipped">スキップ</span>
|
|
316
|
+
<span class="badge-count">${skippedSources.length}</span>
|
|
317
|
+
</div>
|
|
318
|
+
<ul class="nav-list">
|
|
319
|
+
${buildNavItems(skippedSources, "status-skipped")}
|
|
320
|
+
</ul>
|
|
321
|
+
</div>
|
|
322
|
+
`
|
|
323
|
+
: ""}
|
|
324
|
+
${report.orphanTests.length > 0
|
|
325
|
+
? `
|
|
326
|
+
<div class="nav-group">
|
|
327
|
+
<div class="nav-group-title">
|
|
328
|
+
<span class="badge badge-orphan">孤立テスト</span>
|
|
329
|
+
<span class="badge-count">${report.orphanTests.length}</span>
|
|
330
|
+
</div>
|
|
331
|
+
<ul class="nav-list">
|
|
332
|
+
<li class="nav-item">
|
|
333
|
+
<a href="#orphan-tests" class="nav-link status-orphan">
|
|
334
|
+
孤立テストケース一覧
|
|
335
|
+
</a>
|
|
336
|
+
</li>
|
|
337
|
+
</ul>
|
|
338
|
+
</div>
|
|
339
|
+
`
|
|
340
|
+
: ""}
|
|
341
|
+
</aside>
|
|
342
|
+
`;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* メインコンテンツ HTML を生成
|
|
346
|
+
*/
|
|
347
|
+
function buildContent(report) {
|
|
348
|
+
const sections = [];
|
|
349
|
+
// カバー済みソース
|
|
350
|
+
for (const source of report.linkedSources.filter((s) => s.status === "covered")) {
|
|
351
|
+
sections.push(buildSourceSection(source));
|
|
352
|
+
}
|
|
353
|
+
// 未テストソース
|
|
354
|
+
for (const source of report.linkedSources.filter((s) => s.status === "missing")) {
|
|
355
|
+
sections.push(buildSourceSection(source));
|
|
356
|
+
}
|
|
357
|
+
// スキップソース
|
|
358
|
+
for (const source of report.linkedSources.filter((s) => s.status === "skipped")) {
|
|
359
|
+
sections.push(buildSourceSection(source));
|
|
360
|
+
}
|
|
361
|
+
// 孤立テスト
|
|
362
|
+
if (report.orphanTests.length > 0) {
|
|
363
|
+
sections.push(buildOrphanTestsSection(report.orphanTests));
|
|
364
|
+
}
|
|
365
|
+
return sections.join("\n");
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* ソースファイルセクションを生成
|
|
369
|
+
*/
|
|
370
|
+
function buildSourceSection(source) {
|
|
371
|
+
const id = fileToId(source.path);
|
|
372
|
+
const statusClass = `status-${source.status}`;
|
|
373
|
+
const statusLabel = source.status === "covered"
|
|
374
|
+
? "テスト済み"
|
|
375
|
+
: source.status === "missing"
|
|
376
|
+
? "未テスト"
|
|
377
|
+
: "スキップ";
|
|
378
|
+
const testCasesHtml = source.testCases.length > 0
|
|
379
|
+
? `
|
|
380
|
+
<div class="test-cases">
|
|
381
|
+
<h4 class="test-cases-title">テストケース (${source.testCases.length}件)</h4>
|
|
382
|
+
<ul class="test-list">
|
|
383
|
+
${source.testCases
|
|
384
|
+
.map((tc) => `
|
|
385
|
+
<li class="test-item ${tc.description ? "has-doc" : ""}">
|
|
386
|
+
<div class="test-header">
|
|
387
|
+
<span class="test-name">${escapeHtml(tc.description || tc.it)}</span>
|
|
388
|
+
<div class="test-meta">
|
|
389
|
+
${tc.bdd?.given || tc.bdd?.when || tc.bdd?.then ? '<span class="test-bdd-badge">BDD</span>' : ""}
|
|
390
|
+
<span class="test-line">L${tc.line}</span>
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
${tc.description && tc.it !== tc.description ? `<div class="test-original">EN: ${escapeHtml(tc.it)}</div>` : ""}
|
|
394
|
+
${tc.purpose ? `<div class="test-detail"><span class="detail-label">目的:</span> ${escapeHtml(tc.purpose)}</div>` : ""}
|
|
395
|
+
${tc.expected ? `<div class="test-detail"><span class="detail-label">期待:</span> ${escapeHtml(tc.expected)}</div>` : ""}
|
|
396
|
+
</li>
|
|
397
|
+
`)
|
|
398
|
+
.join("")}
|
|
399
|
+
</ul>
|
|
400
|
+
</div>
|
|
401
|
+
`
|
|
402
|
+
: source.status === "missing"
|
|
403
|
+
? '<div class="no-tests">テストファイルが見つかりません</div>'
|
|
404
|
+
: "";
|
|
405
|
+
const skipReasonHtml = source.skipReason
|
|
406
|
+
? `<div class="skip-reason"><span class="skip-label">スキップ理由:</span> ${escapeHtml(source.skipReason)}</div>`
|
|
407
|
+
: "";
|
|
408
|
+
return `
|
|
409
|
+
<section id="${id}" class="source-section ${statusClass}">
|
|
410
|
+
<div class="source-header">
|
|
411
|
+
<span class="badge badge-${source.status}">${statusLabel}</span>
|
|
412
|
+
<h3 class="source-path">${escapeHtml(source.path)}</h3>
|
|
413
|
+
${source.testFile ? `<span class="test-file-link" title="${escapeHtml(source.testFile)}">-> ${escapeHtml(basename(source.testFile))}</span>` : ""}
|
|
414
|
+
</div>
|
|
415
|
+
${skipReasonHtml}
|
|
416
|
+
${testCasesHtml}
|
|
417
|
+
</section>
|
|
418
|
+
`;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* 孤立テストセクションを生成
|
|
422
|
+
*/
|
|
423
|
+
function buildOrphanTestsSection(orphanTests) {
|
|
424
|
+
// ファイルごとにグループ化
|
|
425
|
+
const byFile = new Map();
|
|
426
|
+
for (const tc of orphanTests) {
|
|
427
|
+
const existing = byFile.get(tc.file) || [];
|
|
428
|
+
existing.push(tc);
|
|
429
|
+
byFile.set(tc.file, existing);
|
|
430
|
+
}
|
|
431
|
+
const filesHtml = Array.from(byFile.entries())
|
|
432
|
+
.map(([file, cases]) => `
|
|
433
|
+
<div class="orphan-file">
|
|
434
|
+
<h4 class="orphan-file-path">${escapeHtml(file)}</h4>
|
|
435
|
+
<ul class="test-list">
|
|
436
|
+
${cases
|
|
437
|
+
.map((tc) => `
|
|
438
|
+
<li class="test-item">
|
|
439
|
+
<span class="test-name">${escapeHtml(tc.description || tc.it)}</span>
|
|
440
|
+
<span class="test-line">L${tc.line}</span>
|
|
441
|
+
</li>
|
|
442
|
+
`)
|
|
443
|
+
.join("")}
|
|
444
|
+
</ul>
|
|
445
|
+
</div>
|
|
446
|
+
`)
|
|
447
|
+
.join("");
|
|
448
|
+
return `
|
|
449
|
+
<section id="orphan-tests" class="orphan-section">
|
|
450
|
+
<div class="orphan-header">
|
|
451
|
+
<span class="badge badge-orphan">孤立テスト</span>
|
|
452
|
+
<h3>対応する実装ファイルが見つからないテスト (${orphanTests.length}件)</h3>
|
|
453
|
+
</div>
|
|
454
|
+
<p class="orphan-description">
|
|
455
|
+
これらのテストは規約に基づくソースファイルが見つかりませんでした。
|
|
456
|
+
リファクタリングや削除を検討してください。
|
|
457
|
+
</p>
|
|
458
|
+
${filesHtml}
|
|
459
|
+
</section>
|
|
460
|
+
`;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* サマリーカード HTML を生成
|
|
464
|
+
*/
|
|
465
|
+
function buildSummaryCard(report) {
|
|
466
|
+
const { summary } = report;
|
|
467
|
+
const coverageClass = summary.coveragePercent >= 80
|
|
468
|
+
? "coverage-high"
|
|
469
|
+
: summary.coveragePercent >= 50
|
|
470
|
+
? "coverage-medium"
|
|
471
|
+
: "coverage-low";
|
|
472
|
+
return `
|
|
473
|
+
<div class="summary-card">
|
|
474
|
+
<div class="summary-grid">
|
|
475
|
+
<div class="summary-item">
|
|
476
|
+
<div class="summary-value">${summary.totalSources}</div>
|
|
477
|
+
<div class="summary-label">実装ファイル</div>
|
|
478
|
+
</div>
|
|
479
|
+
<div class="summary-item summary-covered">
|
|
480
|
+
<div class="summary-value">${summary.coveredCount}</div>
|
|
481
|
+
<div class="summary-label">テスト済み</div>
|
|
482
|
+
</div>
|
|
483
|
+
<div class="summary-item summary-missing">
|
|
484
|
+
<div class="summary-value">${summary.missingCount}</div>
|
|
485
|
+
<div class="summary-label">未テスト</div>
|
|
486
|
+
</div>
|
|
487
|
+
<div class="summary-item summary-skipped">
|
|
488
|
+
<div class="summary-value">${summary.skippedCount}</div>
|
|
489
|
+
<div class="summary-label">スキップ</div>
|
|
490
|
+
</div>
|
|
491
|
+
<div class="summary-item">
|
|
492
|
+
<div class="summary-value">${summary.totalTestCases}</div>
|
|
493
|
+
<div class="summary-label">テストケース</div>
|
|
494
|
+
</div>
|
|
495
|
+
<div class="summary-item ${coverageClass}">
|
|
496
|
+
<div class="summary-value">${summary.coveragePercent}%</div>
|
|
497
|
+
<div class="summary-label">カバレッジ</div>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
<div class="summary-meta">
|
|
501
|
+
生成日時: ${new Date(report.generatedAt).toLocaleString("ja-JP")}
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
504
|
+
`;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* ファイルパスを ID に変換
|
|
508
|
+
*/
|
|
509
|
+
function fileToId(file) {
|
|
510
|
+
return "src-" + file.replace(/[^a-zA-Z0-9]/g, "-");
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* スタイル
|
|
514
|
+
*/
|
|
515
|
+
function getStyles() {
|
|
516
|
+
return `
|
|
517
|
+
.header {
|
|
518
|
+
background: var(--card-bg);
|
|
519
|
+
border-bottom: 1px solid var(--border-color);
|
|
520
|
+
padding: 1rem 2rem;
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
gap: 1rem;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.header-title {
|
|
527
|
+
flex: 1;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.header-title h1 {
|
|
531
|
+
font-size: 1.25rem;
|
|
532
|
+
margin: 0;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.back-link {
|
|
536
|
+
display: inline-flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
gap: 0.5rem;
|
|
539
|
+
color: var(--text-secondary);
|
|
540
|
+
text-decoration: none;
|
|
541
|
+
padding: 0.5rem 1rem;
|
|
542
|
+
border-radius: 6px;
|
|
543
|
+
transition: background 0.2s;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.back-link:hover {
|
|
547
|
+
background: var(--border-color);
|
|
548
|
+
color: var(--text-primary);
|
|
549
|
+
text-decoration: none;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.search-box {
|
|
553
|
+
width: 250px;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.search-input {
|
|
557
|
+
width: 100%;
|
|
558
|
+
padding: 0.5rem 1rem;
|
|
559
|
+
background: var(--bg-color);
|
|
560
|
+
border: 1px solid var(--border-color);
|
|
561
|
+
border-radius: 6px;
|
|
562
|
+
color: var(--text-primary);
|
|
563
|
+
font-size: 0.9rem;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.search-input:focus {
|
|
567
|
+
outline: none;
|
|
568
|
+
border-color: var(--accent-blue);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.main-container {
|
|
572
|
+
display: flex;
|
|
573
|
+
min-height: calc(100vh - 60px);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.sidebar {
|
|
577
|
+
width: 300px;
|
|
578
|
+
background: var(--card-bg);
|
|
579
|
+
border-right: 1px solid var(--border-color);
|
|
580
|
+
position: sticky;
|
|
581
|
+
top: 0;
|
|
582
|
+
height: 100vh;
|
|
583
|
+
overflow-y: auto;
|
|
584
|
+
flex-shrink: 0;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.sidebar-header {
|
|
588
|
+
padding: 1rem;
|
|
589
|
+
border-bottom: 1px solid var(--border-color);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.sidebar-title {
|
|
593
|
+
font-size: 0.75rem;
|
|
594
|
+
font-weight: 600;
|
|
595
|
+
text-transform: uppercase;
|
|
596
|
+
letter-spacing: 0.05em;
|
|
597
|
+
color: var(--text-secondary);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.nav-group {
|
|
601
|
+
padding: 0.5rem 0;
|
|
602
|
+
border-bottom: 1px solid var(--border-color);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.nav-group-title {
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
gap: 0.5rem;
|
|
609
|
+
padding: 0.5rem 1rem;
|
|
610
|
+
font-size: 0.8rem;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.nav-list {
|
|
614
|
+
list-style: none;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.nav-item {
|
|
618
|
+
margin-bottom: 0.125rem;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.nav-link {
|
|
622
|
+
display: flex;
|
|
623
|
+
align-items: center;
|
|
624
|
+
gap: 0.5rem;
|
|
625
|
+
padding: 0.375rem 0.75rem 0.375rem 1.5rem;
|
|
626
|
+
color: var(--text-secondary);
|
|
627
|
+
text-decoration: none;
|
|
628
|
+
border-radius: 4px;
|
|
629
|
+
font-size: 0.8rem;
|
|
630
|
+
transition: all 0.15s ease;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.nav-link:hover {
|
|
634
|
+
background: var(--border-color);
|
|
635
|
+
color: var(--text-primary);
|
|
636
|
+
text-decoration: none;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.nav-status {
|
|
640
|
+
width: 8px;
|
|
641
|
+
height: 8px;
|
|
642
|
+
border-radius: 50%;
|
|
643
|
+
flex-shrink: 0;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.status-covered .nav-status { background: var(--accent-green); }
|
|
647
|
+
.status-missing .nav-status { background: #ef4444; }
|
|
648
|
+
.status-skipped .nav-status { background: var(--accent-orange); }
|
|
649
|
+
.status-orphan .nav-status { background: var(--accent-purple); }
|
|
650
|
+
|
|
651
|
+
.nav-count {
|
|
652
|
+
margin-left: auto;
|
|
653
|
+
font-size: 0.7rem;
|
|
654
|
+
background: var(--bg-color);
|
|
655
|
+
padding: 0.125rem 0.375rem;
|
|
656
|
+
border-radius: 4px;
|
|
657
|
+
color: var(--text-secondary);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.content {
|
|
661
|
+
flex: 1;
|
|
662
|
+
padding: 2rem;
|
|
663
|
+
max-width: 900px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.badge {
|
|
667
|
+
display: inline-block;
|
|
668
|
+
padding: 0.125rem 0.5rem;
|
|
669
|
+
border-radius: 4px;
|
|
670
|
+
font-size: 0.7rem;
|
|
671
|
+
font-weight: 600;
|
|
672
|
+
text-transform: uppercase;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.badge-covered { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
|
|
676
|
+
.badge-missing { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
|
|
677
|
+
.badge-skipped { background: rgba(249, 115, 22, 0.2); color: #f97316; }
|
|
678
|
+
.badge-orphan { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
|
|
679
|
+
|
|
680
|
+
.badge-count {
|
|
681
|
+
color: var(--text-secondary);
|
|
682
|
+
font-size: 0.75rem;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.summary-card {
|
|
686
|
+
background: var(--card-bg);
|
|
687
|
+
border: 1px solid var(--border-color);
|
|
688
|
+
border-radius: 12px;
|
|
689
|
+
padding: 1.5rem;
|
|
690
|
+
margin-bottom: 2rem;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.summary-grid {
|
|
694
|
+
display: grid;
|
|
695
|
+
grid-template-columns: repeat(6, 1fr);
|
|
696
|
+
gap: 1rem;
|
|
697
|
+
margin-bottom: 1rem;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.summary-item {
|
|
701
|
+
text-align: center;
|
|
702
|
+
padding: 1rem;
|
|
703
|
+
background: var(--bg-color);
|
|
704
|
+
border-radius: 8px;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.summary-value {
|
|
708
|
+
font-size: 1.5rem;
|
|
709
|
+
font-weight: 700;
|
|
710
|
+
color: var(--text-primary);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.summary-label {
|
|
714
|
+
font-size: 0.75rem;
|
|
715
|
+
color: var(--text-secondary);
|
|
716
|
+
margin-top: 0.25rem;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.summary-covered .summary-value { color: #22c55e; }
|
|
720
|
+
.summary-missing .summary-value { color: #ef4444; }
|
|
721
|
+
.summary-skipped .summary-value { color: #f97316; }
|
|
722
|
+
|
|
723
|
+
.coverage-high .summary-value { color: #22c55e; }
|
|
724
|
+
.coverage-medium .summary-value { color: #eab308; }
|
|
725
|
+
.coverage-low .summary-value { color: #ef4444; }
|
|
726
|
+
|
|
727
|
+
.summary-meta {
|
|
728
|
+
text-align: right;
|
|
729
|
+
font-size: 0.8rem;
|
|
730
|
+
color: var(--text-secondary);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.source-section {
|
|
734
|
+
margin-bottom: 2rem;
|
|
735
|
+
padding: 1rem;
|
|
736
|
+
background: var(--card-bg);
|
|
737
|
+
border: 1px solid var(--border-color);
|
|
738
|
+
border-radius: 8px;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.source-section.status-covered {
|
|
742
|
+
border-left: 3px solid #22c55e;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.source-section.status-missing {
|
|
746
|
+
border-left: 3px solid #ef4444;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.source-section.status-skipped {
|
|
750
|
+
border-left: 3px solid #f97316;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.source-header {
|
|
754
|
+
display: flex;
|
|
755
|
+
align-items: center;
|
|
756
|
+
gap: 0.75rem;
|
|
757
|
+
margin-bottom: 1rem;
|
|
758
|
+
padding-bottom: 0.75rem;
|
|
759
|
+
border-bottom: 1px solid var(--border-color);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.source-path {
|
|
763
|
+
flex: 1;
|
|
764
|
+
font-size: 0.9rem;
|
|
765
|
+
font-family: monospace;
|
|
766
|
+
color: var(--accent-blue);
|
|
767
|
+
margin: 0;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.test-file-link {
|
|
771
|
+
font-size: 0.75rem;
|
|
772
|
+
color: var(--text-secondary);
|
|
773
|
+
font-family: monospace;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.skip-reason {
|
|
777
|
+
background: rgba(249, 115, 22, 0.1);
|
|
778
|
+
padding: 0.75rem;
|
|
779
|
+
border-radius: 6px;
|
|
780
|
+
font-size: 0.85rem;
|
|
781
|
+
margin-bottom: 1rem;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.skip-label {
|
|
785
|
+
font-weight: 600;
|
|
786
|
+
color: #f97316;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.no-tests {
|
|
790
|
+
padding: 1rem;
|
|
791
|
+
text-align: center;
|
|
792
|
+
color: var(--text-secondary);
|
|
793
|
+
background: rgba(239, 68, 68, 0.05);
|
|
794
|
+
border-radius: 6px;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.test-cases-title {
|
|
798
|
+
font-size: 0.85rem;
|
|
799
|
+
color: var(--text-secondary);
|
|
800
|
+
margin-bottom: 0.75rem;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.test-list {
|
|
804
|
+
list-style: none;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.test-item {
|
|
808
|
+
padding: 0.5rem 0.75rem;
|
|
809
|
+
font-size: 0.85rem;
|
|
810
|
+
border-radius: 6px;
|
|
811
|
+
margin-bottom: 0.25rem;
|
|
812
|
+
border: 1px solid transparent;
|
|
813
|
+
transition: all 0.15s ease;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.test-item:hover {
|
|
817
|
+
background: var(--bg-color);
|
|
818
|
+
border-color: var(--border-color);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.test-item.has-doc {
|
|
822
|
+
background: rgba(168, 85, 247, 0.05);
|
|
823
|
+
border-color: rgba(168, 85, 247, 0.2);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.test-header {
|
|
827
|
+
display: flex;
|
|
828
|
+
justify-content: space-between;
|
|
829
|
+
align-items: flex-start;
|
|
830
|
+
gap: 1rem;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.test-name {
|
|
834
|
+
color: var(--text-primary);
|
|
835
|
+
flex: 1;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.test-meta {
|
|
839
|
+
display: flex;
|
|
840
|
+
align-items: center;
|
|
841
|
+
gap: 0.5rem;
|
|
842
|
+
flex-shrink: 0;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.test-line {
|
|
846
|
+
font-size: 0.75rem;
|
|
847
|
+
color: var(--text-secondary);
|
|
848
|
+
opacity: 0.6;
|
|
849
|
+
font-family: monospace;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.test-bdd-badge {
|
|
853
|
+
font-size: 0.6rem;
|
|
854
|
+
padding: 0.125rem 0.375rem;
|
|
855
|
+
background: rgba(34, 197, 94, 0.2);
|
|
856
|
+
color: var(--accent-green);
|
|
857
|
+
border-radius: 3px;
|
|
858
|
+
font-weight: 600;
|
|
859
|
+
text-transform: uppercase;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.test-original {
|
|
863
|
+
font-size: 0.75rem;
|
|
864
|
+
color: var(--text-secondary);
|
|
865
|
+
margin-top: 0.25rem;
|
|
866
|
+
font-style: italic;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.test-detail {
|
|
870
|
+
font-size: 0.8rem;
|
|
871
|
+
color: var(--text-secondary);
|
|
872
|
+
margin-top: 0.25rem;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.detail-label {
|
|
876
|
+
font-weight: 600;
|
|
877
|
+
color: var(--accent-purple);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.orphan-section {
|
|
881
|
+
margin-bottom: 2rem;
|
|
882
|
+
padding: 1rem;
|
|
883
|
+
background: var(--card-bg);
|
|
884
|
+
border: 1px solid var(--border-color);
|
|
885
|
+
border-left: 3px solid #a855f7;
|
|
886
|
+
border-radius: 8px;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.orphan-header {
|
|
890
|
+
display: flex;
|
|
891
|
+
align-items: center;
|
|
892
|
+
gap: 0.75rem;
|
|
893
|
+
margin-bottom: 0.5rem;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.orphan-header h3 {
|
|
897
|
+
font-size: 0.9rem;
|
|
898
|
+
margin: 0;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.orphan-description {
|
|
902
|
+
color: var(--text-secondary);
|
|
903
|
+
font-size: 0.85rem;
|
|
904
|
+
margin-bottom: 1rem;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.orphan-file {
|
|
908
|
+
margin-bottom: 1rem;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.orphan-file-path {
|
|
912
|
+
font-size: 0.85rem;
|
|
913
|
+
font-family: monospace;
|
|
914
|
+
color: var(--accent-purple);
|
|
915
|
+
margin-bottom: 0.5rem;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.hidden {
|
|
919
|
+
display: none !important;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
@media (max-width: 1024px) {
|
|
923
|
+
.summary-grid {
|
|
924
|
+
grid-template-columns: repeat(3, 1fr);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
@media (max-width: 768px) {
|
|
929
|
+
.main-container {
|
|
930
|
+
flex-direction: column;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.sidebar {
|
|
934
|
+
width: 100%;
|
|
935
|
+
height: auto;
|
|
936
|
+
position: static;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.summary-grid {
|
|
940
|
+
grid-template-columns: repeat(2, 1fr);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
`;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* スクリプト
|
|
947
|
+
*/
|
|
948
|
+
function getScripts() {
|
|
949
|
+
return `
|
|
950
|
+
const searchInput = document.getElementById('searchInput');
|
|
951
|
+
const sections = document.querySelectorAll('.source-section, .orphan-section');
|
|
952
|
+
const navItems = document.querySelectorAll('.nav-item');
|
|
953
|
+
|
|
954
|
+
searchInput.addEventListener('input', (e) => {
|
|
955
|
+
const query = e.target.value.toLowerCase().trim();
|
|
956
|
+
|
|
957
|
+
sections.forEach((section) => {
|
|
958
|
+
const text = section.textContent.toLowerCase();
|
|
959
|
+
const isMatch = query === '' || text.includes(query);
|
|
960
|
+
section.classList.toggle('hidden', !isMatch);
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
// サイドバーのナビアイテムも更新
|
|
964
|
+
navItems.forEach((item) => {
|
|
965
|
+
const link = item.querySelector('.nav-link');
|
|
966
|
+
if (!link) return;
|
|
967
|
+
const href = link.getAttribute('href');
|
|
968
|
+
if (!href) return;
|
|
969
|
+
const sectionId = href.substring(1);
|
|
970
|
+
const section = document.getElementById(sectionId);
|
|
971
|
+
if (section) {
|
|
972
|
+
item.classList.toggle('hidden', section.classList.contains('hidden'));
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
// スムーズスクロール
|
|
978
|
+
document.querySelectorAll('.nav-link').forEach((link) => {
|
|
979
|
+
link.addEventListener('click', (e) => {
|
|
980
|
+
e.preventDefault();
|
|
981
|
+
const targetId = link.getAttribute('href').substring(1);
|
|
982
|
+
const target = document.getElementById(targetId);
|
|
983
|
+
if (target) {
|
|
984
|
+
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
});
|
|
988
|
+
`;
|
|
989
|
+
}
|
|
990
|
+
//# sourceMappingURL=link-docs.js.map
|