Comparing version 6.5.12 to 6.5.13
@@ -35,3 +35,3 @@ /// <reference types="node" /> | ||
} | ||
declare type HelpCallback = (sections: HelpSection[]) => void; | ||
declare type HelpCallback = (sections: HelpSection[]) => void | HelpSection[]; | ||
declare type CommandExample = ((bin: string) => string) | string; | ||
@@ -38,0 +38,0 @@ declare class Command { |
@@ -323,3 +323,3 @@ 'use strict'; | ||
const {versionNumber, options: globalOptions, helpCallback} = this.cli.globalCommand; | ||
const sections = [{ | ||
let sections = [{ | ||
body: `${name}${versionNumber ? ` v${versionNumber}` : ""}` | ||
@@ -367,3 +367,3 @@ }]; | ||
if (helpCallback) { | ||
helpCallback(sections); | ||
sections = helpCallback(sections) || sections; | ||
} | ||
@@ -370,0 +370,0 @@ console.log(sections.map((section) => { |
@@ -62,3 +62,3 @@ | ||
} | ||
declare type HelpCallback = (sections: HelpSection[]) => void; | ||
declare type HelpCallback = (sections: HelpSection[]) => void | HelpSection[]; | ||
declare type CommandExample = ((bin: string) => string) | string; | ||
@@ -65,0 +65,0 @@ declare class Command { |
@@ -746,3 +746,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
const {versionNumber, options: globalOptions, helpCallback} = this.cli.globalCommand; | ||
const sections = [{ | ||
let sections = [{ | ||
body: `${name}${versionNumber ? ` v${versionNumber}` : ""}` | ||
@@ -790,3 +790,3 @@ }]; | ||
if (helpCallback) { | ||
helpCallback(sections); | ||
sections = helpCallback(sections) || sections; | ||
} | ||
@@ -793,0 +793,0 @@ console.log(sections.map((section) => { |
{ | ||
"name": "cac", | ||
"version": "6.5.12", | ||
"version": "6.5.13", | ||
"description": "Simple yet powerful framework for building command-line apps.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78067