build: exclude private QA from npm package

This commit is contained in:
Peter Steinberger
2026-04-15 09:38:45 -07:00
parent 78ac118427
commit 229eb72cf6
30 changed files with 539 additions and 86 deletions

View File

@@ -1,6 +1,6 @@
import { isQaLabCliAvailable } from "../../plugin-sdk/qa-lab.js";
import { defineCommandDescriptorCatalog } from "./command-descriptor-utils.js";
import type { NamedCommandDescriptor } from "./command-group-descriptors.js";
import { isPrivateQaCliEnabled } from "./private-qa-cli.js";
export type SubCliDescriptor = NamedCommandDescriptor;
@@ -164,7 +164,7 @@ export const SUB_CLI_DESCRIPTORS = subCliCommandCatalog.descriptors;
export function getSubCliEntries(): ReadonlyArray<SubCliDescriptor> {
const descriptors = subCliCommandCatalog.getDescriptors();
if (isQaLabCliAvailable()) {
if (isPrivateQaCliEnabled()) {
return descriptors;
}
return descriptors.filter((descriptor) => descriptor.name !== "qa");
@@ -172,7 +172,7 @@ export function getSubCliEntries(): ReadonlyArray<SubCliDescriptor> {
export function getSubCliCommandsWithSubcommands(): string[] {
const commands = subCliCommandCatalog.getCommandsWithSubcommands();
if (isQaLabCliAvailable()) {
if (isPrivateQaCliEnabled()) {
return commands;
}
return commands.filter((command) => command !== "qa");