feat: sync all workspaces (#4353)

This commit is contained in:
Jérémy M
2024-03-07 15:40:09 +01:00
committed by GitHub
parent eabece6918
commit c3a024b047
5 changed files with 80 additions and 49 deletions

View File

@ -9,6 +9,16 @@ import { kebabCase } from 'src/utils/kebab-case';
export class CommandLogger {
constructor(private readonly className: string) {}
async createSubDirectory(subDirectory: string): Promise<void> {
const path = `./logs/${kebabCase(this.className)}/${subDirectory}`;
if (existsSync(path) === false) {
await fs.mkdir(path, { recursive: true });
}
return;
}
async writeLog(
fileName: string,
data: unknown,