feat: 增進 app-map

This commit is contained in:
skytek_xinliang
2026-05-07 14:46:14 +08:00
parent 65b72b82cb
commit 10843227a8
6 changed files with 218 additions and 16 deletions
+10
View File
@@ -23,6 +23,13 @@ test('CLI runs doctor and scan against one prototype', async () => {
</form>
</main>
`)
await writeFile(join(cwd, 'packages/prototype/portal.md'), `
# Portal Guide
| 雛型檔 | 舊 JSP 來源 | 功能 |
| --- | --- | --- |
| [\`index.html\`](index.html) | \`legacy/index.jsp\` | Customer portal entry |
`)
const doctor = await exec('node', [cli, 'doctor'], { cwd })
await exec('node', [cli, 'scan'], { cwd })
@@ -45,6 +52,9 @@ test('CLI runs doctor and scan against one prototype', async () => {
assert.equal(appMap.routes[0].prototype, 'index.html')
assert.equal(appMap.routes[0].kind, 'feature-page')
assert.equal(appMap.routes[0].layout, 'template-app')
assert.equal(appMap.routes[0].guide.legacyJsp, 'legacy/index.jsp')
assert.equal(appMap.routes[0].guide.description, 'Customer portal entry')
assert.equal(appMap.guideSources[0].source, 'portal.md')
})
test('CLI help only exposes MVP commands', async () => {