Extract YAML validation to separate module

- Created yaml-validator.js with pure validation functions
- Removed redundant checkYAMLFormatting function (rely on js-yaml)
- Fixed function shadowing issues by using window._validateYAMLPure
- Updated nginx config to serve JS files with correct MIME type
- Improved error reporting with line/column numbers from js-yaml
This commit is contained in:
robojerk 2025-10-31 13:28:38 -07:00
parent 4e108c7d7f
commit 8d2def360e
4 changed files with 201 additions and 116 deletions

View file

@ -15,6 +15,7 @@ services:
# Hot reload frontend (optional, for development)
- ./index.html:/usr/share/nginx/html/index.html:ro,z
- ./manage.html:/usr/share/nginx/html/manage.html:ro,z
- ./yaml-validator.js:/usr/share/nginx/html/yaml-validator.js:ro,z
environment:
# Set working directory for database
- PWD=/app/data