@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/router",
3
3
  "type": "module",
4
- "version": "0.64.4",
4
+ "version": "0.64.6",
5
5
  "description": "The Stacks framework router.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
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(`${modulePath}.ts`)
286
- else if (modulePath.includes('app/Actions')) actionModule = await import(`${modulePath}.ts`)
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(importPathFunction(`/framework/orm/${modulePath}.ts`))
289
- else actionModule = await import(importPathFunction(`${modulePath}.ts`))
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)}`, { styled: false })
58
- log.info(`URL: ${JSON.stringify(url)}`, { styled: false })
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)}`, { styled: false })
72
+ log.info(`Found Route: ${JSON.stringify(foundRoute)}`)
73
73
 
74
74
  if (!foundRoute) {
75
75
  // TODO: create a pretty 404 page