Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #94 Type support for http-logger added #178

Merged
merged 12 commits into from
Jun 23, 2024

Conversation

ThulinaWickramasinghe
Copy link
Collaborator

No description provided.

@ThulinaWickramasinghe ThulinaWickramasinghe marked this pull request as ready for review April 21, 2024 08:17
@ThulinaWickramasinghe ThulinaWickramasinghe changed the title WIP #94 Type support for http-logger Add #94 Type support for http-logger Apr 21, 2024
@ThulinaWickramasinghe ThulinaWickramasinghe changed the title Add #94 Type support for http-logger Add #94 Type support for http-logger added Apr 21, 2024
"main": "dist/index.js",
"scripts": {
"build": "node ../../scripts/esbuild.config.js",
"types": "types/index.d.ts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the wrong place, shall we bring it out ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it was mistakenly added. Fixed it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the requested changes.

*/
type HttpLoggerOptions = {
whitelists?: string[];
loggable?: string[] | ((req: Request) => Record<string, any>[]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you've mentioned the entire express Request type here, shall we update the actual code to pass in the entire req as well, right now it's just passing the headers and body. Passing just the 2 of them seems pointless once i think of it again now. Also shall we add express to peer deps of this package.json file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay will do.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akalanka47000 can you merge this.

},
"packageManager": "[email protected]"
"node": ">=14.0.0",
"pnpm": ">=7.5.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched a bit since I haven't seen pnpm being used here before, I found a few issues saying that this isn't supported, is it possible for you to see if it works right now, maybe try installing an older version of pnpm in a codespace and try pnpm i

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be working fine.

image

@Akalanka47000 Akalanka47000 merged commit 736010d into main Jun 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants