Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix(utils): keep the __proto__ header (#2680)
Ephraim Duncana55d570b9814
diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.tsindex 4fef0aeb2..707719448 100644--- a/packages/utils/src/index.ts+++ b/packages/utils/src/index.ts@@ -1,34 +1,28 @@export { assertSafeUrl, assertSafeUrlSync, safeUrlSchema } from "./ssrf";export {- httpPayloadSchema,- type HttpPayload,- tpcPayloadSchema,- type TcpPayload,- DNSPayloadSchema,type DNSPayload,- icmpPayloadSchema,- grpcPayloadSchema,+ DNSPayloadSchema,GRPC_TLS_MODES,- type IcmpPayload,type GrpcPayload,+ grpcPayloadSchema,+ type HttpPayload,+ httpPayloadSchema,+ type IcmpPayload,+ icmpPayloadSchema,+ type TcpPayload,+ tpcPayloadSchema,} from "./payloads";export {+ MONITOR_JOB_TYPES,MONITOR_METHODS,MONITOR_STATUSES,- MONITOR_JOB_TYPES,} from "./constants";export { buildCurlCommand, type CurlRequest } from "./curl";-export { yieldMany, iteratorToStream } from "./stream";-export { statusLabel, type PageUpdateStatus } from "./status";+export { iteratorToStream, yieldMany } from "./stream";+export { type PageUpdateStatus, statusLabel } from "./status";-export function transformHeaders(headers: { key: string; value: string }[]) {- return headers.length > 0- ? headers.reduce(- (acc, curr) => {- acc[curr.key] = curr.value;- return acc;- },- {} as Record<string, string>,- )- : {};+export function transformHeaders(+ headers: { key: string; value: string }[],+): Record<string, string> {+ return Object.fromEntries(headers.map(({ key, value }) => [key, value]));}