Add debugging for route extraction

master
Garrett Mills 2 years ago
parent c7557cf5b6
commit 8b2ee1c949

@ -1,6 +1,6 @@
{
"name": "@extollo/lib",
"version": "0.9.29",
"version": "0.9.30",
"description": "The framework library that lifts up your code.",
"main": "lib/index.js",
"types": "lib/index.d.ts",

@ -8,6 +8,7 @@ import {validateMiddleware} from '../../validation/middleware'
import {RouteGroup} from './RouteGroup'
import {Config} from '../../service/Config'
import {Application} from '../../lifecycle/Application'
import {Logging} from '../../service/Logging'
/**
* Type alias for an item that is a valid response object, or lack thereof.
@ -277,6 +278,9 @@ export class Route<TReturn extends ResponseObject, THandlerParams extends unknow
const routeParts = (this.route.startsWith('/') ? this.route.substr(1) : this.route).split('/')
const potentialParts = (potential.startsWith('/') ? potential.substr(1) : potential).split('/')
Application.getApplication().make<Logging>(Logging)
.verbose(`Extracting route - (potential: ${potential}, rP: ${JSON.stringify(routeParts)}, pP: ${JSON.stringify(potentialParts)})`)
const params: any = {}
let wildcardIdx = 0

Loading…
Cancel
Save