
Security News
Rust 1.100 Will Add Dependency Cooldowns to Cargo
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.
@eggjs/eventbus-decorator
Advanced tools
@eggjs/eventbus-decoratorimport { EventBus } from '@eggjs/eventbus-decorator';
// Define event first.
// Ts can check event and args type for you.
declare module '@eggjs/eventbus-decorator' {
interface Events {
hello: (msg: string) => Promise<void>;
}
}
class Foo {
@Inject()
private readonly eventBus: EventBus;
bar() {
this.eventBus.emit('hello', '01');
}
}
Cache events in memory until uncork.
class Foo {
@Inject()
private readonly eventBus: ContextEventBus;
bar() {
this.eventBus.cork();
// ...do something
this.eventBus.emit('hello', '01');
// ...do other things
// emit all cached events
this.eventBus.uncork();
}
}
@Event('hello')
export class Foo {
async handle(msg: string): Promise<void> {
console.log('msg: ', msg);
}
}
@Event('hello')
@Event('hi')
export class Foo {
async handle(msg: string): Promise<void> {
console.log('msg: ', msg);
}
}
inject event context if you want to know which event is being handled. The context param must be the first param
@Event('hello')
@Event('hi')
export class Foo {
async handle(@EventContext() ctx: IEventContext, msg: string): Promise<void> {
console.log('eventName: ', ctx.eventName);
console.log('msg: ', msg);
}
}
FAQs
tegg eventbus decorator
The npm package @eggjs/eventbus-decorator receives a total of 0 weekly downloads. As such, @eggjs/eventbus-decorator popularity was classified as not popular.
We found that @eggjs/eventbus-decorator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.