From 484d6a139c75cd16e38ba3f747d12b5764289879 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 18 Jun 2024 16:59:02 -0300 Subject: [PATCH] doc: add built-in dc for module loading --- doc/api/diagnostics_channel.md | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index ce2aae7705f98a..c9df07589c417c 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -1117,6 +1117,64 @@ Emitted when server receives a request. Emitted when server sends a response. +#### Modules + +`module.require.start` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `require()`. Module name. + * `name` - Event name. + * `parentFilename` - Name of the module that attempted to require(id). + +Emitted when `require()` is executed + +`module.require.end` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `require()`. Module name. + * `name` - Event name. + * `parentFilename` - Name of the module that attempted to require(id). + +Emitted when a `require()` call returns + +`module.require.error` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `require()`. Module name. + * `name` - Event name. + * `parentFilename` - Name of the module that attempted to require(id). +* `error` {Error} + +Emitted when a `require()` throws an error + +`module.import.asyncStart` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `import()`. Module name. + * `name` - Event name. + * `parentURL` - URL object of the module that attempted to import(id). + +Emitted when `import()` is invoked. + +`module.import.asyncEnd` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `import()`. Module name. + * `name` - Event name. + * `parentURL` - URL object of the module that attempted to import(id). + +Emitted when `import()` has completed. + +`module.import.error` + +* `event` {Object} containing the following properties + * `id` - Argument passed to `import()`. Module name. + * `name` - Event name. + * `parentURL` - URL object of the module that attempted to import(id). +* `error` {Error} + +Emitted when a `import()` throws an error + #### NET `net.client.socket`