Revert "Merge pull request 'Complete Housekeeping migration and /ase cutover' (#52) from codex/housekeeping-complete into main"
This reverts commit488b6e57c4, reversing changes made tob506b4499a.
This commit is contained in:
1 parent
488b6e57c4
commit
b1ddda66ff
802 files changed
+61370
-76659
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { existsSync, readdirSync } from "node:fs";
|
||||
import { readdirSync } from "node:fs";
|
||||
import { join, relative } from "node:path";
|
||||
import type { LegacyPage, LegacySurface } from "./types";
|
||||
|
||||
@@ -23,7 +23,6 @@ function discoverSurface(
|
||||
): LegacyPage[] {
|
||||
const surfaceDirectory = join(rootDir, "src", "app", surface);
|
||||
const pages: LegacyPage[] = [];
|
||||
if (!existsSync(surfaceDirectory)) return pages;
|
||||
|
||||
function walk(directory: string): void {
|
||||
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
||||
@@ -52,22 +51,6 @@ function discoverSurface(
|
||||
return pages;
|
||||
}
|
||||
|
||||
export function recordedLegacyPages(
|
||||
entries: readonly LegacyPage[],
|
||||
): LegacyPage[] {
|
||||
return entries
|
||||
.map(({ surface, legacyPath, sourceFile }) => ({
|
||||
surface,
|
||||
legacyPath,
|
||||
sourceFile,
|
||||
}))
|
||||
.sort((a, b) =>
|
||||
`${a.surface}:${a.legacyPath}:${a.sourceFile}`.localeCompare(
|
||||
`${b.surface}:${b.legacyPath}:${b.sourceFile}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function discoverLegacyPages(rootDir = process.cwd()): LegacyPage[] {
|
||||
return (["admin", "mod"] as const)
|
||||
.flatMap((surface) => discoverSurface(rootDir, surface))
|
||||
|
||||
Reference in new issue
Block a user