agents-md-gen 0.6.1 → 0.7.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/CHANGELOG.md +7 -0
- package/README.md +2 -0
- package/package.json +5 -1
- package/src/detect.js +46 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
- Detect Dart/Flutter projects (`pubspec.yaml`, Flutter vs. plain
|
|
6
|
+
Dart, `flutter test`/`dart test`).
|
|
7
|
+
- Detect Elixir projects (`mix.exs`, Phoenix framework detection,
|
|
8
|
+
ExUnit).
|
|
9
|
+
|
|
3
10
|
## 0.6.1
|
|
4
11
|
|
|
5
12
|
- Detect Rush monorepos (`rush.json`, including the `//` line
|
package/README.md
CHANGED
|
@@ -63,6 +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
|
+
- **Dart/Flutter** — pub, `flutter test`/`dart test` detection
|
|
67
|
+
- **Elixir** — Mix, Phoenix framework detection, ExUnit
|
|
66
68
|
- **Monorepos** — Turborepo, Nx, Lerna, Rush, npm/yarn/pnpm workspaces,
|
|
67
69
|
listing each detected sub-package
|
|
68
70
|
- CI (GitHub Actions), license, and top-level project structure
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-md-gen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Generate a solid AGENTS.md / CLAUDE.md for any repo by detecting its stack, commands, and structure",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": {
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"csharp",
|
|
45
45
|
"swift",
|
|
46
46
|
"swiftpm",
|
|
47
|
+
"dart",
|
|
48
|
+
"flutter",
|
|
49
|
+
"elixir",
|
|
50
|
+
"phoenix",
|
|
47
51
|
"cli",
|
|
48
52
|
"codegen",
|
|
49
53
|
"developer-tools"
|
package/src/detect.js
CHANGED
|
@@ -229,6 +229,51 @@ function detectRuby(root) {
|
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
function detectDart(root) {
|
|
233
|
+
const pubspec = readText(root, 'pubspec.yaml');
|
|
234
|
+
if (!pubspec) return null;
|
|
235
|
+
const nameMatch = pubspec.match(/^name:\s*(\S+)/m);
|
|
236
|
+
const isFlutter = /^\s*flutter:/m.test(pubspec) || /flutter:\s*\n\s*sdk:\s*flutter/.test(pubspec);
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
ecosystem: isFlutter ? 'Flutter' : 'Dart',
|
|
240
|
+
name: nameMatch ? nameMatch[1] : null,
|
|
241
|
+
description: null,
|
|
242
|
+
packageManager: 'pub',
|
|
243
|
+
frameworks: [],
|
|
244
|
+
testFramework: exists(root, 'test') ? 'test' : null,
|
|
245
|
+
commands: {
|
|
246
|
+
install: 'dart pub get',
|
|
247
|
+
build: isFlutter ? 'flutter build' : null,
|
|
248
|
+
test: isFlutter ? 'flutter test' : 'dart test',
|
|
249
|
+
lint: 'dart analyze',
|
|
250
|
+
dev: isFlutter ? 'flutter run' : null,
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function detectElixir(root) {
|
|
256
|
+
const mixExs = readText(root, 'mix.exs');
|
|
257
|
+
if (!mixExs) return null;
|
|
258
|
+
const nameMatch = mixExs.match(/app:\s*:(\w+)/);
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
ecosystem: 'Elixir',
|
|
262
|
+
name: nameMatch ? nameMatch[1] : null,
|
|
263
|
+
description: null,
|
|
264
|
+
packageManager: 'mix',
|
|
265
|
+
frameworks: /phoenix/i.test(mixExs) ? ['Phoenix'] : [],
|
|
266
|
+
testFramework: exists(root, 'test') ? 'ExUnit' : null,
|
|
267
|
+
commands: {
|
|
268
|
+
install: 'mix deps.get',
|
|
269
|
+
build: 'mix compile',
|
|
270
|
+
test: exists(root, 'test') ? 'mix test' : null,
|
|
271
|
+
lint: exists(root, '.credo.exs') ? 'mix credo' : null,
|
|
272
|
+
dev: null,
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
232
277
|
function detectSwift(root) {
|
|
233
278
|
const manifest = readText(root, 'Package.swift');
|
|
234
279
|
if (!manifest) return null;
|
|
@@ -433,7 +478,7 @@ function detectMonorepo(root) {
|
|
|
433
478
|
}
|
|
434
479
|
|
|
435
480
|
function detectProject(root) {
|
|
436
|
-
const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet, detectSwift];
|
|
481
|
+
const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet, detectSwift, detectDart, detectElixir];
|
|
437
482
|
const stacks = detectors.map((fn) => fn(root)).filter(Boolean);
|
|
438
483
|
|
|
439
484
|
return {
|