@siming-org/core 0.8.13 → 0.8.15
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/index.d.ts +10 -4
- package/dist/index.js +20 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -939,7 +939,8 @@ declare const ReviewSummarySchema: z.ZodObject<{
|
|
|
939
939
|
type ReviewSummary = z.infer<typeof ReviewSummarySchema>;
|
|
940
940
|
/**
|
|
941
941
|
* 测试报告结构化留痕(B1 判定数据):command=执行命令、四计数。
|
|
942
|
-
* skipped
|
|
942
|
+
* B1 只校验 failed==0;skipped 仅如实记录。本任务新增跳过由 B2 按 diff 判定,
|
|
943
|
+
* 授权留痕 topic=skip-authorized;历史存量跳过不阻断。
|
|
943
944
|
*/
|
|
944
945
|
declare const TestReportSchema: z.ZodObject<{
|
|
945
946
|
command: z.ZodString;
|
|
@@ -1482,13 +1483,18 @@ declare const TaskSummarySchema: z.ZodObject<{
|
|
|
1482
1483
|
type TaskSummary = z.infer<typeof TaskSummarySchema>;
|
|
1483
1484
|
|
|
1484
1485
|
type TaskListFilter = {
|
|
1485
|
-
|
|
1486
|
-
|
|
1486
|
+
/** T202610190001:维度内多选并集($in;空数组=不过滤) */
|
|
1487
|
+
status?: string[];
|
|
1488
|
+
type?: string[];
|
|
1489
|
+
/** 锚精确匹配(单轨锚原值;'all' 为通配哨兵不在任何 $in 命中集内) */
|
|
1490
|
+
track?: string[];
|
|
1491
|
+
/** 组合轨道派生条件:锚含 '+' 或存量字面值 'mixed'(T202610120005 前创建,M15 只回填 trackMatch 不改写锚) */
|
|
1492
|
+
trackCombined?: boolean;
|
|
1487
1493
|
projectId?: string;
|
|
1488
1494
|
page?: number;
|
|
1489
1495
|
limit?: number;
|
|
1490
1496
|
sort?: 'progress' | 'createdAt' | 'updatedAt';
|
|
1491
|
-
/**
|
|
1497
|
+
/** T202610190001:搜索双语义——标题模糊 OR taskId 全等(均不区分大小写;元字符转义防注入,长度上限归路由层) */
|
|
1492
1498
|
q?: string;
|
|
1493
1499
|
};
|
|
1494
1500
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1952,10 +1952,27 @@ function createTaskRepo(db) {
|
|
|
1952
1952
|
...base,
|
|
1953
1953
|
async listTasks(filter) {
|
|
1954
1954
|
const match = {};
|
|
1955
|
-
if (filter?.status) match.status = filter.status;
|
|
1956
|
-
if (filter?.track) match.track = filter.track;
|
|
1957
1955
|
if (filter?.projectId) match.projectId = filter.projectId;
|
|
1958
|
-
if (filter?.
|
|
1956
|
+
if (filter?.status?.length) match.status = { $in: filter.status };
|
|
1957
|
+
if (filter?.type?.length) match.type = { $in: filter.type };
|
|
1958
|
+
const and = [];
|
|
1959
|
+
const trackConds = [];
|
|
1960
|
+
if (filter?.track?.length) trackConds.push({ track: { $in: filter.track } });
|
|
1961
|
+
if (filter?.trackCombined) {
|
|
1962
|
+
trackConds.push({ $or: [{ track: { $regex: /\+/ } }, { track: "mixed" }] });
|
|
1963
|
+
}
|
|
1964
|
+
if (trackConds.length === 1) Object.assign(match, trackConds[0]);
|
|
1965
|
+
else if (trackConds.length === 2) and.push({ $or: trackConds });
|
|
1966
|
+
if (filter?.q) {
|
|
1967
|
+
const esc = escapeRegExpLiteral(filter.q);
|
|
1968
|
+
and.push({
|
|
1969
|
+
$or: [
|
|
1970
|
+
{ title: { $regex: esc, $options: "i" } },
|
|
1971
|
+
{ taskId: { $regex: `^${esc}$`, $options: "i" } }
|
|
1972
|
+
]
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
if (and.length > 0) match.$and = and;
|
|
1959
1976
|
const page = filter?.page ?? 1;
|
|
1960
1977
|
const limit = filter?.limit ?? 20;
|
|
1961
1978
|
const skip = (page - 1) * limit;
|