@repometry/cli 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +2 -2
- package/target/main/resources/language-catalog.json +54 -0
- package/target/main/resources/licenses/spdx.json +746 -0
- package/target/main/resources/report/json/config-v2.schema.json +2 -1
- package/target/main/resources/report/json/file-metrics-v1.schema.json +2 -0
- package/target/main/resources/report/json/report-v2.schema.json +6 -3
- package/target/main/resources/report/json/repository-summary-v1.schema.json +14 -0
- package/target/main/resources/viewer/index.html +4 -0
- package/target/main/resources/viewer/styles.css +7 -2
- package/target/main/ts/api/git/git.d.ts +2 -1
- package/target/main/ts/api/git/git.js +4 -4
- package/target/main/ts/api/git/inspection-source.js +2 -2
- package/target/main/ts/api/git/local.d.ts +1 -1
- package/target/main/ts/api/git/local.js +5 -4
- package/target/main/ts/api/import/finding-import.js +2 -9
- package/target/main/ts/api/import/license-import.d.ts +2 -0
- package/target/main/ts/api/import/license-import.js +36 -0
- package/target/main/ts/api/import/repository-path.d.ts +1 -0
- package/target/main/ts/api/import/repository-path.js +10 -0
- package/target/main/ts/cli/imports.d.ts +2 -0
- package/target/main/ts/cli/imports.js +6 -2
- package/target/main/ts/cli/run.js +10 -4
- package/target/main/ts/compose/analysis-report.js +5 -2
- package/target/main/ts/compose/analysis-results.d.ts +3 -2
- package/target/main/ts/compose/analysis-results.js +15 -6
- package/target/main/ts/compose/analysis-steps.js +3 -0
- package/target/main/ts/compose/analyze-snapshot.d.ts +1 -1
- package/target/main/ts/compose/analyze-snapshot.js +7 -4
- package/target/main/ts/compose/built-ins.d.ts +2 -2
- package/target/main/ts/compose/built-ins.js +2 -2
- package/target/main/ts/compose/inspect.d.ts +2 -0
- package/target/main/ts/compose/inspect.js +7 -4
- package/target/main/ts/compose/language-discovery.js +3 -1
- package/target/main/ts/compose/load-plugins.js +4 -2
- package/target/main/ts/compose/phases.d.ts +7 -3
- package/target/main/ts/compose/phases.js +26 -10
- package/target/main/ts/plugins/built-in.d.ts +2 -0
- package/target/main/ts/plugins/built-in.js +4 -1
- package/target/main/ts/plugins/duplication/duplication.d.ts +1 -2
- package/target/main/ts/plugins/duplication/duplication.js +18 -17
- package/target/main/ts/plugins/json-spans.d.ts +11 -0
- package/target/main/ts/plugins/json-spans.js +86 -0
- package/target/main/ts/plugins/language-js/babel-provider.d.ts +34 -2
- package/target/main/ts/plugins/language-js/babel-provider.js +39 -35
- package/target/main/ts/plugins/language-js/js-security.d.ts +17 -2
- package/target/main/ts/plugins/language-js/js-security.js +24 -23
- package/target/main/ts/plugins/language-js/structural-observations.d.ts +2 -1
- package/target/main/ts/plugins/language-js/structural-observations.js +2 -2
- package/target/main/ts/plugins/legal/composer-lock.d.ts +2 -0
- package/target/main/ts/plugins/legal/composer-lock.js +24 -0
- package/target/main/ts/plugins/legal/dependencies.d.ts +73 -0
- package/target/main/ts/plugins/legal/dependencies.js +27 -0
- package/target/main/ts/plugins/legal/licenses.d.ts +19 -0
- package/target/main/ts/plugins/legal/licenses.js +112 -0
- package/target/main/ts/plugins/legal/npm-lock.d.ts +3 -0
- package/target/main/ts/plugins/legal/npm-lock.js +30 -0
- package/target/main/ts/plugins/legal/policy.d.ts +72 -0
- package/target/main/ts/plugins/legal/policy.js +149 -0
- package/target/main/ts/plugins/legal/sbom.d.ts +3 -0
- package/target/main/ts/plugins/legal/sbom.js +131 -0
- package/target/main/ts/plugins/legal/unverified-lock.d.ts +1 -0
- package/target/main/ts/plugins/legal/unverified-lock.js +21 -0
- package/target/main/ts/plugins/maintainability/maintainability.d.ts +1 -2
- package/target/main/ts/plugins/maintainability/maintainability.js +34 -33
- package/target/main/ts/plugins/maintainability/structural-smells.d.ts +1 -2
- package/target/main/ts/plugins/maintainability/structural-smells.js +5 -5
- package/target/main/ts/plugins/security/actions-security.d.ts +17 -2
- package/target/main/ts/plugins/security/actions-security.js +21 -16
- package/target/main/ts/plugins/security/dockerfile.d.ts +17 -2
- package/target/main/ts/plugins/security/dockerfile.js +23 -18
- package/target/main/ts/plugins/security/npm-supply-chain.d.ts +17 -2
- package/target/main/ts/plugins/security/npm-supply-chain.js +32 -110
- package/target/main/ts/plugins/security/secrets.d.ts +18 -6
- package/target/main/ts/plugins/security/secrets.js +27 -23
- package/target/main/ts/plugins/source/forges.js +25 -32
- package/target/main/ts/report/html/app/viewer-issue-group.js +1 -1
- package/target/main/ts/report/html/app/viewer-metric-registry.js +1 -1
- package/target/main/ts/report/html/app/viewer-metrics.d.ts +2 -1
- package/target/main/ts/report/html/app/viewer-metrics.js +7 -2
- package/target/main/ts/report/html/app/viewer-overview-cards.d.ts +1 -0
- package/target/main/ts/report/html/app/viewer-overview-cards.js +20 -1
- package/target/main/ts/report/html/app/viewer-overview-lead.js +4 -1
- package/target/main/ts/report/html/app/viewer-shell.js +3 -1
- package/target/main/ts/report/html/app/viewer-tokenizer.js +37 -9
- package/target/main/ts/report/html/app/viewer-trend-data.js +1 -0
- package/target/main/ts/report/html/app/viewer.js +5 -2
- 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
|
|
|
@@ -22,7 +25,7 @@ Git can serve as a project’s single source of truth for code, tests, docs, and
|
|
|
22
25
|
|
|
23
26
|
Node.js >=24
|
|
24
27
|
|
|
25
|
-
Repometry analyses JavaScript, TypeScript, Go, Python, Java and PHP with no extra tools. Ruby, Kotlin, HCL (Terraform), Lua, Scala, Elixir and
|
|
28
|
+
Repometry analyses JavaScript, TypeScript, Go, Python, Java and PHP with no extra tools. Ruby, Kotlin, HCL (Terraform), Lua, Scala, Elixir, Rust, R, Zig, OCaml and Perl come with `@repometry/all` or as plugins. C#, C, C++, Swift, Bash and Dart are separate plugins. See [Languages](docs/native-languages.md). Generating coverage uses your project's own test tools.
|
|
26
29
|
|
|
27
30
|
## Install
|
|
28
31
|
|
|
@@ -40,7 +43,7 @@ npm install --global repometry
|
|
|
40
43
|
| --- | --- | --- | --- |
|
|
41
44
|
| `@repometry/cli` | `repometry-cli` | JavaScript, TypeScript | about 8 MB |
|
|
42
45
|
| `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 | about
|
|
46
|
+
| `@repometry/all` | `repometry-all` | The above, Ruby, Kotlin, HCL, Lua, Scala, Elixir, Rust, R, Zig, OCaml, Perl | about 33 MB |
|
|
44
47
|
|
|
45
48
|
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
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repometry/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Track repository metrics without SaaS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -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.
|
|
70
|
+
"@repometry/core": "0.7.0",
|
|
71
71
|
"ajv": "8.20.0",
|
|
72
72
|
"semver": "7.8.6"
|
|
73
73
|
},
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"language": "bash",
|
|
4
|
+
"label": "Bash",
|
|
5
|
+
"package": "@repometry/language-bash",
|
|
6
|
+
"experimental": true,
|
|
7
|
+
"extensions": [
|
|
8
|
+
".sh",
|
|
9
|
+
".bash"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
2
12
|
{
|
|
3
13
|
"language": "c",
|
|
4
14
|
"label": "C",
|
|
@@ -30,6 +40,15 @@
|
|
|
30
40
|
".cs"
|
|
31
41
|
]
|
|
32
42
|
},
|
|
43
|
+
{
|
|
44
|
+
"language": "dart",
|
|
45
|
+
"label": "Dart",
|
|
46
|
+
"package": "@repometry/language-dart",
|
|
47
|
+
"experimental": true,
|
|
48
|
+
"extensions": [
|
|
49
|
+
".dart"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
33
52
|
{
|
|
34
53
|
"language": "elixir",
|
|
35
54
|
"label": "Elixir",
|
|
@@ -82,6 +101,24 @@
|
|
|
82
101
|
".lua"
|
|
83
102
|
]
|
|
84
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"language": "ocaml",
|
|
106
|
+
"label": "OCaml",
|
|
107
|
+
"package": "@repometry/language-ocaml",
|
|
108
|
+
"extensions": [
|
|
109
|
+
".ml",
|
|
110
|
+
".mli"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"language": "perl",
|
|
115
|
+
"label": "Perl",
|
|
116
|
+
"package": "@repometry/language-perl",
|
|
117
|
+
"extensions": [
|
|
118
|
+
".pl",
|
|
119
|
+
".pm"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
85
122
|
{
|
|
86
123
|
"language": "php",
|
|
87
124
|
"label": "PHP",
|
|
@@ -98,6 +135,15 @@
|
|
|
98
135
|
".py"
|
|
99
136
|
]
|
|
100
137
|
},
|
|
138
|
+
{
|
|
139
|
+
"language": "r",
|
|
140
|
+
"label": "R",
|
|
141
|
+
"package": "@repometry/language-r",
|
|
142
|
+
"extensions": [
|
|
143
|
+
".r",
|
|
144
|
+
".R"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
101
147
|
{
|
|
102
148
|
"language": "ruby",
|
|
103
149
|
"label": "Ruby",
|
|
@@ -130,5 +176,13 @@
|
|
|
130
176
|
"extensions": [
|
|
131
177
|
".swift"
|
|
132
178
|
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"language": "zig",
|
|
182
|
+
"label": "Zig",
|
|
183
|
+
"package": "@repometry/language-zig",
|
|
184
|
+
"extensions": [
|
|
185
|
+
".zig"
|
|
186
|
+
]
|
|
133
187
|
}
|
|
134
188
|
]
|