File size: 1,020 Bytes
f778c12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | export async function createInstallPlanFixture(params?: {
wrapperPath?: string;
env?: Record<string, string | undefined>;
}): Promise<{
programArguments: string[];
workingDirectory: string;
environment: Record<string, string | undefined>;
environmentValueSources?: Record<string, string | undefined>;
}> {
const environment: Record<string, string | undefined> = {};
if (params?.wrapperPath || params?.env?.OPENCLAW_WRAPPER) {
environment.OPENCLAW_WRAPPER = params.wrapperPath ?? params.env?.OPENCLAW_WRAPPER;
}
return {
programArguments: params?.wrapperPath
? [params.wrapperPath, "gateway", "run"]
: ["openclaw", "gateway", "run"],
workingDirectory: "/tmp",
environment,
};
}
export function nodeProbeOutput(nodeVersion: string, sqliteVersion = "3.53.4") {
return {
stdout: JSON.stringify({
nodeVersion,
sqliteVersion,
sqliteProbe: { available: true, version: sqliteVersion, text: true, blob: true, json: true },
}),
stderr: "",
};
}
|