* This initializes the ESM loader and runs --import (if any) before executing the * callback to run the entry point. * If the callback intends to evaluate a ESM module as entry point, it should return * the corresponding ModuleWrap so that stalled TLA can be checked a process exit. * @param {fun
(callback)
| 120 | * @returns {Promise} |
| 121 | */ |
| 122 | function runEntryPointWithESMLoader(callback) { |
| 123 | const promise = asyncRunEntryPointWithESMLoader(callback); |
| 124 | // Register the promise - if by the time the event loop finishes running, this is |
| 125 | // still unsettled, we'll search the graph from the entry point module and print |
| 126 | // the location of any unsettled top-level await found. |
| 127 | globalThis[entry_point_promise_private_symbol] = promise; |
| 128 | return promise; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Parse the CLI main entry point string and run it. |
no test coverage detected
searching dependent graphs…