speccore 7.1.0 → 7.2.0
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 +24 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts +6 -0
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +505 -49
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/config.js +2 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dev.js +30 -8
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/init.js +16 -276
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/iteration-from-global.js +2 -2
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +149 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/core/change-impact-global.d.ts +20 -0
- package/dist/core/change-impact-global.d.ts.map +1 -0
- package/dist/core/change-impact-global.js +130 -0
- package/dist/core/change-impact-global.js.map +1 -0
- package/dist/core/dev-llm.d.ts +10 -0
- package/dist/core/dev-llm.d.ts.map +1 -1
- package/dist/core/dev-llm.js.map +1 -1
- package/dist/core/doc-cross-reference.d.ts +10 -0
- package/dist/core/doc-cross-reference.d.ts.map +1 -0
- package/dist/core/doc-cross-reference.js +108 -0
- package/dist/core/doc-cross-reference.js.map +1 -0
- package/dist/core/doc-quality-gate.d.ts +28 -0
- package/dist/core/doc-quality-gate.d.ts.map +1 -0
- package/dist/core/doc-quality-gate.js +209 -0
- package/dist/core/doc-quality-gate.js.map +1 -0
- package/dist/core/incremental-analyzer.js +1 -1
- package/dist/core/incremental-analyzer.js.map +1 -1
- package/dist/core/intent-recognition.d.ts.map +1 -1
- package/dist/core/intent-recognition.js +40 -0
- package/dist/core/intent-recognition.js.map +1 -1
- package/dist/core/iteration-cache.d.ts +48 -0
- package/dist/core/iteration-cache.d.ts.map +1 -0
- package/dist/core/iteration-cache.js +148 -0
- package/dist/core/iteration-cache.js.map +1 -0
- package/dist/core/platform-addition.js +3 -3
- package/dist/core/platform-addition.js.map +1 -1
- package/dist/core/semantic-locator.d.ts +42 -0
- package/dist/core/semantic-locator.d.ts.map +1 -0
- package/dist/core/semantic-locator.js +290 -0
- package/dist/core/semantic-locator.js.map +1 -0
- package/dist/core/structured-extractor.d.ts +89 -0
- package/dist/core/structured-extractor.d.ts.map +1 -0
- package/dist/core/structured-extractor.js +428 -0
- package/dist/core/structured-extractor.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.locateFeatureInDoc = locateFeatureInDoc;
|
|
4
|
+
exports.locateFeatureInRequirements = locateFeatureInRequirements;
|
|
5
|
+
exports.locateFeatureInCode = locateFeatureInCode;
|
|
6
|
+
exports.locateFeatureInGlobal = locateFeatureInGlobal;
|
|
7
|
+
exports.buildFeatureContext = buildFeatureContext;
|
|
8
|
+
exports.buildFeatureContextPrompt = buildFeatureContextPrompt;
|
|
9
|
+
/**
|
|
10
|
+
* semantic-locator — 语义定位引擎
|
|
11
|
+
* v7.2.0+
|
|
12
|
+
*
|
|
13
|
+
* 基于功能名称在文档、代码、全局分析产出中定位相关内容,
|
|
14
|
+
* 为细粒度分析提供精确的上下文关联。
|
|
15
|
+
*/
|
|
16
|
+
const fs_extra_1 = require("fs-extra");
|
|
17
|
+
const path_1 = require("path");
|
|
18
|
+
const logger_1 = require("../utils/logger");
|
|
19
|
+
// 功能关键词同义词扩展
|
|
20
|
+
const FEATURE_ALIASES = {
|
|
21
|
+
'订单': ['order', '下单', '订单管理', '订单详情', '订单列表', '订单状态'],
|
|
22
|
+
'认证': ['auth', '登录', '登出', '注册', 'token', 'jwt', 'oauth', 'sso', '权限'],
|
|
23
|
+
'支付': ['payment', '收银', '付款', '充值', '退款', '结算', '账单'],
|
|
24
|
+
'用户': ['user', '会员', '客户', 'account', 'profile', '个人信息'],
|
|
25
|
+
'消息': ['message', '通知', '推送', '私信', '公告', '站内信', 'im'],
|
|
26
|
+
'文件': ['file', '上传', '下载', 'oss', '存储', '附件', '图片'],
|
|
27
|
+
'搜索': ['search', '检索', '查询', '筛选', '过滤', '排序', 'es'],
|
|
28
|
+
};
|
|
29
|
+
function expandKeywords(featureName) {
|
|
30
|
+
const keywords = [featureName];
|
|
31
|
+
const lower = featureName.toLowerCase();
|
|
32
|
+
for (const [key, aliases] of Object.entries(FEATURE_ALIASES)) {
|
|
33
|
+
if (featureName.includes(key) || aliases.some(a => lower.includes(a.toLowerCase()))) {
|
|
34
|
+
keywords.push(key, ...aliases);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return [...new Set(keywords)];
|
|
38
|
+
}
|
|
39
|
+
function calcRelevance(content, keywords) {
|
|
40
|
+
const lowerContent = content.toLowerCase();
|
|
41
|
+
let score = 0;
|
|
42
|
+
for (const kw of keywords) {
|
|
43
|
+
const lowerKw = kw.toLowerCase();
|
|
44
|
+
const count = (lowerContent.match(new RegExp(lowerKw, 'g')) || []).length;
|
|
45
|
+
score += count * 10;
|
|
46
|
+
// 标题匹配加分
|
|
47
|
+
if (/^#{1,3}\s/.test(content) && lowerContent.includes(lowerKw)) {
|
|
48
|
+
score += 30;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return Math.min(100, score);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 在指定文档中定位功能章节
|
|
55
|
+
*/
|
|
56
|
+
async function locateFeatureInDoc(docPath, featureName) {
|
|
57
|
+
if (!(await (0, fs_extra_1.pathExists)(docPath)))
|
|
58
|
+
return null;
|
|
59
|
+
const content = await (0, fs_extra_1.readFile)(docPath, 'utf-8');
|
|
60
|
+
const keywords = expandKeywords(featureName);
|
|
61
|
+
// 按 Markdown 标题分块
|
|
62
|
+
const sections = content.split(/\n(?=#{1,4}\s)/);
|
|
63
|
+
let bestSection = '';
|
|
64
|
+
let bestScore = 0;
|
|
65
|
+
let bestLineStart = 0;
|
|
66
|
+
let bestTitle = '';
|
|
67
|
+
let lineNum = 0;
|
|
68
|
+
for (const section of sections) {
|
|
69
|
+
const score = calcRelevance(section, keywords);
|
|
70
|
+
if (score > bestScore) {
|
|
71
|
+
bestScore = score;
|
|
72
|
+
bestSection = section;
|
|
73
|
+
bestLineStart = lineNum;
|
|
74
|
+
const titleMatch = section.match(/^#{1,4}\s+(.+)/m);
|
|
75
|
+
bestTitle = titleMatch ? titleMatch[1].trim() : '';
|
|
76
|
+
}
|
|
77
|
+
lineNum += section.split('\n').length;
|
|
78
|
+
}
|
|
79
|
+
if (bestScore < 20)
|
|
80
|
+
return null;
|
|
81
|
+
return {
|
|
82
|
+
source: 'doc',
|
|
83
|
+
path: docPath,
|
|
84
|
+
title: bestTitle,
|
|
85
|
+
content: bestSection.slice(0, 3000), // 限制长度
|
|
86
|
+
relevance: bestScore,
|
|
87
|
+
lineStart: bestLineStart,
|
|
88
|
+
lineEnd: bestLineStart + bestSection.split('\n').length,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 在需求文档中定位功能
|
|
93
|
+
*/
|
|
94
|
+
async function locateFeatureInRequirements(iterDir, featureName) {
|
|
95
|
+
const reqDir = (0, path_1.join)(iterDir, '010-requirements');
|
|
96
|
+
if (!(await (0, fs_extra_1.pathExists)(reqDir)))
|
|
97
|
+
return [];
|
|
98
|
+
const locations = [];
|
|
99
|
+
const keywords = expandKeywords(featureName);
|
|
100
|
+
// 扫描 features/ 目录
|
|
101
|
+
const featuresDir = (0, path_1.join)(reqDir, 'features');
|
|
102
|
+
if (await (0, fs_extra_1.pathExists)(featuresDir)) {
|
|
103
|
+
const entries = await (0, fs_extra_1.readdir)(featuresDir, { withFileTypes: true });
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
if (entry.isDirectory()) {
|
|
106
|
+
const readmePath = (0, path_1.join)(featuresDir, entry.name, 'README.md');
|
|
107
|
+
if (await (0, fs_extra_1.pathExists)(readmePath)) {
|
|
108
|
+
const loc = await locateFeatureInDoc(readmePath, featureName);
|
|
109
|
+
if (loc)
|
|
110
|
+
locations.push(loc);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// 扫描 converted/ 和 sources/
|
|
116
|
+
for (const sub of ['converted', 'sources']) {
|
|
117
|
+
const subDir = (0, path_1.join)(reqDir, sub);
|
|
118
|
+
if (!(await (0, fs_extra_1.pathExists)(subDir)))
|
|
119
|
+
continue;
|
|
120
|
+
const files = await (0, fs_extra_1.readdir)(subDir);
|
|
121
|
+
for (const f of files.filter(f => f.endsWith('.md'))) {
|
|
122
|
+
const loc = await locateFeatureInDoc((0, path_1.join)(subDir, f), featureName);
|
|
123
|
+
if (loc)
|
|
124
|
+
locations.push(loc);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// 按相关度排序
|
|
128
|
+
return locations.sort((a, b) => b.relevance - a.relevance);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* 在代码中定位相关文件(基于 structured-data.json 或源码扫描)
|
|
132
|
+
*/
|
|
133
|
+
async function locateFeatureInCode(projectRoot, featureName) {
|
|
134
|
+
const structuredDataPath = (0, path_1.join)(projectRoot, '.speccore', 'cache', 'structured-data.json');
|
|
135
|
+
const keywords = expandKeywords(featureName);
|
|
136
|
+
const locations = [];
|
|
137
|
+
// 如果有结构化数据,优先使用
|
|
138
|
+
if (await (0, fs_extra_1.pathExists)(structuredDataPath)) {
|
|
139
|
+
try {
|
|
140
|
+
const data = await (0, fs_extra_1.readFile)(structuredDataPath, 'utf-8');
|
|
141
|
+
const structured = JSON.parse(data);
|
|
142
|
+
for (const [platform, info] of Object.entries(structured.endpoints || {})) {
|
|
143
|
+
const pInfo = info;
|
|
144
|
+
// 匹配 API
|
|
145
|
+
for (const api of pInfo.apis || []) {
|
|
146
|
+
const apiText = `${api.path} ${api.handler} ${api.description || ''}`;
|
|
147
|
+
if (keywords.some(kw => apiText.toLowerCase().includes(kw.toLowerCase()))) {
|
|
148
|
+
locations.push({
|
|
149
|
+
source: 'code',
|
|
150
|
+
path: api.filePath,
|
|
151
|
+
title: `${api.method} ${api.path}`,
|
|
152
|
+
content: `API: ${api.method} ${api.path}\nHandler: ${api.handler}\nFile: ${api.filePath}:${api.line}`,
|
|
153
|
+
relevance: 80,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// 匹配 Entity
|
|
158
|
+
for (const entity of pInfo.entities || []) {
|
|
159
|
+
if (keywords.some(kw => entity.name.toLowerCase().includes(kw.toLowerCase()))) {
|
|
160
|
+
locations.push({
|
|
161
|
+
source: 'code',
|
|
162
|
+
path: entity.filePath,
|
|
163
|
+
title: `Entity: ${entity.name}`,
|
|
164
|
+
content: `Entity: ${entity.name}\nTable: ${entity.tableName || 'N/A'}\nFile: ${entity.filePath}:${entity.line}`,
|
|
165
|
+
relevance: 75,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// 匹配 Component
|
|
170
|
+
for (const comp of pInfo.components || []) {
|
|
171
|
+
if (keywords.some(kw => comp.name.toLowerCase().includes(kw.toLowerCase()))) {
|
|
172
|
+
locations.push({
|
|
173
|
+
source: 'code',
|
|
174
|
+
path: comp.filePath,
|
|
175
|
+
title: `Component: ${comp.name}`,
|
|
176
|
+
content: `Component: ${comp.name}\nFile: ${comp.filePath}:${comp.line}`,
|
|
177
|
+
relevance: 70,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch { /* ignore */ }
|
|
184
|
+
}
|
|
185
|
+
return locations.sort((a, b) => b.relevance - a.relevance).slice(0, 10);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* 在全局分析产出中定位相关内容
|
|
189
|
+
*/
|
|
190
|
+
async function locateFeatureInGlobal(projectRoot, featureName) {
|
|
191
|
+
const globalDir = (0, path_1.join)(projectRoot, '.speccore', 'GLOBAL');
|
|
192
|
+
if (!(await (0, fs_extra_1.pathExists)(globalDir)))
|
|
193
|
+
return [];
|
|
194
|
+
const locations = [];
|
|
195
|
+
const keywords = expandKeywords(featureName);
|
|
196
|
+
// 扫描 overview/ 和 platforms/
|
|
197
|
+
const scanDir = async (dir) => {
|
|
198
|
+
if (!(await (0, fs_extra_1.pathExists)(dir)))
|
|
199
|
+
return;
|
|
200
|
+
const entries = await (0, fs_extra_1.readdir)(dir, { withFileTypes: true });
|
|
201
|
+
for (const entry of entries) {
|
|
202
|
+
const fullPath = (0, path_1.join)(dir, entry.name);
|
|
203
|
+
if (entry.isDirectory()) {
|
|
204
|
+
await scanDir(fullPath);
|
|
205
|
+
}
|
|
206
|
+
else if (entry.name.endsWith('.md')) {
|
|
207
|
+
const loc = await locateFeatureInDoc(fullPath, featureName);
|
|
208
|
+
if (loc)
|
|
209
|
+
locations.push({ ...loc, source: 'global' });
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
await scanDir((0, path_1.join)(globalDir, 'overview'));
|
|
214
|
+
await scanDir((0, path_1.join)(globalDir, 'platforms'));
|
|
215
|
+
return locations.sort((a, b) => b.relevance - a.relevance).slice(0, 5);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* 构建功能单元的完整上下文
|
|
219
|
+
*/
|
|
220
|
+
async function buildFeatureContext(projectRoot, iterDir, featureName, docName) {
|
|
221
|
+
const ctx = {
|
|
222
|
+
featureName,
|
|
223
|
+
docLocations: [],
|
|
224
|
+
reqLocations: [],
|
|
225
|
+
codeLocations: [],
|
|
226
|
+
globalLocations: [],
|
|
227
|
+
summary: '',
|
|
228
|
+
};
|
|
229
|
+
// 1. 在指定文档中定位
|
|
230
|
+
if (docName) {
|
|
231
|
+
const docPath = docName.startsWith('/') ? docName : (0, path_1.join)(iterDir, '020-specs', docName);
|
|
232
|
+
const loc = await locateFeatureInDoc(docPath, featureName);
|
|
233
|
+
if (loc)
|
|
234
|
+
ctx.docLocations.push(loc);
|
|
235
|
+
}
|
|
236
|
+
// 2. 在需求文档中定位
|
|
237
|
+
ctx.reqLocations = await locateFeatureInRequirements(iterDir, featureName);
|
|
238
|
+
// 3. 在代码中定位
|
|
239
|
+
ctx.codeLocations = await locateFeatureInCode(projectRoot, featureName);
|
|
240
|
+
// 4. 在全局分析中定位
|
|
241
|
+
ctx.globalLocations = await locateFeatureInGlobal(projectRoot, featureName);
|
|
242
|
+
// 生成摘要
|
|
243
|
+
const parts = [];
|
|
244
|
+
if (ctx.docLocations.length > 0)
|
|
245
|
+
parts.push(`文档命中: ${ctx.docLocations.length} 处`);
|
|
246
|
+
if (ctx.reqLocations.length > 0)
|
|
247
|
+
parts.push(`需求命中: ${ctx.reqLocations.length} 处`);
|
|
248
|
+
if (ctx.codeLocations.length > 0)
|
|
249
|
+
parts.push(`代码命中: ${ctx.codeLocations.length} 处`);
|
|
250
|
+
if (ctx.globalLocations.length > 0)
|
|
251
|
+
parts.push(`全局分析命中: ${ctx.globalLocations.length} 处`);
|
|
252
|
+
ctx.summary = parts.join(' | ');
|
|
253
|
+
logger_1.logger.info(`🔍 语义定位: "${featureName}" → ${ctx.summary || '未找到匹配内容'}`);
|
|
254
|
+
return ctx;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* 生成功能分析用的 Prompt 上下文注入文本
|
|
258
|
+
*/
|
|
259
|
+
function buildFeatureContextPrompt(ctx) {
|
|
260
|
+
let prompt = `\n## 🔍 关联上下文(自动定位)\n\n`;
|
|
261
|
+
prompt += `> 正在分析功能: **${ctx.featureName}**\n`;
|
|
262
|
+
prompt += `> ${ctx.summary || '未找到关联内容'}\n\n`;
|
|
263
|
+
if (ctx.reqLocations.length > 0) {
|
|
264
|
+
prompt += `### 需求文档(${ctx.reqLocations.length} 处)\n\n`;
|
|
265
|
+
for (const loc of ctx.reqLocations.slice(0, 2)) {
|
|
266
|
+
prompt += `**${loc.title || loc.path.split('/').pop()}** (相关度: ${loc.relevance})\n`;
|
|
267
|
+
prompt += `\`\`\`
|
|
268
|
+
${loc.content.slice(0, 800)}
|
|
269
|
+
\`\`\`
|
|
270
|
+
|
|
271
|
+
`;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (ctx.codeLocations.length > 0) {
|
|
275
|
+
prompt += `### 关联代码(${ctx.codeLocations.length} 处)\n\n`;
|
|
276
|
+
for (const loc of ctx.codeLocations.slice(0, 3)) {
|
|
277
|
+
prompt += `- **${loc.title}**: \`${loc.path}\`\n`;
|
|
278
|
+
}
|
|
279
|
+
prompt += `\n> 分析技术方案时,请 Read 上述代码文件获取真实实现细节\n\n`;
|
|
280
|
+
}
|
|
281
|
+
if (ctx.globalLocations.length > 0) {
|
|
282
|
+
prompt += `### 全局架构(${ctx.globalLocations.length} 处)\n\n`;
|
|
283
|
+
for (const loc of ctx.globalLocations.slice(0, 2)) {
|
|
284
|
+
prompt += `- **${loc.title || loc.path.split('/').pop()}**: ${loc.path}\n`;
|
|
285
|
+
}
|
|
286
|
+
prompt += `\n`;
|
|
287
|
+
}
|
|
288
|
+
return prompt;
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=semantic-locator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-locator.js","sourceRoot":"","sources":["../../src/core/semantic-locator.ts"],"names":[],"mappings":";;AAsEA,gDAqCC;AAKD,kEAmCC;AAKD,kDAuDC;AAKD,sDA0BC;AAKD,kDA0CC;AAKD,8DAkCC;AApUD;;;;;;GAMG;AACH,uCAAyD;AACzD,+BAA4B;AAC5B,4CAAyC;AAqBzC,aAAa;AACb,MAAM,eAAe,GAA6B;IAChD,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACrD,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,E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nC,MAAM,IAAI,YAAY,GAAG,CAAC,eAAe,CAAC,MAAM,SAAS,CAAC;QAC1D,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YAClD,MAAM,IAAI,OAAO,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC;QAC7E,CAAC;QACD,MAAM,IAAI,IAAI,CAAC;IACjB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export interface ApiEndpoint {
|
|
2
|
+
path: string;
|
|
3
|
+
method: string;
|
|
4
|
+
handler: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
line: number;
|
|
7
|
+
parameters?: string[];
|
|
8
|
+
responseType?: string;
|
|
9
|
+
decorators?: string[];
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EntityField {
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
nullable: boolean;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
isPrimaryKey?: boolean;
|
|
18
|
+
isForeignKey?: boolean;
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface EntityDefinition {
|
|
22
|
+
name: string;
|
|
23
|
+
tableName?: string;
|
|
24
|
+
filePath: string;
|
|
25
|
+
line: number;
|
|
26
|
+
fields: EntityField[];
|
|
27
|
+
relations?: {
|
|
28
|
+
target: string;
|
|
29
|
+
type: string;
|
|
30
|
+
field: string;
|
|
31
|
+
}[];
|
|
32
|
+
description?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RouteConfig {
|
|
35
|
+
path: string;
|
|
36
|
+
component?: string;
|
|
37
|
+
layout?: string;
|
|
38
|
+
lazy?: boolean;
|
|
39
|
+
guards?: string[];
|
|
40
|
+
children?: RouteConfig[];
|
|
41
|
+
filePath: string;
|
|
42
|
+
line: number;
|
|
43
|
+
}
|
|
44
|
+
export interface ComponentInfo {
|
|
45
|
+
name: string;
|
|
46
|
+
filePath: string;
|
|
47
|
+
line: number;
|
|
48
|
+
props?: string[];
|
|
49
|
+
slots?: string[];
|
|
50
|
+
emits?: string[];
|
|
51
|
+
dependencies?: string[];
|
|
52
|
+
description?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface DependencyEdge {
|
|
55
|
+
from: string;
|
|
56
|
+
to: string;
|
|
57
|
+
type: 'import' | 'inherit' | 'implement';
|
|
58
|
+
}
|
|
59
|
+
export interface StructuredData {
|
|
60
|
+
generatedAt: string;
|
|
61
|
+
projectRoot: string;
|
|
62
|
+
endpoints: {
|
|
63
|
+
[platform: string]: {
|
|
64
|
+
apis: ApiEndpoint[];
|
|
65
|
+
entities: EntityDefinition[];
|
|
66
|
+
routes: RouteConfig[];
|
|
67
|
+
components: ComponentInfo[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
dependencies: DependencyEdge[];
|
|
71
|
+
stats: {
|
|
72
|
+
totalApis: number;
|
|
73
|
+
totalEntities: number;
|
|
74
|
+
totalRoutes: number;
|
|
75
|
+
totalComponents: number;
|
|
76
|
+
totalFiles: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 扫描项目源码,提取结构化数据
|
|
81
|
+
* @param projectRoot 项目根目录
|
|
82
|
+
* @param sourcePaths 源码路径列表(从 CONSTITUTION.md 读取)
|
|
83
|
+
*/
|
|
84
|
+
export declare function extractStructuredData(projectRoot: string, sourcePaths: string[]): Promise<StructuredData>;
|
|
85
|
+
/**
|
|
86
|
+
* 加载已提取的结构化数据
|
|
87
|
+
*/
|
|
88
|
+
export declare function loadStructuredData(): Promise<StructuredData | null>;
|
|
89
|
+
//# sourceMappingURL=structured-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-extractor.d.ts","sourceRoot":"","sources":["../../src/core/structured-extractor.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,M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