v0.0.46 공개 화면 피드/포스트 UI 정리
Latest 보기 방식 토글과 아이콘을 SVG 기반으로 정리하고, 게시물 상세 헤더를 Thred 패턴으로 재구성했다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,8 @@ import { spawn } from 'node:child_process'
|
||||
const host = '127.0.0.1'
|
||||
const port = '43117'
|
||||
let printedLinks = false
|
||||
let collectedLines = []
|
||||
const maxCollectedLines = 400
|
||||
|
||||
const nuxtProcess = spawn('nuxt', [
|
||||
'dev',
|
||||
@@ -40,6 +42,13 @@ const handleNuxtLog = (chunk) => {
|
||||
const text = chunk.toString()
|
||||
|
||||
for (const line of text.split('\n')) {
|
||||
if (line) {
|
||||
collectedLines.push(line)
|
||||
if (collectedLines.length > maxCollectedLines) {
|
||||
collectedLines = collectedLines.slice(-maxCollectedLines)
|
||||
}
|
||||
}
|
||||
|
||||
const localMatch = line.match(/Local:\s+(https?:\/\/[^\s]+)/)
|
||||
|
||||
if (localMatch && !printedLinks) {
|
||||
@@ -48,7 +57,7 @@ const handleNuxtLog = (chunk) => {
|
||||
continue
|
||||
}
|
||||
|
||||
if (/(^|\s)(error:|warn:|warning:|failed|fatal|eaddrinuse|cannot)\b/i.test(line)) {
|
||||
if (/(^|\s)(error:|warn:|warning:|failed|fatal|eaddrinuse|cannot|emfile|epipe|eacces|eperm)\b/i.test(line) || /\bat\s.+\(.+\)/.test(line) || /Object\.\$resolve/.test(line)) {
|
||||
console.log(line)
|
||||
}
|
||||
}
|
||||
@@ -58,6 +67,15 @@ nuxtProcess.stdout.on('data', handleNuxtLog)
|
||||
nuxtProcess.stderr.on('data', handleNuxtLog)
|
||||
|
||||
nuxtProcess.on('close', (code) => {
|
||||
if (code && collectedLines.length) {
|
||||
console.log('')
|
||||
console.log('--- Nuxt 종료 로그 (최근) ---')
|
||||
for (const line of collectedLines) {
|
||||
console.log(line)
|
||||
}
|
||||
console.log('--- 종료 로그 끝 ---')
|
||||
console.log('')
|
||||
}
|
||||
process.exit(code || 0)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user