morphbox
Version:
Docker-based AI sandbox for development with Claude integration
25 lines (22 loc) • 728 B
JavaScript
import { j as json } from './index-3BbzJtgI.js';
import { readdir } from 'fs/promises';
import { join } from 'path';
import { homedir } from 'os';
const PANELS_DIR = join(homedir(), "morphbox", "panels");
const GET = async () => {
try {
try {
await readdir(PANELS_DIR);
} catch {
return json([]);
}
const files = await readdir(PANELS_DIR);
const panelFiles = files.filter((file) => file.endsWith(".morph") || file.endsWith(".svelte"));
return json(panelFiles);
} catch (error) {
console.error("Failed to list custom panels:", error);
return json({ error: "Failed to list custom panels" }, { status: 500 });
}
};
export { GET };
//# sourceMappingURL=_server.ts-qGEcxkKO.js.map