Socket
Socket
Sign inDemoInstall

@sentry/core

Package Overview
Dependencies
2
Maintainers
11
Versions
486
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.113.0 to 7.114.0

1

cjs/baseclient.js

@@ -92,2 +92,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

this._transport = options.transport({
tunnel: this._options.tunnel,
recordDroppedEvent: this.recordDroppedEvent.bind(this),

@@ -94,0 +95,0 @@ ...options.transportOptions,

46

cjs/transports/multiplexed.js

@@ -36,2 +36,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

return {
...transport,
send: async (envelope) => {

@@ -45,3 +46,2 @@ const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);

},
flush: timeout => transport.flush(timeout),
};

@@ -51,2 +51,15 @@ };

/** Overrides the DSN in the envelope header */
function overrideDsn(envelope, dsn) {
return utils.createEnvelope(
dsn
? {
...envelope[0],
dsn,
}
: envelope[0],
envelope[1],
);
}
/**

@@ -61,3 +74,3 @@ * Creates a transport that can send events to different DSNs depending on the envelope contents.

const fallbackTransport = createTransport(options);
const otherTransports = {};
const otherTransports = new Map();

@@ -69,3 +82,5 @@ function getTransport(dsn, release) {

if (!otherTransports[key]) {
let transport = otherTransports.get(key);
if (!transport) {
const validatedDsn = utils.dsnFromString(dsn);

@@ -75,10 +90,13 @@ if (!validatedDsn) {

}
const url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn);
otherTransports[key] = release
const url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel);
transport = release
? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })
: createTransport({ ...options, url });
otherTransports.set(key, transport);
}
return otherTransports[key];
return [dsn, transport];
}

@@ -104,6 +122,9 @@

if (transports.length === 0) {
transports.push(fallbackTransport);
// Don't override the DSN in the header for the fallback transport. '' is falsy
transports.push(['', fallbackTransport]);
}
const results = await Promise.all(transports.map(transport => transport.send(envelope)));
const results = await Promise.all(
transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))),
);

@@ -114,5 +135,8 @@ return results[0];

async function flush(timeout) {
const allTransports = [...Object.keys(otherTransports).map(dsn => otherTransports[dsn]), fallbackTransport];
const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));
return results.every(r => r);
const promises = [await fallbackTransport.flush(timeout)];
for (const [, transport] of otherTransports) {
promises.push(await transport.flush(timeout));
}
return promises.every(r => r);
}

@@ -119,0 +143,0 @@

Object.defineProperty(exports, '__esModule', { value: true });
const SDK_VERSION = '7.113.0';
const SDK_VERSION = '7.114.0';
exports.SDK_VERSION = SDK_VERSION;
//# sourceMappingURL=version.js.map

@@ -90,2 +90,3 @@ import { makeDsn, logger, checkOrSetAlreadyCaught, isParameterizedString, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';

this._transport = options.transport({
tunnel: this._options.tunnel,
recordDroppedEvent: this.recordDroppedEvent.bind(this),

@@ -92,0 +93,0 @@ ...options.transportOptions,

@@ -1,2 +0,2 @@

import { dsnFromString, forEachEnvelopeItem } from '@sentry/utils';
import { createEnvelope, dsnFromString, forEachEnvelopeItem } from '@sentry/utils';
import { getEnvelopeEndpointWithUrlEncodedAuth } from '../api.js';

@@ -34,2 +34,3 @@

return {
...transport,
send: async (envelope) => {

@@ -43,3 +44,2 @@ const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);

},
flush: timeout => transport.flush(timeout),
};

@@ -49,2 +49,15 @@ };

/** Overrides the DSN in the envelope header */
function overrideDsn(envelope, dsn) {
return createEnvelope(
dsn
? {
...envelope[0],
dsn,
}
: envelope[0],
envelope[1],
);
}
/**

@@ -59,3 +72,3 @@ * Creates a transport that can send events to different DSNs depending on the envelope contents.

const fallbackTransport = createTransport(options);
const otherTransports = {};
const otherTransports = new Map();

@@ -67,3 +80,5 @@ function getTransport(dsn, release) {

if (!otherTransports[key]) {
let transport = otherTransports.get(key);
if (!transport) {
const validatedDsn = dsnFromString(dsn);

@@ -73,10 +88,13 @@ if (!validatedDsn) {

}
const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn);
otherTransports[key] = release
const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel);
transport = release
? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })
: createTransport({ ...options, url });
otherTransports.set(key, transport);
}
return otherTransports[key];
return [dsn, transport];
}

@@ -102,6 +120,9 @@

if (transports.length === 0) {
transports.push(fallbackTransport);
// Don't override the DSN in the header for the fallback transport. '' is falsy
transports.push(['', fallbackTransport]);
}
const results = await Promise.all(transports.map(transport => transport.send(envelope)));
const results = await Promise.all(
transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))),
);

@@ -112,5 +133,8 @@ return results[0];

async function flush(timeout) {
const allTransports = [...Object.keys(otherTransports).map(dsn => otherTransports[dsn]), fallbackTransport];
const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));
return results.every(r => r);
const promises = [await fallbackTransport.flush(timeout)];
for (const [, transport] of otherTransports) {
promises.push(await transport.flush(timeout));
}
return promises.every(r => r);
}

@@ -117,0 +141,0 @@

@@ -1,4 +0,4 @@

const SDK_VERSION = '7.113.0';
const SDK_VERSION = '7.114.0';
export { SDK_VERSION };
//# sourceMappingURL=version.js.map
{
"name": "@sentry/core",
"version": "7.113.0",
"version": "7.114.0",
"description": "Base implementation for all Sentry JavaScript SDKs",

@@ -32,4 +32,4 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/types": "7.113.0",
"@sentry/utils": "7.113.0"
"@sentry/types": "7.114.0",
"@sentry/utils": "7.114.0"
},

@@ -36,0 +36,0 @@ "madge": {

@@ -1,2 +0,2 @@

export declare const SDK_VERSION = "7.113.0";
export declare const SDK_VERSION = "7.114.0";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export declare const SDK_VERSION = "7.113.0";
export declare const SDK_VERSION = "7.114.0";
//# sourceMappingURL=version.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc