@asenajs/ergenecore 4.0.0 → 5.0.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Asena Ergenecore Adapter
2
2
 
3
- [![Version](https://img.shields.io/badge/version-4.0.0-blue.svg)](https://asena.sh)
3
+ [![Version](https://img.shields.io/npm/v/@asenajs/ergenecore.svg)](https://asena.sh)
4
4
  [![Bun Version](https://img.shields.io/badge/Bun-1.4%2B-blueviolet)](https://bun.sh)
5
5
 
6
6
  **Blazing-fast** native Bun adapter for [Asena.js](https://github.com/asenajs/asena) - Built exclusively with Bun's native APIs for maximum performance.
@@ -40,7 +40,7 @@ Ergenecore is the **fastest** Asena adapter because it:
40
40
  ## Requirements
41
41
 
42
42
  - [Bun](https://bun.sh) v1.4 or higher
43
- - [@asenajs/asena](https://github.com/AsenaJs/Asena) v0.11.0 or higher (peer dependency)
43
+ - [@asenajs/asena](https://github.com/AsenaJs/Asena) v0.12.0 or higher (peer dependency)
44
44
  - [Zod](https://zod.dev) v4.3.6 or higher (peer dependency)
45
45
  - TypeScript v5.9.3 or higher (peer dependency)
46
46
 
@@ -54,6 +54,7 @@ export declare class Ergenecore extends AsenaAdapter<Context, ValidationSchemaWi
54
54
  * Handler for requests that matched no route
55
55
  */
56
56
  private notFoundHandler?;
57
+ private readonly staticFileReader;
57
58
  /**
58
59
  * Whether the adapter logs errors before handing them to the application.
59
60
  * Set false when your own handler already logs with a correlation id.
@@ -413,6 +414,10 @@ export declare class Ergenecore extends AsenaAdapter<Context, ValidationSchemaWi
413
414
  * @returns Bun-compatible route handler
414
415
  */
415
416
  private createRouteHandler;
417
+ private runRouteHandler;
418
+ private settleRoute;
419
+ private finishRoute;
420
+ private failRoute;
416
421
  /**
417
422
  * Type guard to check if validation schema has hook format
418
423
  *
@@ -432,6 +437,9 @@ export declare class Ergenecore extends AsenaAdapter<Context, ValidationSchemaWi
432
437
  * ```
433
438
  */
434
439
  private isValidationSchemaWithHook;
440
+ /** Prepare each legacy validator target once for this route, preserving method order. */
441
+ private prepareValidationSteps;
442
+ private unwrapValidationSchema;
435
443
  /**
436
444
  * Validates request data using Zod schemas
437
445
  *
@@ -455,7 +463,7 @@ export declare class Ergenecore extends AsenaAdapter<Context, ValidationSchemaWi
455
463
  * @param target - Validation target (body, query, param, header, form)
456
464
  * @returns Data to be validated
457
465
  */
458
- private extractValidationData;
466
+ private createValidationExtractor;
459
467
  /**
460
468
  * Serves static files using Bun.file() API
461
469
  *
@@ -482,6 +490,9 @@ export declare class Ergenecore extends AsenaAdapter<Context, ValidationSchemaWi
482
490
  * ```
483
491
  */
484
492
  private serveStaticFile;
493
+ private statFileResponse;
494
+ private serveResolvedStaticFile;
495
+ private withStaticExtras;
485
496
  /**
486
497
  * Builds response headers for static file serving
487
498
  *