Skip to content

v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@jeremeamia jeremeamia released this 16 Jun 16:36
· 16 commits to main since this release
7f458b6

This release contains updates made while dogfooding.

  • Improved Router:
    • Added viewSubmissionAsync to routing (available via either App or Router). I found myself unexpectedly needing this while dogfooding.
  • Improved Context object:
    • Added Context::getAppConfig() and Context::getApiClient() getters to Context. Seemed useful while dogfooding to have these.
    • Added support for Surface factories (i.e., callables that return Surfaces) to methods accepting surfaces like: ack(), respond(), say(), home(), modals(), and view(). Applies to anything calling the Coerce methods for Surfaces.
  • Improve Payload object:
    • Added HasData::getAllOf() method, which also applies to the Payload.
    • Updated Payload::getMetadata() to return an empty PrivateMetadata object when metadata is null, instead of throwing an exception.
    • Added Payload::getResponseUrl() for abstracting the process of getting the response_url from the payload. Works for view_submission payloads too, where response_urls are created from Conversation or Channel Select inputs.
  • Added some new Listeners:
    • Dual - An abstract Listener you can extend to provide both sync/pre-Ack and async/post-Ack logic.
    • WIP - A stub-like Listener that outputs "Work in progress" in the best way (e.g., message, modal, log) available for the current interaction type.
  • Improved logging:
    • (BC) Renamed SlackLogger::addData() to SlackLogger::addContext()` because it fit with PSR-3 nomenclature better.
    • Added the ability to add and get context data with the base Exception class via ::addContext() and ::getContext(), respectively.
    • Improve StderrLogger to include context from the exception, when available.
  • Improved CommandRouter:
    • (BC) Renamed the default list command in CommandRouter to help.
    • Added support for custom default commands by using '*' or the CommandRouter::withDefault() command.
    • (BC) Renamed CommandRouter::description() to withDescription().
  • Improved Deferrers:
    • Fixed a couple of issues with DeferredContextCliServer while dogfooding.
    • Fixed ShellExecDeferrer so that it allows logging via stderr.