Detect and manage npm lifecycle scripts.
npm packages can define preinstall, install, postinstall,
prepare, and other scripts in their package.json.
By default, npm_ex does NOT run lifecycle scripts for security. This module provides detection and opt-in execution.
Summary
Functions
Detect lifecycle scripts in a package's package.json.
Detect lifecycle scripts across all packages in node_modules.
List the install hook names.
Functions
Detect lifecycle scripts in a package's package.json.
Returns a list of {hook_name, command} tuples for install-related hooks.
Detect lifecycle scripts across all packages in node_modules.
Returns a map of package_name => [{hook, command}] for packages
that have install-related scripts.
@spec hook_names() :: [String.t()]
List the install hook names.