{"version":3,"file":"getRequestUrl.js","sources":["../../../src/utils/getRequestUrl.ts"],"sourcesContent":["import type { RequestOptions } from 'node:http';\n\n/** Build a full URL from request options. */\nexport function getRequestUrl(requestOptions: RequestOptions): string {\n const protocol = requestOptions.protocol || '';\n const hostname = requestOptions.hostname || requestOptions.host || '';\n // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n // Also don't add port if the hostname already includes a port\n const port =\n !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\\d+)$/.test(hostname)\n ? ''\n : `:${requestOptions.port}`;\n const path = requestOptions.path ? requestOptions.path : '/';\n return `${protocol}//${hostname}${port}${path}`;\n}\n"],"names":[],"mappings":";;AAEA;AACO,SAAS,aAAa,CAAC,cAAc,EAA0B;AACtE,EAAE,MAAM,QAAS,GAAE,cAAc,CAAC,QAAA,IAAY,EAAE;AAChD,EAAE,MAAM,QAAS,GAAE,cAAc,CAAC,QAAS,IAAG,cAAc,CAAC,IAAK,IAAG,EAAE;AACvE;AACA;AACA,EAAE,MAAM,IAAK;AACb,IAAI,CAAC,cAAc,CAAC,IAAA,IAAQ,cAAc,CAAC,SAAS,EAAA,IAAM,cAAc,CAAC,SAAS,GAAA,IAAO,cAAc,CAAC,IAAI,CAAC,QAAQ;AACrH,QAAQ;AACR,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;AACA,EAAA,MAAA,IAAA,GAAA,cAAA,CAAA,IAAA,GAAA,cAAA,CAAA,IAAA,GAAA,GAAA;AACA,EAAA,OAAA,CAAA,EAAA,QAAA,CAAA,EAAA,EAAA,QAAA,CAAA,EAAA,IAAA,CAAA,EAAA,IAAA,CAAA,CAAA;AACA;;;;"}