faf-cli 2.3.3 → 2.3.5
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.d.ts.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/chat.d.ts +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +177 -6
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/quick.d.ts.map +1 -1
- package/dist/commands/quick.js +30 -5
- package/dist/commands/quick.js.map +1 -1
- package/dist/compiler/faf-compiler.d.ts.map +1 -1
- package/dist/compiler/faf-compiler.js +48 -2
- package/dist/compiler/faf-compiler.js.map +1 -1
- package/dist/generators/faf-generator-championship.d.ts +6 -0
- package/dist/generators/faf-generator-championship.d.ts.map +1 -1
- package/dist/generators/faf-generator-championship.js +19 -3
- package/dist/generators/faf-generator-championship.js.map +1 -1
- package/dist/tests/test-chrome-fuzzy.d.ts +5 -0
- package/dist/tests/test-chrome-fuzzy.d.ts.map +1 -0
- package/dist/tests/test-chrome-fuzzy.js +71 -0
- package/dist/tests/test-chrome-fuzzy.js.map +1 -0
- package/dist/utils/chrome-extension-confirmer.d.ts +41 -0
- package/dist/utils/chrome-extension-confirmer.d.ts.map +1 -0
- package/dist/utils/chrome-extension-confirmer.js +188 -0
- package/dist/utils/chrome-extension-confirmer.js.map +1 -0
- package/dist/utils/chrome-extension-detector.d.ts +74 -0
- package/dist/utils/chrome-extension-detector.d.ts.map +1 -0
- package/dist/utils/chrome-extension-detector.js +268 -0
- package/dist/utils/chrome-extension-detector.js.map +1 -0
- package/dist/utils/fab-formats-engine.d.ts.map +1 -1
- package/dist/utils/fab-formats-engine.js +3 -0
- package/dist/utils/fab-formats-engine.js.map +1 -1
- package/dist/utils/turbo-cat-knowledge.d.ts.map +1 -1
- package/dist/utils/turbo-cat-knowledge.js +16 -0
- package/dist/utils/turbo-cat-knowledge.js.map +1 -1
- package/dist/utils/universal-fuzzy-detector.d.ts +64 -0
- package/dist/utils/universal-fuzzy-detector.d.ts.map +1 -0
- package/dist/utils/universal-fuzzy-detector.js +381 -0
- package/dist/utils/universal-fuzzy-detector.js.map +1 -0
- package/dist/utils/update-checker.d.ts +15 -0
- package/dist/utils/update-checker.d.ts.map +1 -0
- package/dist/utils/update-checker.js +203 -0
- package/dist/utils/update-checker.js.map +1 -0
- package/dist/utils/yaml-generator.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🎯 Universal Fuzzy Detection - Google-style intelligence for ALL inputs
|
|
3
|
+
* "Close enough is good enough"
|
|
4
|
+
*/
|
|
5
|
+
interface FuzzyMatch {
|
|
6
|
+
detected: boolean;
|
|
7
|
+
type: string;
|
|
8
|
+
confidence: 'high' | 'medium' | 'low' | 'none';
|
|
9
|
+
suggestion?: string;
|
|
10
|
+
needsConfirmation: boolean;
|
|
11
|
+
corrected?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class UniversalFuzzyDetector {
|
|
14
|
+
private static readonly PROJECT_PATTERNS;
|
|
15
|
+
private static readonly TYPO_CORRECTIONS;
|
|
16
|
+
private static readonly LANGUAGE_PATTERNS;
|
|
17
|
+
/**
|
|
18
|
+
* Detect project type with fuzzy matching
|
|
19
|
+
*/
|
|
20
|
+
static detectProjectType(input: string): FuzzyMatch;
|
|
21
|
+
/**
|
|
22
|
+
* Detect language with fuzzy matching
|
|
23
|
+
*/
|
|
24
|
+
static detectLanguage(input: string): FuzzyMatch;
|
|
25
|
+
/**
|
|
26
|
+
* Detect with pattern matching
|
|
27
|
+
*/
|
|
28
|
+
private static detectWithPatterns;
|
|
29
|
+
/**
|
|
30
|
+
* Correct common typos across all inputs
|
|
31
|
+
*/
|
|
32
|
+
private static correctTypos;
|
|
33
|
+
/**
|
|
34
|
+
* Fuzzy match with Levenshtein distance
|
|
35
|
+
*/
|
|
36
|
+
private static fuzzyMatch;
|
|
37
|
+
/**
|
|
38
|
+
* Calculate Levenshtein distance
|
|
39
|
+
*/
|
|
40
|
+
private static levenshteinDistance;
|
|
41
|
+
/**
|
|
42
|
+
* Check for project context
|
|
43
|
+
*/
|
|
44
|
+
private static hasProjectContext;
|
|
45
|
+
/**
|
|
46
|
+
* Guess project type from context
|
|
47
|
+
*/
|
|
48
|
+
private static guessProjectType;
|
|
49
|
+
/**
|
|
50
|
+
* Get all suggestions for input
|
|
51
|
+
*/
|
|
52
|
+
static getSuggestions(input: string, limit?: number): string[];
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
/**
|
|
56
|
+
* Examples:
|
|
57
|
+
*
|
|
58
|
+
* detectProjectType("raect app") → "react" (typo corrected)
|
|
59
|
+
* detectProjectType("chr ext") → "chrome-extension" (fuzzy match)
|
|
60
|
+
* detectProjectType("moblie game") → "mobile" + "game" (multiple detections)
|
|
61
|
+
* detectLanguage("typscript") → "typescript" (typo corrected)
|
|
62
|
+
* detectLanguage("js") → "javascript" (abbreviation)
|
|
63
|
+
*/
|
|
64
|
+
//# sourceMappingURL=universal-fuzzy-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"universal-fuzzy-detector.d.ts","sourceRoot":"","sources":["../../src/utils/universal-fuzzy-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,UAAU;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,sBAAsB;IAGjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAwEtC;IAGF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAgFtC;IAGF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAevC;IAEF;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAwBnD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAqChD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA8CjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAY3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAUzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IA4BlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAS/B;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,MAAM,EAAE;CAsBlE;;AAED;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 🎯 Universal Fuzzy Detection - Google-style intelligence for ALL inputs
|
|
4
|
+
* "Close enough is good enough"
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UniversalFuzzyDetector = void 0;
|
|
8
|
+
class UniversalFuzzyDetector {
|
|
9
|
+
// Project type patterns with variations
|
|
10
|
+
static PROJECT_PATTERNS = {
|
|
11
|
+
'chrome-extension': [
|
|
12
|
+
'chrome extension', 'browser extension', 'chrome addon', 'chrome plugin',
|
|
13
|
+
'chr ext', 'c ext', 'ce', 'chrome-ext', 'browser addon', 'manifest v3',
|
|
14
|
+
'chrome exten', 'chrom ext', 'chrome ex', 'browser ext'
|
|
15
|
+
],
|
|
16
|
+
'react': [
|
|
17
|
+
'react', 'react app', 'react application', 'reactjs', 'react.js',
|
|
18
|
+
'react project', 'next', 'nextjs', 'next.js', 'gatsby', 'create-react-app',
|
|
19
|
+
'cra', 'react native', 'rn', 'react typescript', 'react ts'
|
|
20
|
+
],
|
|
21
|
+
'vue': [
|
|
22
|
+
'vue', 'vuejs', 'vue.js', 'vue app', 'vue application', 'nuxt', 'nuxtjs',
|
|
23
|
+
'nuxt.js', 'vue3', 'vue 3', 'vue2', 'vue typescript', 'vue ts', 'vite vue'
|
|
24
|
+
],
|
|
25
|
+
'svelte': [
|
|
26
|
+
'svelte', 'sveltekit', 'svelte kit', 'svelte app', 'sk', 'svelte typescript',
|
|
27
|
+
'svelte ts', 'svelte vite', 'sapper'
|
|
28
|
+
],
|
|
29
|
+
'angular': [
|
|
30
|
+
'angular', 'angularjs', 'angular app', 'ng', 'angular typescript',
|
|
31
|
+
'angular ts', 'angular cli', 'angular material'
|
|
32
|
+
],
|
|
33
|
+
'cli': [
|
|
34
|
+
'cli', 'command line', 'terminal', 'console app', 'cli tool',
|
|
35
|
+
'command line tool', 'terminal app', 'bash script', 'shell script',
|
|
36
|
+
'cmd tool', 'command tool'
|
|
37
|
+
],
|
|
38
|
+
'api': [
|
|
39
|
+
'api', 'rest api', 'graphql', 'backend', 'server', 'microservice',
|
|
40
|
+
'web service', 'rest', 'soap', 'grpc', 'websocket', 'fastapi',
|
|
41
|
+
'express', 'nodejs api', 'node api', 'django api', 'flask api'
|
|
42
|
+
],
|
|
43
|
+
'mobile': [
|
|
44
|
+
'mobile', 'mobile app', 'ios', 'android', 'react native', 'flutter',
|
|
45
|
+
'swift', 'kotlin', 'xamarin', 'ionic', 'cordova', 'phonegap',
|
|
46
|
+
'native app', 'hybrid app', 'pwa', 'progressive web app'
|
|
47
|
+
],
|
|
48
|
+
'desktop': [
|
|
49
|
+
'desktop', 'desktop app', 'electron', 'tauri', 'native app',
|
|
50
|
+
'windows app', 'mac app', 'linux app', 'cross platform',
|
|
51
|
+
'wpf', 'winforms', 'qt', 'gtk', 'swing', 'javafx'
|
|
52
|
+
],
|
|
53
|
+
'game': [
|
|
54
|
+
'game', 'game dev', 'unity', 'unreal', 'godot', 'phaser',
|
|
55
|
+
'three.js', 'babylon', 'canvas game', 'webgl', 'gamedev',
|
|
56
|
+
'2d game', '3d game', 'multiplayer game', 'mmo'
|
|
57
|
+
],
|
|
58
|
+
'library': [
|
|
59
|
+
'library', 'package', 'npm package', 'module', 'framework',
|
|
60
|
+
'sdk', 'toolkit', 'util', 'utils', 'helper', 'plugin',
|
|
61
|
+
'lib', 'component library', 'ui library'
|
|
62
|
+
],
|
|
63
|
+
'fullstack': [
|
|
64
|
+
'fullstack', 'full stack', 'full-stack', 'mern', 'mean', 'lamp',
|
|
65
|
+
'django fullstack', 'rails', 'laravel', 't3 stack', 'jamstack'
|
|
66
|
+
],
|
|
67
|
+
'ai-ml': [
|
|
68
|
+
'ai', 'ml', 'machine learning', 'deep learning', 'neural network',
|
|
69
|
+
'tensorflow', 'pytorch', 'scikit', 'sklearn', 'data science',
|
|
70
|
+
'nlp', 'computer vision', 'cv', 'llm', 'gpt', 'transformer'
|
|
71
|
+
],
|
|
72
|
+
'blockchain': [
|
|
73
|
+
'blockchain', 'crypto', 'smart contract', 'defi', 'web3',
|
|
74
|
+
'ethereum', 'solidity', 'nft', 'dapp', 'decentralized',
|
|
75
|
+
'bitcoin', 'contract', 'chain', 'ledger'
|
|
76
|
+
],
|
|
77
|
+
'iot': [
|
|
78
|
+
'iot', 'internet of things', 'embedded', 'arduino', 'raspberry pi',
|
|
79
|
+
'esp32', 'esp8266', 'sensor', 'mqtt', 'hardware', 'firmware',
|
|
80
|
+
'microcontroller', 'robotics', 'automation'
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
// Common typos and corrections
|
|
84
|
+
static TYPO_CORRECTIONS = {
|
|
85
|
+
// React typos
|
|
86
|
+
'raect': 'react',
|
|
87
|
+
'reat': 'react',
|
|
88
|
+
'recat': 'react',
|
|
89
|
+
'reaxt': 'react',
|
|
90
|
+
'rect': 'react',
|
|
91
|
+
// Vue typos
|
|
92
|
+
'veu': 'vue',
|
|
93
|
+
'vu': 'vue',
|
|
94
|
+
'vuee': 'vue',
|
|
95
|
+
// Angular typos
|
|
96
|
+
'agnular': 'angular',
|
|
97
|
+
'angualr': 'angular',
|
|
98
|
+
'angluar': 'angular',
|
|
99
|
+
'angualar': 'angular',
|
|
100
|
+
// API typos
|
|
101
|
+
'ap i': 'api',
|
|
102
|
+
'a p i': 'api',
|
|
103
|
+
'aip': 'api',
|
|
104
|
+
// Backend typos
|
|
105
|
+
'backned': 'backend',
|
|
106
|
+
'backedn': 'backend',
|
|
107
|
+
'bakcend': 'backend',
|
|
108
|
+
'beck end': 'backend',
|
|
109
|
+
// Frontend typos
|
|
110
|
+
'forntend': 'frontend',
|
|
111
|
+
'fronend': 'frontend',
|
|
112
|
+
'front end': 'frontend',
|
|
113
|
+
'font end': 'frontend',
|
|
114
|
+
// Mobile typos
|
|
115
|
+
'moblie': 'mobile',
|
|
116
|
+
'moible': 'mobile',
|
|
117
|
+
'mbile': 'mobile',
|
|
118
|
+
// Database typos
|
|
119
|
+
'databse': 'database',
|
|
120
|
+
'datbase': 'database',
|
|
121
|
+
'dtabase': 'database',
|
|
122
|
+
'data base': 'database',
|
|
123
|
+
// TypeScript typos
|
|
124
|
+
'typescipt': 'typescript',
|
|
125
|
+
'typscript': 'typescript',
|
|
126
|
+
'type script': 'typescript',
|
|
127
|
+
'ts': 'typescript',
|
|
128
|
+
// JavaScript typos
|
|
129
|
+
'javscript': 'javascript',
|
|
130
|
+
'javascrpt': 'javascript',
|
|
131
|
+
'java script': 'javascript',
|
|
132
|
+
'js': 'javascript',
|
|
133
|
+
// Python typos
|
|
134
|
+
'pyton': 'python',
|
|
135
|
+
'pythong': 'python',
|
|
136
|
+
'pyhton': 'python',
|
|
137
|
+
'pythn': 'python',
|
|
138
|
+
// Common tech typos
|
|
139
|
+
'dokcer': 'docker',
|
|
140
|
+
'kubenetes': 'kubernetes',
|
|
141
|
+
'kubernets': 'kubernetes',
|
|
142
|
+
'k8s': 'kubernetes',
|
|
143
|
+
'postgers': 'postgres',
|
|
144
|
+
'postrgres': 'postgres',
|
|
145
|
+
'mogodb': 'mongodb',
|
|
146
|
+
'mongdb': 'mongodb',
|
|
147
|
+
'reddis': 'redis',
|
|
148
|
+
'radis': 'redis',
|
|
149
|
+
'graphsql': 'graphql',
|
|
150
|
+
'graph ql': 'graphql',
|
|
151
|
+
'web sokect': 'websocket',
|
|
152
|
+
'web socket': 'websocket'
|
|
153
|
+
};
|
|
154
|
+
// Language patterns
|
|
155
|
+
static LANGUAGE_PATTERNS = {
|
|
156
|
+
'typescript': ['typescript', 'ts', 'type script', 'tsc'],
|
|
157
|
+
'javascript': ['javascript', 'js', 'java script', 'ecmascript', 'es6', 'es2020'],
|
|
158
|
+
'python': ['python', 'py', 'python3', 'python2', 'cpython', 'pypy'],
|
|
159
|
+
'java': ['java', 'jvm', 'java 8', 'java 11', 'java 17', 'spring', 'springboot'],
|
|
160
|
+
'csharp': ['c#', 'csharp', 'c sharp', '.net', 'dotnet', 'asp.net'],
|
|
161
|
+
'go': ['go', 'golang', 'go lang'],
|
|
162
|
+
'rust': ['rust', 'rustlang', 'rust lang'],
|
|
163
|
+
'ruby': ['ruby', 'rb', 'rails', 'ruby on rails', 'ror'],
|
|
164
|
+
'php': ['php', 'php7', 'php8', 'laravel', 'symfony'],
|
|
165
|
+
'swift': ['swift', 'swiftui', 'swift ui'],
|
|
166
|
+
'kotlin': ['kotlin', 'kt', 'android kotlin'],
|
|
167
|
+
'dart': ['dart', 'flutter dart'],
|
|
168
|
+
'cpp': ['c++', 'cpp', 'cplusplus', 'c plus plus'],
|
|
169
|
+
'c': ['c', 'c lang', 'c language']
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Detect project type with fuzzy matching
|
|
173
|
+
*/
|
|
174
|
+
static detectProjectType(input) {
|
|
175
|
+
if (!input) {
|
|
176
|
+
return { detected: false, type: '', confidence: 'none', needsConfirmation: false };
|
|
177
|
+
}
|
|
178
|
+
const normalized = input.toLowerCase().trim();
|
|
179
|
+
const corrected = this.correctTypos(normalized);
|
|
180
|
+
// Check if we corrected something
|
|
181
|
+
if (corrected !== normalized) {
|
|
182
|
+
// Re-run detection on corrected text
|
|
183
|
+
const correctedResult = this.detectWithPatterns(corrected);
|
|
184
|
+
if (correctedResult.detected) {
|
|
185
|
+
return {
|
|
186
|
+
...correctedResult,
|
|
187
|
+
corrected: corrected,
|
|
188
|
+
suggestion: `${correctedResult.type} (corrected from "${input}")`
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return this.detectWithPatterns(normalized);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Detect language with fuzzy matching
|
|
196
|
+
*/
|
|
197
|
+
static detectLanguage(input) {
|
|
198
|
+
if (!input) {
|
|
199
|
+
return { detected: false, type: '', confidence: 'none', needsConfirmation: false };
|
|
200
|
+
}
|
|
201
|
+
const normalized = input.toLowerCase().trim();
|
|
202
|
+
const corrected = this.correctTypos(normalized);
|
|
203
|
+
// Check each language pattern
|
|
204
|
+
for (const [language, patterns] of Object.entries(this.LANGUAGE_PATTERNS)) {
|
|
205
|
+
for (const pattern of patterns) {
|
|
206
|
+
if (normalized.includes(pattern) || corrected.includes(pattern)) {
|
|
207
|
+
return {
|
|
208
|
+
detected: true,
|
|
209
|
+
type: language,
|
|
210
|
+
confidence: 'high',
|
|
211
|
+
needsConfirmation: false,
|
|
212
|
+
corrected: corrected !== normalized ? corrected : undefined
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// Fuzzy match
|
|
217
|
+
if (this.fuzzyMatch(normalized, language, 2)) {
|
|
218
|
+
return {
|
|
219
|
+
detected: true,
|
|
220
|
+
type: language,
|
|
221
|
+
confidence: 'medium',
|
|
222
|
+
suggestion: language,
|
|
223
|
+
needsConfirmation: true
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return { detected: false, type: '', confidence: 'none', needsConfirmation: false };
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Detect with pattern matching
|
|
231
|
+
*/
|
|
232
|
+
static detectWithPatterns(text) {
|
|
233
|
+
// Check each project type
|
|
234
|
+
for (const [type, patterns] of Object.entries(this.PROJECT_PATTERNS)) {
|
|
235
|
+
// High confidence - exact match
|
|
236
|
+
for (const pattern of patterns.slice(0, 3)) {
|
|
237
|
+
if (text.includes(pattern)) {
|
|
238
|
+
return {
|
|
239
|
+
detected: true,
|
|
240
|
+
type,
|
|
241
|
+
confidence: 'high',
|
|
242
|
+
needsConfirmation: false
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Medium confidence - close match
|
|
247
|
+
for (const pattern of patterns) {
|
|
248
|
+
if (text.includes(pattern) || this.fuzzyMatch(text, pattern, 3)) {
|
|
249
|
+
return {
|
|
250
|
+
detected: true,
|
|
251
|
+
type,
|
|
252
|
+
confidence: 'medium',
|
|
253
|
+
suggestion: type,
|
|
254
|
+
needsConfirmation: true
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Low confidence - check for related words
|
|
260
|
+
if (this.hasProjectContext(text)) {
|
|
261
|
+
const guessedType = this.guessProjectType(text);
|
|
262
|
+
if (guessedType) {
|
|
263
|
+
return {
|
|
264
|
+
detected: false,
|
|
265
|
+
type: guessedType,
|
|
266
|
+
confidence: 'low',
|
|
267
|
+
suggestion: guessedType,
|
|
268
|
+
needsConfirmation: true
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return { detected: false, type: '', confidence: 'none', needsConfirmation: false };
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Correct common typos across all inputs
|
|
276
|
+
*/
|
|
277
|
+
static correctTypos(text) {
|
|
278
|
+
let corrected = text;
|
|
279
|
+
// Apply all corrections
|
|
280
|
+
for (const [typo, correction] of Object.entries(this.TYPO_CORRECTIONS)) {
|
|
281
|
+
const regex = new RegExp(`\\b${typo}\\b`, 'gi');
|
|
282
|
+
corrected = corrected.replace(regex, correction);
|
|
283
|
+
}
|
|
284
|
+
return corrected;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Fuzzy match with Levenshtein distance
|
|
288
|
+
*/
|
|
289
|
+
static fuzzyMatch(text, pattern, threshold = 3) {
|
|
290
|
+
const words = text.split(/\s+/);
|
|
291
|
+
for (const word of words) {
|
|
292
|
+
if (this.levenshteinDistance(word, pattern) <= threshold) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return this.levenshteinDistance(text, pattern) <= threshold;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Calculate Levenshtein distance
|
|
300
|
+
*/
|
|
301
|
+
static levenshteinDistance(a, b) {
|
|
302
|
+
const matrix = [];
|
|
303
|
+
for (let i = 0; i <= b.length; i++) {
|
|
304
|
+
matrix[i] = [i];
|
|
305
|
+
}
|
|
306
|
+
for (let j = 0; j <= a.length; j++) {
|
|
307
|
+
matrix[0][j] = j;
|
|
308
|
+
}
|
|
309
|
+
for (let i = 1; i <= b.length; i++) {
|
|
310
|
+
for (let j = 1; j <= a.length; j++) {
|
|
311
|
+
if (b.charAt(i - 1) === a.charAt(j - 1)) {
|
|
312
|
+
matrix[i][j] = matrix[i - 1][j - 1];
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j] + 1);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return matrix[b.length][a.length];
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Check for project context
|
|
323
|
+
*/
|
|
324
|
+
static hasProjectContext(text) {
|
|
325
|
+
const contextWords = [
|
|
326
|
+
'app', 'application', 'project', 'build', 'create', 'develop',
|
|
327
|
+
'website', 'service', 'tool', 'platform', 'system', 'software'
|
|
328
|
+
];
|
|
329
|
+
return contextWords.some(word => text.includes(word));
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Guess project type from context
|
|
333
|
+
*/
|
|
334
|
+
static guessProjectType(text) {
|
|
335
|
+
if (text.includes('web') || text.includes('site'))
|
|
336
|
+
return 'react';
|
|
337
|
+
if (text.includes('app') && !text.includes('web'))
|
|
338
|
+
return 'mobile';
|
|
339
|
+
if (text.includes('server') || text.includes('backend'))
|
|
340
|
+
return 'api';
|
|
341
|
+
if (text.includes('script') || text.includes('tool'))
|
|
342
|
+
return 'cli';
|
|
343
|
+
if (text.includes('package') || text.includes('library'))
|
|
344
|
+
return 'library';
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Get all suggestions for input
|
|
349
|
+
*/
|
|
350
|
+
static getSuggestions(input, limit = 5) {
|
|
351
|
+
const suggestions = [];
|
|
352
|
+
const normalized = input.toLowerCase().trim();
|
|
353
|
+
// Check all patterns
|
|
354
|
+
for (const [type, patterns] of Object.entries(this.PROJECT_PATTERNS)) {
|
|
355
|
+
let bestScore = Infinity;
|
|
356
|
+
for (const pattern of patterns) {
|
|
357
|
+
const distance = this.levenshteinDistance(normalized, pattern);
|
|
358
|
+
if (distance < bestScore) {
|
|
359
|
+
bestScore = distance;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
suggestions.push({ type, score: bestScore });
|
|
363
|
+
}
|
|
364
|
+
// Sort by score and return top matches
|
|
365
|
+
return suggestions
|
|
366
|
+
.sort((a, b) => a.score - b.score)
|
|
367
|
+
.slice(0, limit)
|
|
368
|
+
.map(s => s.type);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
exports.UniversalFuzzyDetector = UniversalFuzzyDetector;
|
|
372
|
+
/**
|
|
373
|
+
* Examples:
|
|
374
|
+
*
|
|
375
|
+
* detectProjectType("raect app") → "react" (typo corrected)
|
|
376
|
+
* detectProjectType("chr ext") → "chrome-extension" (fuzzy match)
|
|
377
|
+
* detectProjectType("moblie game") → "mobile" + "game" (multiple detections)
|
|
378
|
+
* detectLanguage("typscript") → "typescript" (typo corrected)
|
|
379
|
+
* detectLanguage("js") → "javascript" (abbreviation)
|
|
380
|
+
*/
|
|
381
|
+
//# sourceMappingURL=universal-fuzzy-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"universal-fuzzy-detector.js","sourceRoot":"","sources":["../../src/utils/universal-fuzzy-detector.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,MAAa,sBAAsB;IAEjC,wCAAwC;IAChC,MAAM,CAAU,gBAAgB,GAA6B;QACnE,kBAAkB,EAAE;YAClB,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe;YACxE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa;YACtE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa;SACxD;QACD,OAAO,EAAE;YACP,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU;YAChE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB;YAC1E,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,kBAAkB,EAAE,UAAU;SAC5D;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ;YACxE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU;SAC3E;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB;YAC5E,WAAW,EAAE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E,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;aACjC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;aACf,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;;AAhZH,wDAiZC;AAED;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🆕 FAF Update Checker - Keep users informed about new versions
|
|
3
|
+
* Checks once per day, non-intrusive, respects quiet mode
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check for updates (respects quiet mode)
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkForUpdates(options?: {
|
|
9
|
+
quiet?: boolean;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Force check (for testing or manual trigger)
|
|
13
|
+
*/
|
|
14
|
+
export declare function forceUpdateCheck(): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=update-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-checker.d.ts","sourceRoot":"","sources":["../../src/utils/update-checker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyFH;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ClF;AAoBD;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAetD"}
|