@dunx/create-app 2.1.0 → 2.2.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunx/create-app",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Scaffold a new dunx application - bunx @dunx/create-app my-api",
5
5
  "keywords": [
6
6
  "bun",
@@ -96,7 +96,7 @@ export class LedgerController {
96
96
  * `/ledger/page` cannot be swallowed by `/ledger/:id`.
97
97
  */
98
98
  @Get('/page', pagedEntries)
99
- page(input: Input<typeof pagedEntries>): Promise<Page<Entry>> {
99
+ page(input: Input<typeof pagedEntries>): Page<Entry> {
100
100
  return this.ledger.page(input.query);
101
101
  }
102
102
 
@@ -63,10 +63,11 @@ export class Ledger implements OnInit, OnShutdown {
63
63
  * so `paginate` falls back to the primary key - `id` is unique on its own, so no
64
64
  * tie-break column is needed.
65
65
  *
66
- * `async` although bun-sqlite is synchronous, because `paginate` awaits the query
67
- * builder - the one code path that serves both dialects.
66
+ * Synchronous, because `paginate`'s return type follows its `db`: a
67
+ * `drizzle-orm/bun-sqlite` handle answers `all()` rather than a promise, so this
68
+ * method needs no `async` and neither does its caller.
68
69
  */
69
- page(options: PageOptions): Promise<Page<Entry>> {
70
+ page(options: PageOptions): Page<Entry> {
70
71
  return paginate<typeof ledger, Entry>({
71
72
  db: this.db,
72
73
  table: ledger,