fix(release): keep private QA bundles out of npm pack

This commit is contained in:
Peter Steinberger
2026-04-11 13:10:42 +01:00
parent a733e92c45
commit cd89892b1f
10 changed files with 81 additions and 10 deletions

View File

@@ -1 +1 @@
export { registerQaLabCli } from "./src/cli.js";
export { isQaLabCliAvailable, registerQaLabCli } from "./src/cli.js";

View File

@@ -2,6 +2,7 @@ import type { Command } from "commander";
import { collectString } from "./cli-options.js";
import { LIVE_TRANSPORT_QA_CLI_REGISTRATIONS } from "./live-transports/cli.js";
import type { QaProviderModeInput } from "./run-config.js";
import { hasQaScenarioPack } from "./scenario-catalog.js";
type QaLabCliRuntime = typeof import("./cli.runtime.js");
@@ -125,6 +126,10 @@ async function runQaMockOpenAi(opts: { host?: string; port?: number }) {
await runtime.runQaMockOpenAiCommand(opts);
}
export function isQaLabCliAvailable(): boolean {
return hasQaScenarioPack();
}
export function registerQaLabCli(program: Command) {
const qa = program
.command("qa")

View File

@@ -181,6 +181,10 @@ function resolveRepoPath(relativePath: string, kind: "file" | "directory" = "fil
return null;
}
export function hasQaScenarioPack(): boolean {
return resolveRepoPath(QA_SCENARIO_PACK_INDEX_PATH, "file") !== null;
}
function readTextFile(relativePath: string): string {
const resolved = resolveRepoPath(relativePath, "file");
if (!resolved) {