mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
15 lines
529 B
TypeScript
15 lines
529 B
TypeScript
import type { DoctorProviderInspection } from "./Doctor.js";
|
|
|
|
/** Select exact non-secret settings published by available providers. */
|
|
export const providerRegistrationEnvironment = (
|
|
inspections: readonly DoctorProviderInspection[],
|
|
): Readonly<Record<string, string>> =>
|
|
Object.fromEntries(
|
|
inspections
|
|
.filter(({ available }) => available)
|
|
.flatMap(({ registrationEnvironment }) =>
|
|
Object.entries(registrationEnvironment),
|
|
)
|
|
.sort(([left], [right]) => left.localeCompare(right)),
|
|
);
|