feat: make tryIt presets, limits, badges and buttons completely dynamic from JSON configs

This commit is contained in:
2026-11-04 15:36:30 +05:30
parent de20dd4c7e
commit e5c318099d
21 changed files with 881 additions and 250 deletions
+2
View File
@@ -50,6 +50,7 @@ export function getPageConfig(slug: string): PageConfig | null {
}
export function getAllTools(): ToolItem[] {
toolsCache.clear();
// 1. Prioritize management/pages/tools/[slug]/tool.config.json
const mgmtToolsDir = path.join(MANAGEMENT_DIR, 'pages', 'tools');
if (fs.existsSync(mgmtToolsDir)) {
@@ -103,6 +104,7 @@ export function getToolById(id: string): ToolItem | null {
}
export function getAllApps(): AppItem[] {
appsCache.clear();
// 1. Prioritize management/apps/[slug]/app.config.json
const mgmtAppsDir = path.join(MANAGEMENT_DIR, 'apps');
if (fs.existsSync(mgmtAppsDir)) {