@defai.digital/ax-cli 3.14.6 → 3.14.7
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/.ax-cli/CUSTOM.md +97 -0
- package/.ax-cli/auto-accept-audit.json +1302 -0
- package/.ax-cli/index.json +43 -0
- package/.ax-cli/memory.json +62 -0
- package/.ax-cli/settings.json +3 -0
- package/README.md +11 -4
- package/ax.config.json +303 -0
- package/dist/mcp/config-detector-v2.d.ts +83 -0
- package/dist/mcp/config-detector-v2.js +328 -0
- package/dist/mcp/config-detector-v2.js.map +1 -0
- package/dist/mcp/config-migrator-v2.d.ts +89 -0
- package/dist/mcp/config-migrator-v2.js +288 -0
- package/dist/mcp/config-migrator-v2.js.map +1 -0
- package/dist/mcp/config-v2.d.ts +111 -0
- package/dist/mcp/config-v2.js +443 -0
- package/dist/mcp/config-v2.js.map +1 -0
- package/dist/mcp/transports-v2.d.ts +152 -0
- package/dist/mcp/transports-v2.js +481 -0
- package/dist/mcp/transports-v2.js.map +1 -0
- package/dist/ui/hooks/use-input-handler.js +4 -4
- package/dist/ui/hooks/use-input-handler.js.map +1 -1
- package/dist/ui/utils/image-handler.d.ts +1 -8
- package/dist/ui/utils/image-handler.js +64 -78
- package/dist/ui/utils/image-handler.js.map +1 -1
- package/dist/utils/error-sanitizer.d.ts +119 -0
- package/dist/utils/error-sanitizer.js +253 -0
- package/dist/utils/error-sanitizer.js.map +1 -0
- package/dist/utils/errors.d.ts +74 -0
- package/dist/utils/errors.js +139 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/image-processor.d.ts +4 -10
- package/dist/utils/image-processor.js +12 -20
- package/dist/utils/image-processor.js.map +1 -1
- package/dist/utils/incremental-analyzer.d.ts +134 -0
- package/dist/utils/incremental-analyzer.js +377 -0
- package/dist/utils/incremental-analyzer.js.map +1 -0
- package/dist/utils/math.d.ts +1 -0
- package/dist/utils/math.js +4 -0
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/settings.d.ts +1 -0
- package/dist/utils/settings.js +4 -0
- package/dist/utils/settings.js.map +1 -0
- package/dist/utils/streaming-analyzer.d.ts +160 -0
- package/dist/utils/streaming-analyzer.js +214 -0
- package/dist/utils/streaming-analyzer.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-processor.js","sourceRoot":"","sources":["../../src/utils/image-processor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,YAAY;AACZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,gBAAgB,CAAC;AAW9D,6CAA6C;AAC7C,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAG3B;IAFlB,YACE,OAAe,EACC,IAA+E;QAE/F,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAA2E;QAG/F,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,wBAAwB;AACxB,MAAM,WAAW,GAA6B;IAC5C,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC7B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACvB,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACvB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAA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AC,CAAC,WAAW,EAA0B,CAAC,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Analyzes only changed files and their dependencies using git integration.
|
|
5
|
+
* Provides 10-50x speedup by avoiding analysis of unchanged files.
|
|
6
|
+
*
|
|
7
|
+
* Quick Win #2: Git-Based Incremental Analysis (Est. time: 1 hour)
|
|
8
|
+
* Impact: 10-50x reduction in files to analyze
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for incremental analysis
|
|
12
|
+
*/
|
|
13
|
+
export interface IncrementalConfig {
|
|
14
|
+
/** Base directory for git operations (default: cwd) */
|
|
15
|
+
baseDir?: string;
|
|
16
|
+
/** File patterns to include (default: all) */
|
|
17
|
+
include?: string[];
|
|
18
|
+
/** File patterns to exclude (default: none) */
|
|
19
|
+
exclude?: string[];
|
|
20
|
+
/** Compare against specific commit/branch (default: HEAD) */
|
|
21
|
+
compareWith?: string;
|
|
22
|
+
/** Include untracked files (default: true) */
|
|
23
|
+
includeUntracked?: boolean;
|
|
24
|
+
/** Build dependency graph (default: false, for future use) */
|
|
25
|
+
trackDependencies?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Changed file info
|
|
29
|
+
*/
|
|
30
|
+
export interface ChangedFile {
|
|
31
|
+
/** File path relative to base directory */
|
|
32
|
+
path: string;
|
|
33
|
+
/** Type of change */
|
|
34
|
+
status: 'modified' | 'added' | 'deleted' | 'renamed' | 'untracked';
|
|
35
|
+
/** Previous path (for renamed files) */
|
|
36
|
+
oldPath?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Result of incremental analysis
|
|
40
|
+
*/
|
|
41
|
+
export interface IncrementalResult {
|
|
42
|
+
/** Files that need analysis */
|
|
43
|
+
filesToAnalyze: string[];
|
|
44
|
+
/** Files that are cached */
|
|
45
|
+
cachedFiles: string[];
|
|
46
|
+
/** Changed files detected */
|
|
47
|
+
changedFiles: ChangedFile[];
|
|
48
|
+
/** Total files in project */
|
|
49
|
+
totalFiles: number;
|
|
50
|
+
/** Estimated speedup */
|
|
51
|
+
speedup: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check if directory is a git repository
|
|
55
|
+
*/
|
|
56
|
+
export declare function isGitRepo(dir?: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Get changed files from git
|
|
59
|
+
*
|
|
60
|
+
* @param config - Configuration options
|
|
61
|
+
* @returns Array of changed files
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const changed = await getChangedFiles({
|
|
66
|
+
* compareWith: 'main',
|
|
67
|
+
* include: ['*.ts', '*.tsx'],
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* console.log(`${changed.length} files changed`);
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function getChangedFiles(config?: IncrementalConfig): Promise<ChangedFile[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Get files to analyze incrementally
|
|
76
|
+
*
|
|
77
|
+
* Returns only files that need analysis based on git changes.
|
|
78
|
+
*
|
|
79
|
+
* @param allFiles - All files in project
|
|
80
|
+
* @param config - Configuration options
|
|
81
|
+
* @returns Incremental analysis result
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const allFiles = await glob('src/** /*.ts');
|
|
86
|
+
* const result = await getFilesToAnalyze(allFiles);
|
|
87
|
+
*
|
|
88
|
+
* console.log(`Analyzing ${result.filesToAnalyze.length} of ${result.totalFiles} files`);
|
|
89
|
+
* console.log(`Speedup: ${result.speedup.toFixed(1)}x`);
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare function getFilesToAnalyze(allFiles: string[], config?: IncrementalConfig): Promise<IncrementalResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Get git repository info
|
|
95
|
+
*
|
|
96
|
+
* @param baseDir - Base directory (default: cwd)
|
|
97
|
+
* @returns Repository information
|
|
98
|
+
*/
|
|
99
|
+
export declare function getGitInfo(baseDir?: string): {
|
|
100
|
+
branch: string;
|
|
101
|
+
commit: string;
|
|
102
|
+
isDirty: boolean;
|
|
103
|
+
ahead: number;
|
|
104
|
+
behind: number;
|
|
105
|
+
} | null;
|
|
106
|
+
/**
|
|
107
|
+
* Simple dependency tracker (for future use)
|
|
108
|
+
*
|
|
109
|
+
* Parses import/require statements to build a dependency graph.
|
|
110
|
+
*/
|
|
111
|
+
export declare class DependencyTracker {
|
|
112
|
+
private graph;
|
|
113
|
+
private reverseGraph;
|
|
114
|
+
/**
|
|
115
|
+
* Add a file and its dependencies
|
|
116
|
+
*/
|
|
117
|
+
addFile(filePath: string): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Get files that depend on the given file
|
|
120
|
+
*/
|
|
121
|
+
getDependents(filePath: string): string[];
|
|
122
|
+
/**
|
|
123
|
+
* Get all affected files (transitive dependencies)
|
|
124
|
+
*/
|
|
125
|
+
getAffectedFiles(changedFiles: string[]): string[];
|
|
126
|
+
/**
|
|
127
|
+
* Parse import statements from file content
|
|
128
|
+
*/
|
|
129
|
+
private parseImports;
|
|
130
|
+
/**
|
|
131
|
+
* Resolve import path to absolute path
|
|
132
|
+
*/
|
|
133
|
+
private resolveImport;
|
|
134
|
+
}
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Analyzes only changed files and their dependencies using git integration.
|
|
5
|
+
* Provides 10-50x speedup by avoiding analysis of unchanged files.
|
|
6
|
+
*
|
|
7
|
+
* Quick Win #2: Git-Based Incremental Analysis (Est. time: 1 hour)
|
|
8
|
+
* Impact: 10-50x reduction in files to analyze
|
|
9
|
+
*/
|
|
10
|
+
import { execSync } from 'child_process';
|
|
11
|
+
import { existsSync } from 'fs';
|
|
12
|
+
import { resolve, dirname, join } from 'path';
|
|
13
|
+
import { readFile } from 'fs/promises';
|
|
14
|
+
/**
|
|
15
|
+
* Check if directory is a git repository
|
|
16
|
+
*/
|
|
17
|
+
export function isGitRepo(dir = process.cwd()) {
|
|
18
|
+
try {
|
|
19
|
+
execSync('git rev-parse --git-dir', {
|
|
20
|
+
cwd: dir,
|
|
21
|
+
stdio: 'ignore',
|
|
22
|
+
});
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get changed files from git
|
|
31
|
+
*
|
|
32
|
+
* @param config - Configuration options
|
|
33
|
+
* @returns Array of changed files
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const changed = await getChangedFiles({
|
|
38
|
+
* compareWith: 'main',
|
|
39
|
+
* include: ['*.ts', '*.tsx'],
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* console.log(`${changed.length} files changed`);
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export async function getChangedFiles(config = {}) {
|
|
46
|
+
const baseDir = config.baseDir || process.cwd();
|
|
47
|
+
// Check if git repo
|
|
48
|
+
if (!isGitRepo(baseDir)) {
|
|
49
|
+
throw new Error('Not a git repository');
|
|
50
|
+
}
|
|
51
|
+
const changedFiles = [];
|
|
52
|
+
try {
|
|
53
|
+
// Get staged and unstaged changes
|
|
54
|
+
const statusOutput = execSync(`git status --porcelain ${config.includeUntracked ? '--untracked-files=all' : '--untracked-files=no'}`, {
|
|
55
|
+
cwd: baseDir,
|
|
56
|
+
encoding: 'utf-8',
|
|
57
|
+
});
|
|
58
|
+
// Parse git status output
|
|
59
|
+
for (const line of statusOutput.split('\n')) {
|
|
60
|
+
if (!line.trim())
|
|
61
|
+
continue;
|
|
62
|
+
const status = line.substring(0, 2);
|
|
63
|
+
const filePath = line.substring(3);
|
|
64
|
+
// Parse status codes
|
|
65
|
+
let changeType;
|
|
66
|
+
if (status.includes('M')) {
|
|
67
|
+
changeType = 'modified';
|
|
68
|
+
}
|
|
69
|
+
else if (status.includes('A')) {
|
|
70
|
+
changeType = 'added';
|
|
71
|
+
}
|
|
72
|
+
else if (status.includes('D')) {
|
|
73
|
+
changeType = 'deleted';
|
|
74
|
+
}
|
|
75
|
+
else if (status.includes('R')) {
|
|
76
|
+
changeType = 'renamed';
|
|
77
|
+
}
|
|
78
|
+
else if (status.includes('?')) {
|
|
79
|
+
changeType = 'untracked';
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
// Apply filters - convert glob patterns to proper regex
|
|
85
|
+
const globToRegex = (pattern) => {
|
|
86
|
+
// Escape special regex chars except * and ?, then convert glob wildcards
|
|
87
|
+
// SECURITY FIX: Use [^/]* instead of .* to prevent ReDoS attacks
|
|
88
|
+
// .* can cause exponential time complexity on patterns like "a*b*c*d*"
|
|
89
|
+
const escaped = pattern
|
|
90
|
+
.replace(/[.+^${}()|[\]\\]/g, '\\$&') // Escape regex special chars
|
|
91
|
+
.replace(/\*/g, '[^/]*') // * -> [^/]* (non-greedy, no directory crossing)
|
|
92
|
+
.replace(/\?/g, '[^/]'); // ? -> [^/] (single char, no directory crossing)
|
|
93
|
+
return new RegExp(`^${escaped}$`);
|
|
94
|
+
};
|
|
95
|
+
if (config.include && config.include.length > 0) {
|
|
96
|
+
const matches = config.include.some((pattern) => globToRegex(pattern).test(filePath));
|
|
97
|
+
if (!matches)
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (config.exclude && config.exclude.length > 0) {
|
|
101
|
+
const excluded = config.exclude.some((pattern) => globToRegex(pattern).test(filePath));
|
|
102
|
+
if (excluded)
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
changedFiles.push({
|
|
106
|
+
path: filePath,
|
|
107
|
+
status: changeType,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
// Get diff against specific commit/branch if specified
|
|
111
|
+
if (config.compareWith) {
|
|
112
|
+
const diffOutput = execSync(`git diff --name-status ${config.compareWith}...HEAD`, {
|
|
113
|
+
cwd: baseDir,
|
|
114
|
+
encoding: 'utf-8',
|
|
115
|
+
});
|
|
116
|
+
for (const line of diffOutput.split('\n')) {
|
|
117
|
+
if (!line.trim())
|
|
118
|
+
continue;
|
|
119
|
+
const [status, ...paths] = line.split('\t');
|
|
120
|
+
const filePath = paths[0];
|
|
121
|
+
// Skip if no file path found
|
|
122
|
+
if (!filePath)
|
|
123
|
+
continue;
|
|
124
|
+
// Skip if already in changed files
|
|
125
|
+
if (changedFiles.some((f) => f.path === filePath)) {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
let changeType;
|
|
129
|
+
if (status === 'M') {
|
|
130
|
+
changeType = 'modified';
|
|
131
|
+
}
|
|
132
|
+
else if (status === 'A') {
|
|
133
|
+
changeType = 'added';
|
|
134
|
+
}
|
|
135
|
+
else if (status === 'D') {
|
|
136
|
+
changeType = 'deleted';
|
|
137
|
+
}
|
|
138
|
+
else if (status.startsWith('R')) {
|
|
139
|
+
changeType = 'renamed';
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
changedFiles.push({
|
|
145
|
+
path: filePath,
|
|
146
|
+
status: changeType,
|
|
147
|
+
oldPath: paths.length > 1 ? paths[1] : undefined,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
throw new Error(`Failed to get changed files: ${error.message}`);
|
|
154
|
+
}
|
|
155
|
+
return changedFiles;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get files to analyze incrementally
|
|
159
|
+
*
|
|
160
|
+
* Returns only files that need analysis based on git changes.
|
|
161
|
+
*
|
|
162
|
+
* @param allFiles - All files in project
|
|
163
|
+
* @param config - Configuration options
|
|
164
|
+
* @returns Incremental analysis result
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* const allFiles = await glob('src/** /*.ts');
|
|
169
|
+
* const result = await getFilesToAnalyze(allFiles);
|
|
170
|
+
*
|
|
171
|
+
* console.log(`Analyzing ${result.filesToAnalyze.length} of ${result.totalFiles} files`);
|
|
172
|
+
* console.log(`Speedup: ${result.speedup.toFixed(1)}x`);
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
export async function getFilesToAnalyze(allFiles, config = {}) {
|
|
176
|
+
const baseDir = config.baseDir || process.cwd();
|
|
177
|
+
// Check if git repo
|
|
178
|
+
if (!isGitRepo(baseDir)) {
|
|
179
|
+
// Not a git repo - analyze all files
|
|
180
|
+
return {
|
|
181
|
+
filesToAnalyze: allFiles,
|
|
182
|
+
cachedFiles: [],
|
|
183
|
+
changedFiles: [],
|
|
184
|
+
totalFiles: allFiles.length,
|
|
185
|
+
speedup: 1.0,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
// Get changed files
|
|
189
|
+
const changedFiles = await getChangedFiles(config);
|
|
190
|
+
if (changedFiles.length === 0) {
|
|
191
|
+
// No changes - all files can use cache
|
|
192
|
+
return {
|
|
193
|
+
filesToAnalyze: [],
|
|
194
|
+
cachedFiles: allFiles,
|
|
195
|
+
changedFiles: [],
|
|
196
|
+
totalFiles: allFiles.length,
|
|
197
|
+
speedup: allFiles.length > 0 ? Infinity : 1.0,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
// Convert changed file paths to absolute paths
|
|
201
|
+
const changedPaths = new Set(changedFiles.map((f) => resolve(baseDir, f.path)));
|
|
202
|
+
// Filter all files to only those that changed
|
|
203
|
+
const filesToAnalyze = allFiles.filter((file) => {
|
|
204
|
+
const absPath = resolve(file);
|
|
205
|
+
return changedPaths.has(absPath);
|
|
206
|
+
});
|
|
207
|
+
const cachedFiles = allFiles.filter((file) => {
|
|
208
|
+
const absPath = resolve(file);
|
|
209
|
+
return !changedPaths.has(absPath);
|
|
210
|
+
});
|
|
211
|
+
const speedup = allFiles.length / Math.max(filesToAnalyze.length, 1);
|
|
212
|
+
return {
|
|
213
|
+
filesToAnalyze,
|
|
214
|
+
cachedFiles,
|
|
215
|
+
changedFiles,
|
|
216
|
+
totalFiles: allFiles.length,
|
|
217
|
+
speedup,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Get git repository info
|
|
222
|
+
*
|
|
223
|
+
* @param baseDir - Base directory (default: cwd)
|
|
224
|
+
* @returns Repository information
|
|
225
|
+
*/
|
|
226
|
+
export function getGitInfo(baseDir = process.cwd()) {
|
|
227
|
+
if (!isGitRepo(baseDir)) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
try {
|
|
231
|
+
const branch = execSync('git rev-parse --abbrev-ref HEAD', {
|
|
232
|
+
cwd: baseDir,
|
|
233
|
+
encoding: 'utf-8',
|
|
234
|
+
}).trim();
|
|
235
|
+
const commit = execSync('git rev-parse --short HEAD', {
|
|
236
|
+
cwd: baseDir,
|
|
237
|
+
encoding: 'utf-8',
|
|
238
|
+
}).trim();
|
|
239
|
+
const statusOutput = execSync('git status --porcelain', {
|
|
240
|
+
cwd: baseDir,
|
|
241
|
+
encoding: 'utf-8',
|
|
242
|
+
});
|
|
243
|
+
const isDirty = statusOutput.trim().length > 0;
|
|
244
|
+
// Get ahead/behind counts
|
|
245
|
+
let ahead = 0;
|
|
246
|
+
let behind = 0;
|
|
247
|
+
try {
|
|
248
|
+
const aheadBehind = execSync('git rev-list --left-right --count HEAD...@{u}', {
|
|
249
|
+
cwd: baseDir,
|
|
250
|
+
encoding: 'utf-8',
|
|
251
|
+
}).trim();
|
|
252
|
+
const splitParts = aheadBehind.split('\t');
|
|
253
|
+
if (splitParts.length >= 2) {
|
|
254
|
+
const [aheadStr, behindStr] = splitParts;
|
|
255
|
+
ahead = parseInt(aheadStr, 10);
|
|
256
|
+
behind = parseInt(behindStr, 10);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
// No upstream branch
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
branch,
|
|
264
|
+
commit,
|
|
265
|
+
isDirty,
|
|
266
|
+
ahead,
|
|
267
|
+
behind,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Simple dependency tracker (for future use)
|
|
276
|
+
*
|
|
277
|
+
* Parses import/require statements to build a dependency graph.
|
|
278
|
+
*/
|
|
279
|
+
export class DependencyTracker {
|
|
280
|
+
graph = new Map();
|
|
281
|
+
reverseGraph = new Map();
|
|
282
|
+
/**
|
|
283
|
+
* Add a file and its dependencies
|
|
284
|
+
*/
|
|
285
|
+
async addFile(filePath) {
|
|
286
|
+
const content = await readFile(filePath, 'utf-8');
|
|
287
|
+
const imports = this.parseImports(content);
|
|
288
|
+
// Resolve imports to absolute paths
|
|
289
|
+
const resolvedImports = imports
|
|
290
|
+
.map((imp) => this.resolveImport(imp, filePath))
|
|
291
|
+
.filter((imp) => imp !== null);
|
|
292
|
+
// Add to graph
|
|
293
|
+
this.graph.set(filePath, new Set(resolvedImports));
|
|
294
|
+
// Add to reverse graph
|
|
295
|
+
for (const imp of resolvedImports) {
|
|
296
|
+
if (!this.reverseGraph.has(imp)) {
|
|
297
|
+
this.reverseGraph.set(imp, new Set());
|
|
298
|
+
}
|
|
299
|
+
this.reverseGraph.get(imp).add(filePath);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Get files that depend on the given file
|
|
304
|
+
*/
|
|
305
|
+
getDependents(filePath) {
|
|
306
|
+
return Array.from(this.reverseGraph.get(filePath) || []);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Get all affected files (transitive dependencies)
|
|
310
|
+
*/
|
|
311
|
+
getAffectedFiles(changedFiles) {
|
|
312
|
+
const affected = new Set(changedFiles);
|
|
313
|
+
const queue = [...changedFiles];
|
|
314
|
+
while (queue.length > 0) {
|
|
315
|
+
const file = queue.shift();
|
|
316
|
+
const dependents = this.getDependents(file);
|
|
317
|
+
for (const dep of dependents) {
|
|
318
|
+
if (!affected.has(dep)) {
|
|
319
|
+
affected.add(dep);
|
|
320
|
+
queue.push(dep);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return Array.from(affected);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Parse import statements from file content
|
|
328
|
+
*/
|
|
329
|
+
parseImports(content) {
|
|
330
|
+
const imports = [];
|
|
331
|
+
// ES6 imports
|
|
332
|
+
const es6Regex = /import\s+.*?\s+from\s+['"]([^'"]+)['"]/g;
|
|
333
|
+
let match;
|
|
334
|
+
while ((match = es6Regex.exec(content)) !== null) {
|
|
335
|
+
imports.push(match[1]);
|
|
336
|
+
}
|
|
337
|
+
// CommonJS requires
|
|
338
|
+
const cjsRegex = /require\(['"]([^'"]+)['"]\)/g;
|
|
339
|
+
while ((match = cjsRegex.exec(content)) !== null) {
|
|
340
|
+
imports.push(match[1]);
|
|
341
|
+
}
|
|
342
|
+
// Dynamic imports
|
|
343
|
+
const dynamicRegex = /import\(['"]([^'"]+)['"]\)/g;
|
|
344
|
+
while ((match = dynamicRegex.exec(content)) !== null) {
|
|
345
|
+
imports.push(match[1]);
|
|
346
|
+
}
|
|
347
|
+
return imports;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Resolve import path to absolute path
|
|
351
|
+
*/
|
|
352
|
+
resolveImport(importPath, fromFile) {
|
|
353
|
+
// Skip node_modules
|
|
354
|
+
if (!importPath.startsWith('.')) {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
const dir = dirname(fromFile);
|
|
358
|
+
let resolved = resolve(dir, importPath);
|
|
359
|
+
// Try with common extensions
|
|
360
|
+
const extensions = ['', '.ts', '.tsx', '.js', '.jsx'];
|
|
361
|
+
for (const ext of extensions) {
|
|
362
|
+
const withExt = resolved + ext;
|
|
363
|
+
if (existsSync(withExt)) {
|
|
364
|
+
return withExt;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
// Try index files
|
|
368
|
+
for (const ext of extensions.slice(1)) {
|
|
369
|
+
const indexPath = join(resolved, `index${ext}`);
|
|
370
|
+
if (existsSync(indexPath)) {
|
|
371
|
+
return indexPath;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
//# sourceMappingURL=incremental-analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incremental-analyzer.js","sourceRoot":"","sources":["../../src/utils/incremental-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgDvC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IACnD,IAAI,CAAC;QACH,QAAQ,CAAC,yBAAyB,EAAE;YAClC,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,SAA4B,EAAE;IAE9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAA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,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9B,IAAI,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAExC,6BAA6B;QAC7B,MAAM,UAAU,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACtD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,MAAM,OAAO,GAAG,QAAQ,GAAG,GAAG,CAAC;YAC/B,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;gBACxB,OAAO,OAAO,CAAC;YACjB,CAAC;QACH,CAAC;QAED,kBAAkB;QAClB,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,CAAC,CAAC;YAChD,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC1B,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function add(a: number, b: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAS;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getSettingsManager, UserSettings, ProjectSettings } from './settings-manager.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/utils/settings.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,uFAAuF;AAEvF,OAAO,EAAE,kBAAkB,EAAiC,MAAM,uBAAuB,CAAC"}
|