@clerc/plugin-completions 1.0.0-beta.26 → 1.0.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1540,8 +1540,11 @@ function buildTabModel(globalFlags, commands) {
1540
1540
  registerGlobalFlags(globalFlags, t);
1541
1541
  for (const cmd of commands.values()) {
1542
1542
  if (cmd.completions?.show === false) continue;
1543
- const command = t.command(cmd.name, cmd.description ?? "");
1544
- registerGlobalFlags(globalFlags, command);
1543
+ let command = t;
1544
+ if (cmd.name !== "") {
1545
+ command = t.command(cmd.name, cmd.description ?? "");
1546
+ registerGlobalFlags(globalFlags, command);
1547
+ }
1545
1548
  for (const [flagName, def] of Object.entries(cmd.flags ?? {})) {
1546
1549
  const normalized = (0, src_exports.normalizeFlagValue)(def);
1547
1550
  const desc = normalized.description ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-completions",
3
- "version": "1.0.0-beta.26",
3
+ "version": "1.0.0-beta.27",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc plugin completions",
@@ -51,8 +51,8 @@
51
51
  "@bomb.sh/tab": "^0.0.10"
52
52
  },
53
53
  "devDependencies": {
54
- "@clerc/core": "1.0.0-beta.26",
55
- "@clerc/utils": "1.0.0-beta.26"
54
+ "@clerc/core": "1.0.0-beta.27",
55
+ "@clerc/utils": "1.0.0-beta.27"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@clerc/core": "*"