MCPcopy Index your code
hub / github.com/nodejs/node / runEntryPointWithESMLoader

Function runEntryPointWithESMLoader

lib/internal/modules/run_main.js:122–129  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

120 * @returns {Promise}
121 */
122function 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.

Callers 2

executeUserEntryPointFunction · 0.85
worker_thread.jsFile · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…