@xmorse/cac 6.0.3 → 6.0.4

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/deno/Command.ts CHANGED
@@ -144,14 +144,6 @@ class Command {
144
144
  title: 'Usage',
145
145
  body: ` $ ${name} ${this.usageText || this.rawName}`
146
146
  });
147
-
148
- // Show full description for specific commands (not global/default)
149
- if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
150
- sections.push({
151
- title: 'Description',
152
- body: this.description.split('\n').map(line => ` ${line}`).join('\n')
153
- });
154
- }
155
147
  const showCommands = (this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0;
156
148
  if (showCommands) {
157
149
  const longestCommandName = findLongest(commands.map(command => command.rawName));
@@ -179,6 +171,14 @@ class Command {
179
171
  }).join('\n')
180
172
  });
181
173
  }
174
+
175
+ // Show full description for specific commands (not global/default)
176
+ if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
177
+ sections.push({
178
+ title: 'Description',
179
+ body: this.description.split('\n').map(line => ` ${line}`).join('\n')
180
+ });
181
+ }
182
182
  if (this.examples.length > 0) {
183
183
  sections.push({
184
184
  title: 'Examples',
package/dist/index.js CHANGED
@@ -352,12 +352,6 @@ class Command {
352
352
  title: "Usage",
353
353
  body: ` $ ${name} ${this.usageText || this.rawName}`
354
354
  });
355
- if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
356
- sections.push({
357
- title: "Description",
358
- body: this.description.split("\n").map((line) => ` ${line}`).join("\n")
359
- });
360
- }
361
355
  const showCommands = (this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0;
362
356
  if (showCommands) {
363
357
  const longestCommandName = findLongest(commands.map((command) => command.rawName));
@@ -385,6 +379,12 @@ class Command {
385
379
  }).join("\n")
386
380
  });
387
381
  }
382
+ if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
383
+ sections.push({
384
+ title: "Description",
385
+ body: this.description.split("\n").map((line) => ` ${line}`).join("\n")
386
+ });
387
+ }
388
388
  if (this.examples.length > 0) {
389
389
  sections.push({
390
390
  title: "Examples",
package/dist/index.mjs CHANGED
@@ -348,12 +348,6 @@ class Command {
348
348
  title: "Usage",
349
349
  body: ` $ ${name} ${this.usageText || this.rawName}`
350
350
  });
351
- if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
352
- sections.push({
353
- title: "Description",
354
- body: this.description.split("\n").map((line) => ` ${line}`).join("\n")
355
- });
356
- }
357
351
  const showCommands = (this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0;
358
352
  if (showCommands) {
359
353
  const longestCommandName = findLongest(commands.map((command) => command.rawName));
@@ -381,6 +375,12 @@ class Command {
381
375
  }).join("\n")
382
376
  });
383
377
  }
378
+ if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
379
+ sections.push({
380
+ title: "Description",
381
+ body: this.description.split("\n").map((line) => ` ${line}`).join("\n")
382
+ });
383
+ }
384
384
  if (this.examples.length > 0) {
385
385
  sections.push({
386
386
  title: "Examples",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmorse/cac",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
4
4
  "description": "Simple yet powerful framework for building command-line apps.",
5
5
  "repository": {
6
6
  "url": "egoist/cac",