mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
fix(cli): use real package metadata in print-command-tree
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.
This commit is contained in:
parent
55669c3965
commit
abdca58884
1 changed files with 2 additions and 9 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue