bfi-cli 0.1.12 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +7 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -6773,15 +6773,20 @@ async function runWhoami(globalOpts) {
6773
6773
  console.log(`\n用户名: ${displayName}`);
6774
6774
  console.log(`用户ID: ${userId}`);
6775
6775
  if (Array.isArray(namespaces) && namespaces.length > 0) {
6776
+ const maxSlug = Math.max(...namespaces.map((ns) => String(ns.slug || "").length), 4);
6777
+ const maxName = Math.max(...namespaces.map((ns) => String(ns.displayName || "").length), 4);
6776
6778
  console.log(`\n命名空间 (${namespaces.length}):`);
6777
6779
  for (const ns of namespaces) {
6778
6780
  const role = ns.role || "MEMBER";
6779
- console.log(` @${ns.slug} ${ns.displayName || ""} [${{
6781
+ const roleLabel = {
6780
6782
  OWNER: "拥有者",
6781
6783
  ADMIN: "管理员",
6782
6784
  MEMBER: "成员",
6783
6785
  VIEWER: "访客"
6784
- }[role] || role}]`);
6786
+ };
6787
+ const slug = String(ns.slug || "").padEnd(maxSlug);
6788
+ const name = String(ns.displayName || "").padEnd(maxName);
6789
+ console.log(` @${slug} ${name} ${roleLabel[role] || role}`);
6785
6790
  }
6786
6791
  }
6787
6792
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bfi-cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "用友大业财BFI统一命令行工具,支持技能,技能包,元数据,UI元数据等",
5
5
  "type": "module",
6
6
  "bin": {