speccore 8.3.16 → 8.3.18
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/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +85 -2
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/iteration/split.d.ts.map +1 -1
- package/dist/commands/iteration/split.js +28 -20
- package/dist/commands/iteration/split.js.map +1 -1
- package/dist/core/spec-paths.d.ts +12 -0
- package/dist/core/spec-paths.d.ts.map +1 -1
- package/dist/core/spec-paths.js +65 -0
- package/dist/core/spec-paths.js.map +1 -1
- package/dist/core/spec-skeleton.d.ts +9 -0
- package/dist/core/spec-skeleton.d.ts.map +1 -1
- package/dist/core/spec-skeleton.js +100 -0
- package/dist/core/spec-skeleton.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/commands/iteration/split.ts"],"names":[],"mappings":"AAwIA,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/commands/iteration/split.ts"],"names":[],"mappings":"AAwIA,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AA4CD,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAg2BzF"}
|
|
@@ -164,28 +164,36 @@ async function detectPlatforms(iterationDir, specified) {
|
|
|
164
164
|
const platforms = await (0, spec_paths_1.parsePlatformList)();
|
|
165
165
|
if (platforms.length > 0)
|
|
166
166
|
return platforms;
|
|
167
|
-
// 2. 回退:扫描 020-specs/
|
|
167
|
+
// 2. 回退:扫描 020-specs/ 子目录(仅旧结构下有效)
|
|
168
|
+
// v8.3.17+: 新结构下 020-specs/ 子目录是功能模块名,不能当成端名扫描
|
|
168
169
|
const specsDir = (0, path_1.join)(iterationDir, '020-specs');
|
|
169
170
|
if (await (0, fs_extra_1.pathExists)(specsDir)) {
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
171
|
+
const isLegacy = await (0, spec_paths_1.isLegacySpecDir)(specsDir);
|
|
172
|
+
if (isLegacy) {
|
|
173
|
+
// 旧结构:子目录是端名,可以扫描
|
|
174
|
+
const entries = await (0, fs_extra_1.readdir)(specsDir, { withFileTypes: true });
|
|
175
|
+
// v8.3.4+: 增加常见 AI 简写过滤,避免 api/web 等错误目录被当成端名
|
|
176
|
+
const knownNonPlatformDirs = new Set([
|
|
177
|
+
'sources', 'assets', 'prototypes', 'converted', 'features', 'bugs', 'refactors', 'research',
|
|
178
|
+
'staging', 'platforms', 'snapshots', 'overview', 'global', spec_paths_1.GLOBAL_SPECS_DIR,
|
|
179
|
+
// 常见 AI 简写垃圾目录(必须从标准端名映射,不能直接用)
|
|
180
|
+
'api', 'web', 'backend', 'frontend', 'server', 'mobile', 'admin', 'h5', 'pc', 'app',
|
|
181
|
+
]);
|
|
182
|
+
const rawPlatforms = entries
|
|
183
|
+
.filter((e) => e.isDirectory() && !e.name.startsWith('_') && !e.name.startsWith('.') && !knownNonPlatformDirs.has(e.name))
|
|
184
|
+
.map((e) => e.name);
|
|
185
|
+
// 二次过滤:用 normalizeScopePlatforms 排除任何残留的非标准端名
|
|
186
|
+
if (rawPlatforms.length > 0) {
|
|
187
|
+
const standardPlatforms = await (0, spec_paths_1.parsePlatformList)();
|
|
188
|
+
if (standardPlatforms.length > 0) {
|
|
189
|
+
return normalizeScopePlatforms(rawPlatforms, standardPlatforms);
|
|
190
|
+
}
|
|
191
|
+
return rawPlatforms;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// 新结构:跳过扫描,提示用户配置端列表
|
|
195
|
+
logger_1.logger.warn(`⚠️ CONSTITUTION.md 中未找到「端列表」,且 020-specs/ 为新结构(按功能模块组织)`);
|
|
196
|
+
logger_1.logger.warn(` 请先在 CONSTITUTION.md 中配置端列表,否则无法正确拆分任务`);
|
|
189
197
|
}
|
|
190
198
|
return ['web']; // 默认
|
|
191
199
|
}
|