Skip to content

Conversation

mrinc
Copy link
Member

@mrinc mrinc commented May 20, 2023

No description provided.

myusername added 5 commits May 20, 2023 20:50
This commit adds support for broadcast events to the events system. A new
class `broadcast` has been added to the `events-default` plugin, which extends
the `EventEmitter` class from the Node.js `events` module. The `broadcast`
class has two methods: `onBroadcast` and `emitBroadcast`. These methods allow
plugins to listen for and emit broadcast events, respectively.

The `Events` class in the `events-default` plugin has been updated to include
a `broadcast` property, which is an instance of the `broadcast` class. The
`Events` class also has two new methods: `onBroadcast` and `emitBroadcast`,
which delegate to the corresponding methods on the `broadcast` instance.

The `IServiceEvents` interface has been updated to include two new methods:
`onBroadcast` and `emitBroadcast`. The `ServiceEvents` interface has been
renamed to `

feat(service): add support for broadcasting events

This commit adds support for broadcasting events to the ServicesBase and RegisteredPlugin classes. The new methods added are onBroadcast and emitBroadcast. The onBroadcast method allows the service to listen to broadcasted events, while the emitBroadcast method allows the service to emit broadcasted events. The ServicesBase and RegisteredPlugin classes now have two new type parameters, onBroadcast and emitBroadcast, which are used to define the types of the onBroadcast and emitBroadcast methods. The ServicesClient class also has two new type parameters, onBroadcast and emitBroadcast, which are used to define the types of the onBroadcast and emitBroadcast methods in the referenced service.

chore(base.ts): refactor setupServicePlugin method to include new events
feat(events.ts): add onBroadcast and emitBroadcast methods to IServiceEvents
refactor(services.ts): update generateEventsForService method signature to include new events

feat(tests): add tests for broadcasting events in EventsBase class

test(events): add test to ensure only one plugin receives an event
test(events): add test to ensure events can be emitted to plugins with name defined
test(events): add broadcast test to events-default plugin
This commit adds support for broadcast events to the events system. A new
class `broadcast` has been added to the `events-default` plugin, which extends
the `EventEmitter` class from the Node.js `events` module. The `broadcast`
class has two methods: `onBroadcast` and `emitBroadcast`. These methods allow
plugins to listen for and emit broadcast events, respectively.

The `Events` class in the `events-default` plugin has been updated to include
a `broadcast` property, which is an instance of the `broadcast` class. The
`Events` class also has two new methods: `onBroadcast` and `emitBroadcast`,
which delegate to the corresponding methods on the `broadcast` instance.

The `IServiceEvents` interface has been updated to include two new methods:
`onBroadcast` and `emitBroadcast`. The `ServiceEvents` interface has been
renamed to `

feat(service): add support for broadcasting events

This commit adds support for broadcasting events to the ServicesBase and RegisteredPlugin classes. The new methods added are onBroadcast and emitBroadcast. The onBroadcast method allows the service to listen to broadcasted events, while the emitBroadcast method allows the service to emit broadcasted events. The ServicesBase and RegisteredPlugin classes now have two new type parameters, onBroadcast and emitBroadcast, which are used to define the types of the onBroadcast and emitBroadcast methods. The ServicesClient class also has two new type parameters, onBroadcast and emitBroadcast, which are used to define the types of the onBroadcast and emitBroadcast methods in the referenced service.

chore(base.ts): refactor setupServicePlugin method to include new events
feat(events.ts): add onBroadcast and emitBroadcast methods to IServiceEvents
refactor(services.ts): update generateEventsForService method signature to include new events

feat(tests): add tests for broadcasting events in EventsBase class

test(events): add test to ensure only one plugin receives an event
test(events): add test to ensure events can be emitted to plugins with name defined
test(events): add broadcast test to events-default plugin
@mrinc mrinc merged commit 46a244b into master May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant