faf-cli 7.4.0 → 7.5.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/README.md +6 -4
- package/dist/cli.js +243 -242
- package/dist/cli.js.map +8 -7
- package/dist/core/types.d.ts +2 -1
- package/dist/detect/jvm.d.ts +40 -0
- package/dist/index.js +131 -130
- package/dist/index.js.map +8 -7
- package/package.json +1 -1
- package/project.faf +3 -3
package/dist/core/types.d.ts
CHANGED
|
@@ -138,10 +138,11 @@ export interface DetectedFramework {
|
|
|
138
138
|
version?: string;
|
|
139
139
|
}
|
|
140
140
|
/** Signal types for framework detection */
|
|
141
|
-
export type SignalType = 'dependency' | 'file' | 'devDependency';
|
|
141
|
+
export type SignalType = 'dependency' | 'file' | 'devDependency' | 'content';
|
|
142
142
|
export interface Signal {
|
|
143
143
|
type: SignalType;
|
|
144
144
|
key?: string;
|
|
145
|
+
/** File glob/name for `file`/`content`, or package key for dependency types. */
|
|
145
146
|
pattern?: string;
|
|
146
147
|
}
|
|
147
148
|
export interface FrameworkSignature {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JVM (Java / Kotlin) detection — CONTENT-AWARE pom / gradle classification.
|
|
3
|
+
*
|
|
4
|
+
* Kill line: pom / gradle alone ≠ type.
|
|
5
|
+
* One brand: JVM. Android + KMP are facets, not a second "Kotlin Edition".
|
|
6
|
+
*
|
|
7
|
+
* Signal graph: settings → modules → plugins/parents/packaging →
|
|
8
|
+
* version catalogs (libs.versions.toml) → deps/starters.
|
|
9
|
+
*
|
|
10
|
+
* Same composition as go.ts / csharp.ts: knowledge in jvm-detection.json.
|
|
11
|
+
*/
|
|
12
|
+
export type JvmAppType = 'mcp' | 'backend' | 'cli' | 'library' | 'mobile';
|
|
13
|
+
export interface JvmProject {
|
|
14
|
+
appType: JvmAppType;
|
|
15
|
+
/** Primary framework label (Spring Boot / Quarkus / …) or ''. */
|
|
16
|
+
framework: string;
|
|
17
|
+
buildTool: 'maven' | 'gradle';
|
|
18
|
+
/** Best-effort language signal for slots. */
|
|
19
|
+
mainLanguage: 'Java' | 'Kotlin' | 'Java/Kotlin';
|
|
20
|
+
/** Facets: android · multiplatform (not product brands). */
|
|
21
|
+
facets: string[];
|
|
22
|
+
/** Glass Hood rationale for .faf `# found:`. */
|
|
23
|
+
found: string;
|
|
24
|
+
}
|
|
25
|
+
interface Catalog {
|
|
26
|
+
plugins: Map<string, string>;
|
|
27
|
+
libraries: Map<string, string>;
|
|
28
|
+
}
|
|
29
|
+
/** True if directory looks like a JVM project root (or multi-module root). */
|
|
30
|
+
export declare function isJvmRoot(dir: string): boolean;
|
|
31
|
+
/** Minimal TOML-ish parse for gradle/libs.versions.toml plugins + libraries. */
|
|
32
|
+
export declare function parseVersionCatalog(content: string): Catalog;
|
|
33
|
+
/** Parse settings.gradle(.kts) include lines → relative module paths. */
|
|
34
|
+
export declare function parseSettingsIncludes(content: string): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Classify a JVM project directory (Maven and/or Gradle, multi-module aware).
|
|
37
|
+
* Returns null if no JVM markers at this directory.
|
|
38
|
+
*/
|
|
39
|
+
export declare function detectJvmProject(dir: string): JvmProject | null;
|
|
40
|
+
export {};
|