faf-cli 7.2.1 → 7.4.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/README.md +8 -2
- package/dist/cli.js +240 -239
- package/dist/cli.js.map +11 -9
- package/dist/core/tiers.d.ts +0 -1
- package/dist/detect/csharp.d.ts +50 -0
- package/dist/detect/go.d.ts +25 -0
- package/dist/index.js +149 -148
- package/dist/index.js.map +10 -8
- package/package.json +1 -1
- package/project.faf +2 -2
package/dist/core/tiers.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import type { TierInfo } from './types.js';
|
|
|
11
11
|
* ♡ heart (empty — good luck)
|
|
12
12
|
*
|
|
13
13
|
* All three 100% glyphs mean the same score: ✪ work · 🏆 social · Trophy Mark (PNG) visual.
|
|
14
|
-
* See PLANET-FAF/memory/trophy-three-glyphs-one-meaning.md
|
|
15
14
|
*/
|
|
16
15
|
export declare const TIERS: TierInfo[];
|
|
17
16
|
/** Get the display badge for a tier */
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* C# /.NET detection — CONTENT-AWARE .csproj classification.
|
|
3
|
+
*
|
|
4
|
+
* A .csproj alone does NOT mean Web API / ASP.NET. Microsoft encodes kind in
|
|
5
|
+
* Project Sdk, then OutputType / Use* props / PackageReference / FrameworkReference.
|
|
6
|
+
* Kill line: .csproj alone ≠ type.
|
|
7
|
+
*
|
|
8
|
+
* Same composition pattern as go.ts / dart.ts: knowledge in csharp-detection.json,
|
|
9
|
+
* logic here. Turbo-Cat + scanner both call detectCsharpProject so they agree.
|
|
10
|
+
*/
|
|
11
|
+
/** FAF project types we emit (aligned with Go + mobile for MAUI). */
|
|
12
|
+
export type CsharpAppType = 'mcp' | 'backend' | 'cli' | 'library' | 'mobile';
|
|
13
|
+
export interface CsharpProject {
|
|
14
|
+
appType: CsharpAppType;
|
|
15
|
+
/** Assembly / project name from filename, or ''. */
|
|
16
|
+
projectName: string;
|
|
17
|
+
/** TargetFramework(s) raw string if present. */
|
|
18
|
+
targetFramework: string;
|
|
19
|
+
/** Sdk attribute (e.g. Microsoft.NET.Sdk.Web). */
|
|
20
|
+
sdk: string;
|
|
21
|
+
/** Primary framework label (ASP.NET Core / Worker / Cobra-equivalent / …). */
|
|
22
|
+
framework: string;
|
|
23
|
+
/** Human-readable rationale for the .faf `# found:` comment (Glass Hood). */
|
|
24
|
+
found: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ParsedCsproj {
|
|
27
|
+
sdk: string;
|
|
28
|
+
outputType: string;
|
|
29
|
+
targetFramework: string;
|
|
30
|
+
isTestProject: boolean;
|
|
31
|
+
useMaui: boolean;
|
|
32
|
+
useWpf: boolean;
|
|
33
|
+
useWindowsForms: boolean;
|
|
34
|
+
packages: Set<string>;
|
|
35
|
+
frameworkRefs: Set<string>;
|
|
36
|
+
}
|
|
37
|
+
/** Parse the load-bearing fields of an SDK-style .csproj (regex — adequate for detection). */
|
|
38
|
+
export declare function parseCsproj(content: string): ParsedCsproj;
|
|
39
|
+
/** Classify a single parsed csproj. */
|
|
40
|
+
export declare function classifyCsproj(parsed: ParsedCsproj, projectFileName: string): Omit<CsharpProject, 'projectName'> & {
|
|
41
|
+
projectName: string;
|
|
42
|
+
};
|
|
43
|
+
/** List root-level .csproj filenames in a directory. */
|
|
44
|
+
export declare function listRootCsprojs(dir: string): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Classify a C# project directory from root-level .csproj file(s).
|
|
47
|
+
* Multiple projects: pick highest-priority classification (MCP > mobile > backend > cli > library).
|
|
48
|
+
* Returns null if no .csproj at this directory level.
|
|
49
|
+
*/
|
|
50
|
+
export declare function detectCsharpProject(dir: string): CsharpProject | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go detection — CONTENT-AWARE go.mod classification.
|
|
3
|
+
*
|
|
4
|
+
* A go.mod alone does NOT mean "backend" or "CLI". The same module file backs
|
|
5
|
+
* libraries, HTTP servers (Gin / Echo / Fiber / Chi), CLIs (Cobra), and MCP
|
|
6
|
+
* servers (mcp-go). We read require paths and light layout signals, then branch.
|
|
7
|
+
*
|
|
8
|
+
* Same composition pattern as dart.ts: knowledge in go-detection.json, logic here.
|
|
9
|
+
* Turbo-Cat + scanner both call detectGoProject so they agree by construction.
|
|
10
|
+
*/
|
|
11
|
+
export type GoAppType = 'mcp' | 'backend' | 'cli' | 'library';
|
|
12
|
+
export interface GoProject {
|
|
13
|
+
/** faf app_type — MCP→mcp, server→backend, CLI→cli, else library. */
|
|
14
|
+
appType: GoAppType;
|
|
15
|
+
/** Module path from `module` line, or ''. */
|
|
16
|
+
modulePath: string;
|
|
17
|
+
/** Primary framework (Gin / Cobra / …) or ''. */
|
|
18
|
+
framework: string;
|
|
19
|
+
/** Human-readable rationale for the .faf `# found:` comment (Glass Hood). */
|
|
20
|
+
found: string;
|
|
21
|
+
}
|
|
22
|
+
/** Collect require module paths from go.mod (require X and require ( … ) blocks). */
|
|
23
|
+
export declare function goModRequires(content: string): Set<string>;
|
|
24
|
+
/** Classify a Go project from go.mod (+ light layout). Returns null if not Go. */
|
|
25
|
+
export declare function detectGoProject(dir: string): GoProject | null;
|