@repometry/cli 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +10 -5
  2. package/package.json +3 -3
  3. package/target/main/resources/licenses/spdx.json +746 -0
  4. package/target/main/resources/report/json/config-v2.schema.json +2 -1
  5. package/target/main/resources/report/json/file-metrics-v1.schema.json +2 -0
  6. package/target/main/resources/report/json/report-v2.schema.json +6 -3
  7. package/target/main/resources/report/json/repository-summary-v1.schema.json +14 -0
  8. package/target/main/resources/viewer/index.html +5 -1
  9. package/target/main/resources/viewer/styles.css +7 -3
  10. package/target/main/ts/api/git/git.d.ts +2 -1
  11. package/target/main/ts/api/git/git.js +4 -4
  12. package/target/main/ts/api/git/inspection-source.js +2 -2
  13. package/target/main/ts/api/git/local.d.ts +1 -1
  14. package/target/main/ts/api/git/local.js +5 -4
  15. package/target/main/ts/api/import/finding-import.js +2 -9
  16. package/target/main/ts/api/import/license-import.d.ts +2 -0
  17. package/target/main/ts/api/import/license-import.js +36 -0
  18. package/target/main/ts/api/import/repository-path.d.ts +1 -0
  19. package/target/main/ts/api/import/repository-path.js +10 -0
  20. package/target/main/ts/cli/distribution.d.ts +8 -0
  21. package/target/main/ts/cli/distribution.js +23 -0
  22. package/target/main/ts/cli/imports.d.ts +2 -0
  23. package/target/main/ts/cli/imports.js +6 -2
  24. package/target/main/ts/cli/run.d.ts +2 -2
  25. package/target/main/ts/cli/run.js +17 -8
  26. package/target/main/ts/compose/analysis-report.js +5 -2
  27. package/target/main/ts/compose/analysis-results.d.ts +3 -2
  28. package/target/main/ts/compose/analysis-results.js +15 -6
  29. package/target/main/ts/compose/analysis-steps.js +3 -0
  30. package/target/main/ts/compose/analyze-snapshot.d.ts +1 -1
  31. package/target/main/ts/compose/analyze-snapshot.js +7 -4
  32. package/target/main/ts/compose/built-ins.d.ts +2 -2
  33. package/target/main/ts/compose/built-ins.js +2 -2
  34. package/target/main/ts/compose/inspect.d.ts +2 -0
  35. package/target/main/ts/compose/inspect.js +7 -4
  36. package/target/main/ts/compose/load-plugins.js +4 -2
  37. package/target/main/ts/compose/phases.d.ts +7 -3
  38. package/target/main/ts/compose/phases.js +26 -10
  39. package/target/main/ts/plugins/built-in.d.ts +2 -0
  40. package/target/main/ts/plugins/built-in.js +4 -1
  41. package/target/main/ts/plugins/json-spans.d.ts +11 -0
  42. package/target/main/ts/plugins/json-spans.js +86 -0
  43. package/target/main/ts/plugins/legal/composer-lock.d.ts +2 -0
  44. package/target/main/ts/plugins/legal/composer-lock.js +24 -0
  45. package/target/main/ts/plugins/legal/dependencies.d.ts +73 -0
  46. package/target/main/ts/plugins/legal/dependencies.js +27 -0
  47. package/target/main/ts/plugins/legal/licenses.d.ts +19 -0
  48. package/target/main/ts/plugins/legal/licenses.js +112 -0
  49. package/target/main/ts/plugins/legal/npm-lock.d.ts +3 -0
  50. package/target/main/ts/plugins/legal/npm-lock.js +30 -0
  51. package/target/main/ts/plugins/legal/policy.d.ts +72 -0
  52. package/target/main/ts/plugins/legal/policy.js +149 -0
  53. package/target/main/ts/plugins/legal/sbom.d.ts +3 -0
  54. package/target/main/ts/plugins/legal/sbom.js +131 -0
  55. package/target/main/ts/plugins/legal/unverified-lock.d.ts +1 -0
  56. package/target/main/ts/plugins/legal/unverified-lock.js +21 -0
  57. package/target/main/ts/plugins/security/npm-supply-chain.js +2 -86
  58. package/target/main/ts/report/html/app/viewer-issue-group.js +1 -1
  59. package/target/main/ts/report/html/app/viewer-metric-registry.js +1 -1
  60. package/target/main/ts/report/html/app/viewer-metrics.d.ts +2 -1
  61. package/target/main/ts/report/html/app/viewer-metrics.js +7 -2
  62. package/target/main/ts/report/html/app/viewer-overview-cards.d.ts +1 -0
  63. package/target/main/ts/report/html/app/viewer-overview-cards.js +20 -19
  64. package/target/main/ts/report/html/app/viewer-overview-lead.js +4 -1
  65. package/target/main/ts/report/html/app/viewer-shell.js +3 -1
  66. package/target/main/ts/report/html/app/viewer-tokenizer.js +35 -8
  67. package/target/main/ts/report/html/app/viewer-trend-data.js +1 -0
  68. package/target/main/ts/report/html/app/viewer.js +5 -2
  69. package/target/main/ts/report/json/validation/report.js +2 -2
package/README.md CHANGED
@@ -15,6 +15,9 @@
15
15
 
16
16
  Git can serve as a project’s single source of truth for code, tests, docs, and CI configuration. Repometry lets you keep coverage and maintainability metrics alongside your code, commit by commit.
17
17
 
18
+ Repometry checks dependency licenses from npm and Composer lockfiles or an imported SBOM.
19
+ Configure a policy and record package exceptions. [License checks](docs/cli.md#license-checks)
20
+
18
21
  ## Demo
19
22
  [https://idleware.github.io/repometry/](https://idleware.github.io/repometry/)
20
23
 
@@ -36,11 +39,13 @@ npm install --global repometry
36
39
 
37
40
  ### Which package
38
41
 
39
- | Package | Command | Languages | Install size |
40
- | --- | --- | --- | --- |
41
- | `@repometry/cli` | `repometry-cli` | JavaScript, TypeScript | about 8 MB |
42
- | `repometry` | `repometry` | The above, Go, Python, Java, PHP | about 15 MB |
43
- | `@repometry/all` | `repometry-all` | The above, Ruby, Kotlin, HCL, Lua, Scala, Elixir, Rust, R, Zig, OCaml, Perl | about 33 MB |
42
+ | Package | Languages | Install size |
43
+ | --- | --- | --- |
44
+ | `@repometry/cli` | JavaScript, TypeScript | about 8 MB |
45
+ | `repometry` | The above, Go, Python, Java, PHP | about 15 MB |
46
+ | `@repometry/all` | The above, Ruby, Kotlin, HCL, Lua, Scala, Elixir, Rust, R, Zig, OCaml, Perl | about 33 MB |
47
+
48
+ Every package uses the `repometry` command. If several are installed together, the command uses the largest distribution.
44
49
 
45
50
  To add a language to `@repometry/cli`, install its `@repometry/language-*` package with your package manager and list it in `plugins`. Repometry never installs a plugin. See [Packages](docs/cli.md#packages).
46
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repometry/cli",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Track repository metrics without SaaS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "node": ">=24"
24
24
  },
25
25
  "bin": {
26
- "repometry-cli": "target/main/ts/cli/main.js"
26
+ "repometry": "target/main/ts/cli/main.js"
27
27
  },
28
28
  "exports": {
29
29
  ".": {
@@ -67,7 +67,7 @@
67
67
  "dependencies": {
68
68
  "@babel/parser": "7.29.15",
69
69
  "@babel/types": "7.29.15",
70
- "@repometry/core": "0.6.0",
70
+ "@repometry/core": "0.1.0",
71
71
  "ajv": "8.20.0",
72
72
  "semver": "7.8.6"
73
73
  },