refactor(db): keep the touched files within their size baselines

The users identity guard moves to repositories/_shared/user-identity.ts
(Users.repository.ts re-exports UserIdentityTakenError), the flag text pass
of the entity generator to scripts/generate-entities-flags.ts, and the
Wallet pass query takes the repository's EntityManager. The size baseline
of Users.repository.ts is lowered to what it holds now (1445 to 1421); a
few exports only their own file used are no longer exported.
This commit is contained in:
Maurice
2026-11-17 12:22:22 +01:00
parent 9e5379d092
commit a26db47cb6
11 changed files with 96 additions and 92 deletions
@@ -31,7 +31,6 @@ import {
checkEntities,
dumpEntities,
fixDbTimestampClassFieldTypes,
fixFlagClassFieldTypes,
fixJsonClassFieldTypes,
generateEntities,
injectJoinColumns,
@@ -46,6 +45,7 @@ import {
writeRepositoriesIfMissing,
type DefaultFixup,
} from '../../../scripts/generate-entities';
import { fixFlagClassFieldTypes } from '../../../scripts/generate-entities-flags';
import { Users } from '../../../src/db/entities/Users.entity';
import { UsersRepository } from '../../../src/db/repositories/Users.repository';
import { createSnapshotTestDb } from '../../helpers/db-mock';
@@ -207,7 +207,7 @@ describe('RULE1c_markBooleanColumns', () => {
const plain = 'export class Addons {\n enabled?: boolean | null;\n}\n';
expect(fixFlagClassFieldTypes(plain, fixups)).toBe(plain);
expect(() => fixFlagClassFieldTypes('export class Addons {\n enabled?: number | null;\n}\n', fixups)).toThrow(
/no IType<boolean, number> to simplify/,
/typed IType<boolean, number> to simplify/,
);
});
});