Skip to content

[PASO 2.13] Add notifications module (EXTENDED) — core@0.14.0#37

Merged
mfg1986 merged 7 commits into
developfrom
feature/PASO-2.13_notifications-module
May 22, 2026
Merged

[PASO 2.13] Add notifications module (EXTENDED) — core@0.14.0#37
mfg1986 merged 7 commits into
developfrom
feature/PASO-2.13_notifications-module

Conversation

@mfg1986
Copy link
Copy Markdown
Contributor

@mfg1986 mfg1986 commented May 22, 2026

Summary

  • New EXTENDED module: notifications/ in @fireflyframework/core
  • provideNotifications(options?) factory with NOTIFICATION_CONFIG injection token
  • NotificationService — central event dispatcher with adapter registry, emit() routing via supports(), Promise.allSettled fault tolerance
  • 5 adapters: ConsoleAdapter (always-on), NoopAdapter (testing), SlackAdapter, WebhookAdapter, EmailAdapter
  • FireflyEvent type + NotificationAdapter interface as public contracts
  • Version bump: 0.13.0 → 0.14.0

Changes by STEP

STEP Description Tests
001 Types, interfaces, config token (notification.types.ts)
002 NotificationService + spec 12 tests
003 ConsoleAdapter + NoopAdapter + specs 13 tests
004 SlackAdapter + WebhookAdapter + EmailAdapter + specs 20 tests
005 provideNotifications() factory + barrel + main entry 8 tests
006 Version bump 0.14.0 + CHANGELOG

Total new tests: 53 (778 total, 0 regressions)

Test plan

  • pnpm nx build core passes
  • pnpm nx test core — 778 tests passing, 0 failed
  • import { provideNotifications, NotificationService } from '@fireflyframework/core' resolves
  • CHANGELOG entry [0.14.0] present with all 10 Added items
  • No regressions in existing modules

mfg1986 added 7 commits May 22, 2026 09:27
Define foundational types for the notifications module:
FireflyEvent, NotificationAdapter, NotificationOptions,
NotificationConfig and NOTIFICATION_CONFIG injection token.
…nt emission

Implement central service with registerAdapter(), emit() and getAdapters().
Uses Promise.allSettled so a failing adapter never blocks others.
12 unit tests covering filtering, dedup, parallel execution and error isolation.
ConsoleAdapter logs formatted events to console (log/warn/error by severity).
NoopAdapter resolves immediately without side effects, for testing.
Both accept all event types. 13 unit tests.
…h tests

Three HTTP-based adapters using native fetch:
- SlackAdapter: formats with severity emoji, POSTs to webhook URL
- WebhookAdapter: sends full FireflyEvent as JSON with optional headers
- EmailAdapter: POSTs email payload to HTTP relay endpoint
20 unit tests with vi.stubGlobal fetch mock.
…d wire into main entry point

provideNotifications() registers NotificationService, NOTIFICATION_CONFIG
token and adapters via provideAppInitializer. ConsoleAdapter always on,
HTTP adapters conditional on options. Barrel exports all public symbols.
8 unit tests for provider factory.
…notifications module

Add [0.14.0] entry documenting all notifications module additions:
NotificationService, 5 adapters, provideNotifications() factory, types.
Fix missing link references for 0.12.0, 0.13.0, 0.14.0.
Replace empty arrow functions with vi.fn() in test mocks to satisfy
no-empty-function rule. Add eslint-disable for required unused param
in NoopAdapter.send().
@mfg1986 mfg1986 merged commit a4e96a6 into develop May 22, 2026
3 checks passed
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