fix(ci): capability audit 丢掉 Next.js 路由组,公开 URL 不变
Gitea run 2697 唯一失败:侧栏把 /chart /ephemeris /reports 移进 app/(secondary)/ 后,_scan_app_routes 把文件夹名写进 app_routes。扫描时丢掉括号段。BUG-753。
This commit is contained in:
@@ -10285,7 +10285,14 @@ class JyotishAPIHandler(BaseHTTPRequestHandler, VedastroEvidenceMixin, SynastryM
|
||||
if not {'page.tsx', 'page.ts', 'page.jsx', 'page.js'}.intersection(filenames):
|
||||
continue
|
||||
relative = os.path.relpath(dirpath, root)
|
||||
routes.append('home' if relative == '.' else relative.replace(os.sep, '/'))
|
||||
if relative == '.':
|
||||
routes.append('home')
|
||||
continue
|
||||
parts = [
|
||||
part for part in relative.replace(os.sep, '/').split('/')
|
||||
if not (part.startswith('(') and part.endswith(')'))
|
||||
]
|
||||
routes.append('/'.join(parts) if parts else 'home')
|
||||
return sorted(set(routes))
|
||||
|
||||
def _scan_app_source_text(self):
|
||||
|
||||
Reference in New Issue
Block a user