The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
import fs from "fs";
import { shell } from "../../../cypress-runner-utils";
export function setupAppCleanup({
rootPath,
env,
appDownCommand,
cleanupAppDir,
}: {
rootPath: string;
env: Record<string, string | number | undefined>;
appDownCommand: string;
cleanupAppDir: boolean;
}) {
if (!process.env.CI) {
["exit", "SIGINT", "SIGTERM", "uncaughtException"].forEach((signal) => {
process.on(signal, () => {
console.log(`Parent received ${signal}, stopping app...`);
shell(appDownCommand, { cwd: rootPath, env });
if (cleanupAppDir) {
fs.rmSync(rootPath, { recursive: true, force: true });
}
});
});
}
}