feat: complete server-backed six-lesson app and trial tooling
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { readFileSync, rmSync, existsSync } from 'node:fs'
|
||||
import { join, dirname } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const frontendRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const runtimeDir = join(frontendRoot, 'e2e', '.runtime')
|
||||
const statePath = join(runtimeDir, 'state.json')
|
||||
|
||||
if (existsSync(statePath)) {
|
||||
try {
|
||||
const { tempDir } = JSON.parse(readFileSync(statePath, 'utf8'))
|
||||
rmSync(tempDir, { recursive: true, force: true })
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
if (existsSync(runtimeDir)) {
|
||||
rmSync(runtimeDir, { recursive: true, force: true })
|
||||
}
|
||||
Reference in New Issue
Block a user