"use client"; import Link from "next/link"; import { useQuery } from "@tanstack/react-query"; import { AppShell } from "@/components/app-shell"; import { Card, CardContent } from "@/components/ui/card"; import { Markdown } from "@/components/ui/markdown"; import { fetchScriptsCatalog } from "@/lib/api/scripts"; /* * /scripts — read-only catalog of everything under scripts/. * * The content is `scripts/SCRIPTS.md` verbatim (active · archived · deleted * tables), served by GET /api/scripts/catalog. SCRIPTS.md is the single * source of truth — CLAUDE.md mandates updating it on every script change — * so we render it directly rather than re-describing the scripts here. */ export default function ScriptsPage() { const { data, isLoading, isError, error } = useQuery({ queryKey: ["scripts-catalog"], queryFn: ({ signal }) => fetchScriptsCatalog(signal), }); const lastModified = data?.last_modified != null ? new Date(data.last_modified * 1000).toLocaleDateString("he-IL", { year: "numeric", month: "long", day: "numeric", }) : null; return (

סקריפטים

קטלוג כל הסקריפטים בתיקיית{" "} scripts/ {" "} — שם, סוג, תפקיד ותזמון. מקור-האמת הוא{" "} scripts/SCRIPTS.md ; עריכה דרך git, לא מכאן.

{data?.gitea_url ? ( מקור ב-Gitea ↗ ) : null}
{isLoading ? (

טוען קטלוג…

) : isError ? (

שגיאה בטעינת הקטלוג: {(error as Error)?.message ?? "לא ידוע"}

) : data ? ( <> {lastModified ? (

עודכן לאחרונה: {lastModified}

) : null} ) : null}
); }