@repometry/all 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +70 -2
- package/package.json +52 -4
- package/target/main/ts/cli/main.d.ts +2 -0
- package/target/main/ts/cli/main.js +5 -0
- package/target/main/ts/distribution.d.ts +3 -0
- package/target/main/ts/distribution.js +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Idleware
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/idleware/repometry/master/.github/assets/readme-header-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/idleware/repometry/master/.github/assets/readme-header-light.svg" alt="repometry" width="287" height="48">
|
|
5
|
+
</picture>
|
|
6
|
+
</h1>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
<p align="center">Track repository metrics without SaaS</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/maintainability.svg" alt="Maintainability"></a>
|
|
12
|
+
<a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/coverage.svg" alt="Coverage"></a>
|
|
13
|
+
<a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/security.svg" alt="Security"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
## Demo
|
|
19
|
+
[https://idleware.github.io/repometry/](https://idleware.github.io/repometry/)
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
Node.js >=24
|
|
24
|
+
|
|
25
|
+
Repometry analyses JavaScript, TypeScript, Go, Python, Java and PHP with no extra tools. Ruby, Kotlin, HCL (Terraform), Lua, Scala, Elixir and Rust come with `@repometry/all` or as plugins. C#, C, C++ and Swift are separate plugins. See [Languages](docs/native-languages.md). Generating coverage uses your project's own test tools.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
# Run without installing.
|
|
31
|
+
npx repometry help
|
|
32
|
+
|
|
33
|
+
# Or install the repometry command.
|
|
34
|
+
npm install --global repometry
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Which package
|
|
38
|
+
|
|
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 | about 28 MB |
|
|
44
|
+
|
|
45
|
+
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
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
Run these commands in your repository. Without an install, start each with `npx`.
|
|
50
|
+
|
|
51
|
+
| Command | What it does |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `repometry analyze` | Analyze HEAD and save its inspection under `.repometry/`. |
|
|
54
|
+
| `repometry analyze HEAD~50..HEAD --skip-saved` | Build history for the last 50 commits, oldest first, skipping saved inspections. A long range uses every core; `--concurrency N` sets a limit. |
|
|
55
|
+
| `repometry analyze --import lcov=coverage/lcov.info --import sarif=results.sarif` | Import coverage and scanner results. Repeat `--import` for each file. [Commands and configuration](docs/cli.md#analysis-options) lists the formats, such as `cobertura` for `coverage.xml`. |
|
|
56
|
+
| `repometry view` | Open the report locally on a free port. Use `--port 3030` to choose a port. |
|
|
57
|
+
| `repometry report html` | Export a static report to `.repometry/report/html`. Use `repometry report html=DIR` for another folder. |
|
|
58
|
+
| `repometry review origin/main --import lcov=coverage/lcov.info` | Report the issues a change adds or worsens on the lines it changes, and their coverage. |
|
|
59
|
+
| `repometry store check --repair --from git:origin/repometry` | Check saved inspections. `--repair` restores missing data from a copy. |
|
|
60
|
+
| `repometry history` | List saved inspections. `show REVISION` prints one report. See [Reading inspections](docs/store.md#reading-inspections). |
|
|
61
|
+
| `repometry projects DIR` | Build an index page for a folder of exported reports. See [Projects index](docs/cli.md#projects-index). |
|
|
62
|
+
| `repometry plugins` | List the effective plugins and the supported formats. See [The plugins command](docs/cli.md#the-plugins-command). |
|
|
63
|
+
| `repometry help analyze` | Get help for a command. |
|
|
64
|
+
|
|
65
|
+
`repometry.config.json` holds the options that every run shares: exclusions, ignore rules, components, plugins and limits for `review`. See [Configuration](docs/cli.md#configuration). To add a plugin, see [Write a plugin](docs/plugins.md) and [Docker plugins](docs/process-plugins.md).
|
|
66
|
+
|
|
67
|
+
A report shows everything the store holds, so publish it only where you would publish that data.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repometry/all",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Repometry CLI with all released language plugins",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/idleware/repometry.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/idleware/repometry#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/idleware/repometry/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"repository",
|
|
16
|
+
"metrics",
|
|
17
|
+
"coverage",
|
|
18
|
+
"maintainability",
|
|
19
|
+
"static-analysis"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=24"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"repometry-all": "target/main/ts/cli/main.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"target/main",
|
|
30
|
+
"!target/main/**/*.map"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "node -e \"require('node:fs').rmSync('target/main', { recursive: true, force: true })\" && tsc -p tsconfig.json && node -e \"const fs = require('node:fs'); fs.chmodSync('target/main/ts/cli/main.js', 0o755); for (const file of ['README.md', 'LICENSE']) fs.cpSync('../../' + file, file)\"",
|
|
37
|
+
"prepack": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"exports": {},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@repometry/cli": "0.2.0",
|
|
42
|
+
"@repometry/language-go": "0.1.3",
|
|
43
|
+
"@repometry/language-python": "0.1.3",
|
|
44
|
+
"@repometry/language-java": "0.0.3",
|
|
45
|
+
"@repometry/language-php": "0.0.3",
|
|
46
|
+
"@repometry/language-ruby": "0.0.3",
|
|
47
|
+
"@repometry/language-kotlin": "0.0.3",
|
|
48
|
+
"@repometry/language-hcl": "0.0.2",
|
|
49
|
+
"@repometry/language-lua": "0.0.1",
|
|
50
|
+
"@repometry/language-scala": "0.0.0",
|
|
51
|
+
"@repometry/language-elixir": "0.0.0",
|
|
52
|
+
"@repometry/language-rust": "0.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { findPackageJSON } from 'node:module';
|
|
2
|
+
import { bundleLanguage } from '@repometry/cli/internal/distribution';
|
|
3
|
+
import goManifest, { go } from '@repometry/language-go';
|
|
4
|
+
import pythonManifest, { python } from '@repometry/language-python';
|
|
5
|
+
import javaManifest, { java } from '@repometry/language-java';
|
|
6
|
+
import phpManifest, { php } from '@repometry/language-php';
|
|
7
|
+
import rubyManifest, { ruby } from '@repometry/language-ruby';
|
|
8
|
+
import kotlinManifest, { kotlin } from '@repometry/language-kotlin';
|
|
9
|
+
import hclManifest, { hcl } from '@repometry/language-hcl';
|
|
10
|
+
import luaManifest, { lua } from '@repometry/language-lua';
|
|
11
|
+
import scalaManifest, { scala } from '@repometry/language-scala';
|
|
12
|
+
import elixirManifest, { elixir } from '@repometry/language-elixir';
|
|
13
|
+
import rustManifest, { rust } from '@repometry/language-rust';
|
|
14
|
+
const distribution = {
|
|
15
|
+
bundled: [
|
|
16
|
+
bundleLanguage(goManifest, go.language),
|
|
17
|
+
bundleLanguage(pythonManifest, python.language),
|
|
18
|
+
bundleLanguage(javaManifest, java.language, true),
|
|
19
|
+
bundleLanguage(phpManifest, php.language, true),
|
|
20
|
+
bundleLanguage(rubyManifest, ruby.language, true),
|
|
21
|
+
bundleLanguage(kotlinManifest, kotlin.language, true),
|
|
22
|
+
bundleLanguage(hclManifest, hcl.language, true),
|
|
23
|
+
bundleLanguage(luaManifest, lua.language, true),
|
|
24
|
+
bundleLanguage(scalaManifest, scala.language, true),
|
|
25
|
+
bundleLanguage(elixirManifest, elixir.language, true),
|
|
26
|
+
bundleLanguage(rustManifest, rust.language, true),
|
|
27
|
+
],
|
|
28
|
+
moduleUrl: import.meta.url,
|
|
29
|
+
packageUrl: new URL('../../../package.json', import.meta.url).href,
|
|
30
|
+
resolvePackage: name => ({ url: import.meta.resolve(name), manifest: findPackageJSON(name, import.meta.url) }),
|
|
31
|
+
};
|
|
32
|
+
export default distribution;
|
|
33
|
+
//# sourceMappingURL=distribution.js.map
|