(rows: readonly CoreRow<"plugin_storage">[])
| 1464 | const ownerRank = (owner: Owner): number => readOwners.indexOf(owner); |
| 1465 | |
| 1466 | const sortByOwnerPrecedence = (rows: readonly CoreRow<"plugin_storage">[]) => |
| 1467 | [...rows].sort((left, right) => { |
| 1468 | const l = ownerRank(left.owner as Owner); |
| 1469 | const r = ownerRank(right.owner as Owner); |
| 1470 | return l - r || left.key.localeCompare(right.key); |
| 1471 | }); |
| 1472 | |
| 1473 | const getVisible = <T>(collection: string, key: string) => |
| 1474 | input.core.findMany("plugin_storage", { where: whereFor(collection, key) }).pipe( |
no test coverage detected