@drizzle-team/brocli
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -120,4 +120,4 @@ /** | ||
*/ | ||
declare const runCli: (commands: Command[], config: BroCliConfig) => void; | ||
declare const runCli: (commands: Command[], config?: BroCliConfig) => void; | ||
export { type AssignConfigName, type BroCliConfig, BroCliError as BrocliError, type BuilderConfig, type Command, type CommandHandler, type CommandHelpHandler, type GenericBuilderConfig, type GenericBuilderInternals, type GenericBuilderInternalsFields, type GenericCommandHandler, type GenericProcessedOptions, type HelpHandler, OptionBuilderBase, type OptionType, type OutputType, type ProcessedOptions, type RawCommand, type Simplify, type TypeOf, type VersionHelpHandler, boolean, command, runCli, string }; |
11
index.js
@@ -258,6 +258,3 @@ // src/brocli-error.ts | ||
if (!match) return false; | ||
if (!hasEq) { | ||
if (nextArg === void 0) throw invalidStringSyntax(match); | ||
skipNext = true; | ||
} | ||
if (!hasEq && nextArg === void 0) throw invalidStringSyntax(match); | ||
data = dataPart; | ||
@@ -314,3 +311,3 @@ return true; | ||
if (cmd) return commandHelpHandler(cmd); | ||
return unknownCommand(); | ||
helpHandler(commands); | ||
} | ||
@@ -358,3 +355,3 @@ }); | ||
const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h"); | ||
if (helpIndex !== -1) { | ||
if (helpIndex !== -1 && (helpIndex > 0 ? args[helpIndex - 1]?.startsWith("-") ? false : true : true)) { | ||
let command3; | ||
@@ -374,3 +371,3 @@ if (args[helpIndex + 1]?.startsWith("-")) { | ||
const versionIndex = args.findIndex((arg) => arg === "--version" || arg === "-v"); | ||
if (versionIndex !== -1) { | ||
if (versionIndex !== -1 && (versionIndex > 0 ? args[versionIndex - 1]?.startsWith("-") ? false : true : true)) { | ||
return versionHelpHandler(name, version); | ||
@@ -377,0 +374,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"author": "Drizzle Team", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Typed CLI command runner", | ||
@@ -32,3 +32,2 @@ "license": "Apache-2.0", | ||
"dprint": "^0.46.2", | ||
"string-argv": "^0.3.2", | ||
"tsup": "^8.1.0", | ||
@@ -35,0 +34,0 @@ "tsx": "^4.7.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
121784
10
941