feat: add missing SocketMode options
Summary
Adds missing SocketModeOptions to App init. Resolves #2292.
New options are made available as seen below:
/** Initialization */
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
socketMode: true,
appToken: process.env.SLACK_APP_TOKEN,
logLevel: LogLevel.DEBUG,
// New SocketModeOptions
socketModeOptions: {
autoReconnectEnabled: true,
clientPingTimeout: 420,
pingPongLoggingEnabled: true,
serverPingTimeout: 150,
},
});
To test:
- [ ] Spin up TS-friendly Bolt project (https://github.com/slack-samples/bolt-ts-starter-template)
- [ ] Symlink
@slack/bolt-jsto this branch in project - [ ] Verify that types exist
- [ ] Verify that changing these values reflects the same changes when logging the SocketMode receiver after initialization (i.e.,
autoReconnectEnabled,serverPingTimeoutMS,clientPingTimeoutMS,pingPongLoggingEnabled).
Requirements (place an x in each [ ])
- [x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 93.46%. Comparing base (d6f9ce7) to head (ea3b4b8).
Additional details and impacted files
@@ Coverage Diff @@
## main #2735 +/- ##
==========================================
+ Coverage 93.44% 93.46% +0.01%
==========================================
Files 37 37
Lines 7675 7693 +18
Branches 669 669
==========================================
+ Hits 7172 7190 +18
Misses 498 498
Partials 5 5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Nice 💯 I also have the same question as @mwbrooks 🤔 having it in its own object could also help us with the separation of concern
📚 Quick question if the new options might be nice to reference from this page?
🔗 https://docs.slack.dev/tools/bolt-js/concepts/socket-mode