@@ -4,6 +4,7 @@ import {Command} from 'commander/esm.mjs';
44import { execSync } from 'child_process' ;
55import { fileURLToPath } from 'url' ;
66import fg from 'fast-glob' ;
7+ import { sanitizeInput } from './util/Sanitizer.mjs' ;
78
89const ROOT_DIR = process . cwd ( ) ;
910const LEARN_DIR = path . resolve ( ROOT_DIR , 'learn' ) ;
@@ -542,12 +543,12 @@ async function runCli() {
542543 program
543544 . name ( 'generate-seo-files' )
544545 . description ( 'Generates sitemap.xml and llms.txt for SEO purposes.' )
545- . option ( '-f, --format <type>' , 'Output format: array, objects, urls, xml, llms' )
546- . option ( '--base-url <url>' , 'Absolute base URL (e.g., https://neomjs.com)' )
547- . option ( '--base-path <path>' , 'Base path for content routes' )
548- . option ( '-o, --output <path>' , 'Output file path' )
549- . option ( '--no-lastmod' , 'Exclude <lastmod> tags from sitemap.xml' )
550- . option ( '--no-top-level' , 'Exclude top-level routes' ) ;
546+ . option ( '-f, --format <type>' , 'Output format: array, objects, urls, xml, llms' , sanitizeInput )
547+ . option ( '--base-url <url>' , 'Absolute base URL (e.g., https://neomjs.com)' , sanitizeInput )
548+ . option ( '--base-path <path>' , 'Base path for content routes' , sanitizeInput )
549+ . option ( '-o, --output <path>' , 'Output file path' , sanitizeInput )
550+ . option ( '--no-lastmod' , 'Exclude <lastmod> tags from sitemap.xml' )
551+ . option ( '--no-top-level' , 'Exclude top-level routes' ) ;
551552
552553 program . parse ( process . argv ) ;
553554
0 commit comments