chore: inventory obsolete UI files

This commit is contained in:
Codex
2026-09-13 20:15:33 +08:00
parent 56e8329b59
commit 1deda1e943
2 changed files with 125 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
param(
[string]$Root = (Resolve-Path "$PSScriptRoot\..")
)
$miniappPages = (Get-Content -Raw -Encoding UTF8 "$Root\miniapp\app.json" | ConvertFrom-Json).pages
$status = git -C $Root status --short
$pairs = Get-ChildItem "$Root\miniapp" -Recurse -Filter *.ts | ForEach-Object {
$js = [IO.Path]::ChangeExtension($_.FullName, '.js')
if (Test-Path -LiteralPath $js) {
[PSCustomObject]@{
TypeScript = $_.FullName.Substring($Root.Length + 1)
JavaScript = $js.Substring($Root.Length + 1)
}
}
}
[PSCustomObject]@{
activePageCount = $miniappPages.Count
activePages = $miniappPages
duplicateSources = $pairs
gitStatus = $status
} | ConvertTo-Json -Depth 5