
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@tinkoff/hook-runner
Advanced tools
Library used for subscription on specific events in different styles: sync, async, promise.
Library used for subscription on specific events in different styles: sync, async, promise.
Working with lib consist of two phases:
runAsyncHooks, with unique event key and additional parameters. It creates a slot for this event that allow to subscribe on the event.registerHooks that will be executed when run... function will be calledThere is different types hooks that are not interoperable. So carefully add new registrations with checking expected hook type.
Also you should preserve data chain, e.g. return data with same interface from hook, as it otherwise may break other hooks.
Create new instance of @tinkoff/hook-runner
import { Hooks } from '@tinkoff/hook-runner';
const hookRunner = new Hooks();
Register new hook for a specific key.
Execute sync hooks. payload is passed through every hook and will be returned as a result (it may be changed by hooks).
Executes async hooks using setTimeout. payload is passed to every hook with its initial value.
Execute promise-based hooks. payload is passed through every hook and will be returned as a result (it may be changed by hooks)
Accepts (context, payload, options). Hooks are running in order passing previous hook result as input for next hook.
Accepts (context, payload, options). Hooks are running independently from each other.
Accepts (context, payload, options). Hooks are running in order passing previous hook result as input for next hook with wrapping call in promise.
FAQs
Library used for subscription on specific events in different styles: sync, async, promise.
The npm package @tinkoff/hook-runner receives a total of 57 weekly downloads. As such, @tinkoff/hook-runner popularity was classified as not popular.
We found that @tinkoff/hook-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.