@fig/complete-commander
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -73,11 +73,10 @@ "use strict"; | ||
}) { | ||
return { | ||
name: _helpCommandName, | ||
description: _helpCommandDescription, | ||
priority: 49, | ||
const [, arg] = _helpCommandnameAndArgs.split(" "); | ||
return Object.assign({ name: _helpCommandName, description: _helpCommandDescription, priority: 49 }, (arg && { | ||
args: { | ||
name: _helpCommandnameAndArgs.split(" ")[1].slice(1, -1), | ||
name: arg.slice(1, -1), | ||
isOptional: true, | ||
template: "help", | ||
}, | ||
}; | ||
})); | ||
} | ||
@@ -129,2 +128,4 @@ function helpOption({ _helpDescription, _helpShortFlag, _helpLongFlag, }) { | ||
const figSpecCommandName = (options === null || options === void 0 ? void 0 : options.figSpecCommandName) || DEFAULT_FIG_SUBCOMMAND_NAME; | ||
// The first subcommand will never have the name of the `figSpecCommandName` | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const spec = getTemplate(generateCommand(command, figSpecCommandName)); | ||
@@ -131,0 +132,0 @@ return spec; |
{ | ||
"name": "@fig/complete-commander", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Export commander command as a Fig spec", | ||
@@ -9,5 +9,5 @@ "main": "lib/index.js", | ||
"test": "ts-node test/index.ts", | ||
"test:overwrite": "OVERWRITE=true npm run test", | ||
"test:overwrite": "OVERWRITE=true yarn test", | ||
"clean:test": "git clean -Xf test", | ||
"prepack": "npm run build" | ||
"prepack": "yarn build" | ||
}, | ||
@@ -53,2 +53,2 @@ "repository": { | ||
} | ||
} | ||
} |
10983
146