Files
lib/src/support/PackageDiscovered.ts
garrettmills 6d1cf18680
Some checks failed
continuous-integration/drone/push Build is failing
Refactor event bus and queue system; detect cycles in DI realization and make
2022-01-26 19:37:54 -06:00

26 lines
663 B
TypeScript

import {Awaitable, UniversalPath} from '../util'
import {ExtolloAwareNodeModule} from './types'
import {BaseEvent} from './bus'
/**
* An event indicating that an NPM package has been discovered
* by the framework.
*
* Application services can listen for this event to register
* various discovery logic (e.g. automatically boot units
*/
export class PackageDiscovered extends BaseEvent {
constructor(
public packageConfig: ExtolloAwareNodeModule,
public packageJson: UniversalPath,
) {
super()
}
eventName = '@extollo/lib.PackageDiscovered'
shouldBroadcast(): Awaitable<boolean> {
return false
}
}