repometry 0.1.0 → 0.2.1

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 (119) hide show
  1. package/README.md +3 -2
  2. package/package.json +5 -4
  3. package/target/main/resources/report/json/config-v1.schema.json +0 -1
  4. package/target/main/resources/report/json/report-v2.schema.json +14 -0
  5. package/target/main/resources/viewer/index.html +10 -20
  6. package/target/main/resources/viewer/styles.css +3 -29
  7. package/target/main/ts/api/gh/github.js +1 -0
  8. package/target/main/ts/api/git/blob-batch.js +1 -0
  9. package/target/main/ts/api/git/changes.js +1 -0
  10. package/target/main/ts/api/git/commit-metadata.js +5 -6
  11. package/target/main/ts/api/git/git-churn.js +1 -0
  12. package/target/main/ts/api/git/git-reader.js +1 -0
  13. package/target/main/ts/api/git/git.js +1 -0
  14. package/target/main/ts/api/git/inspection-source.js +1 -0
  15. package/target/main/ts/api/git/local-sources.js +1 -0
  16. package/target/main/ts/api/git/local.js +1 -0
  17. package/target/main/ts/api/git/metabranch-worktree.js +1 -0
  18. package/target/main/ts/api/git/source-cache.js +1 -0
  19. package/target/main/ts/api/import/finding-import.js +1 -0
  20. package/target/main/ts/api/import/lcov-files.js +1 -0
  21. package/target/main/ts/api/import/profile-file.js +1 -0
  22. package/target/main/ts/api/worker/remote-executor.js +1 -0
  23. package/target/main/ts/api/worker/worker-protocol.js +1 -0
  24. package/target/main/ts/api/worker/worker.js +1 -0
  25. package/target/main/ts/cli/arguments.js +1 -0
  26. package/target/main/ts/cli/config.d.ts +0 -1
  27. package/target/main/ts/cli/config.js +3 -5
  28. package/target/main/ts/cli/imports.js +1 -0
  29. package/target/main/ts/cli/main.js +3 -2
  30. package/target/main/ts/cli/reporting.js +9 -13
  31. package/target/main/ts/cli/revisions.js +1 -0
  32. package/target/main/ts/cli/store.js +1 -0
  33. package/target/main/ts/compose/analyze-snapshot.js +1 -0
  34. package/target/main/ts/compose/attach-churn.js +13 -0
  35. package/target/main/ts/compose/diff-coverage.js +1 -0
  36. package/target/main/ts/compose/inspect.js +1 -0
  37. package/target/main/ts/compose/plugin-list.js +1 -0
  38. package/target/main/ts/compose/prepare-metabranch.js +1 -0
  39. package/target/main/ts/compose/review.js +1 -0
  40. package/target/main/ts/compose/sources.js +1 -0
  41. package/target/main/ts/core/engine/execute.js +1 -0
  42. package/target/main/ts/core/engine/manifest.js +1 -0
  43. package/target/main/ts/core/engine/plan.js +1 -0
  44. package/target/main/ts/core/engine/report-products.js +1 -0
  45. package/target/main/ts/core/model/changes.js +1 -0
  46. package/target/main/ts/core/model/clone-source.js +1 -0
  47. package/target/main/ts/core/model/code-structure.js +1 -0
  48. package/target/main/ts/core/model/finding-ignore.js +1 -0
  49. package/target/main/ts/core/model/measurement.d.ts +6 -0
  50. package/target/main/ts/core/model/measurement.js +6 -0
  51. package/target/main/ts/core/model/report.d.ts +8 -0
  52. package/target/main/ts/core/model/scanner-import.js +1 -0
  53. package/target/main/ts/core/model/snapshot.js +1 -0
  54. package/target/main/ts/core/ports/report.js +1 -0
  55. package/target/main/ts/core/ports/source-provider.js +1 -0
  56. package/target/main/ts/core/profile/exclusions.js +1 -0
  57. package/target/main/ts/core/profile/maintainability.js +1 -0
  58. package/target/main/ts/core/profile/profile.js +1 -0
  59. package/target/main/ts/core/usecases/compare.js +1 -0
  60. package/target/main/ts/core/usecases/diff-coverage-policy.js +1 -0
  61. package/target/main/ts/core/usecases/diff-coverage.js +1 -0
  62. package/target/main/ts/core/usecases/inspect.js +1 -0
  63. package/target/main/ts/core/usecases/review.js +1 -0
  64. package/target/main/ts/index.js +1 -0
  65. package/target/main/ts/plugin.js +1 -0
  66. package/target/main/ts/plugins/coverage/coverage.d.ts +2 -0
  67. package/target/main/ts/plugins/coverage/coverage.js +83 -4
  68. package/target/main/ts/plugins/coverage/diff-coverage.js +1 -0
  69. package/target/main/ts/plugins/duplication/duplication.js +1 -0
  70. package/target/main/ts/plugins/language-js/babel-provider.js +1 -0
  71. package/target/main/ts/plugins/language-js/clone-candidates.js +1 -0
  72. package/target/main/ts/plugins/language-js/code-lines.js +1 -0
  73. package/target/main/ts/plugins/language-js/function-facts.js +1 -0
  74. package/target/main/ts/plugins/language-js/structural-observations.js +1 -0
  75. package/target/main/ts/plugins/maintainability/maintainability.js +1 -0
  76. package/target/main/ts/plugins/maintainability/structural-smells.js +1 -0
  77. package/target/main/ts/plugins/source/forges.js +1 -0
  78. package/target/main/ts/plugins/structure/structure.js +1 -0
  79. package/target/main/ts/report/html/app/viewer-chart.js +5 -5
  80. package/target/main/ts/report/html/app/viewer-commits.d.ts +1 -1
  81. package/target/main/ts/report/html/app/viewer-commits.js +1 -1
  82. package/target/main/ts/report/html/app/viewer-data.d.ts +1 -1
  83. package/target/main/ts/report/html/app/viewer-data.js +4 -4
  84. package/target/main/ts/report/html/app/viewer-files.js +25 -8
  85. package/target/main/ts/report/html/app/viewer-metric-registry.d.ts +3 -1
  86. package/target/main/ts/report/html/app/viewer-metric-registry.js +24 -6
  87. package/target/main/ts/report/html/app/viewer-profile.js +3 -3
  88. package/target/main/ts/report/html/app/viewer-trends.d.ts +0 -1
  89. package/target/main/ts/report/html/app/viewer-trends.js +16 -6
  90. package/target/main/ts/report/html/app/viewer.js +48 -107
  91. package/target/main/ts/report/html/site/badges.js +1 -0
  92. package/target/main/ts/report/html/site/export-site.d.ts +2 -1
  93. package/target/main/ts/report/html/site/export-site.js +17 -24
  94. package/target/main/ts/report/html/site/exported-server.js +1 -0
  95. package/target/main/ts/report/html/site/local-server.js +1 -0
  96. package/target/main/ts/report/html/site/projects.js +1 -0
  97. package/target/main/ts/report/html/site/server.js +1 -0
  98. package/target/main/ts/report/html/site/source-route.js +1 -0
  99. package/target/main/ts/report/json/projections/commit-summary.d.ts +1 -0
  100. package/target/main/ts/report/json/projections/commit-summary.js +7 -1
  101. package/target/main/ts/report/json/projections/components.js +1 -0
  102. package/target/main/ts/report/json/projections/file-metrics.js +1 -0
  103. package/target/main/ts/report/json/projections/inspection-context.js +1 -0
  104. package/target/main/ts/report/json/projections/inspection-details.js +1 -0
  105. package/target/main/ts/report/json/projections/metric-values.js +1 -0
  106. package/target/main/ts/report/json/projections/public-history.js +1 -0
  107. package/target/main/ts/report/json/store/components.js +1 -0
  108. package/target/main/ts/report/json/store/local-store.js +1 -0
  109. package/target/main/ts/report/json/store/pull-review-store.js +1 -0
  110. package/target/main/ts/report/json/validation/metabranch.js +1 -0
  111. package/target/main/ts/report/json/validation/report.js +1 -0
  112. package/target/main/ts/report/json/validation/summary-validation.js +1 -0
  113. package/target/main/ts/report.js +1 -0
  114. package/target/main/ts/api/gh/github-pr-comment.d.ts +0 -4
  115. package/target/main/ts/api/gh/github-pr-comment.js +0 -107
  116. package/target/main/ts/cli/github-pr-comment.d.ts +0 -1
  117. package/target/main/ts/cli/github-pr-comment.js +0 -12
  118. package/target/main/ts/report/html/app/viewer-access.d.ts +0 -19
  119. package/target/main/ts/report/html/app/viewer-access.js +0 -25
package/README.md CHANGED
@@ -17,12 +17,13 @@ Run each command in your repository as `npx repometry <command>`.
17
17
  | `analyze` | Measures HEAD and saves the inspection under `.repometry/` |
18
18
  | `analyze HEAD~50..HEAD` | Measures the last 50 commits, oldest first, to build history. `--skip-saved` leaves commits already saved. |
19
19
  | `analyze --import lcov=coverage/lcov.info` | Adds coverage or scanner results from your tools. Repeat `--import` for each file. |
20
- | `report html` | Writes the public report (history, aggregates, badges) to `.repometry/report/html` |
21
- | `report html --mode private -o DIR` | Writes the private report, with per-file metrics, findings and source links, to `DIR` |
20
+ | `report html` | Writes the report (history, files, findings, badges, source links) to `.repometry/report/html`; `-o DIR` picks another folder |
22
21
  | `view` | Serves the report locally on a free port; `--port 3030` picks the port |
23
22
  | `plugins` | Lists the import formats, reporters and CI adapters |
24
23
  | `help [command]` | Shows the options of a command |
25
24
 
25
+ A report shows everything the store holds, so publish it only where you would publish that data.
26
+
26
27
  ## License
27
28
 
28
29
  [MIT](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repometry",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Track repository metrics without SaaS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -40,15 +40,16 @@
40
40
  }
41
41
  },
42
42
  "files": [
43
- "target/main"
43
+ "target/main",
44
+ "!target/main/**/*.map"
44
45
  ],
45
46
  "publishConfig": {
46
47
  "access": "public"
47
48
  },
48
49
  "scripts": {
49
50
  "build": "node -e \"require('node:fs').rmSync('target/main', { recursive: true, force: true })\" && tsc -p tsconfig.json && tsc -p tsconfig.browser.json && node -e \"const fs = require('node:fs'); fs.chmodSync('target/main/ts/cli/main.js', 0o755); fs.cpSync('src/main/resources', 'target/main/resources', { recursive: true })\"",
50
- "test": "npm run build && tsc -p tsconfig.test.json && node --test 'target/verification/test/ts/*.test.js'",
51
- "coverage": "npm run build && tsc -p tsconfig.json --sourceMap && tsc -p tsconfig.browser.json --sourceMap && tsc -p tsconfig.test.json --sourceMap && c8 --all --src target/main/ts --src target/verification/main/ts --include 'src/main/ts/**' --exclude-after-remap --reporter lcov --reporter text-summary --reports-dir target/coverage node --test 'target/verification/test/ts/*.test.js'",
51
+ "test": "npm run build && node -e \"require('node:fs').rmSync('target/verification', { recursive: true, force: true })\" && tsc -p tsconfig.test.json && node --test 'target/verification/test/ts/*.test.js'",
52
+ "coverage": "npm run build && node -e \"require('node:fs').rmSync('target/verification', { recursive: true, force: true })\" && tsc -p tsconfig.test.json && c8 --all --src target/main/ts --src target/verification/main/ts --include 'src/main/ts/**' --exclude-after-remap --reporter lcov --reporter text-summary --reports-dir target/coverage node --test 'target/verification/test/ts/*.test.js'",
52
53
  "prepack": "npm run build",
53
54
  "release": "npx --yes zx-semrel@1.25.1"
54
55
  },
@@ -21,7 +21,6 @@
21
21
  },
22
22
  "imports": { "$ref": "#/$defs/strings" },
23
23
  "reports": { "$ref": "#/$defs/strings" },
24
- "mode": { "enum": ["public", "private"] },
25
24
  "sources": { "type": "string", "minLength": 1 },
26
25
  "branch": { "type": "string", "minLength": 1 },
27
26
  "minCoverage": { "type": "number", "minimum": 0, "maximum": 100 },
@@ -26,6 +26,20 @@
26
26
  "committedAt": {
27
27
  "type": "string"
28
28
  },
29
+ "commit": {
30
+ "type": "object",
31
+ "required": ["subject", "author"],
32
+ "properties": {
33
+ "subject": { "type": "string" },
34
+ "author": {
35
+ "type": "object",
36
+ "required": ["name", "email"],
37
+ "properties": { "name": { "type": "string" }, "email": { "type": "string" } },
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "additionalProperties": false
42
+ },
29
43
  "appliedConfig": {
30
44
  "$ref": "urn:repometry:schema:report:1#/properties/appliedConfig"
31
45
  },
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta name="repometry-view" content="public">
6
+ <meta name="repometry-view" content="private">
7
7
  <meta name="repometry-project" content="">
8
8
  <title>Repometry</title>
9
9
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 32 32'%3E%3Cstyle%3E.f%7Bfill:%231f6b35%7D.s%7Bfill:%235fae6a%7D@media (prefers-color-scheme:dark)%7B.f%7Bfill:%238fe08f%7D.s%7Bfill:%233f8a4c%7D%7D%3C/style%3E%3Cpath class='f' d='M3 4 29 3 3 15z'/%3E%3Cpath class='s' d='M3 19 9 16.23V29H3zM13 14.38l6-2.77V29h-6zM23 9.77 29 7v22h-6z'/%3E%3C/svg%3E">
@@ -24,13 +24,13 @@
24
24
  <div class="tabs-row">
25
25
  <nav id="navigation" class="tabs" aria-label="Report">
26
26
  <a data-page="overview" href="#overview">Overview</a>
27
- <a data-page="issues" href="#issues" data-private hidden>Issues<span class="tab-count" id="issues-count"></span></a>
28
- <a data-page="hotspots" href="#hotspots" data-private hidden>Hotspots</a>
29
- <a data-page="metrics" href="#metrics" data-private hidden>Metrics</a>
27
+ <a data-page="issues" href="#issues" data-loaded hidden>Issues<span class="tab-count" id="issues-count"></span></a>
28
+ <a data-page="hotspots" href="#hotspots" data-loaded hidden>Hotspots</a>
29
+ <a data-page="metrics" href="#metrics" data-loaded hidden>Metrics</a>
30
30
  <a data-page="trends" href="#trends">Trends</a>
31
- <a data-page="pulls" href="#pulls" data-private hidden>Pull requests</a>
32
- <a data-page="settings" href="#settings" data-private hidden>Profile</a>
33
- <a data-page="diagnostics" href="#diagnostics" data-private hidden>Diagnostics<span class="tab-count" id="diagnostics-count"></span></a>
31
+ <a data-page="pulls" href="#pulls" data-loaded hidden>Pull requests</a>
32
+ <a data-page="settings" href="#settings" data-loaded hidden>Profile</a>
33
+ <a data-page="diagnostics" href="#diagnostics" data-loaded hidden>Diagnostics<span class="tab-count" id="diagnostics-count"></span></a>
34
34
  </nav>
35
35
  <div id="inspection-meta" class="inspection-meta" hidden>
36
36
  <a class="download" href="./history.json" download>Download data</a>
@@ -55,9 +55,9 @@
55
55
  </div>
56
56
  <div class="verdict">
57
57
  <span id="coverage-mark" class="mark ring" aria-hidden="true"></span>
58
- <span class="verdict-text"><button type="button" role="tab" class="verdict-tab" data-metric="coverage" aria-controls="trend" aria-describedby="coverage-detail">Coverage</button><span id="coverage-detail" class="verdict-detail"></span></span>
58
+ <span class="verdict-text"><button type="button" role="tab" class="verdict-tab" data-metric="coverage" aria-controls="trend" aria-describedby="coverage-detail coverage-kinds">Coverage</button><span id="coverage-detail" class="verdict-detail"></span><span id="coverage-kinds" class="verdict-detail verdict-more" hidden></span></span>
59
59
  </div>
60
- <div class="verdict" id="security-verdict" data-private hidden>
60
+ <div class="verdict" id="security-verdict" data-loaded hidden>
61
61
  <span id="security-mark" class="mark severity"></span>
62
62
  <span class="verdict-text"><button type="button" role="tab" class="verdict-tab" data-metric="security" aria-controls="trend" aria-describedby="security-mark security-detail">Security</button><span id="security-detail" class="verdict-detail"></span></span>
63
63
  </div>
@@ -72,7 +72,7 @@
72
72
  <dl id="lead" class="lead"></dl>
73
73
  </div>
74
74
  </div>
75
- <aside id="overview-hotspots" class="overview-aside" aria-labelledby="overview-hotspots-title" data-private hidden>
75
+ <aside id="overview-hotspots" class="overview-aside" aria-labelledby="overview-hotspots-title" data-loaded hidden>
76
76
  <div id="overview-sunburst"></div>
77
77
  <div class="section-heading">
78
78
  <h3 id="overview-hotspots-title">Hotspots</h3>
@@ -80,12 +80,6 @@
80
80
  </div>
81
81
  <div id="overview-hotspot-list"></div>
82
82
  </aside>
83
- <aside id="overview-public" class="overview-public" aria-labelledby="overview-public-title" hidden>
84
- <div class="panel public-panel">
85
- <h3 id="overview-public-title">Public report</h3>
86
- <div id="overview-public-content"></div>
87
- </div>
88
- </aside>
89
83
  </div>
90
84
  </section>
91
85
 
@@ -115,10 +109,6 @@
115
109
  <h2 id="settings-title">Profile</h2>
116
110
  <div id="settings-content"></div>
117
111
  </section>
118
- <section id="unavailable" aria-labelledby="unavailable-title" hidden>
119
- <h2 id="unavailable-title"></h2>
120
- <div id="unavailable-content" class="report-notice"></div>
121
- </section>
122
112
  </main>
123
113
  <footer class="site-footer">
124
114
  <div class="site-footer-inner">
@@ -1,8 +1,5 @@
1
1
  /* Repometry viewer: light, flat and quiet. Every colour is a token; the dark theme follows the system. */
2
2
  :root {
3
- --copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Crect x='3.6' y='3.6' width='7.4' height='7.4' rx='1.2'/%3E%3Cpath d='M8.4 3.6V2a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v5.4a1 1 0 0 0 1 1h1.6'/%3E%3C/svg%3E");
4
- --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4 4.8 9 10 3' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");
5
- --lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2.5 5V3.5a2.5 2.5 0 0 1 5 0V5' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Crect x='1' y='5' width='8' height='6.5' rx='1.2'/%3E%3C/svg%3E");
6
3
  --branch-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.4'%3E%3Ccircle cx='3' cy='2.25' r='1.25'/%3E%3Ccircle cx='3' cy='9.75' r='1.25'/%3E%3Ccircle cx='9' cy='3.75' r='1.25'/%3E%3Cpath d='M3 3.5v5M9 5c0 2.5-6 1.5-6 3.5'/%3E%3C/svg%3E");
7
4
  color-scheme: light dark;
8
5
  --page: #ffffff;
@@ -214,31 +211,6 @@ label select, label input { color: var(--ink); font-weight: 400; font-size: .875
214
211
  .tabs a { flex: none; display: inline-flex; align-items: center; gap: .375rem; min-height: 40px; padding: 0 .1rem; color: var(--secondary); font-size: .875rem; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
215
212
  .tabs a:hover { color: var(--ink); }
216
213
  .tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
217
- .tabs a[data-unavailable] { color: var(--muted); }
218
- .tabs a[data-unavailable]::after { content: ""; width: .625rem; height: .75rem; background: currentColor; -webkit-mask: var(--lock) center / contain no-repeat; mask: var(--lock) center / contain no-repeat; }
219
- .tabs a[data-unavailable]:hover { color: var(--secondary); }
220
- .tabs a[data-unavailable][aria-current] { color: var(--secondary); border-bottom-color: var(--rule-strong); }
221
- .report-notice { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1rem; padding: .75rem 1rem; font-size: .875rem; color: var(--secondary); background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); }
222
- .report-notice-text { flex: 1 1 22rem; margin: 0; line-height: 1.55; }
223
- .report-notice strong { font-weight: 600; color: var(--ink); }
224
- .report-notice code { color: var(--ink); white-space: nowrap; -webkit-user-select: all; user-select: all; }
225
- .report-notice-text > code, .report-notice-command { padding: .125rem .375rem; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 4px; }
226
- .report-notice-command { display: inline-flex; align-items: center; gap: .375rem; margin: 0; line-height: inherit; vertical-align: baseline; cursor: copy; }
227
- .report-notice-command code { font-size: .8125rem; }
228
- .report-notice-command::after { content: ""; width: .75rem; height: .75rem; background: var(--muted); -webkit-mask: var(--copy) center / contain no-repeat; mask: var(--copy) center / contain no-repeat; }
229
- .report-notice-command:hover { border-color: var(--secondary); }
230
- .report-notice-command:hover::after { background: var(--ink); }
231
- .report-notice-command[data-copied]::after { background: var(--good); -webkit-mask-image: var(--check); mask-image: var(--check); }
232
- #unavailable-content { max-width: 46rem; }
233
- .public-panel { padding: 1.25rem 1.25rem 1.375rem; }
234
- .public-panel h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }
235
- .public-panel h3::before { content: ""; width: .75rem; height: .875rem; background: var(--muted); -webkit-mask: var(--lock) center / contain no-repeat; mask: var(--lock) center / contain no-repeat; }
236
- .public-panel p { margin: 0 0 .875rem; font-size: .875rem; line-height: 1.55; color: var(--secondary); }
237
- .public-panel-command { display: flex; width: 100%; justify-content: space-between; min-height: 2.5rem; padding: 0 .75rem; background: var(--surface-2); border-radius: 6px; }
238
- .public-panel code { color: var(--ink); white-space: nowrap; -webkit-user-select: all; user-select: all; }
239
- .public-panel-command:hover { background: var(--surface); }
240
- .public-panel-command code { font-size: .875rem; }
241
- .public-panel > div > code { display: block; padding: .5rem .75rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: 6px; }
242
214
  .tab-count { min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--rule); color: var(--secondary); font-size: .75rem; font-weight: 600; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }
243
215
  .tab-count:empty { display: none; }
244
216
 
@@ -284,6 +256,9 @@ main:focus { outline: none; }
284
256
  .verdict-tab:focus-visible { outline: none; }
285
257
  .verdict:has(.verdict-tab:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
286
258
  .verdict-detail { color: var(--secondary); font-size: .875rem; overflow-wrap: anywhere; }
259
+ /* The coverage kinds beyond lines: a quieter second line under the headline's detail. */
260
+ .verdict-more { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
261
+ .verdict-more > span { white-space: nowrap; }
287
262
  /* A detail that counts something leads to exactly what it counts. */
288
263
  .verdict-detail a { position: relative; z-index: 1; color: inherit; text-decoration-color: var(--rule-strong); }
289
264
  .verdict-detail a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
@@ -486,7 +461,6 @@ tbody tr:last-child > * { border-bottom: 0; }
486
461
 
487
462
  @media (max-width: 72rem) {
488
463
  .overview-grid:has(> aside:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
489
- .public-panel { max-width: 36rem; }
490
464
  .overview-aside { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 0 2.5rem; align-items: start; }
491
465
  .overview-aside > :not(#overview-sunburst) { grid-column: 2; }
492
466
  .overview-aside #overview-sunburst { grid-row: 1 / span 4; }
@@ -89,3 +89,4 @@ function githubFiles() {
89
89
  throw new Error('GitHub reporting requires GITHUB_OUTPUT and GITHUB_STEP_SUMMARY');
90
90
  return { output, summary };
91
91
  }
92
+ //# sourceMappingURL=github.js.map
@@ -103,3 +103,4 @@ class BlobSession {
103
103
  return result.value;
104
104
  }
105
105
  }
106
+ //# sourceMappingURL=blob-batch.js.map
@@ -105,3 +105,4 @@ export function addedRanges(patch) {
105
105
  }
106
106
  return ranges;
107
107
  }
108
+ //# sourceMappingURL=changes.js.map
@@ -12,12 +12,10 @@ export function commitMetadataReader(repository) {
12
12
  result.set(sha, { subject: message.split(/\r?\n/, 1)[0], author: { name, email } });
13
13
  }
14
14
  }
15
- if (result.size) {
16
- for (const [sha, tags] of await tagsByCommit(repository)) {
17
- const commit = result.get(sha);
18
- if (commit)
19
- result.set(sha, { ...commit, tags });
20
- }
15
+ const requested = new Set(revisions);
16
+ for (const [sha, tags] of await tagsByCommit(repository)) {
17
+ if (requested.has(sha))
18
+ result.set(sha, { ...result.get(sha), tags });
21
19
  }
22
20
  return result;
23
21
  };
@@ -52,3 +50,4 @@ export async function resolveGitBranch(repository, name) {
52
50
  return resolveGitCommit(repository, `refs/remotes/origin/${name}`);
53
51
  }
54
52
  }
53
+ //# sourceMappingURL=commit-metadata.js.map
@@ -68,3 +68,4 @@ export function summarizeGitHistory(log, commit, paths, shallow) {
68
68
  window: { endingAt: new Date(endingAt * 1000).toISOString(), commits, shallow, capReached },
69
69
  };
70
70
  }
71
+ //# sourceMappingURL=git-churn.js.map
@@ -71,3 +71,4 @@ export class GitReportReader {
71
71
  return commit;
72
72
  }
73
73
  }
74
+ //# sourceMappingURL=git-reader.js.map
@@ -150,3 +150,4 @@ function readBlobs(directory, ids) {
150
150
  }
151
151
  return blobs;
152
152
  }
153
+ //# sourceMappingURL=git.js.map
@@ -28,3 +28,4 @@ async function physicalPath(path) {
28
28
  return join(await physicalPath(parent), basename(path));
29
29
  }
30
30
  }
31
+ //# sourceMappingURL=inspection-source.js.map
@@ -44,3 +44,4 @@ export async function sourceRemotes(repository) {
44
44
  const origins = await gitText(repository, ['remote', 'get-url', '--all', 'origin']).catch(() => '');
45
45
  return origins.split(/\r?\n/).filter(Boolean);
46
46
  }
47
+ //# sourceMappingURL=local-sources.js.map
@@ -33,3 +33,4 @@ export async function readWorkingTree(directory, output, excludes) {
33
33
  await visit(root, '');
34
34
  return { ...workingSnapshot(files), generatedExcluded: generatedExcluded.sort(comparePaths) };
35
35
  }
36
+ //# sourceMappingURL=local.js.map
@@ -32,3 +32,4 @@ export async function openMetabranchWorktree(repository, worktree, branch, sourc
32
32
  }
33
33
  return target;
34
34
  }
35
+ //# sourceMappingURL=metabranch-worktree.js.map
@@ -54,3 +54,4 @@ function blobMatches(oid, bytes) {
54
54
  function isMissing(error) {
55
55
  return error instanceof Error && 'code' in error && error.code === 'ENOENT';
56
56
  }
57
+ //# sourceMappingURL=source-cache.js.map
@@ -224,3 +224,4 @@ function optionalArray(value) {
224
224
  function safeIndex(value) {
225
225
  return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0;
226
226
  }
227
+ //# sourceMappingURL=finding-import.js.map
@@ -11,3 +11,4 @@ export async function readLcovFiles(input) {
11
11
  sources.sort((a, b) => comparePaths(a.digest, b.digest));
12
12
  return { text: sources.map(source => source.text).join('\n'), inputDigests: sources.map(source => source.digest) };
13
13
  }
14
+ //# sourceMappingURL=lcov-files.js.map
@@ -14,3 +14,4 @@ export async function readProfile(file, optional = false) {
14
14
  }
15
15
  return normalizeProfile(JSON.parse(text));
16
16
  }
17
+ //# sourceMappingURL=profile-file.js.map
@@ -43,3 +43,4 @@ export function remoteExecutor(endpoint, token) {
43
43
  return readReport(JSON.parse(Buffer.concat(parts).toString('utf8')));
44
44
  };
45
45
  }
46
+ //# sourceMappingURL=remote-executor.js.map
@@ -99,3 +99,4 @@ function readCoverage(value) {
99
99
  throw new Error('Invalid worker LCOV input');
100
100
  return { text: value.text, sourceRoot: value.sourceRoot };
101
101
  }
102
+ //# sourceMappingURL=worker-protocol.js.map
@@ -83,3 +83,4 @@ function reply(response, status, error) {
83
83
  response.writeHead(status, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store', Connection: 'close' });
84
84
  response.end(JSON.stringify({ error }));
85
85
  }
86
+ //# sourceMappingURL=worker.js.map
@@ -108,3 +108,4 @@ function distance(a, b) {
108
108
  }
109
109
  return row[b.length];
110
110
  }
111
+ //# sourceMappingURL=arguments.js.map
@@ -4,7 +4,6 @@ export declare function readConfig(root: string, input: Invocation): Promise<{
4
4
  ignore: readonly import("../index.js").FindingIgnoreRule[];
5
5
  imports: readonly string[];
6
6
  reports: readonly string[];
7
- mode: string | undefined;
8
7
  sources: string | undefined;
9
8
  branch: string | undefined;
10
9
  minCoverage: string | undefined;
@@ -3,17 +3,14 @@ import { resolve } from 'node:path';
3
3
  import { isRecord } from '../core/engine/plugin.js';
4
4
  import { normalizeProfile } from '../core/profile/profile.js';
5
5
  import { invocationDirectory } from './store.js';
6
- const keys = new Set(['$schema', 'exclude', 'ignore', 'imports', 'reports', 'mode', 'sources', 'branch',
6
+ const keys = new Set(['$schema', 'exclude', 'ignore', 'imports', 'reports', 'sources', 'branch',
7
7
  'minCoverage', 'minLines', 'maxCoverageDrop', 'maxNewIssues']);
8
8
  function parseConfig(value) {
9
9
  if (!isRecord(value) || Object.keys(value).some(key => !keys.has(key)))
10
10
  throw new Error('Invalid Repometry JSON configuration');
11
11
  string(value.$schema, '$schema');
12
12
  const profile = normalizeProfile({ exclude: value.exclude, ignore: value.ignore });
13
- const { mode } = value;
14
- if (mode !== undefined && mode !== 'private' && mode !== 'public')
15
- throw new Error('Config mode must be public or private');
16
- return { ...profile, imports: list(value.imports, 'imports'), reports: list(value.reports, 'reports'), mode,
13
+ return { ...profile, imports: list(value.imports, 'imports'), reports: list(value.reports, 'reports'),
17
14
  sources: string(value.sources, 'sources'), branch: string(value.branch, 'branch'),
18
15
  minCoverage: number(value.minCoverage, 'minCoverage'), minLines: number(value.minLines, 'minLines'),
19
16
  maxCoverageDrop: number(value.maxCoverageDrop, 'maxCoverageDrop'), maxNewIssues: number(value.maxNewIssues, 'maxNewIssues') };
@@ -58,3 +55,4 @@ function number(value, key) {
58
55
  throw new Error(`Config ${key} must be a number`);
59
56
  return String(value);
60
57
  }
58
+ //# sourceMappingURL=config.js.map
@@ -27,3 +27,4 @@ export function readInputs(base, inputs) {
27
27
  }
28
28
  return { lcov: lcov.length ? lcov : undefined, findings };
29
29
  }
30
+ //# sourceMappingURL=imports.js.map
@@ -34,8 +34,8 @@ const outputOption = option('PATH', 'Set the report output path.', { short: 'o'
34
34
  const baselineOption = option('PATH|git:REF', 'Select the baseline report store.');
35
35
  const branchOption = option('NAME', 'Name the branch represented by the report.');
36
36
  const renderOptions = {
37
- output: outputOption, mode: option('public|private', 'Select the report data to expose.'),
38
- sources: option('auto|none|ID[:SPEC]', 'Select source navigation for a private report.'),
37
+ output: outputOption,
38
+ sources: option('auto|none|ID[:SPEC]', 'Select where the report reads source files.'),
39
39
  title: option('NAME', 'Set the report title.'), components: option('FILE', 'Read component definitions.'),
40
40
  'no-footer': flag('Omit the footer.'), branch: branchOption,
41
41
  };
@@ -376,3 +376,4 @@ catch (error) {
376
376
  process.stderr.write(`repometry: ${error instanceof Error ? error.message : String(error)}\n`);
377
377
  process.exitCode = 1;
378
378
  }
379
+ //# sourceMappingURL=main.js.map
@@ -18,11 +18,6 @@ export async function outputReports(root, store, requested, input, config) {
18
18
  const output = input.text('output');
19
19
  if (output !== undefined && requested.length !== 1)
20
20
  throw new Error('--output requires exactly one report; use FORMAT=PATH for multiple reports');
21
- const mode = input.text('mode') ?? config.mode ?? 'public';
22
- if (mode !== 'public' && mode !== 'private')
23
- throw new Error('--mode must be public or private');
24
- if (input.text('components') && mode !== 'private')
25
- throw new Error('--components requires --mode private');
26
21
  const requests = requested.map(spec => {
27
22
  const equal = spec.indexOf('=');
28
23
  const format = equal < 0 ? spec : spec.slice(0, equal);
@@ -41,12 +36,12 @@ export async function outputReports(root, store, requested, input, config) {
41
36
  const repository = await findRepository(root);
42
37
  const readCommitMetadata = repository === undefined ? undefined : commitMetadataReader(repository);
43
38
  const sourceOption = input.text('sources') ?? config.sources;
44
- const sources = mode === 'private' ? resolveSourceLocator(sourceOption, { remotes: await sourceRemotes(root), env: process.env }) : undefined;
45
- const [components, pulls] = mode === 'private' ? await Promise.all([
39
+ const sources = resolveSourceLocator(sourceOption, { remotes: await sourceRemotes(root), env: process.env });
40
+ const [components, pulls] = await Promise.all([
46
41
  readComponents(componentsPath(root, input), input.text('components') === undefined),
47
42
  store.path ? listPullReviews(store.path) : [],
48
- ]) : [undefined, undefined];
49
- const options = { mode, sources, components, pulls, readCommitMetadata, branch: input.text('branch') ?? config.branch,
43
+ ]);
44
+ const options = { sources, components, pulls, readCommitMetadata, branch: input.text('branch') ?? config.branch,
50
45
  title: input.text('title') ?? (input.text('repo') ? basename(root) : undefined),
51
46
  footer: !input.flag('no-footer') };
52
47
  for (const request of requests) {
@@ -55,16 +50,16 @@ export async function outputReports(root, store, requested, input, config) {
55
50
  else {
56
51
  const rows = await store.reader.listSummaries?.() ?? (await store.reader.list()).filter(report => report.subject.kind === 'commit').map(commitSummary);
57
52
  const data = siteSummary(await withCommitMetadata(rows, readCommitMetadata), options);
58
- await writeSummary(request.path, data, mode === 'private');
53
+ await writeSummary(request.path, data);
59
54
  }
60
55
  }
61
56
  return requests;
62
57
  }
63
- async function writeSummary(path, data, privateReport) {
58
+ async function writeSummary(path, data) {
64
59
  await mkdir(dirname(path), { recursive: true });
65
60
  const temporary = `${path}.${randomUUID()}.tmp`;
66
61
  try {
67
- await writeFile(temporary, data, { mode: privateReport ? 0o600 : 0o644, flag: 'wx' });
62
+ await writeFile(temporary, data, { mode: 0o644, flag: 'wx' });
68
63
  await rename(temporary, path);
69
64
  }
70
65
  finally {
@@ -88,7 +83,7 @@ export async function viewTarget(input, port) {
88
83
  throw new Error(`No report at ${target}: expected a repository, a .repometry folder or an exported report`);
89
84
  }
90
85
  const root = repository ?? target;
91
- const store = selectStore(root, input.text('store') ?? (dataStore ? data : directStore ? target : undefined), resolve('.'));
86
+ const store = selectStore(root, input.text('store') ?? (dataStore ? data : directStore ? target : undefined), invocationDirectory(input));
92
87
  if ((await store.reader.listSummaries?.() ?? []).length === 0)
93
88
  throw new Error(`No saved inspections in ${store.path ?? input.text('store')}. Run repometry analyze first.`);
94
89
  const [components, pulls, config] = await Promise.all([
@@ -106,3 +101,4 @@ function componentsPath(root, input) {
106
101
  const explicit = input.text('components');
107
102
  return explicit === undefined ? resolve(root, '.repometry/components.json') : resolve(invocationDirectory(input), explicit);
108
103
  }
104
+ //# sourceMappingURL=reporting.js.map
@@ -13,3 +13,4 @@ export function parseRange(value) {
13
13
  throw new Error(`${value}: use one BASE..HEAD range`);
14
14
  return { base, head: head || 'HEAD' };
15
15
  }
16
+ //# sourceMappingURL=revisions.js.map
@@ -36,3 +36,4 @@ export async function isDirectory(path) {
36
36
  throw error;
37
37
  }
38
38
  }
39
+ //# sourceMappingURL=store.js.map
@@ -161,3 +161,4 @@ function claimMatcher(claims) {
161
161
  function diagnostic(operation, outcome, path) {
162
162
  return { operation, state: outcome.state, message: outcome.reason, ...(path === undefined ? {} : { path }) };
163
163
  }
164
+ //# sourceMappingURL=analyze-snapshot.js.map
@@ -5,6 +5,9 @@ import { churnSettings, gitChurn } from '../api/git/git-churn.js';
5
5
  export async function attachChurn(report, root, paths) {
6
6
  if (report.subject.kind !== 'commit')
7
7
  return report;
8
+ return withCommitDetails(await measureChurn(report, root, paths), root);
9
+ }
10
+ async function measureChurn(report, root, paths) {
8
11
  if (paths.length === 0)
9
12
  return withCommitTime(report, root);
10
13
  const { churnWindow, ...appliedConfig } = report.appliedConfig;
@@ -35,3 +38,13 @@ async function withCommitTime(report, root) {
35
38
  const time = Date.parse(timestamp.trim());
36
39
  return Number.isFinite(time) ? { ...report, schema: reportSchema, committedAt: new Date(time).toISOString() } : report;
37
40
  }
41
+ /** Message title and author of the inspected commit, kept with the inspection so exports need no Git history. */
42
+ async function withCommitDetails(report, root) {
43
+ const log = await gitText(root, ['show', '--no-show-signature', '--no-notes', '--no-patch', '--format=%an%x00%ae%x00%B', report.subject.id, '--'])
44
+ .catch(() => '');
45
+ const [name, email, message] = log.split('\0');
46
+ if (!name || email === undefined || message === undefined)
47
+ return report;
48
+ return { ...report, schema: reportSchema, commit: { subject: message.split(/\r?\n/, 1)[0], author: { name, email } } };
49
+ }
50
+ //# sourceMappingURL=attach-churn.js.map
@@ -54,3 +54,4 @@ async function readInputs(request, excludedPaths, excludes) {
54
54
  plugin: { id: diffCoverage.id, version: diffCoverage.version, api: diffCoverage.api },
55
55
  } };
56
56
  }
57
+ //# sourceMappingURL=diff-coverage.js.map
@@ -42,3 +42,4 @@ export async function attachFindings(report, inputs, root, findingRoot, excludes
42
42
  status: gaps.length > 0 ? 'partial' : report.status === 'not-applicable' && findingImports.some(item => item.units > 0)
43
43
  ? 'complete' : report.status, diagnostics: [...report.diagnostics, ...gaps] };
44
44
  }
45
+ //# sourceMappingURL=inspect.js.map
@@ -7,3 +7,4 @@ import { structure } from '../plugins/structure/structure.js';
7
7
  import { sourceProviders } from './sources.js';
8
8
  export const builtInPlugins = [babelProvider, structure, maintainability, duplication, coverage, diffCoverage, ...sourceProviders]
9
9
  .map(({ id, version, kinds, claims }) => ({ id, version, kinds, ...(claims ? { claims } : {}) }));
10
+ //# sourceMappingURL=plugin-list.js.map
@@ -14,3 +14,4 @@ export async function prepareMetabranch({ repository, worktree, branch, report }
14
14
  await new LocalReportStore(target).save(report);
15
15
  return ['manifest.json', 'summary.json', `commits/${report.subject.id}/report.json`];
16
16
  }
17
+ //# sourceMappingURL=prepare-metabranch.js.map
@@ -36,3 +36,4 @@ async function readIfAvailable(reader, id) {
36
36
  throw error;
37
37
  }
38
38
  }
39
+ //# sourceMappingURL=review.js.map
@@ -27,3 +27,4 @@ export function resolveSourceLocator(option, context, providers = sourceProvider
27
27
  }
28
28
  return providers.find(provider => provider.id === 'local')?.locate(context);
29
29
  }
30
+ //# sourceMappingURL=sources.js.map
@@ -47,3 +47,4 @@ function readInput(inputs, port, contract) {
47
47
  }
48
48
  return product.value;
49
49
  }
50
+ //# sourceMappingURL=execute.js.map
@@ -102,3 +102,4 @@ function text(value) {
102
102
  function optionalText(value) {
103
103
  return value === undefined || text(value);
104
104
  }
105
+ //# sourceMappingURL=manifest.js.map
@@ -104,3 +104,4 @@ function candidatesFor(contract, inputs, operations) {
104
104
  candidates.push({ operation });
105
105
  return candidates;
106
106
  }
107
+ //# sourceMappingURL=plan.js.map
@@ -83,3 +83,4 @@ function isJson(value, depth = 0) {
83
83
  return isRecord(value) && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null)
84
84
  && Object.values(value).every(item => isJson(item, depth + 1));
85
85
  }
86
+ //# sourceMappingURL=report-products.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=changes.js.map
@@ -12,3 +12,4 @@ export function isCloneSource(value) {
12
12
  && value.codeLines.every((line, index, lines) => isCount(line) && line > (lines[index - 1] ?? 0))
13
13
  && Array.isArray(value.candidates) && value.candidates.every(isCandidate);
14
14
  }
15
+ //# sourceMappingURL=clone-source.js.map
@@ -29,3 +29,4 @@ export const codeStructure = {
29
29
  && Array.isArray(value.observations) && value.observations.every(isObservation)
30
30
  && isCloneSource(value.clones) && value.clones.path === value.path,
31
31
  };
32
+ //# sourceMappingURL=code-structure.js.map
@@ -33,3 +33,4 @@ export function partitionFindings(items, ignore) {
33
33
  }
34
34
  return { findings, ignoredFindings };
35
35
  }
36
+ //# sourceMappingURL=finding-ignore.js.map