balda 0.0.41 → 0.0.42
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/lib/cli.js +21 -21
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +10 -10
- package/lib/index.d.ts +10 -10
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/CLAUDE.md +0 -109
- package/bun.lock +0 -2918
package/lib/index.d.cts
CHANGED
|
@@ -1579,37 +1579,37 @@ declare class Router {
|
|
|
1579
1579
|
* Register a GET route under this router's base path with type-safe path parameters.
|
|
1580
1580
|
*/
|
|
1581
1581
|
get<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1582
|
-
get<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1582
|
+
get<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Register a POST route under this router's base path with type-safe path parameters.
|
|
1585
1585
|
*/
|
|
1586
1586
|
post<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1587
|
-
post<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1587
|
+
post<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1588
1588
|
/**
|
|
1589
1589
|
* Register a PATCH route under this router's base path with type-safe path parameters.
|
|
1590
1590
|
*/
|
|
1591
1591
|
patch<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1592
|
-
patch<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1592
|
+
patch<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Register a PUT route under this router's base path with type-safe path parameters.
|
|
1595
1595
|
*/
|
|
1596
1596
|
put<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1597
|
-
put<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1597
|
+
put<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1598
1598
|
/**
|
|
1599
1599
|
* Register a DELETE route under this router's base path with type-safe path parameters.
|
|
1600
1600
|
*/
|
|
1601
1601
|
delete<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1602
|
-
delete<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1602
|
+
delete<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1603
1603
|
/**
|
|
1604
1604
|
* Register an OPTIONS route under this router's base path with type-safe path parameters.
|
|
1605
1605
|
*/
|
|
1606
1606
|
options<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1607
|
-
options<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1607
|
+
options<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Register an HEAD route under this router's base path with type-safe path parameters.
|
|
1610
1610
|
*/
|
|
1611
1611
|
head<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1612
|
-
head<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1612
|
+
head<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Create a grouped router that shares a base path and middlewares.
|
|
1615
1615
|
* The callback receives a child router where routes are defined; routes
|
|
@@ -2662,11 +2662,11 @@ interface ServerInterface {
|
|
|
2662
2662
|
*/
|
|
2663
2663
|
exit: (code?: number) => void;
|
|
2664
2664
|
}
|
|
2665
|
-
type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TPath extends string = string> = {
|
|
2665
|
+
type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TPath extends string = string, TAll extends RequestSchema | unknown = unknown> = {
|
|
2666
2666
|
middlewares?: ServerRouteMiddleware[] | ServerRouteMiddleware;
|
|
2667
2667
|
body?: TBody;
|
|
2668
2668
|
query?: TQuery;
|
|
2669
|
-
all?:
|
|
2669
|
+
all?: TAll;
|
|
2670
2670
|
responses?: TResponses;
|
|
2671
2671
|
swagger?: SwaggerRouteOptions;
|
|
2672
2672
|
/** Cache configuration for this route. Requires cache to be configured in ServerOptions. */
|
|
@@ -2674,7 +2674,7 @@ type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Re
|
|
|
2674
2674
|
};
|
|
2675
2675
|
type ServerHook = () => SyncOrAsync;
|
|
2676
2676
|
type SignalEvent = Deno.Signal | NodeJS.Signals;
|
|
2677
|
-
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, InferBodyType<TBody>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType;
|
|
2677
|
+
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType;
|
|
2678
2678
|
|
|
2679
2679
|
type RunTimeType = "bun" | "node" | "deno";
|
|
2680
2680
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1579,37 +1579,37 @@ declare class Router {
|
|
|
1579
1579
|
* Register a GET route under this router's base path with type-safe path parameters.
|
|
1580
1580
|
*/
|
|
1581
1581
|
get<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1582
|
-
get<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1582
|
+
get<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Register a POST route under this router's base path with type-safe path parameters.
|
|
1585
1585
|
*/
|
|
1586
1586
|
post<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1587
|
-
post<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1587
|
+
post<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1588
1588
|
/**
|
|
1589
1589
|
* Register a PATCH route under this router's base path with type-safe path parameters.
|
|
1590
1590
|
*/
|
|
1591
1591
|
patch<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1592
|
-
patch<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1592
|
+
patch<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Register a PUT route under this router's base path with type-safe path parameters.
|
|
1595
1595
|
*/
|
|
1596
1596
|
put<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1597
|
-
put<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1597
|
+
put<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1598
1598
|
/**
|
|
1599
1599
|
* Register a DELETE route under this router's base path with type-safe path parameters.
|
|
1600
1600
|
*/
|
|
1601
1601
|
delete<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1602
|
-
delete<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1602
|
+
delete<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1603
1603
|
/**
|
|
1604
1604
|
* Register an OPTIONS route under this router's base path with type-safe path parameters.
|
|
1605
1605
|
*/
|
|
1606
1606
|
options<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1607
|
-
options<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1607
|
+
options<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Register an HEAD route under this router's base path with type-safe path parameters.
|
|
1610
1610
|
*/
|
|
1611
1611
|
head<TPath extends string = string>(path: TPath, handler: ControllerHandler<TPath>): void;
|
|
1612
|
-
head<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery>): void;
|
|
1612
|
+
head<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | undefined = undefined, TQuery extends RequestSchema | undefined = undefined, TAll extends RequestSchema | undefined = undefined>(path: TPath, options: StandardMethodOptions<TResponses, TBody, TQuery, TPath, TAll>, handler: ControllerHandler<TPath, TResponses, TBody, TQuery, TAll>): void;
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Create a grouped router that shares a base path and middlewares.
|
|
1615
1615
|
* The callback receives a child router where routes are defined; routes
|
|
@@ -2662,11 +2662,11 @@ interface ServerInterface {
|
|
|
2662
2662
|
*/
|
|
2663
2663
|
exit: (code?: number) => void;
|
|
2664
2664
|
}
|
|
2665
|
-
type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TPath extends string = string> = {
|
|
2665
|
+
type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TPath extends string = string, TAll extends RequestSchema | unknown = unknown> = {
|
|
2666
2666
|
middlewares?: ServerRouteMiddleware[] | ServerRouteMiddleware;
|
|
2667
2667
|
body?: TBody;
|
|
2668
2668
|
query?: TQuery;
|
|
2669
|
-
all?:
|
|
2669
|
+
all?: TAll;
|
|
2670
2670
|
responses?: TResponses;
|
|
2671
2671
|
swagger?: SwaggerRouteOptions;
|
|
2672
2672
|
/** Cache configuration for this route. Requires cache to be configured in ServerOptions. */
|
|
@@ -2674,7 +2674,7 @@ type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Re
|
|
|
2674
2674
|
};
|
|
2675
2675
|
type ServerHook = () => SyncOrAsync;
|
|
2676
2676
|
type SignalEvent = Deno.Signal | NodeJS.Signals;
|
|
2677
|
-
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, InferBodyType<TBody>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType;
|
|
2677
|
+
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType;
|
|
2678
2678
|
|
|
2679
2679
|
type RunTimeType = "bun" | "node" | "deno";
|
|
2680
2680
|
|