Clean up code found in the audit
- Replace every em-dash in src and server/src with a colon, comma or hyphen - Give every relative import its file extension (.jsx imports of .tsx fixed) - Delete old-historyMock.ts, unused exports, unused CSS utilities, the unused @ alias and the fallback option nothing passed - One copy each of initials, capitalize, byName and the server's marks() - Move the organization, chapter and event hooks from src/data to src/lib - Schema sync always throws on a mismatch (strict was never turned off) - Replace the placeholder README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4066e9ec61
commit
5274e09571
75 changed files with 282 additions and 688 deletions
|
|
@ -18,7 +18,7 @@
|
|||
ever set it, so every insert through the admin will fail.
|
||||
|
||||
The first is a silent repair. The other two are deployment bugs,
|
||||
so with { strict: true } they stop the service starting rather
|
||||
so they stop the service starting rather
|
||||
than waiting to surface one row at a time.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ function collectGroups(entity) {
|
|||
return groups;
|
||||
}
|
||||
|
||||
export function syncDescriptorsWithSchema(db, entities, { strict = true } = {}) {
|
||||
export function syncDescriptorsWithSchema(db, entities) {
|
||||
const list = Array.isArray(entities) ? entities.map((e) => [e.name ?? e.table, e]) : Object.entries(entities);
|
||||
|
||||
const inferred = [];
|
||||
|
|
@ -136,8 +136,7 @@ export function syncDescriptorsWithSchema(db, entities, { strict = true } = {})
|
|||
|
||||
if (problems.length) {
|
||||
const report = `[admin-schema] descriptor does not match the database:\n ${problems.join("\n ")}`;
|
||||
if (strict) throw new Error(report);
|
||||
console.error(report);
|
||||
throw new Error(report);
|
||||
}
|
||||
|
||||
return { inferred, problems };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue