@adaptivestone/framework 3.2.0 → 3.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 3.2.1
2
+
3
+ [UPDATE] updated deps
4
+ [FIX] fix documentation generation
5
+
1
6
  ### 3.2.0
2
7
 
3
8
  [UPDATE] updated deps
@@ -359,11 +359,15 @@ class AbstractController extends Base {
359
359
  routeMiddlewares: routeMiddlewaresReg
360
360
  // eslint-disable-next-line consistent-return
361
361
  .map((middleware) => {
362
+ const routeFullPath = route.fullPath.toUpperCase();
363
+ const middlewareFullPath = middleware.fullPath.toUpperCase();
364
+ const middlewareFullPathWithSliced = middleware.fullPath
365
+ .toUpperCase()
366
+ .slice(0, -1);
362
367
  if (
363
- route.fullPath.toUpperCase() ===
364
- middleware.fullPath.toUpperCase() ||
365
- middleware.fullPath.toUpperCase() ===
366
- `${route.fullPath.toUpperCase()}*`
368
+ middlewareFullPath === routeFullPath ||
369
+ middlewareFullPath === `${routeFullPath}*` ||
370
+ routeFullPath?.indexOf(middlewareFullPathWithSliced) !== -1
367
371
  ) {
368
372
  return {
369
373
  name: middleware.name,
@@ -376,13 +380,20 @@ class AbstractController extends Base {
376
380
  controllerMiddlewares: [
377
381
  ...new Set(
378
382
  middlewaresInfo
379
- .filter(
380
- (middleware) =>
381
- middleware.fullPath.toUpperCase() ===
382
- route.fullPath.toUpperCase() ||
383
- middleware.fullPath.toUpperCase() ===
384
- `${route.fullPath.toUpperCase()}*`,
385
- )
383
+ .filter((middleware) => {
384
+ const routeFullPath = route.fullPath.toUpperCase();
385
+ const middlewareFullPath =
386
+ middleware.fullPath.toUpperCase();
387
+ const middlewareFullPathWithSliced = middleware.fullPath
388
+ .toUpperCase()
389
+ .slice(0, -1);
390
+ return (
391
+ middlewareFullPath === routeFullPath ||
392
+ middlewareFullPath === `${routeFullPath}*` ||
393
+ routeFullPath?.indexOf(middlewareFullPathWithSliced) !==
394
+ -1
395
+ );
396
+ })
386
397
  .map(({ name, params, authParams }) => ({
387
398
  name,
388
399
  params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptivestone/framework",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Adaptive stone node js framework",
5
5
  "main": "src/index.js",
6
6
  "engines": {