// 只读探针:确认 5173 上跑的是不是本仓库,以及本仓库的路由模式。 // 不发任何写请求,不启动/重启服务。 const BASE = 'http://127.0.0.1:5173' async function probe(path, accept) { try { const res = await fetch(BASE + path, { headers: accept ? { accept } : {} }) const text = await res.text() return { status: res.status, ct: res.headers.get('content-type') || '', len: text.length, text } } catch (error) { return { status: 'ERR', error: error.message } } } const targets = [ ['/src/pages/cockpit/index.vue', 'application/javascript'], ['/src/modules/cockpit/prototypes/anchor-prototype-layout.js', '*/*'], ['/src/modules/cockpit/prototypes/FogPrototype.vue', '*/*'], ['/src/common/cesiumStaticPlugin.js', '*/*'], ['/@fs/E:/City-Lifeline-Cockpit-TvT/src/modules/cockpit/prototypes/AnchorPrototype.vue', '*/*'], ] for (const [path, accept] of targets) { const r = await probe(path, accept) const looksHtml = //i.test(r.text || '') const marker = path.includes('anchor-prototype-layout') ? r.text.includes('solveAnchorLayout') : path.includes('AnchorPrototype') ? r.text.includes('AnchorPrototype') : path.includes('cockpit/index.vue') ? r.text.includes('AnchorPrototype') : null console.log(`${r.status} ct=${r.ct} len=${r.len} html=${looksHtml} marker=${marker} ${path}`) } // 这份 5173 的页面路由里有没有 cockpit?抓首页 HTML 里的路由线索 const home = await probe('/', 'text/html') console.log('\n--- 首页 HTML 里的 title / 脚本 ---') console.log((home.text.match(/[^<]*<\/title>/i) || ['(no title)'])[0]) console.log('包含 tvt-app?', home.text.includes('tvt-app')) console.log('包含 /src/main?', /src\/main/.test(home.text))