Files
paseo/packages/app/e2e/helpers/workspace.ts
Mohamed Boudra 420f25f1e9 feat: add download toast, e2e permission tests, and update favicons
- Add download toast component with progress indicator and auto-dismiss
- Add download store for managing file download state
- Add e2e tests for permission prompts (allow/deny flows)
- Add global setup for e2e tests with isolated daemon instance
- Update favicon assets with new design
- Refactor agent-stream-view to use shared tool-call-details component
- Simplify file-explorer-pane component
- Clean up unused screenshots and PRODUCTION.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-16 20:23:07 +07:00

26 lines
807 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');
execSync('git add README.md', { cwd: repoPath, stdio: 'ignore' });
execSync('git commit -m "Initial commit"', { cwd: repoPath, stdio: 'ignore' });
return {
path: repoPath,
cleanup: async () => {
await rm(repoPath, { recursive: true, force: true });
},
};
};