Hub 2.6.0: paged lists, job status filters, one-product updates, installs found on servers
- Jobs: Succeeded/Cancelled filters, product, type and church search, paged on the server; audit log and alerts paged on the server with search; every other list paged. - Updates: one product at a time with its own releases; an Events update pins the church's Accounts (or updates it when the release needs it, or installs it first); fixes the requirement check comparing an object. - A status job adds installs found on a server and ties them to their registration; unlinked registered sites trigger one (daily); heartbeats tie install records too; the install page shows its registration. 13 new tests (209). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,7 @@ function matches(row, where = {}) {
|
||||
if ('gt' in cond && !(v != null && cmp(v, cond.gt) > 0)) return false;
|
||||
if ('gte' in cond && !(v != null && cmp(v, cond.gte) >= 0)) return false;
|
||||
if ('equals' in cond && v !== cond.equals) return false;
|
||||
if ('contains' in cond && !(typeof v === 'string' && (cond.mode === 'insensitive' ? v.toLowerCase().includes(String(cond.contains).toLowerCase()) : v.includes(cond.contains)))) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -107,8 +108,9 @@ function createFakeDb() {
|
||||
return {
|
||||
findUnique: async ({ where, include: inc, select }) => include(name, t(name).find(r => matches(r, where)) || null, inc || select),
|
||||
findFirst: async ({ where, include: inc, orderBy } = {}) => include(name, sort(t(name).filter(r => matches(r, where)), orderBy)[0] || null, inc),
|
||||
findMany: async ({ where, include: inc, orderBy, take, select } = {}) => {
|
||||
findMany: async ({ where, include: inc, orderBy, take, skip, select } = {}) => {
|
||||
let list = sort(t(name).filter(r => matches(r, where)), orderBy);
|
||||
if (skip) list = list.slice(skip);
|
||||
if (take) list = list.slice(0, take);
|
||||
return list.map(r => include(name, r, inc || select));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user