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.
50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "🌐 Running nickel-roundtrip with Web backend..."
|
|
echo ""
|
|
|
|
# Check if config.ncl exists
|
|
if [ ! -f "config.ncl" ]; then
|
|
echo "❌ config.ncl not found! Run ./01-generate-initial-config.sh first"
|
|
exit 1
|
|
fi
|
|
|
|
# Backup current config
|
|
cp config.ncl "config.ncl.backup.$(date +%Y%m%d_%H%M%S)"
|
|
|
|
echo "Starting web server on http://localhost:8080"
|
|
echo "Your browser should open automatically..."
|
|
echo ""
|
|
echo "Features:"
|
|
echo " ✓ All fields pre-populated with current values"
|
|
echo " ✓ Real-time validation"
|
|
echo " ✓ HTML diff viewer on submit"
|
|
echo " ✓ Download button for config.ncl"
|
|
echo " ✓ Auto-close after 30 seconds"
|
|
echo ""
|
|
echo "Press Ctrl+C after form is submitted to exit"
|
|
echo ""
|
|
|
|
# Open browser (macOS)
|
|
sleep 2 && open "http://localhost:8080" &
|
|
|
|
# Run roundtrip with Web backend
|
|
cargo run -p typedialog-web --release -- nickel-roundtrip \
|
|
--input config.ncl \
|
|
--form ci-form.ncl \
|
|
--output config.ncl \
|
|
--ncl-template config.ncl.j2 \
|
|
--verbose
|
|
|
|
echo ""
|
|
echo "✅ Roundtrip completed!"
|
|
echo ""
|
|
echo "Review changes:"
|
|
echo " cat config.ncl"
|
|
echo ""
|
|
echo "Run again:"
|
|
echo " ./04-roundtrip-web.sh"
|