Skip to content

Commit 96429cb

Browse files
committed
Lint and fix build
1 parent 4c3c05c commit 96429cb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dev-packages/node-integration-tests/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function startExpressServerAndSendPortToRunner(
3434
const address = server.address() as AddressInfo;
3535

3636
// @ts-expect-error If we write the port to the app we can read it within route handlers in tests
37-
const actualPort = app.port = port || address.port;
37+
const actualPort = (app.port = port || address.port);
3838

3939
// eslint-disable-next-line no-console
4040
console.log(`{"port":${actualPort}}`);

packages/core/src/tunnel.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import type { Client, Transport } from '@sentry/types';
2-
import { createEnvelope, dsnFromString, parseEnvelope } from '@sentry/utils';
31
import { getEnvelopeEndpointWithUrlEncodedAuth } from './api';
2+
import type { Client } from './client';
43
import { getClient } from './currentScopes';
4+
import type { Transport } from './types-hoist/transport';
5+
import { dsnFromString } from './utils-hoist/dsn';
6+
import { createEnvelope, parseEnvelope } from './utils-hoist/envelope';
57

68
interface HandleTunnelOptions {
79
/**
@@ -27,7 +29,7 @@ export async function handleTunnelEnvelope(
2729
envelopeBytes: Uint8Array,
2830
options: HandleTunnelOptions = {},
2931
): Promise<void> {
30-
const client = (options && options.client) || getClient();
32+
const client = options?.client || getClient();
3133

3234
if (!client) {
3335
throw new Error('No server client');
@@ -46,7 +48,7 @@ export async function handleTunnelEnvelope(
4648
return;
4749
}
4850

49-
if (!options.dsnAllowList || !options.dsnAllowList.includes(headers.dsn)) {
51+
if (!options.dsnAllowList?.includes(headers.dsn)) {
5052
throw new Error('DSN does not match server DSN or allow list');
5153
}
5254

0 commit comments

Comments
 (0)