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

Method run

lib/internal/modules/esm/module_job.js:436–453  ·  view source on GitHub ↗
(isEntryPoint = false)

Source from the content-addressed store, hash-verified

434 }
435
436 async run(isEntryPoint = false) {
437 debug('ModuleJob.run()', this.module);
438 assert(this.shouldRunModule(this.phase));
439 await this.#instantiate();
440 if (isEntryPoint) {
441 globalThis[entry_point_module_private_symbol] = this.module;
442 }
443 const timeout = -1;
444 const breakOnSigint = false;
445 setHasStartedUserESMExecution();
446 try {
447 await this.module.evaluate(timeout, breakOnSigint);
448 } catch (e) {
449 explainCommonJSGlobalLikeNotDefinedError(e, this.module.url, this.module.hasTopLevelAwait);
450 throw e;
451 }
452 return { __proto__: null, module: this.module };
453 }
454}
455
456/**

Callers 2

executeModuleJobMethod · 0.95
importMethod · 0.45

Calls 7

#instantiateMethod · 0.95
shouldRunModuleMethod · 0.80
debugFunction · 0.50
assertFunction · 0.50
evaluateMethod · 0.45

Tested by

no test coverage detected