Some checks failed
CI / Lint (bash) (push) Has been cancelled
CI / Lint (markdown) (push) Has been cancelled
CI / Lint (nickel) (push) Has been cancelled
CI / Lint (nushell) (push) Has been cancelled
CI / Lint (rust) (push) Has been cancelled
CI / Benchmark (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / License Compliance (push) Has been cancelled
CI / Code Coverage (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (macos-latest) (push) Has been cancelled
CI / Build (ubuntu-latest) (push) Has been cancelled
CI / Build (windows-latest) (push) Has been cancelled
Replace all TOML form definitions in examples/ and config/ with type-checked Nickel equivalents. Update cli_loader to prefer .ncl (via nickel export) over .toml in config search order. TOML support retained as fallback — no breaking change. - El loader usa nickel export --format json + serde_json como puente — evita reimplementar un parser Nickel en Rust y aprovecha el binario ya existente. - El orden de búsqueda .ncl > .toml permite migración incremental: cualquier config vieja sigue funcionando sin tocarla. - Los contratos Nickel (| default, | String) en los configs sustituyen la validación que antes era implícita en el parsing TOML — el error llega antes (en nickel export) con mensajes más descriptivos.
39 lines
2.1 KiB
Plaintext
39 lines
2.1 KiB
Plaintext
{
|
|
name = "Tracker Configuration with Arrays",
|
|
description = "Example showing RepeatingGroup arrays for multiple trackers",
|
|
display_mode = "complete",
|
|
elements = [
|
|
# Header
|
|
{ type = "section_header", name = "main_header", title = "🎯 Tracker Configuration", border_top = true, border_bottom = true },
|
|
|
|
# Introduction
|
|
{ type = "section", name = "intro", content = "Configure multiple UDP and HTTP tracker listeners. You can add, edit, or delete trackers as needed." },
|
|
|
|
# Tracker mode selection
|
|
{ type = "select", name = "tracker_mode", prompt = "Tracker Mode", required = true, default = "public", options = [
|
|
{ value = "public", label = "Public Tracker" },
|
|
{ value = "private", label = "Private Tracker" },
|
|
]
|
|
},
|
|
|
|
# UDP Trackers array
|
|
{ type = "repeatinggroup", name = "udp_trackers", prompt = "UDP Tracker Listeners", required = false, default_items = 1, min_items = 0, max_items = 4, unique = true, fragment = "fragments/tracker-udp-item.toml", help = "Add UDP tracker listener addresses (must be unique). Standard BitTorrent port is 6969." },
|
|
|
|
# HTTP Trackers array
|
|
{ type = "repeatinggroup", name = "http_trackers", prompt = "HTTP Tracker Listeners", required = false, default_items = 1, min_items = 0, max_items = 4, unique = true, fragment = "fragments/tracker-http-item.toml", help = "Add HTTP tracker listener addresses (must be unique). Standard HTTP port is 80, HTTPS is 443." },
|
|
|
|
# API Configuration section
|
|
{ type = "section_header", name = "api_header", title = "📡 API Configuration", border_top = true, border_bottom = true },
|
|
|
|
# API Token
|
|
{ type = "password", name = "api_token", prompt = "Admin API Token", required = true, help = "Secure token for API authentication" },
|
|
|
|
# API Port
|
|
{ type = "text", name = "api_port", prompt = "API Port", required = true, default = "1212", placeholder = "1212" },
|
|
|
|
# Summary
|
|
{ type = "section_header", name = "summary_header", title = "✅ Configuration Summary", border_top = true },
|
|
{ type = "section", name = "summary", content = "Review your tracker configuration above. Click submit to save settings." },
|
|
],
|
|
}
|