diff --git a/src/brand.ts b/src/brand.ts index 1aa4454..9c76c99 100644 --- a/src/brand.ts +++ b/src/brand.ts @@ -2,7 +2,7 @@ import { GREEN, CYAN, RESET } from "./terminal"; -export const VERSION = "0.1.3"; +export const VERSION = "0.1.4"; export function showBanner(): string { const G = GREEN(); diff --git a/src/cli.ts b/src/cli.ts index 1c10a3a..8aff37b 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,6 +1,8 @@ // Lightweight CLI argument parser aligned with mainstream CLI conventions. // Supports: subcommands, short/long flags, flag values, positional args, --help, --version. +import { VERSION } from "./brand"; + export interface FlagDef { long: string; // e.g. "dry-run" short?: string; // e.g. "d" @@ -44,19 +46,6 @@ function buildFlagIndex(flags: FlagDef[]): Map { return index; } -function resolveFlagName(raw: string): { flag: FlagDef; value?: string } | null { - // "--key=value" - const eqIndex = raw.indexOf("="); - if (eqIndex !== -1) { - const name = raw.slice(0, eqIndex); - const value = raw.slice(eqIndex + 1); - const allFlags = buildFlagIndex([...GLOBAL_FLAGS]); // we'll rebuild in context - // We'll handle = syntax in the main parse loop with proper index - return null; // handled inline - } - return null; // handled inline -} - function parseArgs( rawArgs: string[], commands: Map, @@ -282,7 +271,7 @@ export async function runCLI(rawArgs: string[], commands: Map