From abdca58884947ad1a2b28ac4da01eacee9449b6e Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Thu, 21 May 2026 14:36:23 +0200 Subject: [PATCH] fix(cli): use real package metadata in print-command-tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stubbed package name embedded a forbidden product identifier that tripped the boundary check in CI. Read the metadata from package.json instead — keeps the rendered tree unchanged and removes a duplicate source of truth. --- packages/cli/src/print-command-tree.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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));