Skip to content

Commit

Permalink
build(deps): bump @slack/bolt from 4.1.1 to 4.2.0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Jan 8, 2025
1 parent 528d939 commit 2d99c3d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 120 deletions.
12 changes: 6 additions & 6 deletions app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const app = new App({
});

/** Sample Function Listener */
app.function('sample_function', async ({ client, inputs, fail }) => {
app.function('sample_function', async ({ client, inputs, fail, logger }) => {
try {
const { user_id } = inputs;

Expand All @@ -38,13 +38,13 @@ app.function('sample_function', async ({ client, inputs, fail }) => {
],
});
} catch (error) {
console.error(error);
logger.error(error);
fail({ error: `Failed to handle a function request: ${error}` });
}
});

/** Sample Action Listener */
app.action<BlockAction>('sample_button', async ({ body, client, complete, fail }) => {
app.action<BlockAction>('sample_button', async ({ body, client, complete, fail, logger }) => {
const { channel, message, user } = body;

try {
Expand All @@ -62,7 +62,7 @@ app.action<BlockAction>('sample_button', async ({ body, client, complete, fail }
text: 'Function completed successfully!',
});
} catch (error) {
console.error(error);
logger.error(error);
// biome-ignore lint/style/noNonNullAssertion: we know this button comes from a function, so `fail` is available.
fail!({ error: `Failed to handle a function request: ${error}` });
}
Expand All @@ -72,8 +72,8 @@ app.action<BlockAction>('sample_button', async ({ body, client, complete, fail }
(async () => {
try {
await app.start();
console.log('⚡️ Bolt app is running!');
app.logger.info('⚡️ Bolt app is running!');
} catch (error) {
console.error('Failed to start the app', error);
app.logger.error('Failed to start the app', error);
}
})();
146 changes: 33 additions & 113 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/slack-samples/bolt-ts-custom-function-template/issues"
},
"dependencies": {
"@slack/bolt": "^4.1.1",
"@slack/bolt": "^4.2.0",
"dotenv": "~16.4.7"
},
"devDependencies": {
Expand Down

0 comments on commit 2d99c3d

Please sign in to comment.