agents-md-gen 0.6.0 → 0.6.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 +5 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/detect.js +20 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -63,8 +63,8 @@ docker run --rm -v "$PWD":/workdir ghcr.io/peshino2012/agents-md-gen
|
|
|
63
63
|
- **PHP** — Composer, Laravel/Symfony detection, PHPUnit
|
|
64
64
|
- **.NET/C#** — NuGet, xUnit/NUnit/MSTest detection
|
|
65
65
|
- **Swift** — Swift Package Manager, XCTest detection
|
|
66
|
-
- **Monorepos** — Turborepo, Nx, Lerna, npm/yarn/pnpm workspaces,
|
|
67
|
-
each detected sub-package
|
|
66
|
+
- **Monorepos** — Turborepo, Nx, Lerna, Rush, npm/yarn/pnpm workspaces,
|
|
67
|
+
listing each detected sub-package
|
|
68
68
|
- CI (GitHub Actions), license, and top-level project structure
|
|
69
69
|
|
|
70
70
|
## GitHub Action
|
package/package.json
CHANGED
package/src/detect.js
CHANGED
|
@@ -368,7 +368,27 @@ function detectDocker(root) {
|
|
|
368
368
|
return { dockerfile, compose: compose || null };
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
+
function readJsonWithComments(root, ...segments) {
|
|
372
|
+
const text = readText(root, ...segments);
|
|
373
|
+
if (!text) return null;
|
|
374
|
+
try {
|
|
375
|
+
// rush.json commonly ships with // line comments, which aren't valid JSON.
|
|
376
|
+
return JSON.parse(text.replace(/^\s*\/\/.*$/gm, ''));
|
|
377
|
+
} catch {
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
371
382
|
function detectMonorepo(root) {
|
|
383
|
+
const rush = readJsonWithComments(root, 'rush.json');
|
|
384
|
+
if (rush && Array.isArray(rush.projects)) {
|
|
385
|
+
const packages = rush.projects
|
|
386
|
+
.map((p) => p.packageName)
|
|
387
|
+
.filter(Boolean)
|
|
388
|
+
.sort();
|
|
389
|
+
return { tool: 'Rush', packages };
|
|
390
|
+
}
|
|
391
|
+
|
|
372
392
|
const pkg = readJson(root, 'package.json');
|
|
373
393
|
const patterns = [];
|
|
374
394
|
|