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.
- package/build/background-jobs/main.js +163 -2
- package/build/routes/base-route.js +3 -2
- package/build/routes/basic-route.js +33 -8
- package/build/routes/get-route.js +17 -1
- package/build/routes/post-route.js +17 -1
- package/build/routes/resolver.js +5 -3
- package/build/src/background-jobs/main.d.ts +60 -0
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +154 -3
- package/build/src/routes/base-route.d.ts +3 -2
- package/build/src/routes/base-route.d.ts.map +1 -1
- package/build/src/routes/base-route.js +4 -3
- package/build/src/routes/basic-route.d.ts +19 -6
- package/build/src/routes/basic-route.d.ts.map +1 -1
- package/build/src/routes/basic-route.js +29 -9
- package/build/src/routes/get-route.d.ts +12 -1
- package/build/src/routes/get-route.d.ts.map +1 -1
- package/build/src/routes/get-route.js +16 -2
- package/build/src/routes/post-route.d.ts +12 -1
- package/build/src/routes/post-route.d.ts.map +1 -1
- package/build/src/routes/post-route.js +16 -2
- package/build/src/routes/resolver.d.ts +2 -1
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +6 -4
- package/package.json +1 -1
- package/src/background-jobs/main.js +163 -2
- package/src/routes/base-route.js +3 -2
- package/src/routes/basic-route.js +33 -8
- package/src/routes/get-route.js +17 -1
- package/src/routes/post-route.js +17 -1
- package/src/routes/resolver.js +5 -3
package/src/routes/resolver.js
CHANGED
|
@@ -92,10 +92,12 @@ export default class VelociousRoutesResolver {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const routeResolverHookMatch = await this.resolveRouteResolverHooks(currentPath, {hasMatchingCustomRoute})
|
|
95
|
-
|
|
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]
|