bxo 0.0.5-dev.26 → 0.0.5-dev.28

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.
Files changed (2) hide show
  1. package/index.ts +5 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -90,7 +90,7 @@ export type Context<TConfig extends RouteConfig = {}> = {
90
90
  };
91
91
 
92
92
  // Handler function type with proper response typing
93
- type Handler<TConfig extends RouteConfig = {}, EC = {}> = (ctx: Context<TConfig> & EC) => Promise<InferResponseType<TConfig['response']>> | InferResponseType<TConfig['response']>;
93
+ type Handler<TConfig extends RouteConfig = {}, EC = {}> = (ctx: Context<TConfig> & EC) => Promise<InferResponseType<TConfig['response']> | any> | InferResponseType<TConfig['response']> | any;
94
94
 
95
95
  // Route definition
96
96
  interface Route {
@@ -332,7 +332,7 @@ export default class BXO {
332
332
  if (routeSegment === '*' && i === routeSegments.length - 1) {
333
333
  // Wildcard at end matches remaining path segments
334
334
  const remainingPath = pathSegments.slice(i).join('/');
335
- params['*'] = remainingPath;
335
+ params['*'] = decodeURIComponent(remainingPath);
336
336
  break;
337
337
  }
338
338
 
@@ -347,7 +347,7 @@ export default class BXO {
347
347
  } else if (routeSegment === '*') {
348
348
  // Single segment wildcard
349
349
  params['*'] = decodeURIComponent(pathSegment);
350
- } else if (routeSegment !== pathSegment) {
350
+ } else if (routeSegment !== decodeURIComponent(pathSegment)) {
351
351
  isMatch = false;
352
352
  break;
353
353
  }
@@ -396,7 +396,7 @@ export default class BXO {
396
396
  if (routeSegment === '*' && i === routeSegments.length - 1) {
397
397
  // Wildcard at end matches remaining path segments
398
398
  const remainingPath = pathSegments.slice(i).join('/');
399
- params['*'] = remainingPath;
399
+ params['*'] = decodeURIComponent(remainingPath);
400
400
  break;
401
401
  }
402
402
 
@@ -411,7 +411,7 @@ export default class BXO {
411
411
  } else if (routeSegment === '*') {
412
412
  // Single segment wildcard
413
413
  params['*'] = decodeURIComponent(pathSegment);
414
- } else if (routeSegment !== pathSegment) {
414
+ } else if (routeSegment !== decodeURIComponent(pathSegment)) {
415
415
  isMatch = false;
416
416
  break;
417
417
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bxo",
3
3
  "module": "index.ts",
4
- "version": "0.0.5-dev.26",
4
+ "version": "0.0.5-dev.28",
5
5
  "description": "A simple and lightweight web framework for Bun",
6
6
  "type": "module",
7
7
  "devDependencies": {