@stacksjs/router 0.64.4 → 0.64.6
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/dist/index.js +15 -15
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
- package/src/router.ts +4 -4
- package/src/server.ts +3 -3
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -282,11 +282,11 @@ export class Router implements RouterInterface {
|
|
|
282
282
|
|
|
283
283
|
let actionModule = null
|
|
284
284
|
|
|
285
|
-
if (modulePath.includes('storage/framework/orm')) actionModule = await import(
|
|
286
|
-
else if (modulePath.includes('app/Actions')) actionModule = await import(
|
|
285
|
+
if (modulePath.includes('storage/framework/orm')) actionModule = await import(modulePath)
|
|
286
|
+
else if (modulePath.includes('app/Actions')) actionModule = await import(modulePath)
|
|
287
287
|
else if (modulePath.includes('OrmAction'))
|
|
288
|
-
actionModule = await import(
|
|
289
|
-
else actionModule = await import(importPathFunction(
|
|
288
|
+
actionModule = await import(p.storagePath(`/framework/orm/${modulePath}`))
|
|
289
|
+
else actionModule = await import(importPathFunction(modulePath))
|
|
290
290
|
|
|
291
291
|
// Use custom path from action module if available
|
|
292
292
|
const newPath = actionModule.default.path ?? originalPath
|
package/src/server.ts
CHANGED
|
@@ -54,8 +54,8 @@ export async function serverResponse(req: Request, body: string) {
|
|
|
54
54
|
const url = new URL(trimmedUrl)
|
|
55
55
|
const routesList: Route[] = await route.getRoutes()
|
|
56
56
|
|
|
57
|
-
log.info(`Routes List: ${JSON.stringify(routesList)}
|
|
58
|
-
log.info(`URL: ${JSON.stringify(url)}
|
|
57
|
+
log.info(`Routes List: ${JSON.stringify(routesList)}`)
|
|
58
|
+
log.info(`URL: ${JSON.stringify(url)}`)
|
|
59
59
|
|
|
60
60
|
if (req.method === 'OPTIONS') {
|
|
61
61
|
return handleOptions(req)
|
|
@@ -69,7 +69,7 @@ export async function serverResponse(req: Request, body: string) {
|
|
|
69
69
|
})
|
|
70
70
|
.find((route: Route) => route.method === req.method)
|
|
71
71
|
|
|
72
|
-
log.info(`Found Route: ${JSON.stringify(foundRoute)}
|
|
72
|
+
log.info(`Found Route: ${JSON.stringify(foundRoute)}`)
|
|
73
73
|
|
|
74
74
|
if (!foundRoute) {
|
|
75
75
|
// TODO: create a pretty 404 page
|