feat(ui): add action buttons to Docker, Git, systemd, and Caddy modules
- Docker table: Restart and Stop buttons per container row (docker_compose_restart / docker_compose_stop) - Git repos list: Fetch and Pull buttons per repo; Pull disabled when working tree is dirty - systemd units list: Restart button per unit (systemctl_restart) - Caddy: Edit link on /caddy page, new /caddy/edit page with textarea + 3-step Validate → Save+Reload flow - All buttons open ConfirmDialog with exact agent-call preview, then stream output via StreamingTerminal - Add docker_compose_stop to ops-agent/commands.yml.example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b74cf3d75f
commit
3781fce1e2
8 changed files with 1019 additions and 2 deletions
214
app/caddy/_components/caddy-editor.tsx
Normal file
214
app/caddy/_components/caddy-editor.tsx
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
'use client'
|
||||
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { useFlowRun } from '@/hooks/useFlowRun'
|
||||
import ConfirmDialog from '@/components/ConfirmDialog'
|
||||
import StreamingTerminal from '@/components/StreamingTerminal'
|
||||
|
||||
type Phase = 'edit' | 'writing' | 'validating' | 'validated' | 'saving' | 'saved'
|
||||
|
||||
type DialogPending = 'validate' | 'save' | null
|
||||
|
||||
type Props = {
|
||||
initialContent: string
|
||||
initialError: string | null
|
||||
}
|
||||
|
||||
const VALIDATE_PREVIEW =
|
||||
'cat > /srv/scrum4me/caddy/Caddyfile.new \\\n && mv /srv/scrum4me/caddy/Caddyfile.new /srv/scrum4me/caddy/Caddyfile\ncaddy validate --config /srv/scrum4me/caddy/Caddyfile'
|
||||
|
||||
const SAVE_PREVIEW = 'caddy reload --config /srv/scrum4me/caddy/Caddyfile'
|
||||
|
||||
export default function CaddyEditor({ initialContent, initialError }: Props) {
|
||||
const [content, setContent] = useState(initialContent)
|
||||
const [phase, setPhase] = useState<Phase>('edit')
|
||||
const [dialogPending, setDialogPending] = useState<DialogPending>(null)
|
||||
|
||||
const writeFlow = useFlowRun()
|
||||
const validateFlow = useFlowRun()
|
||||
const reloadFlow = useFlowRun()
|
||||
|
||||
// Chain: write done → start validate
|
||||
useEffect(() => {
|
||||
if (phase === 'writing' && writeFlow.status === 'done') {
|
||||
setPhase('validating')
|
||||
validateFlow.start('caddy_validate')
|
||||
} else if (phase === 'writing' && (writeFlow.status === 'failed' || writeFlow.status === 'error')) {
|
||||
setPhase('edit')
|
||||
}
|
||||
}, [writeFlow.status, phase, validateFlow.start])
|
||||
|
||||
// Validate done → validated phase
|
||||
useEffect(() => {
|
||||
if (phase === 'validating' && validateFlow.status === 'done') {
|
||||
setPhase('validated')
|
||||
} else if (phase === 'validating' && (validateFlow.status === 'failed' || validateFlow.status === 'error')) {
|
||||
setPhase('edit')
|
||||
}
|
||||
}, [validateFlow.status, phase])
|
||||
|
||||
// Reload done → saved
|
||||
useEffect(() => {
|
||||
if (phase === 'saving' && reloadFlow.status === 'done') {
|
||||
setPhase('saved')
|
||||
} else if (phase === 'saving' && (reloadFlow.status === 'failed' || reloadFlow.status === 'error')) {
|
||||
setPhase('validated')
|
||||
}
|
||||
}, [reloadFlow.status, phase])
|
||||
|
||||
const handleValidateConfirm = useCallback(() => {
|
||||
setDialogPending(null)
|
||||
setPhase('writing')
|
||||
writeFlow.reset()
|
||||
validateFlow.reset()
|
||||
writeFlow.start('caddy_write_config', [], content)
|
||||
}, [content, writeFlow.reset, writeFlow.start, validateFlow.reset])
|
||||
|
||||
const handleSaveConfirm = useCallback(() => {
|
||||
setDialogPending(null)
|
||||
setPhase('saving')
|
||||
reloadFlow.reset()
|
||||
reloadFlow.start('caddy_reload')
|
||||
}, [reloadFlow.reset, reloadFlow.start])
|
||||
|
||||
const handleEditAgain = () => {
|
||||
writeFlow.reset()
|
||||
validateFlow.reset()
|
||||
reloadFlow.reset()
|
||||
setPhase('edit')
|
||||
}
|
||||
|
||||
const isActive = phase === 'writing' || phase === 'validating' || phase === 'saving'
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{initialError && (
|
||||
<div className="rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive">
|
||||
Failed to load current config: {initialError}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Textarea */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-base font-medium tracking-tight">Caddyfile</h2>
|
||||
{phase === 'saved' && (
|
||||
<span className="inline-flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400">
|
||||
<span className="size-2 rounded-full bg-green-500" />
|
||||
Reloaded successfully
|
||||
</span>
|
||||
)}
|
||||
{phase === 'validated' && (
|
||||
<span className="inline-flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400">
|
||||
<span className="size-2 rounded-full bg-green-500" />
|
||||
Config is valid
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<textarea
|
||||
value={content}
|
||||
onChange={(e) => {
|
||||
setContent(e.target.value)
|
||||
// Reset validated state if user edits after validation
|
||||
if (phase === 'validated' || phase === 'saved') setPhase('edit')
|
||||
}}
|
||||
readOnly={isActive}
|
||||
rows={24}
|
||||
spellCheck={false}
|
||||
className="w-full rounded-lg border border-border bg-zinc-950 p-4 font-mono text-xs text-zinc-100 focus:outline-none focus:ring-1 focus:ring-ring resize-y disabled:opacity-50"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Action buttons */}
|
||||
<div className="flex items-center gap-3">
|
||||
{(phase === 'edit' || phase === 'validated' || phase === 'saved') && (
|
||||
<button
|
||||
onClick={() => setDialogPending('validate')}
|
||||
disabled={isActive || !content.trim()}
|
||||
className="rounded-lg border border-border px-4 py-2 text-sm hover:bg-muted/50 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Validate
|
||||
</button>
|
||||
)}
|
||||
{(phase === 'validated') && (
|
||||
<button
|
||||
onClick={() => setDialogPending('save')}
|
||||
disabled={isActive}
|
||||
className="rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Save + Reload
|
||||
</button>
|
||||
)}
|
||||
{(phase === 'validated' || phase === 'saved') && (
|
||||
<button
|
||||
onClick={handleEditAgain}
|
||||
className="rounded-lg border border-border px-4 py-2 text-sm hover:bg-muted/50 transition-colors"
|
||||
>
|
||||
Edit again
|
||||
</button>
|
||||
)}
|
||||
{phase === 'saved' && (
|
||||
<Link
|
||||
href="/caddy"
|
||||
className="rounded-lg border border-border px-4 py-2 text-sm hover:bg-muted/50 transition-colors"
|
||||
>
|
||||
← Back to Caddy
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Write flow terminal (step 1 of validate) */}
|
||||
{(phase === 'writing' || phase === 'validating' || (writeFlow.status !== 'idle' && writeFlow.lines.length > 0)) && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-xs text-muted-foreground">Writing config…</p>
|
||||
<StreamingTerminal
|
||||
lines={writeFlow.lines}
|
||||
status={writeFlow.status === 'done' ? 'done' : writeFlow.status}
|
||||
error={writeFlow.error}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Validate flow terminal (step 2 of validate) */}
|
||||
{(phase === 'validating' || phase === 'validated' || (validateFlow.status !== 'idle')) && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-xs text-muted-foreground">Validating config…</p>
|
||||
<StreamingTerminal
|
||||
lines={validateFlow.lines}
|
||||
status={validateFlow.status}
|
||||
error={validateFlow.error}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Reload flow terminal */}
|
||||
{(phase === 'saving' || phase === 'saved' || (reloadFlow.status !== 'idle')) && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-xs text-muted-foreground">Reloading Caddy…</p>
|
||||
<StreamingTerminal
|
||||
lines={reloadFlow.lines}
|
||||
status={reloadFlow.status}
|
||||
error={reloadFlow.error}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Confirm dialogs */}
|
||||
<ConfirmDialog
|
||||
open={dialogPending === 'validate'}
|
||||
title="Validate Caddyfile"
|
||||
commandPreview={VALIDATE_PREVIEW}
|
||||
onConfirm={handleValidateConfirm}
|
||||
onCancel={() => setDialogPending(null)}
|
||||
/>
|
||||
<ConfirmDialog
|
||||
open={dialogPending === 'save'}
|
||||
title="Save + Reload Caddy"
|
||||
commandPreview={SAVE_PREVIEW}
|
||||
onConfirm={handleSaveConfirm}
|
||||
onCancel={() => setDialogPending(null)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
43
app/caddy/edit/page.tsx
Normal file
43
app/caddy/edit/page.tsx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { redirect } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { getCurrentUser } from '@/lib/session'
|
||||
import { execAgent } from '@/lib/agent-client'
|
||||
import CaddyEditor from '../_components/caddy-editor'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function CaddyEditPage() {
|
||||
const user = await getCurrentUser()
|
||||
if (!user) redirect('/login')
|
||||
|
||||
let initialContent = ''
|
||||
let initialError: string | null = null
|
||||
try {
|
||||
initialContent = await execAgent('caddy_show_config')
|
||||
} catch (err) {
|
||||
initialError = err instanceof Error ? err.message : 'failed to load config'
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-background p-6">
|
||||
<div className="mx-auto max-w-4xl space-y-6">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link
|
||||
href="/caddy"
|
||||
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
← Caddy
|
||||
</Link>
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold tracking-tight">Edit Caddyfile</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Edit, validate, then save and reload Caddy
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CaddyEditor initialContent={initialContent} initialError={initialError} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import { redirect } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { codeToHtml } from 'shiki'
|
||||
import { getCurrentUser } from '@/lib/session'
|
||||
import { execAgent } from '@/lib/agent-client'
|
||||
|
|
@ -41,7 +42,15 @@ export default async function CaddyPage() {
|
|||
</div>
|
||||
|
||||
<section className="space-y-3">
|
||||
<h2 className="text-lg font-medium tracking-tight">Caddyfile</h2>
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-lg font-medium tracking-tight">Caddyfile</h2>
|
||||
<Link
|
||||
href="/caddy/edit"
|
||||
className="rounded-md border border-border px-3 py-1 text-xs hover:bg-muted/50 transition-colors"
|
||||
>
|
||||
Edit
|
||||
</Link>
|
||||
</div>
|
||||
{configError ? (
|
||||
<div className="rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive">
|
||||
{configError}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
import { useCallback, useEffect, useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { type Container, parseDockerPs } from '@/lib/parse-docker'
|
||||
import { useFlowRun } from '@/hooks/useFlowRun'
|
||||
import ConfirmDialog from '@/components/ConfirmDialog'
|
||||
import StreamingTerminal from '@/components/StreamingTerminal'
|
||||
|
||||
async function fetchContainers(): Promise<Container[]> {
|
||||
const res = await fetch('/api/agent/exec', {
|
||||
|
|
@ -68,6 +71,13 @@ function statusBadge(status: string) {
|
|||
)
|
||||
}
|
||||
|
||||
type ActionDef = {
|
||||
commandKey: string
|
||||
args: string[]
|
||||
preview: string
|
||||
title: string
|
||||
}
|
||||
|
||||
type Props = {
|
||||
initialContainers: Container[]
|
||||
initialError: string | null
|
||||
|
|
@ -78,6 +88,8 @@ export default function DockerTable({ initialContainers, initialError }: Props)
|
|||
const [error, setError] = useState<string | null>(initialError)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
const [lastUpdated, setLastUpdated] = useState<Date>(new Date())
|
||||
const [pendingAction, setPendingAction] = useState<ActionDef | null>(null)
|
||||
const flowRun = useFlowRun()
|
||||
|
||||
const refresh = useCallback(async () => {
|
||||
setRefreshing(true)
|
||||
|
|
@ -98,6 +110,12 @@ export default function DockerTable({ initialContainers, initialError }: Props)
|
|||
return () => clearInterval(id)
|
||||
}, [refresh])
|
||||
|
||||
const handleConfirm = useCallback(() => {
|
||||
if (!pendingAction) return
|
||||
flowRun.start(pendingAction.commandKey, pendingAction.args)
|
||||
setPendingAction(null)
|
||||
}, [pendingAction, flowRun.start])
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
|
|
@ -129,12 +147,13 @@ export default function DockerTable({ initialContainers, initialError }: Props)
|
|||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Status</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Ports</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Uptime</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{containers.length === 0 && !error ? (
|
||||
<tr>
|
||||
<td colSpan={5} className="px-4 py-8 text-center text-muted-foreground">
|
||||
<td colSpan={6} className="px-4 py-8 text-center text-muted-foreground">
|
||||
No containers running
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -158,12 +177,69 @@ export default function DockerTable({ initialContainers, initialError }: Props)
|
|||
{c.ports || '—'}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-xs text-muted-foreground">{c.created}</td>
|
||||
<td className="px-4 py-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() =>
|
||||
setPendingAction({
|
||||
commandKey: 'docker_compose_restart',
|
||||
args: [c.name],
|
||||
preview: `docker compose restart ${c.name}`,
|
||||
title: `Restart ${c.name}`,
|
||||
})
|
||||
}
|
||||
disabled={flowRun.status === 'running'}
|
||||
className="rounded-md border border-border px-2 py-1 text-xs hover:bg-muted/50 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Restart
|
||||
</button>
|
||||
<button
|
||||
onClick={() =>
|
||||
setPendingAction({
|
||||
commandKey: 'docker_compose_stop',
|
||||
args: [c.name],
|
||||
preview: `docker compose stop ${c.name}`,
|
||||
title: `Stop ${c.name}`,
|
||||
})
|
||||
}
|
||||
disabled={flowRun.status === 'running'}
|
||||
className="rounded-md border border-destructive/30 px-2 py-1 text-xs text-destructive hover:bg-destructive/10 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Stop
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{flowRun.status !== 'idle' && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm font-medium text-foreground">Output</span>
|
||||
{flowRun.status !== 'running' && (
|
||||
<button
|
||||
onClick={flowRun.reset}
|
||||
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<StreamingTerminal lines={flowRun.lines} status={flowRun.status} error={flowRun.error} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ConfirmDialog
|
||||
open={pendingAction !== null}
|
||||
title={pendingAction?.title ?? ''}
|
||||
commandPreview={pendingAction?.preview ?? ''}
|
||||
onConfirm={handleConfirm}
|
||||
onCancel={() => setPendingAction(null)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
import { useCallback, useEffect, useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { type RepoStatus, parseGitStatus } from '@/lib/parse-git'
|
||||
import { useFlowRun } from '@/hooks/useFlowRun'
|
||||
import ConfirmDialog from '@/components/ConfirmDialog'
|
||||
import StreamingTerminal from '@/components/StreamingTerminal'
|
||||
|
||||
interface RepoEntry {
|
||||
path: string
|
||||
|
|
@ -78,6 +81,13 @@ function statusBadge(status: RepoStatus) {
|
|||
)
|
||||
}
|
||||
|
||||
type ActionDef = {
|
||||
commandKey: string
|
||||
args: string[]
|
||||
preview: string
|
||||
title: string
|
||||
}
|
||||
|
||||
type Props = {
|
||||
initialRepos: RepoEntry[]
|
||||
}
|
||||
|
|
@ -86,6 +96,8 @@ export default function GitReposList({ initialRepos }: Props) {
|
|||
const [repos, setRepos] = useState<RepoEntry[]>(initialRepos)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
const [lastUpdated, setLastUpdated] = useState<Date>(new Date())
|
||||
const [pendingAction, setPendingAction] = useState<ActionDef | null>(null)
|
||||
const flowRun = useFlowRun()
|
||||
|
||||
const refresh = useCallback(async () => {
|
||||
setRefreshing(true)
|
||||
|
|
@ -112,6 +124,12 @@ export default function GitReposList({ initialRepos }: Props) {
|
|||
return () => clearInterval(id)
|
||||
}, [refresh])
|
||||
|
||||
const handleConfirm = useCallback(() => {
|
||||
if (!pendingAction) return
|
||||
flowRun.start(pendingAction.commandKey, pendingAction.args)
|
||||
setPendingAction(null)
|
||||
}, [pendingAction, flowRun.start])
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
|
|
@ -137,6 +155,7 @@ export default function GitReposList({ initialRepos }: Props) {
|
|||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Status</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Ahead</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Path</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -173,11 +192,69 @@ export default function GitReposList({ initialRepos }: Props) {
|
|||
)}
|
||||
</td>
|
||||
<td className="px-4 py-3 font-mono text-xs text-muted-foreground">{r.path}</td>
|
||||
<td className="px-4 py-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() =>
|
||||
setPendingAction({
|
||||
commandKey: 'git_fetch',
|
||||
args: [r.path],
|
||||
preview: `git fetch --quiet\n(in ${r.path})`,
|
||||
title: `Fetch ${r.name}`,
|
||||
})
|
||||
}
|
||||
disabled={flowRun.status === 'running'}
|
||||
className="rounded-md border border-border px-2 py-1 text-xs hover:bg-muted/50 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Fetch
|
||||
</button>
|
||||
<button
|
||||
onClick={() =>
|
||||
setPendingAction({
|
||||
commandKey: 'git_pull',
|
||||
args: [r.path],
|
||||
preview: `git pull --ff-only\n(in ${r.path})`,
|
||||
title: `Pull ${r.name}`,
|
||||
})
|
||||
}
|
||||
disabled={flowRun.status === 'running' || r.status?.dirty === true}
|
||||
title={r.status?.dirty ? 'Working tree is dirty — commit or stash changes first' : undefined}
|
||||
className="rounded-md border border-border px-2 py-1 text-xs hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
Pull
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{flowRun.status !== 'idle' && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm font-medium text-foreground">Output</span>
|
||||
{flowRun.status !== 'running' && (
|
||||
<button
|
||||
onClick={flowRun.reset}
|
||||
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<StreamingTerminal lines={flowRun.lines} status={flowRun.status} error={flowRun.error} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ConfirmDialog
|
||||
open={pendingAction !== null}
|
||||
title={pendingAction?.title ?? ''}
|
||||
commandPreview={pendingAction?.preview ?? ''}
|
||||
onConfirm={handleConfirm}
|
||||
onCancel={() => setPendingAction(null)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
import { useCallback, useEffect, useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { parseSystemctlStatus, type UnitStatus, type ActiveState } from '@/lib/parse-systemd'
|
||||
import { useFlowRun } from '@/hooks/useFlowRun'
|
||||
import ConfirmDialog from '@/components/ConfirmDialog'
|
||||
import StreamingTerminal from '@/components/StreamingTerminal'
|
||||
|
||||
interface UnitEntry {
|
||||
unit: string
|
||||
|
|
@ -84,6 +87,13 @@ function StatusBadge({ status }: { status: UnitStatus }) {
|
|||
)
|
||||
}
|
||||
|
||||
type ActionDef = {
|
||||
commandKey: string
|
||||
args: string[]
|
||||
preview: string
|
||||
title: string
|
||||
}
|
||||
|
||||
type Props = {
|
||||
initialUnits: UnitEntry[]
|
||||
}
|
||||
|
|
@ -92,6 +102,8 @@ export default function SystemdUnitsList({ initialUnits }: Props) {
|
|||
const [units, setUnits] = useState<UnitEntry[]>(initialUnits)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
const [lastUpdated, setLastUpdated] = useState<Date>(new Date())
|
||||
const [pendingAction, setPendingAction] = useState<ActionDef | null>(null)
|
||||
const flowRun = useFlowRun()
|
||||
|
||||
const refresh = useCallback(async () => {
|
||||
setRefreshing(true)
|
||||
|
|
@ -118,6 +130,12 @@ export default function SystemdUnitsList({ initialUnits }: Props) {
|
|||
return () => clearInterval(id)
|
||||
}, [refresh])
|
||||
|
||||
const handleConfirm = useCallback(() => {
|
||||
if (!pendingAction) return
|
||||
flowRun.start(pendingAction.commandKey, pendingAction.args)
|
||||
setPendingAction(null)
|
||||
}, [pendingAction, flowRun.start])
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
|
|
@ -142,6 +160,7 @@ export default function SystemdUnitsList({ initialUnits }: Props) {
|
|||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Description</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Status</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Uptime</th>
|
||||
<th className="px-4 py-3 text-left font-medium text-muted-foreground">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -173,11 +192,52 @@ export default function SystemdUnitsList({ initialUnits }: Props) {
|
|||
<td className="px-4 py-3 text-xs text-muted-foreground">
|
||||
{entry.status?.uptime || '—'}
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<button
|
||||
onClick={() =>
|
||||
setPendingAction({
|
||||
commandKey: 'systemctl_restart',
|
||||
args: [entry.unit],
|
||||
preview: `sudo /usr/bin/systemctl restart ${entry.unit}`,
|
||||
title: `Restart ${entry.unit}`,
|
||||
})
|
||||
}
|
||||
disabled={flowRun.status === 'running'}
|
||||
className="rounded-md border border-border px-2 py-1 text-xs hover:bg-muted/50 disabled:opacity-50 transition-colors"
|
||||
>
|
||||
Restart
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{flowRun.status !== 'idle' && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm font-medium text-foreground">Output</span>
|
||||
{flowRun.status !== 'running' && (
|
||||
<button
|
||||
onClick={flowRun.reset}
|
||||
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<StreamingTerminal lines={flowRun.lines} status={flowRun.status} error={flowRun.error} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ConfirmDialog
|
||||
open={pendingAction !== null}
|
||||
title={pendingAction?.title ?? ''}
|
||||
commandPreview={pendingAction?.preview ?? ''}
|
||||
onConfirm={handleConfirm}
|
||||
onCancel={() => setPendingAction(null)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,18 @@ commands:
|
|||
- postgres
|
||||
description: "Restart a docker compose service (ops-agent user must be in the docker group)"
|
||||
|
||||
docker_compose_stop:
|
||||
cmd: ["docker", "compose", "stop"]
|
||||
cwd: "/srv/scrum4me/compose"
|
||||
args:
|
||||
allowed:
|
||||
- scrum4me-web
|
||||
- worker-idea
|
||||
- ops-dashboard
|
||||
- caddy
|
||||
- postgres
|
||||
description: "Stop a docker compose service"
|
||||
|
||||
docker_compose_build:
|
||||
cmd: ["docker", "compose", "build"]
|
||||
cwd: "/srv/scrum4me/compose"
|
||||
|
|
|
|||
526
package-lock.json
generated
526
package-lock.json
generated
|
|
@ -23,6 +23,7 @@
|
|||
"react": "19.2.4",
|
||||
"react-dom": "19.2.4",
|
||||
"shadcn": "^4.7.0",
|
||||
"shiki": "^1.29.2",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tw-animate-css": "^1.4.0"
|
||||
},
|
||||
|
|
@ -2065,6 +2066,75 @@
|
|||
"integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@shikijs/core": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.29.2.tgz",
|
||||
"integrity": "sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/engine-javascript": "1.29.2",
|
||||
"@shikijs/engine-oniguruma": "1.29.2",
|
||||
"@shikijs/types": "1.29.2",
|
||||
"@shikijs/vscode-textmate": "^10.0.1",
|
||||
"@types/hast": "^3.0.4",
|
||||
"hast-util-to-html": "^9.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/engine-javascript": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.2.tgz",
|
||||
"integrity": "sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/types": "1.29.2",
|
||||
"@shikijs/vscode-textmate": "^10.0.1",
|
||||
"oniguruma-to-es": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/engine-oniguruma": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz",
|
||||
"integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/types": "1.29.2",
|
||||
"@shikijs/vscode-textmate": "^10.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/langs": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.2.tgz",
|
||||
"integrity": "sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/types": "1.29.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/themes": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.2.tgz",
|
||||
"integrity": "sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/types": "1.29.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/types": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz",
|
||||
"integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/vscode-textmate": "^10.0.1",
|
||||
"@types/hast": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/vscode-textmate": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz",
|
||||
"integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@sindresorhus/merge-streams": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz",
|
||||
|
|
@ -2408,6 +2478,24 @@
|
|||
"integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/hast": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
|
||||
"integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mdast": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
|
||||
"integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.41",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.41.tgz",
|
||||
|
|
@ -2462,12 +2550,24 @@
|
|||
"integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||
"integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/validate-npm-package-name": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
|
||||
"integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz",
|
||||
"integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
||||
|
|
@ -2837,6 +2937,16 @@
|
|||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/ccount": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
|
||||
"integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "5.6.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
|
||||
|
|
@ -2849,6 +2959,26 @@
|
|||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/character-entities-html4": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
|
||||
"integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/character-entities-legacy": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
|
||||
"integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "4.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.5.1.tgz",
|
||||
|
|
@ -3018,6 +3148,16 @@
|
|||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/comma-separated-tokens": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
|
||||
"integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "14.0.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
|
||||
|
|
@ -3304,6 +3444,15 @@
|
|||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/dequal": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
||||
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/destr": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
|
||||
|
|
@ -3320,6 +3469,19 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/devlop": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
|
||||
"integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dequal": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "8.0.4",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-8.0.4.tgz",
|
||||
|
|
@ -3400,6 +3562,12 @@
|
|||
"integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/emoji-regex-xs": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz",
|
||||
"integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/empathic": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz",
|
||||
|
|
@ -4081,6 +4249,42 @@
|
|||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-to-html": {
|
||||
"version": "9.0.5",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz",
|
||||
"integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/hast": "^3.0.0",
|
||||
"@types/unist": "^3.0.0",
|
||||
"ccount": "^2.0.0",
|
||||
"comma-separated-tokens": "^2.0.0",
|
||||
"hast-util-whitespace": "^3.0.0",
|
||||
"html-void-elements": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.0.0",
|
||||
"property-information": "^7.0.0",
|
||||
"space-separated-tokens": "^2.0.0",
|
||||
"stringify-entities": "^4.0.0",
|
||||
"zwitch": "^2.0.4"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/hast-util-whitespace": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
|
||||
"integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/hast": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/headers-polyfill": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-5.0.1.tgz",
|
||||
|
|
@ -4100,6 +4304,16 @@
|
|||
"node": ">=16.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/html-void-elements": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz",
|
||||
"integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/http-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
|
|
@ -4876,6 +5090,27 @@
|
|||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast": {
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
|
||||
"integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/hast": "^3.0.0",
|
||||
"@types/mdast": "^4.0.0",
|
||||
"@ungap/structured-clone": "^1.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-util-sanitize-uri": "^2.0.0",
|
||||
"trim-lines": "^3.0.0",
|
||||
"unist-util-position": "^5.0.0",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vfile": "^6.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
||||
|
|
@ -4912,6 +5147,95 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark-util-character": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
|
||||
"integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark-util-encode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
|
||||
"integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/micromark-util-sanitize-uri": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
|
||||
"integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-encode": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark-util-symbol": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
|
||||
"integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/micromark-util-types": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
|
||||
"integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
|
|
@ -5363,6 +5687,17 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/oniguruma-to-es": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz",
|
||||
"integrity": "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"emoji-regex-xs": "^1.0.0",
|
||||
"regex": "^5.1.1",
|
||||
"regex-recursion": "^5.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/open": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz",
|
||||
|
|
@ -5824,6 +6159,16 @@
|
|||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/property-information": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz",
|
||||
"integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-addr": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
|
|
@ -5972,6 +6317,31 @@
|
|||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/regex": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz",
|
||||
"integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"regex-utilities": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/regex-recursion": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz",
|
||||
"integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"regex": "^5.1.1",
|
||||
"regex-utilities": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/regex-utilities": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz",
|
||||
"integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/remeda": {
|
||||
"version": "2.33.4",
|
||||
"resolved": "https://registry.npmjs.org/remeda/-/remeda-2.33.4.tgz",
|
||||
|
|
@ -6314,6 +6684,22 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shiki": {
|
||||
"version": "1.29.2",
|
||||
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.29.2.tgz",
|
||||
"integrity": "sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/core": "1.29.2",
|
||||
"@shikijs/engine-javascript": "1.29.2",
|
||||
"@shikijs/engine-oniguruma": "1.29.2",
|
||||
"@shikijs/langs": "1.29.2",
|
||||
"@shikijs/themes": "1.29.2",
|
||||
"@shikijs/types": "1.29.2",
|
||||
"@shikijs/vscode-textmate": "^10.0.1",
|
||||
"@types/hast": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
|
|
@ -6422,6 +6808,16 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/space-separated-tokens": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
|
||||
"integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/split2": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
|
||||
|
|
@ -6490,6 +6886,20 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/stringify-entities": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
|
||||
"integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"character-entities-html4": "^2.0.0",
|
||||
"character-entities-legacy": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/stringify-object": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-5.0.0.tgz",
|
||||
|
|
@ -6666,6 +7076,16 @@
|
|||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/trim-lines": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
|
||||
"integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-morph": {
|
||||
"version": "26.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz",
|
||||
|
|
@ -6820,6 +7240,74 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-is": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
|
||||
"integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-position": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz",
|
||||
"integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-stringify-position": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
|
||||
"integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-visit": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz",
|
||||
"integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"unist-util-is": "^6.0.0",
|
||||
"unist-util-visit-parents": "^6.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-visit-parents": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz",
|
||||
"integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"unist-util-is": "^6.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
||||
|
|
@ -6931,6 +7419,34 @@
|
|||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/vfile": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
|
||||
"integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"vfile-message": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/vfile-message": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz",
|
||||
"integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"unist-util-stringify-position": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/web-streams-polyfill": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
|
||||
|
|
@ -7191,6 +7707,16 @@
|
|||
"peerDependencies": {
|
||||
"zod": "^3.25.28 || ^4"
|
||||
}
|
||||
},
|
||||
"node_modules/zwitch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
|
||||
"integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue