mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 10:40:20 +00:00
fix(release): keep private QA bundles out of npm pack
This commit is contained in:
@@ -1 +1 @@
|
||||
export { registerQaLabCli } from "./src/cli.js";
|
||||
export { isQaLabCliAvailable, registerQaLabCli } from "./src/cli.js";
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user