@stalfh233/omc-cli 0.8.26 → 0.8.27

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/cli.js CHANGED
@@ -1165,10 +1165,16 @@ function applyReadArgAliases(toolName, schemaKeys, input) {
1165
1165
  return pageSize;
1166
1166
  // 探针 R F2(0.8.26):org.role.list 的行把角色主键叫 `id`,相邻的
1167
1167
  // org.role.users 却只收 roleId——同一概念两个名字。仅在目标键真实存在时换算。
1168
+ // 探针 S F1(0.8.27):同一行的角色码叫 `code`,role.users 只收 roleCode;一并换算。
1168
1169
  if (toolName === "org.role.users") {
1169
- const roleId = move("id", "roleId", (value) => (typeof value === "string" && value.trim().length > 0 ? value : undefined), (next) => `roleId=${String(next)}(org.role.list 的 id)`);
1170
- if (roleId !== undefined)
1171
- return roleId;
1170
+ const idAlias = move("id", "roleId", (value) => (typeof value === "string" && value.trim().length > 0 ? value : undefined), (next) => `roleId=${String(next)}(org.role.list 的 id)`);
1171
+ if (idAlias?.conflict !== undefined)
1172
+ return idAlias;
1173
+ const codeAlias = move("code", "roleCode", (value) => (typeof value === "string" && value.trim().length > 0 ? value : undefined), (next) => `roleCode=${String(next)}(org.role.list 的 code)`);
1174
+ if (codeAlias?.conflict !== undefined)
1175
+ return codeAlias;
1176
+ if (idAlias !== undefined || codeAlias !== undefined)
1177
+ return { args, applied };
1172
1178
  }
1173
1179
  if (ONLY_CUSTOM_TO_ALL_TOOLS.has(toolName)) {
1174
1180
  const onlyCustom = move("onlyCustom", "all", (value) => (typeof value === "boolean" ? !value : undefined), (next) => `all=${String(next)}`);
@@ -138,7 +138,7 @@ export const PRESENTATION_FIELDS = ["htmlJson", "actionsJson", "columnsJson", "q
138
138
  export const directionArg = z.enum(["ASC", "DESC"]).describe("SortDirectionType; sent numeric ASC(1)/DESC(2)");
139
139
  export const displayTypeArg = z
140
140
  .enum(["INPUT", "RADIO", "CHECKBOX", "SELECT", "RANGE"])
141
- .describe("DisplayType; sent numeric INPUT(0)/RADIO(1)/CHECKBOX(2)/SELECT(3)/RANGE(4)");
141
+ .describe("门户筛选控件(不是字段类型):文本/数值→INPUT、单选/下拉→SELECT、多选/复选→CHECKBOX、日期→RANGE");
142
142
  export const choiceTypeArg = z.enum(["SELECT", "POPUP", "TREE_LEFT"]).describe("ChoiceType; sent numeric SELECT(1)/POPUP(2)/TREE_LEFT(3)");
143
143
  export const conditionOptionsArg = z
144
144
  .union([z.string(), z.record(z.string(), z.unknown())])
@@ -430,7 +430,9 @@ export function registerOrganizationLane(tools) {
430
430
  count: members.length,
431
431
  total: data?.totalElements ?? members.length,
432
432
  members,
433
- note: "members[].id 是用户 id(可直接作为 addUsers 的 userIds / userScope 的 userId;不是角色 id——角色 id 在 org.role.list 的行里)",
433
+ note: members.length === 0
434
+ ? "该角色当前 0 个成员:审批场景改用 名称@user:<userId>(org.user.search 取 id);发布成空角色流程会无人能审(approval-flow --apply 会零写入拒绝 approval-role-has-no-members,确要发布加 --allow-empty-role)。members[].id 是用户 id(可直接作为 addUsers 的 userIds / userScope 的 userId;不是角色 id——角色 id 在 org.role.list 的行里)"
435
+ : "members[].id 是用户 id(可直接作为 addUsers 的 userIds / userScope 的 userId;不是角色 id——角色 id 在 org.role.list 的行里)",
434
436
  };
435
437
  }),
436
438
  }));
@@ -61,7 +61,7 @@ const configureConditions = Object.freeze({
61
61
  "视图固定条件只在门户运行面生效:REST data.list --queryCode 不应用,验收看 listview.get 回读的 conditions",
62
62
  ],
63
63
  conditionalRequirements: [
64
- "filterType 是 QueryFilterType 字符串枚举(Eq/Gte/Lte/Like…,省略时按 propertyType 取平台默认);displayType 是 INPUT/RADIO/CHECKBOX/SELECT/RANGE。",
64
+ "filterType 是 QueryFilterType 字符串枚举(Eq/Gte/Lte/Like…,省略时按 propertyType 取平台默认);displayType 是 INPUT/RADIO/CHECKBOX/SELECT/RANGE,且是**门户筛选控件**(不是字段类型):文本/数值→INPUT、单选/下拉→SELECT、多选/复选→CHECKBOX、日期→RANGE;工具不自动推导,按门户需要显式给。",
65
65
  "只想加条件不要重发列:省略 fieldCodes 即不动列;要精确列集合另配 replaceColumns+hideDefaultSystemFields。",
66
66
  "2.1.5 树视图条件行需原样带回 treeLimitScopeType/treeLimitConditionGroup/treeDefaultConditionGroup,否则默认拒 listview-tree-conditions-changed。",
67
67
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.8.26",
3
+ "version": "0.8.27",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "commander": "14.0.3",
61
- "omc-core": "0.8.26",
61
+ "omc-core": "0.8.27",
62
62
  "proper-lockfile": "4.1.2",
63
63
  "write-file-atomic": "6.0.0",
64
64
  "zod": "^3.23.8",
@@ -76,6 +76,6 @@
76
76
  "directory": "packages/omc-cli"
77
77
  },
78
78
  "optionalDependencies": {
79
- "@stalfh233/omc-fake-platform": "0.8.26"
79
+ "@stalfh233/omc-fake-platform": "0.8.27"
80
80
  }
81
81
  }