1'use strict'; 2 3/** 4 * Handle a Promise from running code that potentially does Top-Level Await. 5 * In that case, it makes sense to set the exit code to a specific non-zero value 6 * if the main code never finishes running. 7 */ 8function handleProcessExit() { 9 process.exitCode ??= 13; 10} 11 12module.exports = { 13 handleProcessExit, 14}; 15