Changelog - 2026-09-17
@venizia/ignis-kernel/repository
FeatureIn one line. A new entry point gives you the repository and datasource contract for a non-SQL transport (an HTTP request to another server, say) at 14.7 KB gzipped instead of 105.3 KB.
ts
import { AbstractDataSource, AbstractRepository } from '@venizia/ignis-kernel/repository';
import type { TFilter, TWhere } from '@venizia/ignis-kernel/repository';What changed
- What it carries.
AbstractRepository,AbstractDataSource,IDataSource, the CRUD contract interfaces (IRepository,IReadableRepository,ICreatableRepository,IUpdatableRepository,IDeletableRepository,IPersistableRepository,ICrudRepository),buildDataRange,TCount,TDataRange,TDataWithRange, the filter vocabulary, andAbstractEntity. - Same filter vocabulary. A consumer on another transport shares
where/order/limit/skipthrough@venizia/ignis-filter. CountSchemamoved,TCountis explicit.CountSchemaleftcommon/types/results.tsforcommon/types/result-schemas.ts, andTCountis written out as{ count: number }. Both files are re-exported from the same barrel, so no import path changes.
Who is affected
- Nobody, at the API. A new entry point; the root barrel is unchanged.
Details
What a consumer has to write:
AbstractRepositorydemands twelve abstract members. For a read-only resource, implementIReadableRepositoryinstead (five members).findis an overload with a range variant; declare both signatures.IRepositorynamesdataSource,entityandgetEntity.AbstractDataSourcedeclaresname,settingsandschemaas fields with no constructor that sets them. A subclass assigns them itself.
ts
class HttpDataSource extends AbstractDataSource<{ baseUrl: string }> {
override name = 'http';
override settings: { baseUrl: string };
override schema = {} as never;
constructor(opts: { baseUrl: string }) {
super({ scope: HttpDataSource.name });
this.settings = { baseUrl: opts.baseUrl };
}
async configure(): Promise<void> {}
}