Changelog - 2026-09-23
@repository({ type })
FeatureIn one line. A repository over another service's API has no model, and @repository no longer demands one.
import { HttpRepository } from '@venizia/ignis-connectors/http';
import { repository, RepositoryTypes } from '@venizia/ignis';
@repository({ type: RepositoryTypes.REMOTE, dataSource: CatalogDataSource })
export class ProductRepository extends HttpRepository<TProduct> {
constructor(dataSource: CatalogDataSource) {
super({ dataSource, resource: 'products' });
}
}RepositoryTypes.MODEL(the default) requiresmodel.RepositoryTypes.REMOTErefuses it and keeps the datasource injection.- No existing repository is affected. Omitting
typemeansMODEL. - TypeScript rejects a
MODELrepository withoutmodeland aREMOTEone with it. A JavaScript caller gets the same answer at decoration time, as does an unknowntype. - A bare
@repository()on a subclass inherits the parent'stypewith its model and datasource. getRepositoryMetadata()now returns theTRepositoryMetadataunion, so its.modelis typed... | undefined. Code that passes.modelon stops compiling. Checkmodelor narrow ontypefirst.
See Read another service's API.
defineCrudController injects its repository
FeatureIn one line. The generated controller injects the repository named in repository.name, so the subclass needs no constructor.
Before:
@controller({ path: BASE_PATH })
export class NoteController extends BaseCrudController {
constructor(
@inject({
key: BindingKeys.build({ namespace: BindingNamespaces.REPOSITORY, key: NoteRepository.name }),
})
repository: NoteRepository,
) {
super(repository);
}
}After:
@controller({ path: BASE_PATH })
export class NoteController extends BaseCrudController {}- Affected: a
defineCrudControllersubclass with no decorated constructor parameter now receivesrepositories.<repository.name>at parameter 0. That name must match a bound repository, or resolving the controller fails. - Not affected: a subclass with an explicit
@injectconstructor. Its own injection still wins. - An empty
repository.namethrows when the controller is defined. - Fixed on the way: a subclass's
@injectno longer rewrites the injection list its parent owns, so two subclasses of one generated controller can inject differently. - Bump every
@venizia/*package of this release together.- Two subclasses of one generated CRUD or search controller keep separate injections only on the new inversion; on inversion 0.2.0-23 the subclass rewrites its parent's list.
- A partial bump fails loud: an old kernel next to the new connectors,
@venizia/ignisor worker throwserrorResponses is not a functionat boot, rejectsstop(), or fails to link the connectors' search controllers. - A partial bump can also fail silent: a new kernel next to old connectors stops reporting the audit keys, so the CRUD routes no longer omit them - writable again, as before this release.
HttpDataSource accepts a relative baseUrl
Featurenew HttpDataSource({ baseUrl: '/api' }) threw Invalid URL on the first request. A relative baseUrl now resolves against location.href, so a page or a Web Worker can call its own origin or a dev-server proxy. A server has no location, so there a relative baseUrl fails and names the fix: pass an absolute URL. An absolute baseUrl is unchanged.
RequestSpyMiddleware no longer drains upload bodies
Bug FixIn one line. A handler that streams req.raw.body on, such as an upload proxy, failed with Body object should not be disturbed or locked. It now works, and binary bodies are no longer mangled.
application/jsonand form types are parsed as before; a malformed body is still a 400.text/*is read from a clone, or from Hono's cache when a middleware already read it.- Anything else except
application/octet-streamis not read, and is logged as<N bytes, content-type>. - Affected: any route behind
RequestTrackerComponentthat receives a binary body with its real content type. Nothing to change on your side. parseBodycallers: a binary type now returns the<N bytes, content-type>description instead of mangled text.