2026-07-22 20:38:26 +08:00
|
|
|
import type { DoctorProviderInspection } from "./Doctor.js";
|
2026-10-11 10:10:01 -07:00
|
|
|
import { compareUnicodeCodePoints } from "../domain/unicodeCodePointOrder.js";
|
2026-07-22 20:38:26 +08:00
|
|
|
|
2026-10-06 16:53:33 +08:00
|
|
|
/** Preserve adapter-published settings independently of runtime readiness. */
|
2026-07-22 20:38:26 +08:00
|
|
|
export const providerRegistrationEnvironment = (
|
|
|
|
|
inspections: readonly DoctorProviderInspection[],
|
|
|
|
|
): Readonly<Record<string, string>> =>
|
|
|
|
|
Object.fromEntries(
|
|
|
|
|
inspections
|
|
|
|
|
.flatMap(({ registrationEnvironment }) =>
|
|
|
|
|
Object.entries(registrationEnvironment),
|
|
|
|
|
)
|
2026-10-11 10:10:01 -07:00
|
|
|
.sort(([left], [right]) => compareUnicodeCodePoints(left, right)),
|
2026-07-22 20:38:26 +08:00
|
|
|
);
|