@hcmai/cli 0.4.11 → 0.4.13
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
CHANGED
|
@@ -3173,7 +3173,15 @@ function formatDescriptionTable(desc, verbose = false) {
|
|
|
3173
3173
|
const call = [a.scope, a.httpMethod].filter(Boolean).join(" ");
|
|
3174
3174
|
const params = a.params?.length ? ` params: ${a.params.map((p) => `${p.name}:${p.type}`).join(", ")}` : "";
|
|
3175
3175
|
const description = verbose && a.description ? ` ${a.description}` : "";
|
|
3176
|
-
|
|
3176
|
+
const source = a.source && a.source.toLowerCase() !== "java" ? ` [${a.source.toLowerCase()}]` : "";
|
|
3177
|
+
lines.push(
|
|
3178
|
+
` ${a.name.padEnd(20)} ${call.padEnd(12)} ${a.label ?? ""}${source}${params}${description}`
|
|
3179
|
+
);
|
|
3180
|
+
}
|
|
3181
|
+
if (!desc.effectiveActionsAvailable) {
|
|
3182
|
+
lines.push(
|
|
3183
|
+
` \u26A0\uFE0F \u4EE5\u4E0A\u53EA\u542B\u6CE8\u89E3 action\uFF0CYAML \u58F0\u660E\u7684\u811A\u672C Action \u672A\u7EB3\u5165\uFF1A${desc.effectiveActionsNote ?? "\u539F\u56E0\u672A\u77E5"}`
|
|
3184
|
+
);
|
|
3177
3185
|
}
|
|
3178
3186
|
if (desc.relations.length) {
|
|
3179
3187
|
lines.push(`relations: ${desc.relations.map((r) => `${r.key}(via ${r.via})`).join(", ")}`);
|
|
@@ -8002,9 +8010,10 @@ async function resolveCoreAction(request) {
|
|
|
8002
8010
|
const description = await HcmClient19.fromAuthContext(auth).describe(request.model);
|
|
8003
8011
|
const named = description.actions.filter((action2) => action2.name === request.action);
|
|
8004
8012
|
if (named.length === 0) {
|
|
8013
|
+
const degraded = description.effectiveActionsAvailable ? "" : `\u26A0\uFE0F \u672C\u6B21\u6BD4\u5BF9\u4E0D\u542B\u811A\u672C Action\u2014\u2014${description.effectiveActionsNote ?? "\u539F\u56E0\u672A\u77E5"}\u3002`;
|
|
8005
8014
|
return failed(
|
|
8006
8015
|
"action-metadata-not-found",
|
|
8007
|
-
`Core \u5143\u6570\u636E\u91CC\u6CA1\u6709 ${request.model}.${request.action} \u8FD9\u4E2A Action\
|
|
8016
|
+
`Core \u5143\u6570\u636E\u91CC\u6CA1\u6709 ${request.model}.${request.action} \u8FD9\u4E2A Action\u3002${degraded}next_step=\u7528 \`hcm describe ${request.model}\` \u770B\u5B83\u5217\u51FA\u7684 Action \u540D\uFF08\u811A\u672C Action \u4F1A\u6807 [script]\uFF09`
|
|
8008
8017
|
);
|
|
8009
8018
|
}
|
|
8010
8019
|
const matches = request.explicitShape ? named.filter((action2) => matchesRequest(action2, request)) : named;
|
|
@@ -9100,7 +9109,7 @@ function premise4(message, hint) {
|
|
|
9100
9109
|
`);
|
|
9101
9110
|
return 1;
|
|
9102
9111
|
}
|
|
9103
|
-
var REQUESTS_SHAPE = "`--requests` \u6536\u7684\u662F\u4E00\u4E2A JSON \u6570\u7EC4\uFF0C\u6BCF\u6761\u81F3\u5C11\u8981\u6709 `request` / `verdict` / `evidence` \u4E09\u683C\u3002\
|
|
9112
|
+
var REQUESTS_SHAPE = "`--requests` \u6536\u7684\u662F\u4E00\u4E2A JSON \u6570\u7EC4\uFF0C\u6BCF\u6761\u81F3\u5C11\u8981\u6709 `request` / `verdict` / `evidence` \u4E09\u683C\u3002\u4E03\u683C\u6838\u67E5\u8868\u7531\u672C\u547D\u4EE4\u81EA\u5DF1\u586B\uFF0C\u522B\u624B\u5199\u3002";
|
|
9104
9113
|
function readRequests(file) {
|
|
9105
9114
|
let raw;
|
|
9106
9115
|
try {
|
|
@@ -10027,7 +10036,7 @@ delivery.command("gate0").description(
|
|
|
10027
10036
|
"\u987E\u95EE\u624B\u5199\u7684\u6620\u5C04\u5DE5\u4EF6\uFF08naturalKey \u8FD9\u4E00\u7C7B\u7684\u552F\u4E00\u6765\u6E90\uFF09\uFF1B\u4E0D\u7ED9 \u21D2 \u90A3\u4E00\u7C7B\u6052\u7EFF \u21D2 rc=2"
|
|
10028
10037
|
).option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((opts) => deliveryGate0Command(opts));
|
|
10029
10038
|
delivery.command("triage").description(
|
|
10030
|
-
"\u9700\u6C42\u5206\u8BCA\uFF1A\
|
|
10039
|
+
"\u9700\u6C42\u5206\u8BCA\uFF1A\u4E03\u7C7B\u627F\u8F7D\u7269\u7531\u672C\u547D\u4EE4\u73B0\u63A2\u73B0\u586B\uFF08\u987E\u95EE\u8DF3\u4E0D\u4E86\u6B65\uFF09\uFF0C\u7ED3\u8BBA\u4E0E\u8BC1\u636E\u7531\u4F60\u7ED9\uFF0C\u5B83\u53EA\u5224\u4E24\u8005\u6253\u4E0D\u6253\u67B6"
|
|
10031
10040
|
).requiredOption(
|
|
10032
10041
|
"--requests <file>",
|
|
10033
10042
|
'\u5F85\u5206\u8BCA\u7684\u9700\u6C42\u6E05\u5355\uFF08**\u8FD9\u53F0\u673A\u5668\u4E0A**\u7684\u4E00\u4EFD JSON \u6570\u7EC4\uFF09\uFF1A\u6BCF\u6761 `{"request":\u5BA2\u6237\u539F\u8BDD, "verdict":REUSE|CONFIG|EXTEND|GAP, "evidence":\u51ED\u4EC0\u4E48\u8FD9\u4E48\u5224, "debtAction":\u7F3A\u54EA\u4E2A Action\uFF08GAP \u65F6\uFF09, "blindAcknowledged":true\uFF08\u5224 GAP \u4E14\u6709\u76F2\u533A\u65F6\u5FC5\u987B\u663E\u5F0F\u627F\u8BA4\uFF09}`'
|