mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
Part 1 of 6: #52989 → #52990 → #52991 → #52992 → #52993 → #53138 Advisors becomes Issues. This PR maps lints to issues on the client: one issue per check, each lint an affected resource, plus one issue for banned IPs. There's no Issues API yet, so issues exist only while their check fails. Nothing renders them until #52990. ## How to test - Read `data/issues/lint-to-issue.ts`; the rest follows from it. - `pnpm --filter studio exec vitest run data/issues components/interfaces/Issues` --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Jordi Enric <jordi.err@gmail.com>
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import type { IssueAffectedResource } from './issue.types'
|
|
|
|
export function getUniqueIssueResources(affected: Pick<IssueAffectedResource, 'resource'>[]) {
|
|
return Array.from(
|
|
new Map(
|
|
affected.map(({ resource }) => [
|
|
JSON.stringify([resource.type, resource.schema, resource.name]),
|
|
resource,
|
|
])
|
|
).values()
|
|
)
|
|
}
|