-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from sliit-foss/feat/type-support-http-module…
…-logger Add #94 Type support for http-logger added
- Loading branch information
Showing
12 changed files
with
2,562 additions
and
2,547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ | |
"prettier": "3.2.5" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
"node": ">=14.0.0", | ||
"pnpm": ">=7.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
{ | ||
"name": "@sliit-foss/http-logger", | ||
"version": "1.3.1", | ||
"description": "Http logging middleware for Express.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "node ../../scripts/esbuild.config.js", | ||
"build:watch": "bash ../../scripts/esbuild.watch.sh", | ||
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/http-logger", | ||
"lint": "bash ../../scripts/lint.sh", | ||
"release": "bash ../../scripts/release.sh", | ||
"test": "bash ../../scripts/test/test.sh" | ||
}, | ||
"dependencies": { | ||
"@sliit-foss/module-logger": "1.3.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sliit-foss/npm-catalogue.git" | ||
}, | ||
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/packages/http-logger/readme.md", | ||
"keywords": [ | ||
"logging", | ||
"http-logging", | ||
"middleware" | ||
], | ||
"author": "SLIIT FOSS", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/sliit-foss/npm-catalogue/issues" | ||
} | ||
} | ||
{ | ||
"name": "@sliit-foss/http-logger", | ||
"version": "1.3.1", | ||
"description": "Http logging middleware for Express.js", | ||
"main": "dist/index.js", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
"build": "node ../../scripts/esbuild.config.js", | ||
"build:watch": "bash ../../scripts/esbuild.watch.sh", | ||
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/http-logger", | ||
"lint": "bash ../../scripts/lint.sh", | ||
"release": "bash ../../scripts/release.sh", | ||
"test": "bash ../../scripts/test/test.sh" | ||
}, | ||
"dependencies": { | ||
"@sliit-foss/module-logger": "1.3.1" | ||
}, | ||
"peerDependencies": { | ||
"express": "*" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sliit-foss/npm-catalogue.git" | ||
}, | ||
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/packages/http-logger/readme.md", | ||
"keywords": [ | ||
"logging", | ||
"http-logging", | ||
"middleware" | ||
], | ||
"author": "SLIIT FOSS", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/sliit-foss/npm-catalogue/issues" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { RequestHandler, Request } from "express"; | ||
|
||
/** | ||
* @description Options for logging middleware function | ||
*/ | ||
type HttpLoggerOptions = { | ||
whitelists?: string[]; | ||
loggable?: string[] | ((req: Request) => object); | ||
}; | ||
|
||
/** | ||
* @description Creates a HTTP logging middleware for Express.js | ||
* @param {HttpLoggerOptions} options Add options to customize logging | ||
* @returns {RequestHandler} A middleware function which will log http requests | ||
*/ | ||
declare const httpLogger: (options: HttpLoggerOptions) => RequestHandler; | ||
|
||
export default httpLogger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
{ | ||
"name": "@sliit-foss/mongoose-aggregate-paginate-v2", | ||
"version": "1.0.0", | ||
"description": "A cursor based custom aggregate pagination library for Mongoose with customizable labels.", | ||
"main": "dist/index.js", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
"build": "node ../../scripts/esbuild.config.js", | ||
"build:watch": "bash ../../scripts/esbuild.watch.sh", | ||
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/express-http-context", | ||
"lint": "bash ../../scripts/lint.sh", | ||
"release": "bash ../../scripts/release.sh", | ||
"test": "if [ \"$CI\" = \"true\" ]; then \n bash ../../scripts/test/test.sh; else \n echo \"Skipping as it is not a CI environemnt\"; fi" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sliit-foss/npm-catalogue.git" | ||
}, | ||
"keywords": [ | ||
"aggregate", | ||
"aggregate-paginate", | ||
"aggregate-pagination", | ||
"mongoose-aggregate", | ||
"mongoose", | ||
"pagination", | ||
"plugin", | ||
"mongodb", | ||
"paginate", | ||
"paging", | ||
"next", | ||
"prev", | ||
"nextpage", | ||
"prevpage", | ||
"total", | ||
"paginator", | ||
"plugin" | ||
], | ||
"author": "SLIIT FOSS", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/sliit-foss/npm-catalogue/issues" | ||
}, | ||
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/plugins/mongoose-aggregate-paginate-v2#readme", | ||
"peerDependencies": { | ||
"mongoose": ">=7.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=4.0.0" | ||
} | ||
"name": "@sliit-foss/mongoose-aggregate-paginate-v2", | ||
"version": "1.0.0", | ||
"description": "A cursor based custom aggregate pagination library for Mongoose with customizable labels.", | ||
"main": "dist/index.js", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
"build": "node ../../scripts/esbuild.config.js", | ||
"build:watch": "bash ../../scripts/esbuild.watch.sh", | ||
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/express-http-context", | ||
"lint": "bash ../../scripts/lint.sh", | ||
"release": "bash ../../scripts/release.sh", | ||
"test": "if [ \"$CI\" = \"true\" ]; then \n bash ../../scripts/test/test.sh; else \n echo \"Skipping as it is not a CI environemnt\"; fi" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sliit-foss/npm-catalogue.git" | ||
}, | ||
"keywords": [ | ||
"aggregate", | ||
"aggregate-paginate", | ||
"aggregate-pagination", | ||
"mongoose-aggregate", | ||
"mongoose", | ||
"pagination", | ||
"plugin", | ||
"mongodb", | ||
"paginate", | ||
"paging", | ||
"next", | ||
"prev", | ||
"nextpage", | ||
"prevpage", | ||
"total", | ||
"paginator", | ||
"plugin" | ||
], | ||
"author": "SLIIT FOSS", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/sliit-foss/npm-catalogue/issues" | ||
}, | ||
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/plugins/mongoose-aggregate-paginate-v2#readme", | ||
"peerDependencies": { | ||
"mongoose": ">=7.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=4.0.0" | ||
} | ||
} |
Oops, something went wrong.