Skip to content

Commit a4160c7

Browse files
author
Luca Forstner
committed
Rename options type of node transport
1 parent f166ea0 commit a4160c7

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

packages/core/src/transports/base.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,6 @@ export interface BrowserTransportOptions extends BaseTransportOptions {
6767
sendClientReports?: boolean;
6868
}
6969

70-
// TODO: Move into Node transport
71-
export interface NodeTransportOptions extends BaseTransportOptions {
72-
headers?: Record<string, string>;
73-
// Set a HTTP proxy that should be used for outbound requests.
74-
httpProxy?: string;
75-
// Set a HTTPS proxy that should be used for outbound requests.
76-
httpsProxy?: string;
77-
// HTTPS proxy certificates path
78-
caCerts?: string;
79-
}
80-
8170
export interface NewTransport {
8271
send(request: Envelope): PromiseLike<TransportResponse>;
8372
flush(timeout?: number): PromiseLike<boolean>;

packages/node/src/transports/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export { BaseTransport } from './base';
22
export { HTTPTransport } from './http';
33
export { HTTPSTransport } from './https';
4-
export { makeNewHttpTransport, makeNewHttpsTransport } from './new';
4+
export { makeNewHttpTransport, makeNewHttpsTransport, NodeTransportOptions } from './new';

packages/node/src/transports/new.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { HTTPModule } from './base/http-module';
2020
// OR
2121
// - Split this file up and leave it in the transports folder
2222

23-
export interface HttpTransportOptions extends BaseTransportOptions {
23+
export interface NodeTransportOptions extends BaseTransportOptions {
2424
/** Define custom headers */
2525
headers?: Record<string, string>;
2626
/** Set a proxy that should be used for outbound requests. */
@@ -34,7 +34,7 @@ export interface HttpTransportOptions extends BaseTransportOptions {
3434
/**
3535
* Creates a Transport that uses http to send events to Sentry.
3636
*/
37-
export function makeNewHttpTransport(options: HttpTransportOptions): NewTransport {
37+
export function makeNewHttpTransport(options: NodeTransportOptions): NewTransport {
3838
// Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`
3939
const proxy = applyNoProxyOption(options.url, options.proxy || process.env.http_proxy);
4040

@@ -51,7 +51,7 @@ export function makeNewHttpTransport(options: HttpTransportOptions): NewTranspor
5151
/**
5252
* Creates a Transport that uses https to send events to Sentry.
5353
*/
54-
export function makeNewHttpsTransport(options: HttpTransportOptions): NewTransport {
54+
export function makeNewHttpsTransport(options: NodeTransportOptions): NewTransport {
5555
// Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`
5656
const proxy = applyNoProxyOption(options.url, options.proxy || process.env.https_proxy || process.env.http_proxy);
5757

@@ -94,7 +94,7 @@ function applyNoProxyOption(transportUrl: string, proxy: string | undefined): st
9494
* Creates a RequestExecutor to be used with `createTransport`.
9595
*/
9696
function createRequestExecutor(
97-
options: HttpTransportOptions,
97+
options: NodeTransportOptions,
9898
httpModule: HTTPModule,
9999
agent: http.Agent,
100100
): TransportRequestExecutor {

0 commit comments

Comments
 (0)