v0.3.0
Pre-release
Pre-release
This release contains updates made while dogfooding.
- Improved
Router
:- Added
viewSubmissionAsync
to routing (available via eitherApp
orRouter
). I found myself unexpectedly needing this while dogfooding.
- Added
- Improved
Context
object:- Added
Context::getAppConfig()
andContext::getApiClient()
getters toContext
. Seemed useful while dogfooding to have these. - Added support for
Surface
factories (i.e.,callable
s that returnSurface
s) to methods accepting surfaces like:ack()
,respond()
,say()
,home()
,modals()
, andview()
. Applies to anything calling theCoerce
methods forSurface
s.
- Added
- Improve
Payload
object:- Added
HasData::getAllOf()
method, which also applies to thePayload
. - Updated
Payload::getMetadata()
to return an emptyPrivateMetadata
object when metadata isnull
, instead of throwing an exception. - Added
Payload::getResponseUrl()
for abstracting the process of getting theresponse_url
from the payload. Works forview_submission
payloads too, whereresponse_urls
are created from Conversation or Channel Select inputs.
- Added
- Added some new
Listeners
:Dual
- An abstractListener
you can extend to provide both sync/pre-Ack and async/post-Ack logic.WIP
- A stub-likeListener
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.
- (BC) Renamed
- Improved
CommandRouter
:- (BC) Renamed the default
list
command inCommandRouter
tohelp
. - Added support for custom default commands by using
'*'
or theCommandRouter::withDefault()
command. - (BC) Renamed
CommandRouter::description()
towithDescription()
.
- (BC) Renamed the default
- Improved
Deferrers
:- Fixed a couple of issues with
DeferredContextCliServer
while dogfooding. - Fixed
ShellExecDeferrer
so that it allows logging viastderr
.
- Fixed a couple of issues with