@hcmai/cli 0.15.13 → 0.15.14
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 +27 -2
- package/dist/index.js.map +1 -1
- package/dist/skills/manifest.json +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11405,7 +11405,7 @@ init_exit();
|
|
|
11405
11405
|
import { createJiraClient } from "@hcmai/sdk";
|
|
11406
11406
|
|
|
11407
11407
|
// src/jira/gaps.ts
|
|
11408
|
-
import { CASES_REPO_SLUG as CASES_REPO_SLUG2, repoIssueUrl } from "@hcmai/sdk";
|
|
11408
|
+
import { CASES_REPO_SLUG as CASES_REPO_SLUG2, describeNonBmpHits, findNonBmpChars, repoIssueUrl } from "@hcmai/sdk";
|
|
11409
11409
|
import { linkedRepoRefs, parseRef } from "@hcmai/sdk";
|
|
11410
11410
|
var MIN_LEN = [
|
|
11411
11411
|
["title", 8],
|
|
@@ -11429,6 +11429,8 @@ function validateGapInput(x) {
|
|
|
11429
11429
|
if (!["\u963B\u65AD", "\u6709\u66FF\u4EE3\u6CD5", "\u63AA\u8F9E\u7EA7"].includes(String(g.severity))) problems.push("severity \u53EA\u80FD\u662F \u963B\u65AD / \u6709\u66FF\u4EE3\u6CD5 / \u63AA\u8F9E\u7EA7");
|
|
11430
11430
|
if (!["\u7F3A\u9677", "\u7F3A\u80FD\u529B"].includes(String(g.kind))) problems.push("kind \u53EA\u80FD\u662F \u7F3A\u9677\uFF08\u6545\u969C\uFF09/ \u7F3A\u80FD\u529B\uFF08\u9700\u6C42\uFF09");
|
|
11431
11431
|
if (g.module !== void 0 && !["HCM-Core", "HCM-Cloud", "\u4EA7\u54C1\u652F\u6301"].includes(String(g.module))) problems.push("module \u53EA\u80FD\u662F HCM-Core / HCM-Cloud / \u4EA7\u54C1\u652F\u6301");
|
|
11432
|
+
const nonBmp = findNonBmpChars(g);
|
|
11433
|
+
if (nonBmp.length) problems.push(describeNonBmpHits(nonBmp).split("\n").join("\n "));
|
|
11432
11434
|
if (problems.length) throw new Error(`\u7F3A\u53E3\u8F7D\u8377\u4E0D\u5408\u683C\uFF0C\u6CA1\u6709\u63D0\uFF1A
|
|
11433
11435
|
${problems.join("\n ")}`);
|
|
11434
11436
|
return g;
|
|
@@ -11791,7 +11793,17 @@ async function gapComments({ client: client3 }, ref, { limit } = {}, casesSlug =
|
|
|
11791
11793
|
}
|
|
11792
11794
|
|
|
11793
11795
|
// src/jira/gap-verify.ts
|
|
11794
|
-
import {
|
|
11796
|
+
import {
|
|
11797
|
+
CASES_REPO_SLUG as CASES_REPO_SLUG3,
|
|
11798
|
+
CliError as CliError26,
|
|
11799
|
+
CliErrorCode as CliErrorCode27,
|
|
11800
|
+
JiraHttpError,
|
|
11801
|
+
JiraNonBmpContentError,
|
|
11802
|
+
NON_BMP_RULE_NOTE,
|
|
11803
|
+
firstLine as firstLine2,
|
|
11804
|
+
nonBmpHitLines,
|
|
11805
|
+
parseRef as parseRef2
|
|
11806
|
+
} from "@hcmai/sdk";
|
|
11795
11807
|
var VERIFY_RESULTS = ["pass", "fail", "partial"];
|
|
11796
11808
|
var WRITTEN_TAG = { no: "\u3010\u672A\u5199\u5165\u3011", yes: "\u3010\u5DF2\u5199\u5165\u3011", unknown: "\u3010\u5199\u6CA1\u5199\u4E0D\u786E\u5B9A\u3011" };
|
|
11797
11809
|
var FIXED_STATUS = "\u5DF2\u4FEE\u590D";
|
|
@@ -11887,6 +11899,19 @@ function unconfirmedWhy(e) {
|
|
|
11887
11899
|
return name;
|
|
11888
11900
|
}
|
|
11889
11901
|
function writeFailure(e, key2, what) {
|
|
11902
|
+
if (e instanceof JiraNonBmpContentError) {
|
|
11903
|
+
return verifyFailure(
|
|
11904
|
+
"non-bmp-content",
|
|
11905
|
+
CliErrorCode27.INVALID_ARGUMENT,
|
|
11906
|
+
"no",
|
|
11907
|
+
`\u8FD9\u6B21${what}\u4E00\u4E2A\u5B57\u90FD\u6CA1\u53D1\u51FA\u53BB\uFF1A\u6B63\u6587\u91CC\u6709 ${e.hits.length} \u5904 Jira \u5B58\u4E0D\u4E0B\u7684\u5B57\u7B26`,
|
|
11908
|
+
// 🔴 清单落 nextStep,不落 cause:CliError 渲染 cause 时 formatCause 截到 300 字,
|
|
11909
|
+
// 三处命中就会把「该怎么改」整段截掉——那正是顾问唯一需要的那段。
|
|
11910
|
+
`\u6362\u6389\u4E0B\u9762\u8FD9\u4E9B\u5B57\u7B26\u518D\u91CD\u8DD1\uFF08${NON_BMP_RULE_NOTE}\uFF09\uFF1A
|
|
11911
|
+
${nonBmpHitLines(e.hits)}`,
|
|
11912
|
+
{ key: key2, hits: e.hits }
|
|
11913
|
+
);
|
|
11914
|
+
}
|
|
11890
11915
|
if (e instanceof JiraHttpError && e.status >= 400 && e.status < 500) {
|
|
11891
11916
|
return verifyFailure("write-rejected", CliErrorCode27.BUSINESS_RULE_VIOLATION, "no", `Jira \u4EE5 ${e.status} \u62D2\u7EDD\u4E86\u8FD9\u6B21${what}`, rejectNextStep(e.status, key2), {
|
|
11892
11917
|
key: key2,
|