mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-15 04:42:45 +00:00
- 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
24 lines
656 B
TypeScript
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 });
|
|
},
|
|
};
|
|
};
|