import fs from 'node:fs'; import { execFileSync } from 'node:child_process'; let code = fs.readFileSync('.qa/reproducible-env-c-promotion.mjs', 'utf8') .replaceAll('reproducible-env-c', 'embedded-browser').replaceAll('1.21.0', '1.22.0') .replaceAll('candidate C', 'candidate 1.22'); fs.writeFileSync('.qa/embedded-browser-promotion.mjs', code, { flag: 'wx' }); execFileSync(process.execPath, ['--check', '.qa/embedded-browser-promotion.mjs'], { windowsHide: true, stdio: 'pipe' }); console.log(JSON.stringify({ success: true, action: 'Prepared gated promotion; not executed' }));