@chappibunny/repolens 1.8.0 → 1.8.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.
- package/CHANGELOG.md +11 -2
- package/README.md +8 -6
- package/package.json +1 -1
- package/src/cli.js +94 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoLens will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.8.1
|
|
6
|
+
|
|
7
|
+
### 📖 Documentation Refresh
|
|
8
|
+
|
|
9
|
+
- **README overhaul**: Updated test badge (379 passing), version reference (v1.8.1), document count (15 types), expanded audience table to include all 15 documents (GraphQL Schema, TypeScript Type Graph, Dependency Graph, Architecture Drift), added `uninstall` and `uninstall --force` to commands table.
|
|
10
|
+
- **DEVELOPMENT.md**: Updated test coverage (379 across 22 files), expanded test suite description to cover all test categories, fixed tarball version in install example.
|
|
11
|
+
- **CLI version test**: Now reads version from `package.json` dynamically instead of hardcoding — won't break on future version bumps.
|
|
12
|
+
|
|
5
13
|
## 1.8.0
|
|
6
14
|
|
|
7
15
|
### ✨ GitHub Models — First-Class AI Provider
|
|
@@ -11,6 +19,7 @@ All notable changes to RepoLens will be documented in this file.
|
|
|
11
19
|
- **Config-driven AI settings**: `ai.enabled`, `ai.provider`, `ai.model`, `ai.temperature`, and `ai.base_url` in `.repolens.yml` are now fully respected at runtime (env vars still take precedence). Previously these config values were ignored.
|
|
12
20
|
- **Init wizard fixes**: Provider selection now uses correct runtime values (`github`, `openai_compatible`, `anthropic`, `google`) instead of mismatched labels. The wizard now emits `ai.provider` to the generated YAML. Added `github_wiki` to publisher choices.
|
|
13
21
|
- **Demo AI upsell**: `repolens demo` now shows a hint about GitHub Models (free) when AI is not enabled, guiding users to `repolens init --interactive`.
|
|
22
|
+
- **Uninstall command**: `repolens uninstall` removes all RepoLens-generated files (`.repolens/`, `.repolens.yml`, workflow, `.env.example`, `README.repolens.md`) with confirmation prompt and `--force` flag.
|
|
14
23
|
- **Doctor validation**: `repolens doctor` now checks for `GITHUB_TOKEN` when provider is `github`, and `REPOLENS_AI_API_KEY` for other providers.
|
|
15
24
|
|
|
16
25
|
### 📖 Documentation
|
|
@@ -21,8 +30,8 @@ All notable changes to RepoLens will be documented in this file.
|
|
|
21
30
|
|
|
22
31
|
### 🧪 Tests
|
|
23
32
|
|
|
24
|
-
-
|
|
25
|
-
- **
|
|
33
|
+
- 29 new tests: provider config fallbacks, `isAIEnabled` with config, `getAIConfig` with config, GitHub Models defaults, init wizard content, doctor env validation, uninstall command (5 scenarios)
|
|
34
|
+
- **379 tests passing** across 22 test files
|
|
26
35
|
|
|
27
36
|
## 1.7.1
|
|
28
37
|
|
package/README.md
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/@chappibunny/repolens)
|
|
12
12
|
[](https://marketplace.visualstudio.com/items?itemName=CHAPIBUNNY.repolens-architecture)
|
|
13
|
-
[](https://github.com/CHAPIBUNNY/repolens/actions)
|
|
14
14
|
[](LICENSE)
|
|
15
15
|
|
|
16
16
|
**Your architecture docs are already outdated.** RepoLens fixes that.
|
|
17
17
|
|
|
18
18
|
RepoLens scans your repository, generates living architecture documentation, and publishes it to Notion, Confluence, GitHub Wiki, or Markdown — automatically on every push. Engineers get technical docs. Stakeholders get readable system overviews. Nobody writes a word.
|
|
19
19
|
|
|
20
|
-
> Stable as of v1.0 — [API guarantees](STABILITY.md) · [Security hardened](SECURITY.md) · v1.
|
|
20
|
+
> Stable as of v1.0 — [API guarantees](STABILITY.md) · [Security hardened](SECURITY.md) · v1.8.1
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -75,13 +75,13 @@ Run `npx @chappibunny/repolens migrate` to automatically update your workflow fi
|
|
|
75
75
|
|
|
76
76
|
## 📋 What It Generates
|
|
77
77
|
|
|
78
|
-
**
|
|
78
|
+
**15 document types** for three audiences — no manual writing required:
|
|
79
79
|
|
|
80
80
|
| Audience | Documents |
|
|
81
81
|
|---|---|
|
|
82
82
|
| **Stakeholders** (founders, PMs, ops) | Executive Summary · Business Domains · Data Flows |
|
|
83
|
-
| **Everyone** | System Overview · Developer Onboarding · Change Impact |
|
|
84
|
-
| **Engineers** | Architecture Overview · Module Catalog · API Surface · Route Map · System Map |
|
|
83
|
+
| **Everyone** | System Overview · Developer Onboarding · Change Impact · Architecture Drift |
|
|
84
|
+
| **Engineers** | Architecture Overview · Module Catalog · API Surface · Route Map · System Map · GraphQL Schema · TypeScript Type Graph · Dependency Graph |
|
|
85
85
|
|
|
86
86
|
**Two modes:** Deterministic (free, fast, always works) or AI-Enhanced (optional — GitHub Models, OpenAI, Anthropic, Google, Azure, Ollama).
|
|
87
87
|
|
|
@@ -155,6 +155,8 @@ Step-by-step setup for publishers, AI features, Notion, Confluence, GitHub Wiki,
|
|
|
155
155
|
| `repolens doctor` | Validate your setup |
|
|
156
156
|
| `repolens watch` | Auto-regenerate docs on file changes |
|
|
157
157
|
| `repolens migrate` | Upgrade from v0.3.0 workflows ([details](MIGRATION.md)) |
|
|
158
|
+
| `repolens uninstall` | Remove all RepoLens files (config, docs, workflow) |
|
|
159
|
+
| `repolens uninstall --force` | Remove without confirmation prompt |
|
|
158
160
|
| `repolens feedback` | Send feedback to the team |
|
|
159
161
|
|
|
160
162
|
---
|
|
@@ -237,7 +239,7 @@ When you open a pull request, RepoLens posts:
|
|
|
237
239
|
| [Configuration](CONFIGURATION.md) | Complete `.repolens.yml` schema and examples |
|
|
238
240
|
| [Environment Variables](ENVIRONMENT.md) | All env vars by publisher and feature |
|
|
239
241
|
| [Architecture](ARCHITECTURE.md) | Pipeline diagram, project structure |
|
|
240
|
-
| [Development](DEVELOPMENT.md) | Setup, tests (
|
|
242
|
+
| [Development](DEVELOPMENT.md) | Setup, tests (379 across 22 files), release process |
|
|
241
243
|
| [Security](SECURITY.md) | Threat model, secret detection, validation layers |
|
|
242
244
|
| [Telemetry](TELEMETRY.md) | Opt-in privacy-first usage analytics |
|
|
243
245
|
| [Troubleshooting](TROUBLESHOOTING.md) | Common issues and fixes |
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -145,6 +145,7 @@ Commands:
|
|
|
145
145
|
publish Scan, render, and publish documentation
|
|
146
146
|
demo Generate local docs without API keys (quick preview)
|
|
147
147
|
watch Watch for file changes and regenerate docs
|
|
148
|
+
uninstall Remove all RepoLens-generated files from your repository
|
|
148
149
|
feedback Send feedback to the RepoLens team
|
|
149
150
|
version Print the current RepoLens version
|
|
150
151
|
|
|
@@ -169,6 +170,8 @@ Examples:
|
|
|
169
170
|
repolens publish --config /path/.repolens.yml # Explicit config path
|
|
170
171
|
repolens demo # Quick local preview (no API keys)
|
|
171
172
|
repolens watch # Watch mode (Markdown only)
|
|
173
|
+
repolens uninstall # Remove all RepoLens files
|
|
174
|
+
repolens uninstall --target /tmp/my-repo # Uninstall from specific repo
|
|
172
175
|
repolens --version
|
|
173
176
|
`);
|
|
174
177
|
}
|
|
@@ -521,6 +524,96 @@ async function main() {
|
|
|
521
524
|
return;
|
|
522
525
|
}
|
|
523
526
|
|
|
527
|
+
if (command === "uninstall") {
|
|
528
|
+
await printBanner();
|
|
529
|
+
|
|
530
|
+
const targetDir = getArg("--target") || process.cwd();
|
|
531
|
+
const forceFlag = process.argv.includes("--force");
|
|
532
|
+
|
|
533
|
+
info("Scanning for RepoLens files...\n");
|
|
534
|
+
|
|
535
|
+
// All files/directories that RepoLens creates
|
|
536
|
+
const candidates = [
|
|
537
|
+
{ path: path.join(targetDir, ".repolens"), type: "dir", label: ".repolens/", source: "demo/publish" },
|
|
538
|
+
{ path: path.join(targetDir, ".repolens.yml"), type: "file", label: ".repolens.yml", source: "init" },
|
|
539
|
+
{ path: path.join(targetDir, ".github", "workflows", "repolens.yml"), type: "file", label: ".github/workflows/repolens.yml", source: "init" },
|
|
540
|
+
{ path: path.join(targetDir, ".env.example"), type: "file", label: ".env.example", source: "init" },
|
|
541
|
+
{ path: path.join(targetDir, "README.repolens.md"), type: "file", label: "README.repolens.md", source: "init" },
|
|
542
|
+
];
|
|
543
|
+
|
|
544
|
+
// Check which files exist
|
|
545
|
+
const found = [];
|
|
546
|
+
for (const item of candidates) {
|
|
547
|
+
try {
|
|
548
|
+
const stat = await fs.stat(item.path);
|
|
549
|
+
if ((item.type === "dir" && stat.isDirectory()) || (item.type === "file" && stat.isFile())) {
|
|
550
|
+
found.push(item);
|
|
551
|
+
}
|
|
552
|
+
} catch {
|
|
553
|
+
// File doesn't exist — skip
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
if (found.length === 0) {
|
|
558
|
+
info("No RepoLens files found. Nothing to remove.");
|
|
559
|
+
await closeTelemetry();
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
info("Found the following RepoLens files:\n");
|
|
564
|
+
for (const item of found) {
|
|
565
|
+
const icon = item.type === "dir" ? "📁" : "📄";
|
|
566
|
+
info(` ${icon} ${item.label} (created by ${item.source})`);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// Confirm unless --force
|
|
570
|
+
if (!forceFlag) {
|
|
571
|
+
const isCI = process.env.CI || process.env.GITHUB_ACTIONS;
|
|
572
|
+
const isTest = process.env.NODE_ENV === "test" || process.env.VITEST;
|
|
573
|
+
|
|
574
|
+
if (isCI || isTest) {
|
|
575
|
+
info("\nCI/test environment detected — skipping confirmation (use --force to suppress this message).");
|
|
576
|
+
} else {
|
|
577
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
578
|
+
const answer = await rl.question(`\nRemove ${found.length} item${found.length === 1 ? "" : "s"}? This cannot be undone. (y/N): `);
|
|
579
|
+
rl.close();
|
|
580
|
+
|
|
581
|
+
if (answer.trim().toLowerCase() !== "y") {
|
|
582
|
+
info("Uninstall cancelled.");
|
|
583
|
+
await closeTelemetry();
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// Remove files
|
|
590
|
+
let removed = 0;
|
|
591
|
+
for (const item of found) {
|
|
592
|
+
try {
|
|
593
|
+
if (item.type === "dir") {
|
|
594
|
+
await fs.rm(item.path, { recursive: true, force: true });
|
|
595
|
+
} else {
|
|
596
|
+
await fs.unlink(item.path);
|
|
597
|
+
}
|
|
598
|
+
info(` ✓ Removed ${item.label}`);
|
|
599
|
+
removed++;
|
|
600
|
+
} catch (err) {
|
|
601
|
+
error(` ✗ Failed to remove ${item.label}: ${err.message}`);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
info(`\n✓ Removed ${removed}/${found.length} RepoLens file${found.length === 1 ? "" : "s"}.`);
|
|
606
|
+
|
|
607
|
+
if (removed > 0) {
|
|
608
|
+
info("\nTo reinstall, run: repolens init");
|
|
609
|
+
info("To uninstall the npm package: npm uninstall @chappibunny/repolens");
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
trackUsage("uninstall", "success", { removed, total: found.length });
|
|
613
|
+
await closeTelemetry();
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
|
|
524
617
|
if (command === "feedback") {
|
|
525
618
|
await printBanner();
|
|
526
619
|
info("Send feedback to the RepoLens team");
|
|
@@ -567,7 +660,7 @@ async function main() {
|
|
|
567
660
|
}
|
|
568
661
|
|
|
569
662
|
error(`Unknown command: ${command}`);
|
|
570
|
-
error("Available commands: init, doctor, migrate, publish, demo, watch, feedback, version, help");
|
|
663
|
+
error("Available commands: init, doctor, migrate, publish, demo, watch, uninstall, feedback, version, help");
|
|
571
664
|
process.exit(EXIT_ERROR);
|
|
572
665
|
}
|
|
573
666
|
|