Files
paseo/packages/app/e2e/helpers/workspace.ts
Mohamed Boudra 868f9fb571 WIP: Large refactor checkpoint
- Refactored daemon client and RPC layer
- Added new client package structure in server
- Removed legacy hooks (use-daemon-request, use-session-rpc, use-websocket)
- Added use-daemon-client hook
- Added e2e test infrastructure with Playwright
- Updated agent providers and session handling
- Removed codex-sdk patches
2026-01-12 13:30:20 +07:00

24 lines
656 B
TypeScript

import { execSync } from 'node:child_process';
import { mkdtemp, writeFile, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
type TempRepo = {
path: string;
cleanup: () => Promise<void>;
};
export const createTempGitRepo = async (prefix = 'paseo-e2e-'): Promise<TempRepo> => {
const repoPath = await mkdtemp(path.join(tmpdir(), prefix));
execSync('git init', { cwd: repoPath, stdio: 'ignore' });
await writeFile(path.join(repoPath, 'README.md'), '# Temp Repo\n');
return {
path: repoPath,
cleanup: async () => {
await rm(repoPath, { recursive: true, force: true });
},
};
};