Rocky_Mountain_Vending/.pnpm-store/v10/files/f0/f100090166ba6d61ae803902177249d2cd3b1531e75df086572bfc960dc7472abae6594ff5bdf42024286fcb611dcc4287a1ab3bc6828dab44b600c247f53e
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
9.2 KiB
Text

{"version":3,"file":"http.js","sources":["../../../src/transports/http.ts"],"sourcesContent":["import * as http from 'node:http';\nimport * as https from 'node:https';\nimport { Readable } from 'node:stream';\nimport { createGzip } from 'node:zlib';\nimport type {\n BaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequest,\n TransportRequestExecutor,\n} from '@sentry/core';\nimport { consoleSandbox, createTransport, suppressTracing } from '@sentry/core';\nimport { HttpsProxyAgent } from '../proxy';\nimport type { HTTPModule } from './http-module';\n\nexport interface NodeTransportOptions extends BaseTransportOptions {\n /** Define custom headers */\n headers?: Record<string, string>;\n /** Set a proxy that should be used for outbound requests. */\n proxy?: string;\n /** HTTPS proxy CA certificates */\n caCerts?: string | Buffer | Array<string | Buffer>;\n /** Custom HTTP module. Defaults to the native 'http' and 'https' modules. */\n httpModule?: HTTPModule;\n /** Allow overriding connection keepAlive, defaults to false */\n keepAlive?: boolean;\n}\n\n// Estimated maximum size for reasonable standalone event\nconst GZIP_THRESHOLD = 1024 * 32;\n\n/**\n * Gets a stream from a Uint8Array or string\n * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0\n */\nfunction streamFromBody(body: Uint8Array | string): Readable {\n return new Readable({\n read() {\n this.push(body);\n this.push(null);\n },\n });\n}\n\n/**\n * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.\n */\nexport function makeNodeTransport(options: NodeTransportOptions): Transport {\n let urlSegments: URL;\n\n try {\n urlSegments = new URL(options.url);\n } catch (e) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.',\n );\n });\n return createTransport(options, () => Promise.resolve({}));\n }\n\n const isHttps = urlSegments.protocol === 'https:';\n\n // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`\n // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`\n const proxy = applyNoProxyOption(\n urlSegments,\n options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy,\n );\n\n const nativeHttpModule = isHttps ? https : http;\n const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;\n\n // TODO(v10): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node\n // versions(>= 8) as they had memory leaks when using it: #2555\n const agent = proxy\n ? (new HttpsProxyAgent(proxy) as http.Agent)\n : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });\n\n const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);\n return createTransport(options, requestExecutor);\n}\n\n/**\n * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion.\n *\n * @param transportUrl The URL the transport intends to send events to.\n * @param proxy The client configured proxy.\n * @returns A proxy the transport should use.\n */\nfunction applyNoProxyOption(transportUrlSegments: URL, proxy: string | undefined): string | undefined {\n const { no_proxy } = process.env;\n\n const urlIsExemptFromProxy = no_proxy\n ?.split(',')\n .some(\n exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption),\n );\n\n if (urlIsExemptFromProxy) {\n return undefined;\n } else {\n return proxy;\n }\n}\n\n/**\n * Creates a RequestExecutor to be used with `createTransport`.\n */\nfunction createRequestExecutor(\n options: NodeTransportOptions,\n httpModule: HTTPModule,\n agent: http.Agent,\n): TransportRequestExecutor {\n const { hostname, pathname, port, protocol, search } = new URL(options.url);\n return function makeRequest(request: TransportRequest): Promise<TransportMakeRequestResponse> {\n return new Promise((resolve, reject) => {\n // This ensures we do not generate any spans in OpenTelemetry for the transport\n suppressTracing(() => {\n let body = streamFromBody(request.body);\n\n const headers: Record<string, string> = { ...options.headers };\n\n if (request.body.length > GZIP_THRESHOLD) {\n headers['content-encoding'] = 'gzip';\n body = body.pipe(createGzip());\n }\n\n const req = httpModule.request(\n {\n method: 'POST',\n agent,\n headers,\n hostname,\n path: `${pathname}${search}`,\n port,\n protocol,\n ca: options.caCerts,\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n\n res.setEncoding('utf8');\n\n // \"Key-value pairs of header names and values. Header names are lower-cased.\"\n // https://nodejs.org/api/http.html#http_message_headers\n const retryAfterHeader = res.headers['retry-after'] ?? null;\n const rateLimitsHeader = res.headers['x-sentry-rate-limits'] ?? null;\n\n resolve({\n statusCode: res.statusCode,\n headers: {\n 'retry-after': retryAfterHeader,\n 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader)\n ? rateLimitsHeader[0] || null\n : rateLimitsHeader,\n },\n });\n },\n );\n\n req.on('error', reject);\n body.pipe(req);\n });\n });\n };\n}\n"],"names":["Readable","consoleSandbox","createTransport","HttpsProxyAgent","suppressTracing","createGzip"],"mappings":";;;;;;;;;AA4BA;AACA,MAAM,cAAA,GAAiB,IAAA,GAAO,EAAE;;AAEhC;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,IAAI,EAAiC;AAC7D,EAAE,OAAO,IAAIA,oBAAQ,CAAC;AACtB,IAAI,IAAI,GAAG;AACX,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACrB,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACrB,KAAK;AACL,GAAG,CAAC;AACJ;;AAEA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,OAAO,EAAmC;AAC5E,EAAE,IAAI,WAAW;;AAEjB,EAAE,IAAI;AACN,IAAI,WAAA,GAAc,IA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