cursedbelt-server 4.36.0 → 4.37.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.
@@ -1,6 +1,5 @@
1
1
  import { ChunkStore } from 'cursedbelt-core/ctgr/chunk-store';
2
- import type { Hono } from 'hono';
3
- import type { CursedbeltEnv } from './context.js';
2
+ import type { Env, Hono } from 'hono';
4
3
  export interface CtgrTunnelOptions {
5
4
  /**
6
5
  * The accumulator for multi-chunk payloads. Share ONE across an app (the default is
@@ -13,4 +12,4 @@ export interface CtgrTunnelOptions {
13
12
  * at the paths the twins mirror (a twin path is `/ctgr<xx>` + the real path). Returns
14
13
  * the {@link ChunkStore} in use, for tests and metrics.
15
14
  */
16
- export declare function mountCtgrTunnel<E extends CursedbeltEnv = CursedbeltEnv>(app: Hono<E>, options?: CtgrTunnelOptions): ChunkStore;
15
+ export declare function mountCtgrTunnel<E extends Env = Env>(app: Hono<E>, options?: CtgrTunnelOptions): ChunkStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursedbelt-server",
3
- "version": "4.36.0",
3
+ "version": "4.37.0",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "description": "The app-facing Bun/Hono server tier of the cursedbelt split — storage, sharing, activity, guard, sync. React-free; cursedbelt-core below it.",
@@ -21,8 +21,7 @@ import {
21
21
  type CtgrDecoded,
22
22
  } from 'cursedbelt-core/ctgr/types';
23
23
  import { V0ChunkStore } from 'cursedbelt-core/ctgr/v0compat';
24
- import type { ExecutionContext, Hono } from 'hono';
25
- import type { CursedbeltEnv } from './context.js';
24
+ import type { Env, ExecutionContext, Hono } from 'hono';
26
25
  import { CTGR_ROUTE_PATTERN } from './ctgr.js';
27
26
 
28
27
  /** Query keys the codec adds to a twin URL — dropped when rebuilding the real request. */
@@ -42,7 +41,7 @@ export interface CtgrTunnelOptions {
42
41
  * at the paths the twins mirror (a twin path is `/ctgr<xx>` + the real path). Returns
43
42
  * the {@link ChunkStore} in use, for tests and metrics.
44
43
  */
45
- export function mountCtgrTunnel<E extends CursedbeltEnv = CursedbeltEnv>(
44
+ export function mountCtgrTunnel<E extends Env = Env>(
46
45
  app: Hono<E>,
47
46
  options: CtgrTunnelOptions = {},
48
47
  ): ChunkStore {
@@ -75,7 +74,7 @@ export function mountCtgrTunnel<E extends CursedbeltEnv = CursedbeltEnv>(
75
74
  } catch {
76
75
  executionCtx = undefined;
77
76
  }
78
- return app.fetch(realReq, c.env as E, executionCtx);
77
+ return app.fetch(realReq, c.env as never, executionCtx);
79
78
  });
80
79
 
81
80
  return store;