* Bump commander.js to latest version. * Update gn command to work with new commander. * Fix build_config handling in various commands.
build/commands
* Replace imports. * Migrate config.js to TS. * Replace build references. * Adjust TargetOS to infer from a runtime list. * Apply stricter rules for optional properties. * Restore options.outputDir to keep the PR without any logic change.
Make Log functions global in `build/commands`.
The PR converts format.js (build/commands/) to TypeScript