@stalfh233/omc-cli 0.8.34 → 0.8.36

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.
@@ -409,7 +409,7 @@ export async function cmdApprovalFlow(args) {
409
409
  ...(originatorName !== undefined ? { originatorName, originatorNameNote: ORIGINATOR_NAME_NOTE } : {}), ...(roleChecks.length > 0 ? { participantChecks: roleChecks } : {}), crossAccountApproval, ...preexistingSection, publish: publishOutcome.result
410
410
  }, request, classified.error));
411
411
  if (publishOutcome.exitCode === 0)
412
- process.stderr.write("[omc] 前台生效验证清单:1) 造一条数据提交走流程;2) 每级审批人在门户有待办(角色用 FindUserByRole 需审批人挂在发起人同部门,否则 PENDING 不来);3) 审批节点字段只读(不可改单);4) 驳回退发起人核对;5) 设计器打开流程确认节点链显示正常。边界:非发起人身份的审批无法在单会话 CLI 内推进(单 token);跨账号请另建环境或把参与人设为 {Originator}。\n");
412
+ process.stderr.write("[omc] 前台生效验证清单:1) 造一条数据提交走流程;2) 每级审批人在门户有待办(角色用 FindUserByRole 需审批人挂在发起人同部门,否则 PENDING 不来);3) 审批节点字段只读(不可改单;节点 editable/visible 只作用于门户 form/load 读面膜——REST 普通写不拦,见 data.update/data.save 回执的 nodeFieldPermissionNote(带 formData 的审批提交也回);普通写也不拦);4) 驳回退发起人核对;5) 设计器打开流程确认节点链显示正常。边界:非发起人身份的审批无法在单会话 CLI 内推进(单 token);跨账号请另建环境或把参与人设为 {Originator}。\n");
413
413
  return publishOutcome.exitCode;
414
414
  }
415
415
  //# sourceMappingURL=approval-flow.js.map
package/dist/cli.js CHANGED
@@ -2044,6 +2044,18 @@ function joinSplitFlagValues(raw, flags) {
2044
2044
  out.push(token);
2045
2045
  continue;
2046
2046
  }
2047
+ // issue #65:`--jq` 的可选值不接受以 `--` 开头的 token。旧实现把
2048
+ // `--jq --args '{...}'` 里的 `--args` 当成 `--jq` 的值拼接成
2049
+ // `--args {...}`,commander 随后报 `unknown option '--args {...}'`——错误
2050
+ // 信息里完全看不出是参数顺序问题。这里视作裸 `--jq`,把后续 token 交回解析器。
2051
+ if (value.startsWith("--")) {
2052
+ out.push(token);
2053
+ if (value === "--args" || value === "--args-file" || value === "--args-list") {
2054
+ process.stderr.write("[omc] 提示:`--jq` 是裸用(下一个参数是 " + value + "),本次只列顶层键;" +
2055
+ "若要过滤参数后的回执,请把 `--jq '<path>'` 放在 `--args` 之后,或直接写 `--jq '<path>'`。\n");
2056
+ }
2057
+ continue;
2058
+ }
2047
2059
  const parts = [value];
2048
2060
  let cursor = index + 2;
2049
2061
  while (cursor < raw.length && !raw[cursor].startsWith("--")) {
package/dist/discovery.js CHANGED
@@ -297,6 +297,19 @@ export function terseType(node, depth = 0) {
297
297
  }
298
298
  if (node.type === "array")
299
299
  return `array<${terseType(node.items, depth + 1)}>`;
300
+ // F5(探针 Z,0.8.34):z.record(...) 生成的 schema 没有 properties、只有
301
+ // additionalProperties(如 form.draft layout.spans → `{type:"object",
302
+ // additionalProperties:{type:"integer"}}`)。旧实现把它压成裸 "object",
303
+ // 调用方看不到「键→值类型」——渲染成 record<integer>;true/false 仍回 object。
304
+ if ((node.type === "object" || node.type === undefined) && node.properties === undefined && node.additionalProperties !== undefined && typeof node.additionalProperties === "object") {
305
+ const valueType = terseType(node.additionalProperties, depth + 1);
306
+ // 无类型约束(additionalProperties:{})仍是 "object"——record<any> 不提供
307
+ // 新信息,却会给 describe 预算加字节(r59/describe.single 边界)。
308
+ if (valueType === "any")
309
+ return "object";
310
+ const label = `record<${valueType}>`;
311
+ return label.length <= 60 ? label : "object";
312
+ }
300
313
  // T3(GitLab #17,2026-11-04):枚举只写在 schema 的嵌套属性里(orders[].dir
301
314
  // 的 ASC|DESC),而紧凑标签把整个 object 压成 "object"——调用方只能靠报错
302
315
  // 试出合法值(`dir:"desc"` 被 zod 拒)。短枚举就内联,长了退回 "object"
@@ -408,6 +408,30 @@ function closestFamilyName(type) {
408
408
  }
409
409
  /** wire propertyType (int) -> form controlType (type-matrix.md §3.1). */
410
410
  export const FIELD_CONTROL_TYPES = { ...CAPABILITY_CONTROL_TYPES };
411
+ /**
412
+ * F4(探针 Y)/ F7(探针 Z):字段行 published:true 但选项级 `published:false`。
413
+ * `field-families` 生成 custom 选项时固定 `published:false`(8.1 兼容形态),
414
+ * 字段/表单发布不会重写这个标记;运行时 REST 按 code/value 接受。
415
+ * 读面(field.list/field.get、listview.get/configure 的条件行)同源判定。
416
+ * 门户 UI 是否使用该标记未验证——只给读数与边界,不断言门户也忽略。
417
+ */
418
+ export function hasUnpublishedCustomOptions(options) {
419
+ if (options === null || typeof options !== "object" || Array.isArray(options))
420
+ return false;
421
+ let optionsSet = options.optionsSet;
422
+ if (typeof optionsSet === "string") {
423
+ try {
424
+ optionsSet = JSON.parse(optionsSet);
425
+ }
426
+ catch {
427
+ return false;
428
+ }
429
+ }
430
+ if (optionsSet === null || typeof optionsSet !== "object" || Array.isArray(optionsSet))
431
+ return false;
432
+ const custom = optionsSet.custom;
433
+ return Array.isArray(custom) && custom.some((entry) => entry !== null && typeof entry === "object" && entry.published === false);
434
+ }
411
435
  export const SYSTEM_FIELD_CODES = new Set([
412
436
  "owner",
413
437
  "creater",