velocious 1.0.720 → 1.0.721

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.
@@ -92,10 +92,12 @@ export default class VelociousRoutesResolver {
92
92
  }
93
93
 
94
94
  const routeResolverHookMatch = await this.resolveRouteResolverHooks(currentPath, {hasMatchingCustomRoute})
95
- let skipControllerConnections = this.configuration.database === false || routeResolverHookMatch?.skipControllerConnections === true
95
+ const matchResult = routeResolverHookMatch || !currentRoute ? undefined : this.matchPathWithRoutes(currentRoute, currentPath)
96
+ let skipControllerConnections = this.configuration.database === false
97
+ || routeResolverHookMatch?.skipControllerConnections === true
98
+ || matchResult?.skipControllerConnections === true
96
99
  let skipAbilityResolution = routeResolverHookMatch?.skipAbilityResolution === true
97
100
  let skipTenantResolution = routeResolverHookMatch?.skipTenantResolution === true
98
- const matchResult = routeResolverHookMatch || !currentRoute ? undefined : this.matchPathWithRoutes(currentRoute, currentPath)
99
101
  const actionParam = this.params.action
100
102
  const controllerParam = this.params.controller
101
103
  const actionValue = typeof actionParam == "string" ? actionParam : (Array.isArray(actionParam) ? actionParam[0] : undefined)
@@ -272,7 +274,7 @@ export default class VelociousRoutesResolver {
272
274
  * Runs match path with routes.
273
275
  * @param {import("./base-route.js").default} route - Route.
274
276
  * @param {string} path - Path.
275
- * @returns {{restPath: string} | undefined} - REST path metadata for this route.
277
+ * @returns {{restPath: string, skipControllerConnections?: boolean} | undefined} - REST path metadata for this route, including the matched leaf route's options.
276
278
  */
277
279
  matchPathWithRoutes(route, path) {
278
280
  const pathWithoutSlash = path.replace(/^\//, "").split("?")[0]