diff --git a/CHANGELOG.md b/CHANGELOG.md index bdef898..d1e355f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.4.0](https://github.com/ClearC2/headlamp/compare/v2.3.2...v2.4.0) (2023-03-08) + + +### Features + +* support cjs files ([08018b3](https://github.com/ClearC2/headlamp/commit/08018b30d9b220b7bf3644ad3d15f2229c23df25)) + ## [2.3.2](https://github.com/ClearC2/headlamp/compare/v2.3.1...v2.3.2) (2023-02-24) diff --git a/lib/api-route-provider.js b/lib/api-route-provider.js index 3d04e53..b9b9eef 100644 --- a/lib/api-route-provider.js +++ b/lib/api-route-provider.js @@ -558,11 +558,11 @@ function getFileRoutes(options) { }; if (options.routes) { - routes = routes.concat(filesToRoutes(_glob["default"].sync("".concat(options.routes, "/**/*.+(js|json)")))); + routes = routes.concat(filesToRoutes(_glob["default"].sync("".concat(options.routes, "/**/*.+(js|json|cjs)")))); } if (src && srcDir) { - routes = routes.concat(filesToRoutes(_glob["default"].sync("".concat(src, "/**/").concat(srcDir, "/**/*.+(js|json)")))); + routes = routes.concat(filesToRoutes(_glob["default"].sync("".concat(src, "/**/").concat(srcDir, "/**/*.+(js|json|cjs)")))); } return routes; diff --git a/package.json b/package.json index 0038271..16110b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@clearc2/headlamp", - "version": "2.3.2", + "version": "2.4.0", "description": "Express API documenter", "main": "lib/index.js", "publishConfig": {