@gulibs/safe-coder 0.0.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 +515 -0
- package/dist/documentation/cache.d.ts +13 -0
- package/dist/documentation/cache.d.ts.map +1 -0
- package/dist/documentation/cache.js +48 -0
- package/dist/documentation/cache.js.map +1 -0
- package/dist/documentation/github-client.d.ts +11 -0
- package/dist/documentation/github-client.d.ts.map +1 -0
- package/dist/documentation/github-client.js +88 -0
- package/dist/documentation/github-client.js.map +1 -0
- package/dist/documentation/http-fetcher.d.ts +5 -0
- package/dist/documentation/http-fetcher.d.ts.map +1 -0
- package/dist/documentation/http-fetcher.js +27 -0
- package/dist/documentation/http-fetcher.js.map +1 -0
- package/dist/documentation/index.d.ts +14 -0
- package/dist/documentation/index.d.ts.map +1 -0
- package/dist/documentation/index.js +75 -0
- package/dist/documentation/index.js.map +1 -0
- package/dist/documentation/normalizer.d.ts +6 -0
- package/dist/documentation/normalizer.d.ts.map +1 -0
- package/dist/documentation/normalizer.js +38 -0
- package/dist/documentation/normalizer.js.map +1 -0
- package/dist/documentation/npm-client.d.ts +7 -0
- package/dist/documentation/npm-client.d.ts.map +1 -0
- package/dist/documentation/npm-client.js +49 -0
- package/dist/documentation/npm-client.js.map +1 -0
- package/dist/errors/contextual-analysis.d.ts +11 -0
- package/dist/errors/contextual-analysis.d.ts.map +1 -0
- package/dist/errors/contextual-analysis.js +75 -0
- package/dist/errors/contextual-analysis.js.map +1 -0
- package/dist/errors/eslint-integration.d.ts +8 -0
- package/dist/errors/eslint-integration.d.ts.map +1 -0
- package/dist/errors/eslint-integration.js +43 -0
- package/dist/errors/eslint-integration.js.map +1 -0
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +58 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/pattern-matcher.d.ts +25 -0
- package/dist/errors/pattern-matcher.d.ts.map +1 -0
- package/dist/errors/pattern-matcher.js +44 -0
- package/dist/errors/pattern-matcher.js.map +1 -0
- package/dist/errors/patterns.json +36 -0
- package/dist/errors/typescript-integration.d.ts +6 -0
- package/dist/errors/typescript-integration.d.ts.map +1 -0
- package/dist/errors/typescript-integration.js +46 -0
- package/dist/errors/typescript-integration.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/server/mcp-server.d.ts +11 -0
- package/dist/server/mcp-server.d.ts.map +1 -0
- package/dist/server/mcp-server.js +213 -0
- package/dist/server/mcp-server.js.map +1 -0
- package/dist/types/documentation.d.ts +26 -0
- package/dist/types/documentation.d.ts.map +1 -0
- package/dist/types/documentation.js +2 -0
- package/dist/types/documentation.js.map +1 -0
- package/dist/utils/config.d.ts +9 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +10 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +9 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/rate-limiter.js +26 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/validation/auto-fix.d.ts +15 -0
- package/dist/validation/auto-fix.d.ts.map +1 -0
- package/dist/validation/auto-fix.js +49 -0
- package/dist/validation/auto-fix.js.map +1 -0
- package/dist/validation/index.d.ts +21 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +45 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/resolution-db.d.ts +15 -0
- package/dist/validation/resolution-db.d.ts.map +1 -0
- package/dist/validation/resolution-db.js +62 -0
- package/dist/validation/resolution-db.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-fetcher.d.ts","sourceRoot":"","sources":["../../src/documentation/http-fetcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,qBAAa,WAAY,YAAW,mBAAmB;IAC/C,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAwB3E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
export class HttpFetcher {
|
|
3
|
+
async fetch(packageName, version) {
|
|
4
|
+
try {
|
|
5
|
+
// packageName should be a URL for HTTP fetcher
|
|
6
|
+
const url = packageName.startsWith('http') ? packageName : `https://${packageName}`;
|
|
7
|
+
const response = await axios.get(url, {
|
|
8
|
+
timeout: 10000,
|
|
9
|
+
headers: {
|
|
10
|
+
'User-Agent': 'Safe-Coder-MCP/1.0.0',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
name: new URL(url).hostname,
|
|
15
|
+
version,
|
|
16
|
+
content: response.data,
|
|
17
|
+
source: 'http',
|
|
18
|
+
url,
|
|
19
|
+
lastUpdated: new Date(),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw new Error(`Failed to fetch HTTP documentation: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=http-fetcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-fetcher.js","sourceRoot":"","sources":["../../src/documentation/http-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,OAAO,WAAW;IACtB,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,OAAgB;QAC/C,IAAI,CAAC;YACH,+CAA+C;YAC/C,MAAM,GAAG,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,WAAW,EAAE,CAAC;YAEpF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE;gBACpC,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE;oBACP,YAAY,EAAE,sBAAsB;iBACrC;aACF,CAAC,CAAC;YAEH,OAAO;gBACL,IAAI,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ;gBAC3B,OAAO;gBACP,OAAO,EAAE,QAAQ,CAAC,IAAI;gBACtB,MAAM,EAAE,MAAM;gBACd,GAAG;gBACH,WAAW,EAAE,IAAI,IAAI,EAAE;aACxB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,uCAAuC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QACrH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DocumentationCache } from './cache.js';
|
|
2
|
+
import type { Documentation } from '../types/documentation.js';
|
|
3
|
+
export declare class DocumentationService {
|
|
4
|
+
private cache;
|
|
5
|
+
private npmClient;
|
|
6
|
+
private githubClient;
|
|
7
|
+
private httpFetcher;
|
|
8
|
+
private normalizer;
|
|
9
|
+
constructor(cacheTTLMinutes?: number, githubToken?: string);
|
|
10
|
+
getDocumentation(packageName: string, version?: string, source?: 'npm' | 'github' | 'http'): Promise<Documentation>;
|
|
11
|
+
refreshDocumentation(packageName: string, version?: string): Promise<void>;
|
|
12
|
+
getCache(): DocumentationCache;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/documentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,UAAU,CAA0B;gBAEhC,eAAe,GAAE,MAAW,EAAE,WAAW,CAAC,EAAE,MAAM;IAQxD,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GACjC,OAAO,CAAC,aAAa,CAAC;IAoDnB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhF,QAAQ,IAAI,kBAAkB;CAG/B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { DocumentationCache } from './cache.js';
|
|
2
|
+
import { NpmRegistryClient } from './npm-client.js';
|
|
3
|
+
import { GitHubClient } from './github-client.js';
|
|
4
|
+
import { HttpFetcher } from './http-fetcher.js';
|
|
5
|
+
import { DocumentationNormalizer } from './normalizer.js';
|
|
6
|
+
export class DocumentationService {
|
|
7
|
+
cache;
|
|
8
|
+
npmClient;
|
|
9
|
+
githubClient;
|
|
10
|
+
httpFetcher;
|
|
11
|
+
normalizer;
|
|
12
|
+
constructor(cacheTTLMinutes = 60, githubToken) {
|
|
13
|
+
this.cache = new DocumentationCache(cacheTTLMinutes);
|
|
14
|
+
this.npmClient = new NpmRegistryClient();
|
|
15
|
+
this.githubClient = new GitHubClient(githubToken);
|
|
16
|
+
this.httpFetcher = new HttpFetcher();
|
|
17
|
+
this.normalizer = new DocumentationNormalizer();
|
|
18
|
+
}
|
|
19
|
+
async getDocumentation(packageName, version, source) {
|
|
20
|
+
const cacheKey = this.cache.generateKey(packageName, version);
|
|
21
|
+
// Check cache first
|
|
22
|
+
const cached = this.cache.get(cacheKey);
|
|
23
|
+
if (cached) {
|
|
24
|
+
return cached;
|
|
25
|
+
}
|
|
26
|
+
// Determine source if not specified
|
|
27
|
+
let actualSource = source;
|
|
28
|
+
if (!actualSource) {
|
|
29
|
+
if (packageName.startsWith('http')) {
|
|
30
|
+
actualSource = 'http';
|
|
31
|
+
}
|
|
32
|
+
else if (packageName.includes('/')) {
|
|
33
|
+
actualSource = 'github';
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
actualSource = 'npm';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Fetch documentation
|
|
40
|
+
let documentation;
|
|
41
|
+
try {
|
|
42
|
+
switch (actualSource) {
|
|
43
|
+
case 'npm':
|
|
44
|
+
documentation = await this.npmClient.fetch(packageName, version);
|
|
45
|
+
break;
|
|
46
|
+
case 'github':
|
|
47
|
+
documentation = await this.githubClient.fetch(packageName, version);
|
|
48
|
+
break;
|
|
49
|
+
case 'http':
|
|
50
|
+
documentation = await this.httpFetcher.fetch(packageName, version);
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
throw new Error(`Unknown source: ${actualSource}`);
|
|
54
|
+
}
|
|
55
|
+
// Normalize documentation
|
|
56
|
+
const normalized = this.normalizer.normalize(documentation.content, actualSource);
|
|
57
|
+
documentation = { ...documentation, sections: normalized.sections };
|
|
58
|
+
// Cache the result
|
|
59
|
+
this.cache.set(cacheKey, documentation);
|
|
60
|
+
return documentation;
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
throw new Error(`Failed to fetch documentation: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Background refresh for popular packages
|
|
67
|
+
async refreshDocumentation(packageName, version) {
|
|
68
|
+
const cacheKey = this.cache.generateKey(packageName, version);
|
|
69
|
+
this.cache.set(cacheKey, await this.getDocumentation(packageName, version), 0); // Force refresh
|
|
70
|
+
}
|
|
71
|
+
getCache() {
|
|
72
|
+
return this.cache;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/documentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,MAAM,OAAO,oBAAoB;IACvB,KAAK,CAAqB;IAC1B,SAAS,CAAoB;IAC7B,YAAY,CAAe;IAC3B,WAAW,CAAc;IACzB,UAAU,CAA0B;IAE5C,YAAY,kBAA0B,EAAE,EAAE,WAAoB;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,kBAAkB,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAuB,EAAE,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,WAAmB,EACnB,OAAgB,EAChB,MAAkC;QAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAE9D,oBAAoB;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC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B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAChH,CAAC;IACH,CAAC;IAED,0CAA0C;IAC1C,KAAK,CAAC,oBAAoB,CAAC,WAAmB,EAAE,OAAgB;QAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB;IAClG,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Documentation, IDocumentationNormalizer } from '../types/documentation.js';
|
|
2
|
+
export declare class DocumentationNormalizer implements IDocumentationNormalizer {
|
|
3
|
+
normalize(content: string, source: 'npm' | 'github' | 'http'): Documentation;
|
|
4
|
+
private extractSections;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=normalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/documentation/normalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAEzF,qBAAa,uBAAwB,YAAW,wBAAwB;IACtE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,aAAa;IAa5E,OAAO,CAAC,eAAe;CA6BxB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export class DocumentationNormalizer {
|
|
2
|
+
normalize(content, source) {
|
|
3
|
+
// Extract sections from markdown content
|
|
4
|
+
const sections = this.extractSections(content);
|
|
5
|
+
return {
|
|
6
|
+
name: '',
|
|
7
|
+
content,
|
|
8
|
+
source,
|
|
9
|
+
lastUpdated: new Date(),
|
|
10
|
+
sections,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
extractSections(content) {
|
|
14
|
+
const sections = {};
|
|
15
|
+
// Extract README
|
|
16
|
+
const readmeMatch = content.match(/#\s+(.+?)(?=\n|$)/);
|
|
17
|
+
if (readmeMatch) {
|
|
18
|
+
sections.readme = content;
|
|
19
|
+
}
|
|
20
|
+
// Extract API section
|
|
21
|
+
const apiMatch = content.match(/##?\s+API[^#]*/is);
|
|
22
|
+
if (apiMatch) {
|
|
23
|
+
sections.api = apiMatch[0];
|
|
24
|
+
}
|
|
25
|
+
// Extract Examples section
|
|
26
|
+
const examplesMatch = content.match(/##?\s+Examples?[^#]*/is);
|
|
27
|
+
if (examplesMatch) {
|
|
28
|
+
sections.examples = examplesMatch[0];
|
|
29
|
+
}
|
|
30
|
+
// Extract Installation section
|
|
31
|
+
const installMatch = content.match(/##?\s+Installation[^#]*/is);
|
|
32
|
+
if (installMatch) {
|
|
33
|
+
sections.installation = installMatch[0];
|
|
34
|
+
}
|
|
35
|
+
return sections;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=normalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizer.js","sourceRoot":"","sources":["../../src/documentation/normalizer.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,uBAAuB;IAClC,SAAS,CAAC,OAAe,EAAE,MAAiC;QAC1D,yCAAyC;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAE/C,OAAO;YACL,IAAI,EAAE,EAAE;YACR,OAAO;YACP,MAAM;YACN,WAAW,EAAE,IAAI,IAAI,EAAE;YACvB,QAAQ;SACT,CAAC;IACJ,CAAC;IAEO,eAAe,CAAC,OAAe;QACrC,MAAM,QAAQ,GAA8B,EAAE,CAAC;QAE/C,iBAAiB;QACjB,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACvD,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC;QAC5B,CAAC;QAED,sBAAsB;QACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACnD,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAED,2BAA2B;QAC3B,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC9D,IAAI,aAAa,EAAE,CAAC;YAClB,QAAQ,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,+BAA+B;QAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAChE,IAAI,YAAY,EAAE,CAAC;YACjB,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Documentation, DocumentationSource } from '../types/documentation.js';
|
|
2
|
+
export declare class NpmRegistryClient implements DocumentationSource {
|
|
3
|
+
private readonly registryUrl;
|
|
4
|
+
fetch(packageName: string, version?: string): Promise<Documentation>;
|
|
5
|
+
private fetchFromRepository;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=npm-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-client.d.ts","sourceRoot":"","sources":["../../src/documentation/npm-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,qBAAa,iBAAkB,YAAW,mBAAmB;IAC3D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;IAEtD,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;YAoC5D,mBAAmB;CAelC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
export class NpmRegistryClient {
|
|
3
|
+
registryUrl = 'https://registry.npmjs.org';
|
|
4
|
+
async fetch(packageName, version) {
|
|
5
|
+
try {
|
|
6
|
+
// Fetch package metadata
|
|
7
|
+
const packageUrl = `${this.registryUrl}/${packageName}`;
|
|
8
|
+
const packageResponse = await axios.get(packageUrl);
|
|
9
|
+
const packageData = packageResponse.data;
|
|
10
|
+
const targetVersion = version || packageData['dist-tags']?.latest || 'latest';
|
|
11
|
+
const versionData = packageData.versions[targetVersion] || packageData.versions[packageData['dist-tags']?.latest];
|
|
12
|
+
if (!versionData) {
|
|
13
|
+
throw new Error(`Version ${targetVersion} not found for package ${packageName}`);
|
|
14
|
+
}
|
|
15
|
+
// Try to get README from package data
|
|
16
|
+
let content = versionData.readme || '';
|
|
17
|
+
let sourceUrl = versionData.repository?.url || versionData.homepage;
|
|
18
|
+
// If no README in package, try fetching from repository
|
|
19
|
+
if (!content && versionData.repository) {
|
|
20
|
+
content = await this.fetchFromRepository(versionData.repository);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
name: packageName,
|
|
24
|
+
version: targetVersion,
|
|
25
|
+
content: content || `No documentation available for ${packageName}@${targetVersion}`,
|
|
26
|
+
source: 'npm',
|
|
27
|
+
url: sourceUrl,
|
|
28
|
+
lastUpdated: new Date(),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new Error(`Failed to fetch npm documentation for ${packageName}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async fetchFromRepository(repo) {
|
|
36
|
+
if (!repo.url || repo.type !== 'git') {
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
39
|
+
// Extract GitHub URL
|
|
40
|
+
const githubMatch = repo.url.match(/github\.com[\/:]([^\/]+)\/([^\/]+?)(?:\.git)?$/);
|
|
41
|
+
if (githubMatch) {
|
|
42
|
+
const [, owner, repoName] = githubMatch;
|
|
43
|
+
// Return empty - GitHub client will handle this
|
|
44
|
+
return '';
|
|
45
|
+
}
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=npm-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-client.js","sourceRoot":"","sources":["../../src/documentation/npm-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,OAAO,iBAAiB;IACX,WAAW,GAAG,4BAA4B,CAAC;IAE5D,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,OAAgB;QAC/C,IAAI,CAAC;YACH,yBAAyB;YACzB,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;YACxD,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACpD,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC;YAEzC,MAAM,aAAa,GAAG,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,QAAQ,CAAC;YAC9E,MAAM,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;YAElH,IAAI,CAAC,WA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ChD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DetectedError } from './pattern-matcher.js';
|
|
2
|
+
export declare class ContextualAnalysis {
|
|
3
|
+
detectErrors(code: string): DetectedError[];
|
|
4
|
+
private extractDefinedVariables;
|
|
5
|
+
private extractUsedVariables;
|
|
6
|
+
private isKeyword;
|
|
7
|
+
private isBuiltIn;
|
|
8
|
+
private isGlobal;
|
|
9
|
+
private prioritize;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=contextual-analysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextual-analysis.d.ts","sourceRoot":"","sources":["../../src/errors/contextual-analysis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,kBAAkB;IAC7B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE;IAwB3C,OAAO,CAAC,uBAAuB;IAsB/B,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export class ContextualAnalysis {
|
|
2
|
+
detectErrors(code) {
|
|
3
|
+
const errors = [];
|
|
4
|
+
const lines = code.split('\n');
|
|
5
|
+
// Detect undefined variables
|
|
6
|
+
const definedVars = this.extractDefinedVariables(code);
|
|
7
|
+
const usedVars = this.extractUsedVariables(code);
|
|
8
|
+
for (const usedVar of usedVars) {
|
|
9
|
+
if (!definedVars.has(usedVar.name) && !this.isGlobal(usedVar.name)) {
|
|
10
|
+
errors.push({
|
|
11
|
+
type: 'contextual',
|
|
12
|
+
message: `Variable '${usedVar.name}' is used but not defined`,
|
|
13
|
+
line: usedVar.line,
|
|
14
|
+
column: usedVar.column,
|
|
15
|
+
priority: 3,
|
|
16
|
+
fix: `Define '${usedVar.name}' before use or import it`,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return this.prioritize(errors);
|
|
21
|
+
}
|
|
22
|
+
extractDefinedVariables(code) {
|
|
23
|
+
const defined = new Set();
|
|
24
|
+
const lines = code.split('\n');
|
|
25
|
+
for (const line of lines) {
|
|
26
|
+
// Match variable declarations
|
|
27
|
+
const constMatch = line.match(/\b(const|let|var)\s+(\w+)/);
|
|
28
|
+
if (constMatch) {
|
|
29
|
+
defined.add(constMatch[2]);
|
|
30
|
+
}
|
|
31
|
+
// Match function parameters
|
|
32
|
+
const funcMatch = line.match(/(?:function|=>)\s*\(?([^)]+)\)?/);
|
|
33
|
+
if (funcMatch) {
|
|
34
|
+
const params = funcMatch[1].split(',').map(p => p.trim().split(':')[0].trim());
|
|
35
|
+
params.forEach(p => defined.add(p));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return defined;
|
|
39
|
+
}
|
|
40
|
+
extractUsedVariables(code) {
|
|
41
|
+
const used = [];
|
|
42
|
+
const lines = code.split('\n');
|
|
43
|
+
for (let i = 0; i < lines.length; i++) {
|
|
44
|
+
const line = lines[i];
|
|
45
|
+
// Match variable usage (simple heuristic)
|
|
46
|
+
const varMatch = line.matchAll(/\b([a-zA-Z_$][a-zA-Z0-9_$]*)\b/g);
|
|
47
|
+
for (const match of varMatch) {
|
|
48
|
+
const name = match[1];
|
|
49
|
+
if (!this.isKeyword(name) && !this.isBuiltIn(name)) {
|
|
50
|
+
used.push({
|
|
51
|
+
name,
|
|
52
|
+
line: i + 1,
|
|
53
|
+
column: (match.index || 0) + 1,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return used;
|
|
59
|
+
}
|
|
60
|
+
isKeyword(name) {
|
|
61
|
+
const keywords = ['const', 'let', 'var', 'function', 'if', 'else', 'for', 'while', 'return', 'import', 'export', 'async', 'await', 'class', 'interface', 'type'];
|
|
62
|
+
return keywords.includes(name);
|
|
63
|
+
}
|
|
64
|
+
isBuiltIn(name) {
|
|
65
|
+
const builtins = ['console', 'window', 'document', 'process', 'Buffer', 'Array', 'Object', 'String', 'Number', 'Boolean', 'Date', 'Math', 'JSON', 'Promise'];
|
|
66
|
+
return builtins.includes(name);
|
|
67
|
+
}
|
|
68
|
+
isGlobal(name) {
|
|
69
|
+
return this.isBuiltIn(name);
|
|
70
|
+
}
|
|
71
|
+
prioritize(errors) {
|
|
72
|
+
return errors.sort((a, b) => a.priority - b.priority);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=contextual-analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextual-analysis.js","sourceRoot":"","sources":["../../src/errors/contextual-analysis.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAC,IAAY;QACvB,MAAM,MAAM,GAAoB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE/B,6BAA6B;QAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAEjD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnE,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,YAAY;oBAClB,OAAO,EAAE,aAAa,OAAO,CAAC,IAAI,2BAA2B;oBAC7D,IAAI,EAAE,OAAO,CAAC,IAA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,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAC7J,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAEO,QAAQ,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEO,UAAU,CAAC,MAAuB;QACxC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DetectedError } from './pattern-matcher.js';
|
|
2
|
+
export declare class ESLintIntegration {
|
|
3
|
+
private eslint;
|
|
4
|
+
constructor();
|
|
5
|
+
detectErrors(code: string, filename?: string): Promise<DetectedError[]>;
|
|
6
|
+
private prioritize;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=eslint-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint-integration.d.ts","sourceRoot":"","sources":["../../src/errors/eslint-integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAS;;IAcjB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAkB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA2BxF,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ESLint } from 'eslint';
|
|
2
|
+
export class ESLintIntegration {
|
|
3
|
+
eslint;
|
|
4
|
+
constructor() {
|
|
5
|
+
this.eslint = new ESLint({
|
|
6
|
+
overrideConfig: {
|
|
7
|
+
rules: {
|
|
8
|
+
'no-unused-vars': 'warn',
|
|
9
|
+
'no-undef': 'error',
|
|
10
|
+
'no-console': 'off',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
async detectErrors(code, filename = 'code.ts') {
|
|
16
|
+
try {
|
|
17
|
+
const results = await this.eslint.lintText(code, { filePath: filename });
|
|
18
|
+
const errors = [];
|
|
19
|
+
for (const result of results) {
|
|
20
|
+
for (const message of result.messages) {
|
|
21
|
+
const priority = message.severity === 2 ? 1 : 5; // Error = 1, Warning = 5
|
|
22
|
+
errors.push({
|
|
23
|
+
type: 'eslint',
|
|
24
|
+
message: message.message,
|
|
25
|
+
line: message.line,
|
|
26
|
+
column: message.column,
|
|
27
|
+
priority,
|
|
28
|
+
fix: message.fix ? 'Auto-fix available' : undefined,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return this.prioritize(errors);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
// ESLint might fail, return empty array
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
prioritize(errors) {
|
|
40
|
+
return errors.sort((a, b) => a.priority - b.priority);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=eslint-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint-integration.js","sourceRoot":"","sources":["../../src/errors/eslint-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAS;IAEvB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC;YACvB,cAAc,EAAE;gBACd,KAAK,EAAE;oBACL,gBAAgB,EAAE,MAAM;oBACxB,UAAU,EAAE,OAAO;oBACnB,YAAY,EAAE,KAAK;iBACpB;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,WAAmB,SAAS;QAC3D,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;YACzE,MAAM,MAAM,GAAoB,EAAE,CAAC;YAEnC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yBAAyB;oBAE1E,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,OAAO,CAAC,OAAO;wBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;wBAClB,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,QAAQ;wBACR,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS;qBACpD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,wCAAwC;YACxC,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAEO,UAAU,CAAC,MAAuB;QACxC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DetectedError } from './pattern-matcher.js';
|
|
2
|
+
export declare class ErrorDetectionService {
|
|
3
|
+
private patternMatcher;
|
|
4
|
+
private eslint;
|
|
5
|
+
private typescript;
|
|
6
|
+
private contextual;
|
|
7
|
+
constructor();
|
|
8
|
+
detectErrors(code: string, filename?: string): Promise<DetectedError[]>;
|
|
9
|
+
private deduplicateAndPrioritize;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAK1E,qBAAa,qBAAqB;IAChC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,UAAU,CAAwB;IAC1C,OAAO,CAAC,UAAU,CAAqB;;IASjC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAkB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA+BxF,OAAO,CAAC,wBAAwB;CAgBjC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PatternMatcher } from './pattern-matcher.js';
|
|
2
|
+
import { ESLintIntegration } from './eslint-integration.js';
|
|
3
|
+
import { TypeScriptIntegration } from './typescript-integration.js';
|
|
4
|
+
import { ContextualAnalysis } from './contextual-analysis.js';
|
|
5
|
+
export class ErrorDetectionService {
|
|
6
|
+
patternMatcher;
|
|
7
|
+
eslint;
|
|
8
|
+
typescript;
|
|
9
|
+
contextual;
|
|
10
|
+
constructor() {
|
|
11
|
+
this.patternMatcher = new PatternMatcher();
|
|
12
|
+
this.eslint = new ESLintIntegration();
|
|
13
|
+
this.typescript = new TypeScriptIntegration();
|
|
14
|
+
this.contextual = new ContextualAnalysis();
|
|
15
|
+
}
|
|
16
|
+
async detectErrors(code, filename = 'code.ts') {
|
|
17
|
+
const allErrors = [];
|
|
18
|
+
// Layer 1: Static analysis (ESLint)
|
|
19
|
+
try {
|
|
20
|
+
const eslintErrors = await this.eslint.detectErrors(code, filename);
|
|
21
|
+
allErrors.push(...eslintErrors);
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
// Continue if ESLint fails
|
|
25
|
+
}
|
|
26
|
+
// Layer 2: TypeScript compiler
|
|
27
|
+
try {
|
|
28
|
+
const tsErrors = await this.typescript.detectErrors(code, filename);
|
|
29
|
+
allErrors.push(...tsErrors);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
// Continue if TypeScript fails
|
|
33
|
+
}
|
|
34
|
+
// Layer 3: Pattern matching
|
|
35
|
+
const patternErrors = this.patternMatcher.detect(code);
|
|
36
|
+
allErrors.push(...patternErrors);
|
|
37
|
+
// Layer 4: Contextual analysis
|
|
38
|
+
const contextualErrors = this.contextual.detectErrors(code);
|
|
39
|
+
allErrors.push(...contextualErrors);
|
|
40
|
+
// Remove duplicates and prioritize
|
|
41
|
+
return this.deduplicateAndPrioritize(allErrors);
|
|
42
|
+
}
|
|
43
|
+
deduplicateAndPrioritize(errors) {
|
|
44
|
+
// Remove duplicates based on line, column, and type
|
|
45
|
+
const seen = new Set();
|
|
46
|
+
const unique = [];
|
|
47
|
+
for (const error of errors) {
|
|
48
|
+
const key = `${error.type}:${error.line}:${error.column}`;
|
|
49
|
+
if (!seen.has(key)) {
|
|
50
|
+
seen.add(key);
|
|
51
|
+
unique.push(error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Sort by priority (lower = more critical)
|
|
55
|
+
return unique.sort((a, b) => a.priority - b.priority);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qBAAqB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C,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC5D,SAAS,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;QAEpC,mCAAmC;QACnC,OAAO,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IAEO,wBAAwB,CAAC,MAAuB;QACtD,oDAAoD;QACpD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,MAAM,GAAoB,EAAE,CAAC;QAEnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAC1D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,2CAA2C;QAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ErrorPattern {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
priority: number;
|
|
5
|
+
pattern: string;
|
|
6
|
+
description: string;
|
|
7
|
+
fix: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DetectedError {
|
|
10
|
+
type: string;
|
|
11
|
+
message: string;
|
|
12
|
+
line?: number;
|
|
13
|
+
column?: number;
|
|
14
|
+
priority: number;
|
|
15
|
+
fix?: string;
|
|
16
|
+
pattern?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class PatternMatcher {
|
|
19
|
+
private patterns;
|
|
20
|
+
constructor();
|
|
21
|
+
detect(code: string): DetectedError[];
|
|
22
|
+
private prioritize;
|
|
23
|
+
addPattern(pattern: ErrorPattern): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=pattern-matcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-matcher.d.ts","sourceRoot":"","sources":["../../src/errors/pattern-matcher.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAiB;;IAMjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE;IAkCrC,OAAO,CAAC,UAAU;IAIlB,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;CAGxC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import patternsData from './patterns.json';
|
|
2
|
+
export class PatternMatcher {
|
|
3
|
+
patterns;
|
|
4
|
+
constructor() {
|
|
5
|
+
this.patterns = patternsData.patterns;
|
|
6
|
+
}
|
|
7
|
+
detect(code) {
|
|
8
|
+
const errors = [];
|
|
9
|
+
const lines = code.split('\n');
|
|
10
|
+
for (let i = 0; i < lines.length; i++) {
|
|
11
|
+
const line = lines[i];
|
|
12
|
+
const lineNumber = i + 1;
|
|
13
|
+
for (const pattern of this.patterns) {
|
|
14
|
+
try {
|
|
15
|
+
const regex = new RegExp(pattern.pattern, 'g');
|
|
16
|
+
const matches = line.matchAll(regex);
|
|
17
|
+
for (const match of matches) {
|
|
18
|
+
errors.push({
|
|
19
|
+
type: pattern.id,
|
|
20
|
+
message: `${pattern.name}: ${pattern.description}`,
|
|
21
|
+
line: lineNumber,
|
|
22
|
+
column: match.index ? match.index + 1 : undefined,
|
|
23
|
+
priority: pattern.priority,
|
|
24
|
+
fix: pattern.fix,
|
|
25
|
+
pattern: pattern.pattern,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
// Invalid regex pattern, skip
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return this.prioritize(errors);
|
|
36
|
+
}
|
|
37
|
+
prioritize(errors) {
|
|
38
|
+
return errors.sort((a, b) => a.priority - b.priority);
|
|
39
|
+
}
|
|
40
|
+
addPattern(pattern) {
|
|
41
|
+
this.patterns.push(pattern);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=pattern-matcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-matcher.js","sourceRoot":"","sources":["../../src/errors/pattern-matcher.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAqB3C,MAAM,OAAO,cAAc;IACjB,QAAQ,CAAiB;IAEjC;QACE,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,QAA0B,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,MAAM,MAAM,GAAoB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG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B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"patterns": [
|
|
3
|
+
{
|
|
4
|
+
"id": "undefined-variable",
|
|
5
|
+
"name": "Undefined Variable",
|
|
6
|
+
"priority": 3,
|
|
7
|
+
"pattern": "\\b(\\w+)\\s*\\?\\s*\\.",
|
|
8
|
+
"description": "Variable may be undefined before optional chaining",
|
|
9
|
+
"fix": "Ensure variable is defined before use or use optional chaining"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "missing-import",
|
|
13
|
+
"name": "Missing Import",
|
|
14
|
+
"priority": 2,
|
|
15
|
+
"pattern": "import\\s+.*from\\s+['\"]([^'\"]+)['\"]",
|
|
16
|
+
"description": "Import statement may be missing or incorrect",
|
|
17
|
+
"fix": "Add missing import statement"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "async-await",
|
|
21
|
+
"name": "Missing Await",
|
|
22
|
+
"priority": 2,
|
|
23
|
+
"pattern": "(async\\s+)?function.*\\{[^}]*\\b(\\w+)\\([^)]*\\)(?!\\s*await)",
|
|
24
|
+
"description": "Async function call missing await",
|
|
25
|
+
"fix": "Add await keyword before async function call"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "null-check",
|
|
29
|
+
"name": "Missing Null Check",
|
|
30
|
+
"priority": 3,
|
|
31
|
+
"pattern": "\\b(\\w+)\\.(\\w+)(?!\\s*\\?)",
|
|
32
|
+
"description": "Property access without null/undefined check",
|
|
33
|
+
"fix": "Add null/undefined check before property access"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-integration.d.ts","sourceRoot":"","sources":["../../src/errors/typescript-integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,qBAAqB;IAC1B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAkB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA6CxF,OAAO,CAAC,UAAU;CAGnB"}
|