Skip to content

Commit

Permalink
Export a function by default in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
filmaj committed Aug 6, 2021
1 parent a9200c4 commit 195c9db
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
matchMessage,
onlyViewActions,
} from './middleware/builtin';
import { processMiddleware } from './middleware/process';
import processMiddleware from './middleware/process';
import { ConversationStore, conversationContext, MemoryStore } from './conversation-store';
import { WorkflowStep } from './WorkflowStep';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ViewWorkflowStepSubmitAction,
WorkflowStepExecuteEvent,
} from './types';
import { processMiddleware } from './middleware/process';
import processMiddleware from './middleware/process';
import { WorkflowStepInitializationError } from './errors';

/** Interfaces */
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { WebClient } from '@slack/web-api';
import { Logger } from '@slack/logger';
import { Middleware, AnyMiddlewareArgs, Context } from '../types';

export async function processMiddleware(
export default async function processMiddleware(
middleware: Middleware<AnyMiddlewareArgs>[],
initialArgs: AnyMiddlewareArgs,
context: Context,
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/ExpressReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { InstallProvider, CallbackOptions, InstallProviderOptions, InstallURLOpt
import App from '../App';
import { ReceiverAuthenticityError, ReceiverMultipleAckError, ReceiverInconsistentStateError } from '../errors';
import { AnyMiddlewareArgs, Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';

// Option keys for tls.createServer() and tls.createSecureContext(), exclusive of those for http.createServer()
const httpsOptionKeys = [
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/HTTPReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { URL } from 'url';
import { verify as verifySlackAuthenticity, BufferedIncomingMessage } from './verify-request';
import App from '../App';
import { Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';
import {
ReceiverMultipleAckError,
ReceiverInconsistentStateError,
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/SocketModeReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { InstallProvider, CallbackOptions, InstallProviderOptions, InstallURLOpt
import { AppsConnectionsOpenResponse } from '@slack/web-api';
import App from '../App';
import { Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';

// TODO: we throw away the key names for endpoints, so maybe we should use this interface. is it better for migrations?
// if that's the reason, let's document that with a comment.
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/render-html-for-install-path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function renderHtmlForInstallPath(addToSlackUrl: string): string {
export default function renderHtmlForInstallPath(addToSlackUrl: string): string {
return `<html>
<body>
<a href=${addToSlackUrl}>
Expand Down

0 comments on commit 195c9db

Please sign in to comment.