speedly 2.0.16 → 2.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -214,7 +214,8 @@ function RouterFetcher(baseDir) {
214
214
  let paths = {};
215
215
  const tags = [];
216
216
  modules.forEach((routerPath) => {
217
- const mf = routerPath.split(path_1.default.sep).at(-1)?.split(".")[0] || "default";
217
+ const mf = path_1.default.relative(baseDir, routerPath).replace(/\\/g, "/").split(".")[0] ||
218
+ "default";
218
219
  try {
219
220
  const router = require(routerPath);
220
221
  paths = { ...paths, ...routeAnalyzer(router, mf) };
@@ -214,7 +214,8 @@ function RouterFetcher(baseDir) {
214
214
  let paths = {};
215
215
  const tags = [];
216
216
  modules.forEach((routerPath) => {
217
- const mf = routerPath.split(path_1.default.sep).at(-1)?.split(".")[0] || "default";
217
+ const mf = path_1.default.relative(baseDir, routerPath).replace(/\\/g, "/").split(".")[0] ||
218
+ "default";
218
219
  try {
219
220
  const router = require(routerPath);
220
221
  paths = { ...paths, ...routeAnalyzer(router, mf) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speedly",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",