diff --git a/packages/cli/src/print-command-tree.ts b/packages/cli/src/print-command-tree.ts index cc304d8a..389891b1 100644 --- a/packages/cli/src/print-command-tree.ts +++ b/packages/cli/src/print-command-tree.ts @@ -1,6 +1,6 @@ import { fileURLToPath } from 'node:url'; import { buildKtxProgram } from './cli-program.js'; -import type { KtxCliIo, KtxCliPackageInfo } from './cli-runtime.js'; +import { getKtxCliPackageInfo, type KtxCliIo } from './cli-runtime.js'; import { formatCommandTree, walkCommandTree } from './command-tree.js'; function silentIo(): KtxCliIo { @@ -10,18 +10,11 @@ function silentIo(): KtxCliIo { }; } -function stubPackageInfo(): KtxCliPackageInfo { - return { - name: '@kaelio/ktx', - version: '0.0.0-docs', - }; -} - export function renderKtxCommandTree(): string { const program = buildKtxProgram({ io: silentIo(), deps: {}, - packageInfo: stubPackageInfo(), + packageInfo: getKtxCliPackageInfo(), runInit: async () => 0, }); return formatCommandTree(walkCommandTree(program));