bazis 0.110.1 → 0.111.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.
@@ -6,10 +6,12 @@ import {
6
6
  Global,
7
7
  Module,
8
8
  singletonValue,
9
+ CLASS_PROVIDER_HOOK,
9
10
  type BazisModuleRef,
10
11
  } from "../di";
11
12
  import { loadBazisGeneratedRuntime } from "../generatedRuntime";
12
13
  import { missingCacheModuleCheck } from "../cache/http/missingCacheModuleCheck";
14
+ import { cacheableClassProviderHook } from "../cache/di/classProviderHook";
13
15
  import { httpModule, useModelValidator, type HttpModuleOptions, type ModelValidator } from "../http";
14
16
  import { grpcModule, type GrpcModuleOptions } from "../grpc";
15
17
  import { buildHttpOpenApiDocument } from "../http/OpenApi/openApiDocument";
@@ -322,6 +324,11 @@ export function composeApp(root: BazisModuleRef, options: RunAppOptions = {}): B
322
324
  // Warns about @OutputCache routes when no cache module is installed.
323
325
  globals.push({ global: true, providers: [missingCacheModuleCheck()] });
324
326
  }
327
+ // The cache wrapper of @Cacheable / @CacheableRedis classes, also without a cache
328
+ // module: it then needs ICache, and the graph check names the class and says to add
329
+ // cache: memory(). Without it the decorators would silently do nothing. The cache
330
+ // module registers the same hook, and DI keeps one.
331
+ globals.push({ global: true, providers: [singletonValue(CLASS_PROVIDER_HOOK, cacheableClassProviderHook)] });
325
332
  const appRoot: BazisModuleRef =
326
333
  globals.length > 0 || options.config !== undefined
327
334
  ? {
@@ -232,7 +232,7 @@ export class CodexAppServerClient implements CodexClient {
232
232
  if (method === "account/updated") this.modelCache = undefined;
233
233
  }, () => { this.clearLogin(); this.modelCache = undefined; });
234
234
  const initialized = await client.request("initialize", {
235
- clientInfo: { name: "bazis", title: "Bazis", version: "0.110.1" }, capabilities: { experimentalApi: true },
235
+ clientInfo: { name: "bazis", title: "Bazis", version: "0.111.0" }, capabilities: { experimentalApi: true },
236
236
  }, 15_000, signal);
237
237
  if (resolve(text(initialized.codexHome, 4096)) !== this.paths.home) throw new CodexError("PROTOCOL_ERROR");
238
238
  client.notify("initialized");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bazis",
3
- "version": "0.110.1",
3
+ "version": "0.111.0",
4
4
  "description": "Modular backend framework for Bun in TypeScript: DI wired by codegen, HTTP, a PostgreSQL ORM, JWT, WebSocket, agents and a CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Alexander Alenin",