From 8a0164c1f937d27b47b9517e13ad6b8c567919a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 11 Jun 2025 11:34:43 +0200 Subject: [PATCH] fix issue with missing cli commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/twelve-zoos-learn.md | 5 +++++ packages/cli/src/modules/config/index.ts | 14 ++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 .changeset/twelve-zoos-learn.md diff --git a/.changeset/twelve-zoos-learn.md b/.changeset/twelve-zoos-learn.md new file mode 100644 index 0000000000..c1c553cb70 --- /dev/null +++ b/.changeset/twelve-zoos-learn.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fix an issue where some commands were not usable because of missing dist files diff --git a/packages/cli/src/modules/config/index.ts b/packages/cli/src/modules/config/index.ts index 44cf2ea928..d62dbd4d26 100644 --- a/packages/cli/src/modules/config/index.ts +++ b/packages/cli/src/modules/config/index.ts @@ -74,9 +74,7 @@ export default createCliPlugin({ .usage('$0', info.description) .help() .parse(args); - const m = - (await require('./commands/print')) as typeof import('./commands/print'); - await m.default(argv); + await lazy(() => import('./commands/print'), 'default')(argv); }, }); reg.addCommand({ @@ -99,9 +97,7 @@ export default createCliPlugin({ }) .help() .parse(args); - const m = - (await require('./commands/validate')) as typeof import('./commands/validate'); - await m.default(argv); + await lazy(() => import('./commands/validate'), 'default')(argv); }, }); @@ -118,8 +114,7 @@ export default createCliPlugin({ }) .help() .parse(args); - const m = await import('./commands/schema'); - await m.default(argv); + await lazy(() => import('./commands/schema'), 'default')(argv); }, }); @@ -136,8 +131,7 @@ export default createCliPlugin({ }) .help() .parse(args); - const m = await import('./commands/schema'); - await m.default(argv); + await lazy(() => import('./commands/schema'), 'default')(argv); }, }); },