- Delete old Vite+Svelte frontend - Initialize new SvelteKit project with TypeScript - Configure Tailwind CSS v4 + DaisyUI - Implement JWT authentication with auto-refresh - Create login page with form validation (Zod) - Add protected route guards - Update Docker configuration for single-stage build - Add E2E tests with Playwright (6/11 passing) - Fix Svelte 5 reactivity with $state() runes Known issues: - 5 E2E tests failing (timing/async issues) - Token refresh implementation needs debugging - Validation error display timing
33 lines
734 B
JavaScript
33 lines
734 B
JavaScript
import { exec } from 'child_process'
|
|
|
|
export default function getUncommittedChanges() {
|
|
return new Promise((resolve, reject) => {
|
|
exec('git status --porcelain', (error, stdout, stderr) => {
|
|
if (error) {
|
|
reject(error);
|
|
return
|
|
}
|
|
|
|
if (stderr) {
|
|
reject(new Error(stderr.toString()))
|
|
return
|
|
}
|
|
|
|
const output = stdout.toString().trim()
|
|
|
|
if (!output) {
|
|
resolve([]);
|
|
}
|
|
|
|
const uncommittedFiles = output.trim().split('\n').map((line) => {
|
|
line = line.trim()
|
|
const whitespaceIndex = line.indexOf(' ')
|
|
const status = line.slice(0, whitespaceIndex)
|
|
const filename = line.slice(whitespaceIndex + ' '.length)
|
|
return { status, filename }
|
|
})
|
|
|
|
resolve(uncommittedFiles)
|
|
})
|
|
})
|
|
} |