galbe 0.15.5 → 0.15.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,6 +1,6 @@
1
1
  {
2
2
  "name": "galbe",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "description": "Fast, lightweight and highly customizable JavaScript web framework based on Bun",
5
5
  "author": "Pierre Caillaud M (https://github.com/pierre-cm)",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { Server } from 'bun'
2
1
  import type { RouteFileMeta } from './routes'
3
2
  import type {
4
3
  GalbeConfig,
@@ -130,7 +129,7 @@ export class Galbe {
130
129
  stopCb: (() => void)[] = []
131
130
  errorCb: ErrorHandler[] = []
132
131
  listening: boolean = false
133
- server?: Server<any>
132
+ server?: Awaited<ReturnType<typeof server>>
134
133
  plugins: GalbePlugin[] = []
135
134
  constructor(config?: GalbeConfig) {
136
135
  this.config = config ?? {}
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Serve, SocketAddress, TLSOptions } from 'bun'
1
+ import type { SocketAddress, TLSOptions } from 'bun'
2
2
  import type {
3
3
  STAny,
4
4
  STArray,
@@ -141,7 +141,7 @@ export type GalbeConfig = {
141
141
  /** Enable or disable TLS support. */
142
142
  tls?: TLSOptions
143
143
  /** Extra options passed through to `Bun.serve` (e.g. `maxRequestBodySize`, `idleTimeout`). `port`, `fetch` and `error` are ignored, and the dedicated `hostname`, `reusePort` and `tls` config keys take precedence. */
144
- server?: Partial<Omit<Serve.Options<any>, 'port' | 'fetch' | 'error'>> | TLSOptions
144
+ server?: Partial<Omit<Parameters<typeof Bun.serve>[0], 'port' | 'fetch' | 'error'>> | TLSOptions
145
145
  /** A Glob Pattern or a list of Glob patterns defining the route files to be analyzed by the Automatic Route Analyzer. */
146
146
  routes?: boolean | string | string[]
147
147
  router?: { cacheEnabled: boolean; cacheLimit?: number }