Skip to content

Commit

Permalink
Export CommonRequest from buildContext file (#94)
Browse files Browse the repository at this point in the history
There was a typescript issue where we didn't export one of the types we were using, leading to not being able to export a type depending on it with `declaration: true` in your config.

Fixes #93

> We also add the github actions workflow to run checks on PRs.
  • Loading branch information
ericbf authored Jan 19, 2024
1 parent 6f817bf commit 1cfa911
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/all-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This action checks all aspects of the code to ensure it is a compliant change, as
# determined by the scirpts we have in npm.
name: All checks

# Controls when the workflow will run
on:
# Triggers this workflow on push to the main branch
push:
branches: [main]

# Triggers this workflow on all pull requests to main
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && CI=true npm run test

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && CI=true npm run build
6 changes: 3 additions & 3 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 src/buildContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const promisifiedLogout = (req: express.Request, options?: { keepSessionInfo?: b
req.logout(options, done);
});

interface CommonRequest<UserObjectType extends Express.User>
export interface CommonRequest<UserObjectType extends Express.User>
extends Pick<Context<UserObjectType>, 'isAuthenticated' | 'isUnauthenticated'> {
user?: UserObjectType;
}
Expand Down

0 comments on commit 1cfa911

Please sign in to comment.