mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 12:23:16 +00:00
- 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)
26 lines
807 B
TypeScript
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 });
|
|
},
|
|
};
|
|
};
|