@nexiq/extension-sdk 1.0.1 → 1.0.3
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/dist/tasks/componentTask.js +332 -0
- package/dist/tasks/componentTask.test.js +520 -0
- package/eslint.config.js +1 -0
- package/package.json +9 -6
- package/src/tasks/componentTask.test.ts +572 -0
- package/src/tasks/componentTask.ts +268 -44
- package/tsconfig.json +3 -2
- package/dist/extension-sdk/src/tasks/componentTask.js +0 -129
- package/dist/shared/src/component.d.ts +0 -273
- package/dist/shared/src/index.d.ts +0 -126
- package/dist/shared/src/index.js +0 -3
- package/dist/shared/src/types/backend.d.ts +0 -109
- package/dist/shared/src/types/backend.js +0 -1
- package/dist/shared/src/types/config.d.ts +0 -42
- package/dist/shared/src/types/config.js +0 -1
- package/dist/shared/src/types/git.d.ts +0 -41
- package/dist/shared/src/types/git.js +0 -1
- package/dist/shared/src/types/index.d.ts +0 -80
- package/dist/shared/src/types/index.js +0 -5
- package/dist/shared/src/types/object.d.ts +0 -24
- package/dist/shared/src/types/object.js +0 -1
- package/dist/shared/src/types/primitive.d.ts +0 -175
- package/dist/shared/src/types/primitive.js +0 -1
- package/dist/shared/src/utils.d.ts +0 -5
- package/dist/shared/src/utils.js +0 -81
- /package/dist/{extension-sdk/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{extension-sdk/src/index.js → index.js} +0 -0
- /package/dist/{extension-sdk/src/tasks → tasks}/componentTask.d.ts +0 -0
- /package/dist/{shared/src/component.js → tasks/componentTask.test.d.ts} +0 -0
- /package/dist/{extension-sdk/src/tasks → tasks}/gitTask.d.ts +0 -0
- /package/dist/{extension-sdk/src/tasks → tasks}/gitTask.js +0 -0
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import type { TypeDataDeclare, UIItemState } from "./types/index.js";
|
|
2
|
-
import type { PropDataType, TypeData } from "./types/primitive.js";
|
|
3
|
-
export type ComponentFileImport = {
|
|
4
|
-
localName: string;
|
|
5
|
-
importedName: string | null;
|
|
6
|
-
source: string;
|
|
7
|
-
type: "default" | "named" | "namespace" | "type";
|
|
8
|
-
importKind: "value" | "type";
|
|
9
|
-
};
|
|
10
|
-
export type ComponentFileExport = {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
type: "default" | "named" | "namespace" | "type";
|
|
14
|
-
exportKind: "value" | "type" | "component" | "function" | "class";
|
|
15
|
-
};
|
|
16
|
-
export interface State extends ComponentLoc {
|
|
17
|
-
id: string;
|
|
18
|
-
setter?: string | undefined;
|
|
19
|
-
parentId?: string | undefined;
|
|
20
|
-
}
|
|
21
|
-
export interface RefData extends ComponentLoc {
|
|
22
|
-
id: string;
|
|
23
|
-
defaultData: PropDataType;
|
|
24
|
-
parentId?: string | undefined;
|
|
25
|
-
}
|
|
26
|
-
export interface Memo extends ComponentLoc, ReactDependencies {
|
|
27
|
-
id: string;
|
|
28
|
-
scope: VariableScope;
|
|
29
|
-
async?: boolean | undefined;
|
|
30
|
-
parentId?: string | undefined;
|
|
31
|
-
}
|
|
32
|
-
export type ComponentInfoRenderDependency = {
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
value: PropDataType;
|
|
36
|
-
valueId?: string;
|
|
37
|
-
};
|
|
38
|
-
export interface ComponentInfoRender extends ComponentLoc {
|
|
39
|
-
id: string;
|
|
40
|
-
tag: string;
|
|
41
|
-
instanceId: string;
|
|
42
|
-
parentId?: string | undefined;
|
|
43
|
-
dependencies: ComponentInfoRenderDependency[];
|
|
44
|
-
isDependency?: boolean | undefined;
|
|
45
|
-
renderIndex: number;
|
|
46
|
-
kind: "jsx" | "ternary" | "loop" | "expression" | "hook" | "call";
|
|
47
|
-
children: Record<string, ComponentInfoRender>;
|
|
48
|
-
}
|
|
49
|
-
export interface EffectInfo extends ComponentLoc, ReactDependencies {
|
|
50
|
-
id: string;
|
|
51
|
-
scope?: VariableScope;
|
|
52
|
-
file?: string;
|
|
53
|
-
kind?: "effect";
|
|
54
|
-
}
|
|
55
|
-
export interface PropData {
|
|
56
|
-
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
type: string;
|
|
59
|
-
kind: "prop" | "spread";
|
|
60
|
-
props?: PropData[];
|
|
61
|
-
hash?: string;
|
|
62
|
-
gitStatus?: "added" | "modified" | "deleted";
|
|
63
|
-
file?: string;
|
|
64
|
-
loc?: VariableLoc;
|
|
65
|
-
defaultValue?: PropDataType | undefined;
|
|
66
|
-
}
|
|
67
|
-
export interface ReactFunctionInfoBase {
|
|
68
|
-
states: string[];
|
|
69
|
-
hooks: string[];
|
|
70
|
-
props: PropData[];
|
|
71
|
-
propName?: string | undefined;
|
|
72
|
-
propType?: TypeData;
|
|
73
|
-
effects: Record<string, EffectInfo>;
|
|
74
|
-
}
|
|
75
|
-
export interface ReactFunctionInfo extends ReactFunctionInfoBase {
|
|
76
|
-
id: string;
|
|
77
|
-
name: string;
|
|
78
|
-
file: string;
|
|
79
|
-
}
|
|
80
|
-
export interface HookInfo extends ReactFunctionInfoBase {
|
|
81
|
-
}
|
|
82
|
-
export interface ComponentInfo extends ReactFunctionInfoBase {
|
|
83
|
-
componentType: "Function" | "Class";
|
|
84
|
-
contexts: string[];
|
|
85
|
-
forwardRef?: boolean;
|
|
86
|
-
}
|
|
87
|
-
export interface ComponentFileVarDependency {
|
|
88
|
-
id: string;
|
|
89
|
-
name: string;
|
|
90
|
-
}
|
|
91
|
-
export interface VariableLoc {
|
|
92
|
-
line: number;
|
|
93
|
-
column: number;
|
|
94
|
-
}
|
|
95
|
-
export interface ComponentLoc {
|
|
96
|
-
loc: VariableLoc;
|
|
97
|
-
}
|
|
98
|
-
export interface VariableScope {
|
|
99
|
-
start: VariableLoc;
|
|
100
|
-
end: VariableLoc;
|
|
101
|
-
}
|
|
102
|
-
export type VarType = "function" | "data" | "jsx" | "class";
|
|
103
|
-
export type ReactFunctionVar = "component" | "hook";
|
|
104
|
-
export type ReactStateVar = "state" | "ref";
|
|
105
|
-
export type ReactWithCallbackVar = "memo" | "callback";
|
|
106
|
-
export type ReactVarKind = ReactFunctionVar | ReactStateVar | ReactWithCallbackVar;
|
|
107
|
-
export type VarKind = "normal" | ReactVarKind;
|
|
108
|
-
export type VariableNamePattern = {
|
|
109
|
-
type: "identifier";
|
|
110
|
-
name: string;
|
|
111
|
-
loc: VariableLoc;
|
|
112
|
-
id: string;
|
|
113
|
-
} | {
|
|
114
|
-
type: "object";
|
|
115
|
-
properties: VariableObjectProperty[];
|
|
116
|
-
raw: string;
|
|
117
|
-
loc: VariableLoc;
|
|
118
|
-
id: string;
|
|
119
|
-
} | {
|
|
120
|
-
type: "array";
|
|
121
|
-
elements: VariableArrayElement[];
|
|
122
|
-
raw: string;
|
|
123
|
-
loc: VariableLoc;
|
|
124
|
-
id: string;
|
|
125
|
-
} | {
|
|
126
|
-
type: "rest";
|
|
127
|
-
argument: VariableNamePattern;
|
|
128
|
-
loc: VariableLoc;
|
|
129
|
-
id: string;
|
|
130
|
-
} | {
|
|
131
|
-
type: "void";
|
|
132
|
-
loc: VariableLoc;
|
|
133
|
-
id: string;
|
|
134
|
-
};
|
|
135
|
-
export type VariableObjectProperty = {
|
|
136
|
-
key: string;
|
|
137
|
-
value: VariableNamePattern;
|
|
138
|
-
loc: VariableLoc;
|
|
139
|
-
};
|
|
140
|
-
export type VariableArrayElement = {
|
|
141
|
-
type: "element";
|
|
142
|
-
value: VariableNamePattern;
|
|
143
|
-
loc: VariableLoc;
|
|
144
|
-
} | {
|
|
145
|
-
type: "rest";
|
|
146
|
-
value: VariableNamePattern;
|
|
147
|
-
loc: VariableLoc;
|
|
148
|
-
} | null;
|
|
149
|
-
export type VariableName = VariableNamePattern;
|
|
150
|
-
interface ComponentFileVarBaseType<TType extends VarType> {
|
|
151
|
-
id: string;
|
|
152
|
-
name: VariableName;
|
|
153
|
-
type: TType;
|
|
154
|
-
file: string;
|
|
155
|
-
hash?: string | undefined;
|
|
156
|
-
parentId?: string | undefined;
|
|
157
|
-
declarationKind?: "const" | "let" | "var" | "using" | "await using" | undefined;
|
|
158
|
-
dependencies: Record<string, ComponentFileVarDependency>;
|
|
159
|
-
ui?: (UIItemState & {
|
|
160
|
-
children?: Record<string, UIItemState>;
|
|
161
|
-
vars?: Record<string, UIItemState>;
|
|
162
|
-
}) | undefined;
|
|
163
|
-
}
|
|
164
|
-
export interface ComponentFileVarBase<TType extends VarType, TKind extends VarKind> extends ComponentLoc, ComponentFileVarBaseType<TType> {
|
|
165
|
-
kind: TKind;
|
|
166
|
-
}
|
|
167
|
-
export type FunctionReturn = PropDataType | ComponentFileVarJSX | string;
|
|
168
|
-
export interface ComponentFileVarBaseTypeFunction<TKind extends VarKind, TType extends VarType = "function"> extends ComponentFileVarBase<TType, TKind> {
|
|
169
|
-
type: TType;
|
|
170
|
-
scope: VariableScope;
|
|
171
|
-
async?: boolean | undefined;
|
|
172
|
-
var: Record<string, ComponentFileVar>;
|
|
173
|
-
return?: FunctionReturn | undefined;
|
|
174
|
-
children: Record<string, ComponentInfoRender>;
|
|
175
|
-
}
|
|
176
|
-
export interface ComponentFileVarBaseTypeData<TKind extends VarKind, TType extends VarType = "data"> extends ComponentFileVarBase<TType, TKind> {
|
|
177
|
-
type: TType;
|
|
178
|
-
children?: Record<string, ComponentInfoRender>;
|
|
179
|
-
}
|
|
180
|
-
export type ComponentFileVarDependencyType<TKind extends VarKind> = ComponentFileVarBaseTypeFunction<TKind> | ComponentFileVarBaseTypeData<TKind>;
|
|
181
|
-
export type ComponentFileVarReact<TType extends VarType, TKind extends ReactVarKind> = ComponentFileVarBase<TType, TKind>;
|
|
182
|
-
export type ComponentFileVarReactFunction<TKind extends ReactVarKind, TType extends VarType = "function"> = ComponentFileVarBaseTypeFunction<TKind, TType> & ReactFunctionInfoBase;
|
|
183
|
-
export type ReactDependency = {
|
|
184
|
-
id: string;
|
|
185
|
-
name: string;
|
|
186
|
-
};
|
|
187
|
-
export type ReactDependencies = {
|
|
188
|
-
reactDeps: ReactDependency[];
|
|
189
|
-
};
|
|
190
|
-
export type ComponentFileVarReactWithCallback<TKind extends ReactVarKind, TType extends VarType = "function"> = ComponentFileVarBaseTypeFunction<TKind, TType> & ReactDependencies;
|
|
191
|
-
export type ComponentFileVarComponent = ComponentFileVarReactFunction<"component", "function" | "class"> & ComponentInfo & {
|
|
192
|
-
kind: "component";
|
|
193
|
-
};
|
|
194
|
-
export type ComponentFileVarState = ComponentFileVarReact<"data", "state"> & {
|
|
195
|
-
setter?: string | undefined;
|
|
196
|
-
};
|
|
197
|
-
export type ComponentFileVarCallHook = ComponentFileVarReact<"data", "hook"> & {
|
|
198
|
-
call: {
|
|
199
|
-
id: string;
|
|
200
|
-
name: string;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
export type ComponentFileVarRef = ComponentFileVarReact<"data", "ref"> & {
|
|
204
|
-
defaultData: PropDataType;
|
|
205
|
-
};
|
|
206
|
-
export type ComponentFileVarHook = ComponentFileVarReactFunction<"hook", "function"> & HookInfo & {
|
|
207
|
-
kind: "hook";
|
|
208
|
-
};
|
|
209
|
-
export type ComponentFileVarCallback = ComponentFileVarReactWithCallback<"callback"> & ReactDependencies;
|
|
210
|
-
export type MemoFileVarHook = ComponentFileVarReactWithCallback<"memo"> & ReactDependencies;
|
|
211
|
-
export type ComponentFileVarNormalBase<TType extends VarType> = ComponentLoc & ComponentFileVarBase<TType, "normal"> & {
|
|
212
|
-
kind: "normal";
|
|
213
|
-
};
|
|
214
|
-
export type ComponentFileVarNormalFunction = ComponentFileVarNormalBase<"function" | "class"> & ComponentFileVarBaseTypeFunction<"normal">;
|
|
215
|
-
export type ComponentFileVarNormalData = ComponentFileVarNormalBase<"data"> & ComponentFileVarBaseTypeData<"normal">;
|
|
216
|
-
export type ComponentFileVarNormal = ComponentFileVarNormalFunction | ComponentFileVarNormalData;
|
|
217
|
-
export interface ComponentFileVarJSX extends ComponentFileVarBase<"jsx", "normal"> {
|
|
218
|
-
type: "jsx";
|
|
219
|
-
tag: string;
|
|
220
|
-
props: ComponentInfoRenderDependency[];
|
|
221
|
-
children: Record<string, ComponentInfoRender>;
|
|
222
|
-
srcId?: string | undefined;
|
|
223
|
-
}
|
|
224
|
-
export type ComponentFileVarFunction = ComponentFileVarBaseTypeFunction<"normal"> & {
|
|
225
|
-
kind: "normal";
|
|
226
|
-
};
|
|
227
|
-
export type ComponentFileVar = ComponentFileVarComponent | ComponentFileVarState | ComponentFileVarCallHook | ComponentFileVarRef | ComponentFileVarNormal | ComponentFileVarHook | ComponentFileVarCallback | MemoFileVarHook | ComponentFileVarFunction | ComponentFileVarJSX;
|
|
228
|
-
export type IResolveAddRender = {
|
|
229
|
-
type: "comAddRender";
|
|
230
|
-
fileName: string;
|
|
231
|
-
tag: string;
|
|
232
|
-
dependency: ComponentInfoRenderDependency[];
|
|
233
|
-
loc: VariableLoc;
|
|
234
|
-
kind?: ComponentInfoRender["kind"] | undefined;
|
|
235
|
-
parentId?: string | undefined;
|
|
236
|
-
};
|
|
237
|
-
export type IResolveAddHook = {
|
|
238
|
-
type: "comAddHook";
|
|
239
|
-
name: string;
|
|
240
|
-
fileName: string;
|
|
241
|
-
hook: string;
|
|
242
|
-
loc: VariableLoc;
|
|
243
|
-
};
|
|
244
|
-
export type IResolveCallHook = {
|
|
245
|
-
type: "comResolveCallHook";
|
|
246
|
-
fileName: string;
|
|
247
|
-
loc: VariableLoc;
|
|
248
|
-
id: string;
|
|
249
|
-
hook: string;
|
|
250
|
-
};
|
|
251
|
-
export type IResolveTsType = {
|
|
252
|
-
type: "tsType";
|
|
253
|
-
fileName: string;
|
|
254
|
-
id: string;
|
|
255
|
-
};
|
|
256
|
-
export type IResolveComPropsTsType = {
|
|
257
|
-
type: "comPropsTsType";
|
|
258
|
-
fileName: string;
|
|
259
|
-
id: string;
|
|
260
|
-
};
|
|
261
|
-
export type ComponentDBResolve = IResolveAddRender | IResolveAddHook | IResolveCallHook | IResolveTsType | IResolveComPropsTsType;
|
|
262
|
-
export type ComponentFile = {
|
|
263
|
-
path: string;
|
|
264
|
-
fingerPrint: string;
|
|
265
|
-
hash: string;
|
|
266
|
-
import: Record<string, ComponentFileImport>;
|
|
267
|
-
export: Record<string, ComponentFileExport>;
|
|
268
|
-
starExports: string[];
|
|
269
|
-
defaultExport: string | null;
|
|
270
|
-
tsTypes: Record<string, TypeDataDeclare>;
|
|
271
|
-
var: Record<string, ComponentFileVar>;
|
|
272
|
-
};
|
|
273
|
-
export {};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import type { ComponentFile, ComponentFileVar, PropData, EffectInfo, ComponentDBResolve } from "./component.js";
|
|
2
|
-
export type DataEdge = {
|
|
3
|
-
from: string;
|
|
4
|
-
to: string;
|
|
5
|
-
label: string;
|
|
6
|
-
};
|
|
7
|
-
export interface EntityRow {
|
|
8
|
-
id: string;
|
|
9
|
-
scope_id: string;
|
|
10
|
-
kind: string;
|
|
11
|
-
name: string | null;
|
|
12
|
-
type: string | null;
|
|
13
|
-
line: number | null;
|
|
14
|
-
column: number | null;
|
|
15
|
-
end_line: number | null;
|
|
16
|
-
end_column: number | null;
|
|
17
|
-
declaration_kind: string | null;
|
|
18
|
-
data_json: string | null;
|
|
19
|
-
}
|
|
20
|
-
export interface ScopeRow {
|
|
21
|
-
id: string;
|
|
22
|
-
file_id: number;
|
|
23
|
-
parent_id: string | null;
|
|
24
|
-
kind: string;
|
|
25
|
-
entity_id: string | null;
|
|
26
|
-
data_json: string | null;
|
|
27
|
-
}
|
|
28
|
-
export interface SymbolRow {
|
|
29
|
-
id: string;
|
|
30
|
-
entity_id: string;
|
|
31
|
-
scope_id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
path: string | null;
|
|
34
|
-
is_alias: number;
|
|
35
|
-
has_default: number;
|
|
36
|
-
data_json: string | null;
|
|
37
|
-
}
|
|
38
|
-
export interface RenderRow {
|
|
39
|
-
id: string;
|
|
40
|
-
file_id: number;
|
|
41
|
-
parent_entity_id: string;
|
|
42
|
-
parent_render_id: string | null;
|
|
43
|
-
render_index: number;
|
|
44
|
-
tag: string;
|
|
45
|
-
symbol_id: string | null;
|
|
46
|
-
line: number | null;
|
|
47
|
-
column: number | null;
|
|
48
|
-
kind: string;
|
|
49
|
-
data_json: string | null;
|
|
50
|
-
}
|
|
51
|
-
export interface RelationRow {
|
|
52
|
-
from_id: string;
|
|
53
|
-
to_id: string;
|
|
54
|
-
kind: string;
|
|
55
|
-
line: number | null;
|
|
56
|
-
column: number | null;
|
|
57
|
-
data_json: string | null;
|
|
58
|
-
}
|
|
59
|
-
export interface FileRow {
|
|
60
|
-
id: number;
|
|
61
|
-
path: string;
|
|
62
|
-
hash: string;
|
|
63
|
-
fingerprint: string;
|
|
64
|
-
default_export: string | null;
|
|
65
|
-
star_exports_json: string | null;
|
|
66
|
-
}
|
|
67
|
-
export interface ExportRow {
|
|
68
|
-
id: string;
|
|
69
|
-
scope_id: string;
|
|
70
|
-
symbol_id: string | null;
|
|
71
|
-
entity_id: string | null;
|
|
72
|
-
name: string | null;
|
|
73
|
-
is_default: number;
|
|
74
|
-
}
|
|
75
|
-
export type DatabaseData = {
|
|
76
|
-
files: FileRow[];
|
|
77
|
-
entities: EntityRow[];
|
|
78
|
-
scopes: ScopeRow[];
|
|
79
|
-
symbols: SymbolRow[];
|
|
80
|
-
renders: RenderRow[];
|
|
81
|
-
exports: ExportRow[];
|
|
82
|
-
relations: RelationRow[];
|
|
83
|
-
diff?: AnalyzedDiff;
|
|
84
|
-
};
|
|
85
|
-
export type AnalyzedDiff = {
|
|
86
|
-
added: string[];
|
|
87
|
-
modified: string[];
|
|
88
|
-
deleted: string[];
|
|
89
|
-
deletedObjects?: Record<string, ComponentFileVar | PropData | EffectInfo>;
|
|
90
|
-
};
|
|
91
|
-
export type JsonData = {
|
|
92
|
-
src: string;
|
|
93
|
-
edges: DataEdge[];
|
|
94
|
-
files: Record<string, ComponentFile>;
|
|
95
|
-
labels?: Record<string, string[]>;
|
|
96
|
-
diff?: AnalyzedDiff;
|
|
97
|
-
resolve: ComponentDBResolve[];
|
|
98
|
-
};
|
|
99
|
-
export interface BenchmarkToolCall {
|
|
100
|
-
id: string;
|
|
101
|
-
name: string;
|
|
102
|
-
arguments: Record<string, unknown>;
|
|
103
|
-
}
|
|
104
|
-
export interface BenchmarkStep {
|
|
105
|
-
role: "user" | "assistant" | "tool" | "system";
|
|
106
|
-
content?: string;
|
|
107
|
-
toolCalls?: BenchmarkToolCall[];
|
|
108
|
-
toolCallId?: string;
|
|
109
|
-
toolName?: string;
|
|
110
|
-
tokens: number;
|
|
111
|
-
}
|
|
112
|
-
export interface BenchmarkResult {
|
|
113
|
-
scenarioId: string;
|
|
114
|
-
projectName: string;
|
|
115
|
-
approach: "baseline" | "react-map-cold" | "react-map-warm";
|
|
116
|
-
testType: "single-prompt" | "planning";
|
|
117
|
-
model: string;
|
|
118
|
-
success: boolean;
|
|
119
|
-
totalTokens: number;
|
|
120
|
-
toolCallsCount: number;
|
|
121
|
-
latencyMs: number;
|
|
122
|
-
steps: BenchmarkStep[];
|
|
123
|
-
}
|
|
124
|
-
export * from "./types/index.js";
|
|
125
|
-
export * from "./component.js";
|
|
126
|
-
export * from "./utils.js";
|
package/dist/shared/src/index.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { DatabaseData } from "../index.js";
|
|
2
|
-
import type { ProjectStatus, GitStatus, GitCommit, GitFileDiff, ReactMapConfig, AppStateData, UIStateMap } from "./index.js";
|
|
3
|
-
export interface BackendRequestMap {
|
|
4
|
-
check_project_status: {
|
|
5
|
-
payload: {
|
|
6
|
-
projectPath: string;
|
|
7
|
-
};
|
|
8
|
-
response: ProjectStatus;
|
|
9
|
-
};
|
|
10
|
-
save_project_config: {
|
|
11
|
-
payload: {
|
|
12
|
-
projectPath: string;
|
|
13
|
-
config: ReactMapConfig;
|
|
14
|
-
};
|
|
15
|
-
response: {
|
|
16
|
-
success: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
get_project_icon: {
|
|
20
|
-
payload: {
|
|
21
|
-
projectPath: string;
|
|
22
|
-
};
|
|
23
|
-
response: string | null;
|
|
24
|
-
};
|
|
25
|
-
git_status: {
|
|
26
|
-
payload: {
|
|
27
|
-
projectPath: string;
|
|
28
|
-
};
|
|
29
|
-
response: GitStatus;
|
|
30
|
-
};
|
|
31
|
-
git_log: {
|
|
32
|
-
payload: {
|
|
33
|
-
projectPath: string;
|
|
34
|
-
options: number | {
|
|
35
|
-
limit?: number;
|
|
36
|
-
path?: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
response: GitCommit[];
|
|
40
|
-
};
|
|
41
|
-
git_diff: {
|
|
42
|
-
payload: {
|
|
43
|
-
projectPath: string;
|
|
44
|
-
options: {
|
|
45
|
-
file?: string;
|
|
46
|
-
commit?: string;
|
|
47
|
-
baseCommit?: string;
|
|
48
|
-
staged?: boolean;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
response: GitFileDiff[];
|
|
52
|
-
};
|
|
53
|
-
git_analyze_commit: {
|
|
54
|
-
payload: {
|
|
55
|
-
projectPath: string;
|
|
56
|
-
commitHash: string;
|
|
57
|
-
subPath?: string;
|
|
58
|
-
};
|
|
59
|
-
response: DatabaseData;
|
|
60
|
-
};
|
|
61
|
-
open_project: {
|
|
62
|
-
payload: {
|
|
63
|
-
projectPath: string;
|
|
64
|
-
subProject?: string;
|
|
65
|
-
};
|
|
66
|
-
response: {
|
|
67
|
-
sqlitePath: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
read_state: {
|
|
71
|
-
payload: {
|
|
72
|
-
projectPath: string;
|
|
73
|
-
};
|
|
74
|
-
response: unknown;
|
|
75
|
-
};
|
|
76
|
-
save_state: {
|
|
77
|
-
payload: {
|
|
78
|
-
projectPath: string;
|
|
79
|
-
state: AppStateData;
|
|
80
|
-
};
|
|
81
|
-
response: boolean;
|
|
82
|
-
};
|
|
83
|
-
update_graph_position: {
|
|
84
|
-
payload: {
|
|
85
|
-
projectPath: string;
|
|
86
|
-
subProject?: string;
|
|
87
|
-
positions: UIStateMap;
|
|
88
|
-
contextId?: string;
|
|
89
|
-
};
|
|
90
|
-
response: boolean;
|
|
91
|
-
};
|
|
92
|
-
call_tool: {
|
|
93
|
-
payload: {
|
|
94
|
-
name: string;
|
|
95
|
-
arguments: Record<string, unknown>;
|
|
96
|
-
};
|
|
97
|
-
response: unknown;
|
|
98
|
-
};
|
|
99
|
-
chunked_response: {
|
|
100
|
-
payload: {
|
|
101
|
-
chunk: string;
|
|
102
|
-
index: number;
|
|
103
|
-
total: number;
|
|
104
|
-
originalType: string;
|
|
105
|
-
};
|
|
106
|
-
response: void;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
export type BackendMessageType = keyof BackendRequestMap;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export type AppTheme = "dark" | "light";
|
|
2
|
-
export interface CustomColors {
|
|
3
|
-
nodeHighlight?: string;
|
|
4
|
-
comboHighlight?: string;
|
|
5
|
-
arrowColor?: string;
|
|
6
|
-
labelColor?: string;
|
|
7
|
-
gitAdded?: string;
|
|
8
|
-
gitModified?: string;
|
|
9
|
-
gitDeleted?: string;
|
|
10
|
-
stateNode?: string;
|
|
11
|
-
memoNode?: string;
|
|
12
|
-
callbackNode?: string;
|
|
13
|
-
refNode?: string;
|
|
14
|
-
effectNode?: string;
|
|
15
|
-
propNode?: string;
|
|
16
|
-
componentNode?: string;
|
|
17
|
-
hookNode?: string;
|
|
18
|
-
renderNode?: string;
|
|
19
|
-
typeKeyword?: string;
|
|
20
|
-
typeLiteral?: string;
|
|
21
|
-
typeString?: string;
|
|
22
|
-
typeNumber?: string;
|
|
23
|
-
typeBoolean?: string;
|
|
24
|
-
typePunctuation?: string;
|
|
25
|
-
typeReference?: string;
|
|
26
|
-
typeComponent?: string;
|
|
27
|
-
typeDefault?: string;
|
|
28
|
-
genericsColor?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface SubProject {
|
|
31
|
-
name: string;
|
|
32
|
-
path: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ReactMapConfig {
|
|
35
|
-
entry?: string;
|
|
36
|
-
aliases?: Record<string, string>;
|
|
37
|
-
extensions?: string[];
|
|
38
|
-
dependencyDepth?: number;
|
|
39
|
-
analysisPath?: string;
|
|
40
|
-
ignorePatterns?: string[];
|
|
41
|
-
ignoreSubProjects?: string[];
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export interface GitFileStatus {
|
|
2
|
-
path: string;
|
|
3
|
-
index: string;
|
|
4
|
-
working_dir: string;
|
|
5
|
-
}
|
|
6
|
-
export interface GitStatus {
|
|
7
|
-
current: string | null;
|
|
8
|
-
tracking: string | null;
|
|
9
|
-
detached: boolean;
|
|
10
|
-
files: GitFileStatus[];
|
|
11
|
-
staged: string[];
|
|
12
|
-
}
|
|
13
|
-
export interface GitCommit {
|
|
14
|
-
hash: string;
|
|
15
|
-
date: string;
|
|
16
|
-
message: string;
|
|
17
|
-
author_name: string;
|
|
18
|
-
author_email: string;
|
|
19
|
-
}
|
|
20
|
-
export interface GitDiff {
|
|
21
|
-
file: string;
|
|
22
|
-
diff: string;
|
|
23
|
-
}
|
|
24
|
-
export interface GitDiffLine {
|
|
25
|
-
type: 'added' | 'deleted' | 'normal';
|
|
26
|
-
content: string;
|
|
27
|
-
newLineNumber?: number;
|
|
28
|
-
oldLineNumber?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface GitFileDiff {
|
|
31
|
-
path: string;
|
|
32
|
-
hunks: GitDiffHunk[];
|
|
33
|
-
}
|
|
34
|
-
export interface GitDiffHunk {
|
|
35
|
-
content: string;
|
|
36
|
-
lines: GitDiffLine[];
|
|
37
|
-
oldStart: number;
|
|
38
|
-
oldLines: number;
|
|
39
|
-
newStart: number;
|
|
40
|
-
newLines: number;
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { ComponentLoc, VariableName } from "../component.js";
|
|
2
|
-
import type { TypeData, TypeDataLiteralBody } from "./primitive.js";
|
|
3
|
-
import type { ReactMapConfig, SubProject } from "./config.js";
|
|
4
|
-
export * from "./primitive.js";
|
|
5
|
-
export * from "./object.js";
|
|
6
|
-
export * from "./git.js";
|
|
7
|
-
export * from "./config.js";
|
|
8
|
-
export interface ProjectStatus {
|
|
9
|
-
hasConfig: boolean;
|
|
10
|
-
isMonorepo: boolean;
|
|
11
|
-
projectType: "vite" | "next" | "unknown";
|
|
12
|
-
config: ReactMapConfig | null;
|
|
13
|
-
subProjects: SubProject[];
|
|
14
|
-
}
|
|
15
|
-
export type GraphViewType = "component" | "file" | "router";
|
|
16
|
-
export interface AppStateData {
|
|
17
|
-
selectedSubProject: string | null;
|
|
18
|
-
centeredItemId: string | null;
|
|
19
|
-
selectedId: string | null;
|
|
20
|
-
isSidebarOpen: boolean;
|
|
21
|
-
activeTab: "projects" | "git";
|
|
22
|
-
selectedCommit: string | null;
|
|
23
|
-
viewport?: {
|
|
24
|
-
x: number;
|
|
25
|
-
y: number;
|
|
26
|
-
zoom: number;
|
|
27
|
-
} | null;
|
|
28
|
-
view?: GraphViewType;
|
|
29
|
-
sidebar: {
|
|
30
|
-
right: {
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export interface TypeDataParam {
|
|
37
|
-
name: string;
|
|
38
|
-
default?: TypeData;
|
|
39
|
-
constraint?: TypeData;
|
|
40
|
-
}
|
|
41
|
-
export interface TypeDataParamFunction extends TypeDataParam {
|
|
42
|
-
const?: boolean;
|
|
43
|
-
in?: boolean;
|
|
44
|
-
out?: boolean;
|
|
45
|
-
}
|
|
46
|
-
export interface TypeDataDeclareBase {
|
|
47
|
-
id: string;
|
|
48
|
-
type: "interface" | "type";
|
|
49
|
-
name: VariableName;
|
|
50
|
-
}
|
|
51
|
-
export interface TypeDataDeclareInterface extends TypeDataDeclareBase, ComponentLoc {
|
|
52
|
-
type: "interface";
|
|
53
|
-
extends?: string[];
|
|
54
|
-
body: TypeDataLiteralBody[];
|
|
55
|
-
params?: Record<string, TypeDataParam>;
|
|
56
|
-
}
|
|
57
|
-
export interface TypeDataDeclareType extends TypeDataDeclareBase, ComponentLoc {
|
|
58
|
-
type: "type";
|
|
59
|
-
body: TypeData;
|
|
60
|
-
params?: TypeDataParam[];
|
|
61
|
-
}
|
|
62
|
-
export type TypeDataDeclare = TypeDataDeclareInterface | TypeDataDeclareType;
|
|
63
|
-
export type ComponentTypeData = {
|
|
64
|
-
type: "name";
|
|
65
|
-
name: string;
|
|
66
|
-
} | {
|
|
67
|
-
type: "inline";
|
|
68
|
-
body: TypeData;
|
|
69
|
-
};
|
|
70
|
-
export interface UIItemState {
|
|
71
|
-
x: number;
|
|
72
|
-
y: number;
|
|
73
|
-
radius?: number;
|
|
74
|
-
collapsedRadius?: number;
|
|
75
|
-
expandedRadius?: number;
|
|
76
|
-
isLayoutCalculated?: boolean;
|
|
77
|
-
collapsed?: boolean;
|
|
78
|
-
}
|
|
79
|
-
export type UIStateMap = Record<string, UIItemState>;
|
|
80
|
-
export * from "./backend.js";
|