-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathindex.ts
31 lines (29 loc) · 1.1 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { ComponentType, SVGProps } from 'react';
import { OpenTelemetry } from './opentelemetry';
import { Validation } from './validation';
import { Datadog } from './datadog';
import { Sentry } from './sentry';
import { Category, EcosystemElement, Technology } from '../types';
export const ECOSYSTEM_HOOKS: EcosystemElement[] = [OpenTelemetry, Validation, Datadog, Sentry]
.map((hook) => {
return hook.technologies.map(({ vendorOfficial, technology, href, category }): EcosystemElement => {
return {
title: `${hook.name} Hook`,
description: typeof hook.description === 'string' ? hook.description : hook.description(vendorOfficial),
type: 'Hook',
logo: hook.logo,
href,
allTechnologies: [technology],
technology,
vendorOfficial,
category,
};
});
})
.flat();
export type Hook = {
name: string;
logo: ComponentType<SVGProps<SVGSVGElement>>;
technologies: Array<{ technology: Technology; vendorOfficial: boolean; href: string; category: Category[] }>;
description: string | ((vendorSupported: boolean) => string);
};