@siming-org/cli 0.8.3 → 0.8.4
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.js +36 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1128,11 +1128,15 @@ async function checkDeferredIssues(ctx) {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
const loaded = await ctx.loadIssueIds();
|
|
1130
1130
|
if (!loaded.ok) {
|
|
1131
|
-
return fail3(type, `\
|
|
1131
|
+
return fail3(type, `\u95EE\u9898\u6C60\u53CD\u67E5\u5931\u8D25\uFF1A${loaded.error}`, "\u68C0\u67E5 server \u53EF\u7528\u6027\u540E\u91CD\u8BD5");
|
|
1132
1132
|
}
|
|
1133
1133
|
const missing = ids.filter((id) => !loaded.ids.has(id));
|
|
1134
1134
|
if (missing.length > 0) {
|
|
1135
|
-
return fail3(
|
|
1135
|
+
return fail3(
|
|
1136
|
+
type,
|
|
1137
|
+
`\u5EF6\u671F\u95EE\u9898\u672A\u843D\u6C60\uFF1A${missing.join(", ")}`,
|
|
1138
|
+
"siming issue create \u5C06\u5EF6\u671F\u573A\u666F\u5F55\u5165\u4EFB\u52A1\u6240\u5C5E\u9879\u76EE\u7684\u95EE\u9898\u6C60\uFF08cancelled \u4E0D\u8BA1\u5165\uFF09\u540E\uFF0Crecord-set \u4FEE\u6B63 deferredIssues"
|
|
1139
|
+
);
|
|
1136
1140
|
}
|
|
1137
1141
|
return { type, status: "pass", detail: `\u5EF6\u671F\u95EE\u9898 ${ids.length} \u4E2A\u5747\u5DF2\u843D\u6C60` };
|
|
1138
1142
|
}
|
|
@@ -1257,6 +1261,33 @@ function auditAiChecks(aiChecks, record) {
|
|
|
1257
1261
|
return results;
|
|
1258
1262
|
}
|
|
1259
1263
|
|
|
1264
|
+
// src/client/checks/issue-pool-loader.ts
|
|
1265
|
+
var POOL_STATUSES = "pending,partial,converted,done";
|
|
1266
|
+
var PAGE_LIMIT = 500;
|
|
1267
|
+
var MAX_PAGES = 20;
|
|
1268
|
+
async function loadProjectIssuePoolIds(client, projectId) {
|
|
1269
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1270
|
+
let collected = 0;
|
|
1271
|
+
for (let page = 1; page <= MAX_PAGES; page++) {
|
|
1272
|
+
const r = await client.getJson(
|
|
1273
|
+
`/api/issues?projectId=${encodeURIComponent(projectId)}&status=${encodeURIComponent(POOL_STATUSES)}&limit=${PAGE_LIMIT}&page=${page}`
|
|
1274
|
+
);
|
|
1275
|
+
if (!r.success) return { ok: false, error: r.error.message };
|
|
1276
|
+
for (const item of r.data.items) {
|
|
1277
|
+
const id = item.issueId ?? item.id ?? "";
|
|
1278
|
+
if (id !== "") ids.add(id);
|
|
1279
|
+
}
|
|
1280
|
+
collected += r.data.items.length;
|
|
1281
|
+
if (collected >= r.data.total || r.data.items.length < r.data.limit) {
|
|
1282
|
+
return { ok: true, ids };
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
return {
|
|
1286
|
+
ok: false,
|
|
1287
|
+
error: `\u95EE\u9898\u6C60\u5206\u9875\u8D85\u4E0A\u9650\uFF08>${MAX_PAGES} \u9875 \xD7 ${PAGE_LIMIT} \u6761\uFF09\u2014\u2014\u68C0\u67E5\u6570\u636E\u5F62\u6001\u540E\u91CD\u8BD5`
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1260
1291
|
// src/client/checks/param-resolver.ts
|
|
1261
1292
|
import { DEFAULT_VCS_DOC_PATHS } from "@siming-org/core";
|
|
1262
1293
|
import { execFile } from "child_process";
|
|
@@ -1387,15 +1418,9 @@ async function runNodeGate(client, taskId) {
|
|
|
1387
1418
|
vcs,
|
|
1388
1419
|
...vcsLoadError !== void 0 ? { vcsLoadError } : {},
|
|
1389
1420
|
runGit: defaultGitRunner,
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
);
|
|
1394
|
-
if (!r.success) return { ok: false, error: r.error.message };
|
|
1395
|
-
const ids = new Set(r.data.items.map((i) => i.issueId ?? i.id ?? ""));
|
|
1396
|
-
ids.delete("");
|
|
1397
|
-
return { ok: true, ids };
|
|
1398
|
-
},
|
|
1421
|
+
// B8 判定通道(T202610100001):同项目问题池存在性——旧任务绑定视图(GET
|
|
1422
|
+
// /api/tasks/:taskId/issues)对普通入池 issue 恒空集,详见 issue-pool-loader.ts 头注
|
|
1423
|
+
loadIssueIds: () => loadProjectIssuePoolIds(client, context.task.projectId),
|
|
1399
1424
|
fileExists: (p) => existsSync6(p)
|
|
1400
1425
|
},
|
|
1401
1426
|
vcs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siming-org/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Wuchao",
|
|
6
6
|
"engines": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"picocolors": "^1.1.1",
|
|
28
28
|
"yaml": "^2.6.0",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@siming-org/
|
|
31
|
-
"@siming-org/
|
|
30
|
+
"@siming-org/server": "0.8.4",
|
|
31
|
+
"@siming-org/core": "0.8.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"tsup": "^8.3.5",
|