agents-md-gen 0.5.0 → 0.6.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 +4 -0
- package/README.md +1 -0
- package/package.json +3 -1
- package/src/detect.js +24 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ docker run --rm -v "$PWD":/workdir ghcr.io/peshino2012/agents-md-gen
|
|
|
62
62
|
- **Java/Kotlin** — Maven, Gradle (with wrapper detection)
|
|
63
63
|
- **PHP** — Composer, Laravel/Symfony detection, PHPUnit
|
|
64
64
|
- **.NET/C#** — NuGet, xUnit/NUnit/MSTest detection
|
|
65
|
+
- **Swift** — Swift Package Manager, XCTest detection
|
|
65
66
|
- **Monorepos** — Turborepo, Nx, Lerna, npm/yarn/pnpm workspaces, listing
|
|
66
67
|
each detected sub-package
|
|
67
68
|
- 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.6.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": {
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"laravel",
|
|
43
43
|
"dotnet",
|
|
44
44
|
"csharp",
|
|
45
|
+
"swift",
|
|
46
|
+
"swiftpm",
|
|
45
47
|
"cli",
|
|
46
48
|
"codegen",
|
|
47
49
|
"developer-tools"
|
package/src/detect.js
CHANGED
|
@@ -229,6 +229,29 @@ function detectRuby(root) {
|
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
function detectSwift(root) {
|
|
233
|
+
const manifest = readText(root, 'Package.swift');
|
|
234
|
+
if (!manifest) return null;
|
|
235
|
+
const nameMatch = manifest.match(/name:\s*"([^"]+)"/);
|
|
236
|
+
const usesXCTest = /XCTest/.test(manifest) || exists(root, 'Tests');
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
ecosystem: 'Swift',
|
|
240
|
+
name: nameMatch ? nameMatch[1] : null,
|
|
241
|
+
description: null,
|
|
242
|
+
packageManager: 'swiftpm',
|
|
243
|
+
frameworks: [],
|
|
244
|
+
testFramework: usesXCTest ? 'XCTest' : null,
|
|
245
|
+
commands: {
|
|
246
|
+
install: 'swift package resolve',
|
|
247
|
+
build: 'swift build',
|
|
248
|
+
test: usesXCTest ? 'swift test' : null,
|
|
249
|
+
lint: exists(root, '.swiftlint.yml') ? 'swiftlint' : null,
|
|
250
|
+
dev: null,
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
232
255
|
function detectPhp(root) {
|
|
233
256
|
const composer = readJson(root, 'composer.json');
|
|
234
257
|
if (!composer) return null;
|
|
@@ -390,7 +413,7 @@ function detectMonorepo(root) {
|
|
|
390
413
|
}
|
|
391
414
|
|
|
392
415
|
function detectProject(root) {
|
|
393
|
-
const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet];
|
|
416
|
+
const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet, detectSwift];
|
|
394
417
|
const stacks = detectors.map((fn) => fn(root)).filter(Boolean);
|
|
395
418
|
|
|
396
419
|
return {
|