start-slicemachine 0.12.57-beta.8 → 0.12.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StartSliceMachineProcess.cjs.map +1 -1
- package/dist/StartSliceMachineProcess.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/context.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/context.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/http.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/modules.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/modules.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/module.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/module.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/index.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/index.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/transports/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/transports/http.js.map +1 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -1
- package/dist/_node_modules/fetch-blob/file.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/file.js.map +1 -1
- package/dist/_node_modules/fetch-blob/index.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/index.js.map +1 -1
- package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/streams.js.map +1 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -1
- package/dist/_node_modules/node-domexception/index.cjs.map +1 -1
- package/dist/_node_modules/node-domexception/index.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/body.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/headers.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/index.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/request.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/is.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -1
- package/dist/_node_modules/yallist/yallist.cjs.map +1 -1
- package/dist/_node_modules/yallist/yallist.js.map +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/legacyMigrations/detectFramework.cjs.map +1 -1
- package/dist/legacyMigrations/detectFramework.js.map +1 -1
- package/dist/legacyMigrations/migrateAssets.cjs.map +1 -1
- package/dist/legacyMigrations/migrateAssets.js.map +1 -1
- package/dist/legacyMigrations/migrateSMJSON.cjs.map +1 -1
- package/dist/legacyMigrations/migrateSMJSON.js.map +1 -1
- package/dist/lib/checkIsSentryEnabled.cjs.map +1 -1
- package/dist/lib/checkIsSentryEnabled.js.map +1 -1
- package/dist/lib/createSliceMachineExpressApp.cjs.map +1 -1
- package/dist/lib/createSliceMachineExpressApp.js.map +1 -1
- package/dist/lib/locateFileUpward.cjs.map +1 -1
- package/dist/lib/locateFileUpward.js.map +1 -1
- package/dist/lib/safelyExecute.cjs.map +1 -1
- package/dist/lib/safelyExecute.js.map +1 -1
- package/dist/lib/sentryFrontendTunnel.cjs.map +1 -1
- package/dist/lib/sentryFrontendTunnel.js.map +1 -1
- package/dist/lib/setupSentry.cjs.map +1 -1
- package/dist/lib/setupSentry.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.js.map +1 -1
- package/dist/packages/start-slicemachine/package.json.cjs +1 -1
- package/dist/packages/start-slicemachine/package.json.js +1 -1
- package/package.json +4 -5
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareEvent.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACA,OACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAY,MAAO;AAAA,IACpD,WAAW,MAAM,aAAa,uBAAwB;AAAA,EAC1D;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC5C;AAID,QAAM,aAAa,cAAc,OAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClB,0BAAsB,UAAU,KAAK,SAAS;AAAA,EAC/C;AAED,QAAM,wBAAwB,UAAU,OAAO,qBAAqB,OAAO,mBAAoB,IAAG;AAKlG,QAAM,OAAO,iBAAiB;AAE9B,MAAI,gBAAgB;AAClB,UAAM,gBAAgB,eAAe;AACrC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A,EACA;AACF;AAEA,SAAS,mBAAmB,MAAM;AAChC,SAAO,OAAO,KAAK,IAAI,EAAE,KAAK,SAAO,mBAAmB,SAAS,GAAG,CAAE;AACxE;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"prepareEvent.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACA,OACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAY,MAAO;AAAA,IACpD,WAAW,MAAM,aAAa,uBAAwB;AAAA,EAC1D;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC5C;AAID,QAAM,aAAa,cAAc,OAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClB,0BAAsB,UAAU,KAAK,SAAS;AAAA,EAC/C;AAED,QAAM,wBAAwB,UAAU,OAAO,qBAAqB,OAAO,mBAAoB,IAAG;AAKlG,QAAM,OAAO,iBAAiB;AAE9B,MAAI,gBAAgB;AAClB,UAAM,gBAAgB,eAAe;AACrC,mBAAe,MAAM,aAAa;AAAA,EACnC;AAED,MAAI,YAAY;AACd,UAAM,iBAAiB,WAAW;AAClC,mBAAe,MAAM,cAAc;AAAA,EACpC;AAED,QAAM,cAAc,CAAC,GAAI,KAAK,eAAe,CAAA,GAAK,GAAG,KAAK,WAAW;AACrE,MAAI,YAAY,QAAQ;AACtB,SAAK,cAAc;AAAA,EACpB;AAED,wBAAsB,UAAU,IAAI;AAGpC,QAAM,kBAAkB;AAAA,IACtB,GAAG;AAAA;AAAA,IAEH,GAAG,yBAA0B;AAAA;AAAA,IAE7B,GAAG,KAAK;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AAM,SAAS,MAAM,MAAM,OAAO,UAAU;AAAA,IACxF;AAAA,EACF;AAGD,MAAI,MAAM,OAAO;AACf,eAAW,QAAQ,MAAM,MAAM,IAAI,UAAQ;AACzC,YAAM,OAAO,WAAW,IAAI,EAAE;AAE9B,UAAI,MAAM;AAGR,aAAK,OAAO,UAAU,MAAM,OAAO,UAAU;AAAA,MAC9C;AAED,aAAO;AAAA,IACb,CAAK;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,cAAc,OAAO,gBAAgB;AAC5C,MAAI,CAAC,gBAAgB;AACnB,WAAO;AAAA,EACR;AAED,QAAM,aAAa,QAAQ,MAAM,MAAO,IAAG,IAAI;AAC/C,aAAW,OAAO,cAAc;AAChC,SAAO;AACT;AAMA,SAAS,+BACP,MACA;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAGD,MAAI,sBAAsB,IAAI,GAAG;AAC/B,WAAO,EAAE,gBAAgB;EAC1B;AAED,MAAI,mBAAmB,IAAI,GAAG;AAC5B,WAAO;AAAA,MACL,gBAAgB;AAAA,IACtB;AAAA,EACG;AAED,SAAO;AACT;AAEA,SAAS,sBACP,MACA;AACA,SAAO,gBAAgB,SAAS,OAAO,SAAS;AAClD;AAEA,MAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,SAAS,mBAAmB,MAAM;AAChC,SAAO,OAAO,KAAK,IAAI,EAAE,KAAK,SAAO,mBAAmB,SAAS,GAAG,CAAE;AACxE;","x_google_ignoreList":[0]}
|
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkMetadata.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name","SDK_VERSION"],"mappings":";;;AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB;AAAA,
|
|
1
|
+
{"version":3,"file":"sdkMetadata.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name","SDK_VERSION"],"mappings":";;;AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAASC,QAAW;AAAA,MAC5B,EAAQ;AAAA,MACF,SAASA,QAAW;AAAA,IAC1B;AAAA,EACG;AAED,UAAQ,YAAY;AACtB;;","x_google_ignoreList":[0]}
|
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkMetadata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name"],"mappings":";AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB;AAAA,
|
|
1
|
+
{"version":3,"file":"sdkMetadata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name"],"mappings":";AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAAS;AAAA,MACjB,EAAQ;AAAA,MACF,SAAS;AAAA,IACf;AAAA,EACG;AAED,UAAQ,YAAY;AACtB;","x_google_ignoreList":[0]}
|
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-errors.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":["isInstanceOf","truncate"],"mappings":";;;;AAMA,SAAS,4BACP,kCACA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AA2C,cAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"aggregate-errors.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":["isInstanceOf","truncate"],"mappings":";;;;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAACA,GAAY,aAAC,KAAK,mBAAmB,KAAK,GAAG;AACxG;AAAA,EACD;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UACA;AAAA,QACV;AAAA,MACO;AAAA,IACP,CAAK;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,4CAA4C,WAAW,aAAa;AAE3E,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,GAAI,UAAU,SAAS,oBAAoB,EAAE,oBAAoB,KAAI;AAAA,IACrE,cAAc;AAAA,EAClB;AACA;AAEA,SAAS,2CACP,WACA,QACA,aACA,UACA;AAEA,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,MAAM;AAAA,IACN;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,EACf;AACA;AAOA,SAAS,4BAA4B,YAAY,gBAAgB;AAC/D,SAAO,WAAW,IAAI,eAAa;AACjC,QAAI,UAAU,OAAO;AACnB,gBAAU,QAAQC,OAAQ,SAAC,UAAU,OAAO,cAAc;AAAA,IAC3D;AACD,WAAO;AAAA,EACX,CAAG;AACH;;","x_google_ignoreList":[0]}
|
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-errors.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":[],"mappings":";;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAAC,aAAa,KAAK,mBAAmB,KAAK,GAAG;AACxG;AAAA,EACD;AAGD,QAAM,oBACJ,MAAM,UAAU,OAAO,SAAS,IAAI,MAAM,UAAU,OAAO,MAAM,UAAU,OAAO,SAAS,CAAC,IAAI;AAGlG,MAAI,mBAAmB;AACrB,UAAM,UAAU,SAAS;AAAA,MACvB;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA,MAAM,UAAU;AAAA,QAChB;AAAA,QACA;AAAA,MACD;AAAA,MACD;AAAA,IACN;AAAA,EACG;AACH;AAEA,SAAS,6BACP,kCACA,QACA,OACA,OACA,KACA,gBACA,WACA,aACA;AACA,MAAI,eAAe,UAAU,QAAQ,GAAG;AACtC,WAAO;AAAA,EACR;AAED,MAAI,gBAAgB,CAAC,GAAG,cAAc;AAGtC,MAAI,aAAa,MAAM,GAAG,GAAG,KAAK,GAAG;AACnC,gDAA4C,WAAW,WAAW;AAClE,UAAM,eAAe,iCAAiC,QAAQ,MAAM,GAAG,CAAC;AACxE,UAAM,iBAAiB,cAAc;AACrC,+CAA2C,cAAc,KAAK,gBAAgB,WAAW;AACzF,oBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,GAAG;AAAA,MACT;AAAA,MACA,CAAC,cAAc,GAAG,aAAa;AAAA,MAC/B;AAAA,MACA;AAAA,IACN;AAAA,EACG;AAID,MAAI,MAAM,QAAQ,MAAM,MAAM,GAAG;AAC/B,UAAM,OAAO,QAAQ,CAAC,YAAY,MAAM;AACtC,UAAI,aAAa,YAAY,KAAK,GAAG;AACnC,oDAA4C,WAAW,WAAW;AAClE,cAAM,eAAe,iCAAiC,QAAQ,UAAU;AACxE,cAAM,iBAAiB,cAAc;AACrC,mDAA2C,cAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"aggregate-errors.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":[],"mappings":";;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAAC,aAAa,KAAK,mBAAmB,KAAK,GAAG;AACxG;AAAA,EACD;AAGD,QAAM,oBACJ,MAAM,UAAU,OAAO,SAAS,IAAI,MAAM,UAAU,OAAO,MAAM,UAAU,OAAO,SAAS,CAAC,IAAI;AAGlG,MAAI,mBAAmB;AACrB,UAAM,UAAU,SAAS;AAAA,MACvB;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA,MAAM,UAAU;AAAA,QAChB;AAAA,QACA;AAAA,MACD;AAAA,MACD;AAAA,IACN;AAAA,EACG;AACH;AAEA,SAAS,6BACP,kCACA,QACA,OACA,OACA,KACA,gBACA,WACA,aACA;AACA,MAAI,eAAe,UAAU,QAAQ,GAAG;AACtC,WAAO;AAAA,EACR;AAED,MAAI,gBAAgB,CAAC,GAAG,cAAc;AAGtC,MAAI,aAAa,MAAM,GAAG,GAAG,KAAK,GAAG;AACnC,gDAA4C,WAAW,WAAW;AAClE,UAAM,eAAe,iCAAiC,QAAQ,MAAM,GAAG,CAAC;AACxE,UAAM,iBAAiB,cAAc;AACrC,+CAA2C,cAAc,KAAK,gBAAgB,WAAW;AACzF,oBAAgB;AAAA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[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baggage.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":["isString","DEBUG_BUILD","logger"],"mappings":";;;;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAACA,GAAQ,SAAC,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACR;AAID,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MACjC;AACD,aAAO;AAAA,IACR,GAAE,CAAE,CAAA;AAAA,EACT,OAAS;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACR;AAED,oBAAgB,sBAAsB,aAAa;AAAA,EACpD;AAGD,QAAM,yBAAyB,OAAO,QAAQ,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACzF,QAAI,IAAI,MAAM,+BAA+B,GAAG;AAC9C,YAAM,iBAAiB,IAAI,MAAM,0BAA0B,MAAM;AACjE,UAAI,cAAc,IAAI;AAAA,IACvB;AACD,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AAIL,MAAI,OAAO,KAAK,sBAAsB,EAAE,SAAS,GAAG;AAClD,WAAO;AAAA,EACX,OAAS;AACL,WAAO;AAAA,EACR;AACH;AAWA,SAAS,4CAEP,wBACA;AACA,MAAI,CAAC,wBAAwB;AAC3B,WAAO;AAAA,EACR;AAGD,QAAM,oBAAoB,OAAO,QAAQ,sBAAsB,EAAE;AAAA,IAC/D,CAAC,KAAK,CAAC,QAAQ,QAAQ,MAAM;AAC3B,UAAI,UAAU;AACZ,YAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"baggage.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":["isString","DEBUG_BUILD","logger"],"mappings":";;;;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAACA,GAAQ,SAAC,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACR;AAID,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MACjC;AACD,aAAO;AAAA,IACR,GAAE,CAAE,CAAA;AAAA,EACT,OAAS;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACR;AAED,oBAAgB,sBAAsB,aAAa;AAAA,EACpD;AAGD,QAAM,yBAAyB,OAAO,QAAQ,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACzF,QAAI,IAAI,MAAM,+BAA+B,GAAG;AAC9C,YAAM,iBAAiB,IAAI,MAAM,0BAA0B,MAAM;AACjE,UAAI,cAAc,IAAI;AAAA,IACvB;AACD,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AAIL,MAAI,OAAO,KAAK,sBAAsB,EAAE,SAAS,GAAG;AAClD,WAAO;AAAA,EACX,OAAS;AACL,WAAO;AAAA,EACR;AACH;AAWA,SAAS,4CAEP,wBACA;AACA,MAAI,CAAC,wBAAwB;AAC3B,WAAO;AAAA,EACR;AAGD,QAAM,oBAAoB,OAAO,QAAQ,sBAAsB,EAAE;AAAA,IAC/D,CAAC,KAAK,CAAC,QAAQ,QAAQ,MAAM;AAC3B,UAAI,UAAU;AACZ,YAAI,GAAG,yBAAyB,GAAG,MAAM,EAAE,IAAI;AAAA,MAChD;AACD,aAAO;AAAA,IACR;AAAA,IACD,CAAE;AAAA,EACN;AAEE,SAAO,sBAAsB,iBAAiB;AAChD;AAQA,SAAS,sBAAsB,eAAe;AAC5C,SAAO,cACJ,MAAM,GAAG,EACT,IAAI,kBAAgB,aAAa,MAAM,GAAG,EAAE,IAAI,gBAAc,mBAAmB,WAAW,KAAI,CAAE,CAAC,CAAC,EACpG,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AAC7B,QAAI,GAAG,IAAI;AACX,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AACT;AASA,SAAS,sBAAsB,QAAQ;AACrC,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC,WAAO;AAAA,EACR;AAED,SAAO,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,WAAW,WAAW,GAAG,iBAAiB;AAC9F,UAAM,eAAe,GAAG,mBAAmB,SAAS,CAAC,IAAI,mBAAmB,WAAW,CAAC;AACxF,UAAM,mBAAmB,iBAAiB,IAAI,eAAe,GAAG,aAAa,IAAI,YAAY;AAC7F,QAAI,iBAAiB,SAAS,2BAA2B;AACvDC,iBAAW,eACTC,OAAAA,OAAO;AAAA,QACL,mBAAmB,SAAS,cAAc,WAAW;AAAA,MAC/D;AACM,aAAO;AAAA,IACb,OAAW;AACL,aAAO;AAAA,IACR;AAAA,EACF,GAAE,EAAE;AACP;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baggage.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":[],"mappings":";;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAAC,SAAS,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACR;AAID,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MACjC;AACD,aAAO;AAAA,IACR,GAAE,CAAE,CAAA;AAAA,EACT,OAAS;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACR;AAED,oBAAgB,sBAAsB,aAAa;AAAA,EACpD;AAGD,QAAM,yBAAyB,OAAO,QAAQ,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACzF,QAAI,IAAI,MAAM,+BAA+B,GAAG;AAC9C,YAAM,iBAAiB,IAAI,MAAM,0BAA0B,MAAM;AACjE,UAAI,cAAc,IAAI;AAAA,IACvB;AACD,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AAIL,MAAI,OAAO,KAAK,sBAAsB,EAAE,SAAS,GAAG;AAClD,WAAO;AAAA,EACX,OAAS;AACL,WAAO;AAAA,EACR;AACH;AAWA,SAAS,4CAEP,wBACA;AACA,MAAI,CAAC,wBAAwB;AAC3B,WAAO;AAAA,EACR;AAGD,QAAM,oBAAoB,OAAO,QAAQ,sBAAsB,EAAE;AAAA,IAC/D,CAAC,KAAK,CAAC,QAAQ,QAAQ,MAAM;AAC3B,UAAI,UAAU;AACZ,YAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"baggage.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":[],"mappings":";;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAAC,SAAS,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;A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KAAI,CAAE,CAAC,CAAC,EACpG,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AAC7B,QAAI,GAAG,IAAI;AACX,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AACT;AASA,SAAS,sBAAsB,QAAQ;AACrC,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC,WAAO;AAAA,EACR;AAED,SAAO,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,WAAW,WAAW,GAAG,iBAAiB;AAC9F,UAAM,eAAe,GAAG,mBAAmB,SAAS,CAAC,IAAI,mBAAmB,WAAW,CAAC;AACxF,UAAM,mBAAmB,iBAAiB,IAAI,eAAe,GAAG,aAAa,IAAI,YAAY;AAC7F,QAAI,iBAAiB,SAAS,2BAA2B;AACvD,qBACE,OAAO;AAAA,QACL,mBAAmB,SAAS,cAAc,WAAW;AAAA,MAC/D;AACM,aAAO;AAAA,IACb,OAAW;AACL,aAAO;AAAA,IACR;AAAA,EACF,GAAE,EAAE;AACP;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":["getGlobalObject","isString"],"mappings":";;;;AAIA,MAAM,SAASA,UAAe,gBAAA;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACD;AAED,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,IAC3B;AAED,WAAO,IAAI,QAAO,EAAG,KAAK,SAAS;AAAA,EACpC,SAAQ,
|
|
1
|
+
{"version":3,"file":"browser.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":["getGlobalObject","isString"],"mappings":";;;;AAIA,MAAM,SAASA,UAAe,gBAAA;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACD;AAED,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,IAC3B;AAED,WAAO,IAAI,QAAO,EAAG,KAAK,SAAS;AAAA,EACpC,SAAQ,KAAK;AACZ,WAAO;AAAA,EACR;AACH;AAOA,SAAS,qBAAqB,IAAI,UAAU;AAC1C,QAAM,OAAO;AAIb,QAAM,MAAM,CAAA;AACZ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AAEJ,MAAI,CAAC,QAAQ,CAAC,KAAK,SAAS;AAC1B,WAAO;AAAA,EACR;AAGD,MAAI,OAAO,aAAa;AAEtB,QAAI,gBAAgB,eAAe,KAAK,WAAW,KAAK,QAAQ,iBAAiB,GAAG;AAClF,aAAO,KAAK,QAAQ,iBAAiB;AAAA,IACtC;AAAA,EACF;AAED,MAAI,KAAK,KAAK,QAAQ,YAAa,CAAA;AAGnC,QAAM,eACJ,YAAY,SAAS,SACjB,SAAS,OAAO,aAAW,KAAK,aAAa,OAAO,CAAC,EAAE,IAAI,aAAW,CAAC,SAAS,KAAK,aAAa,OAAO,CAAC,CAAC,IAC3G;AAEN,MAAI,gBAAgB,aAAa,QAAQ;AACvC,iBAAa,QAAQ,iBAAe;AAClC,UAAI,KAAK,IAAI,YAAY,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,IAAI;AAAA,IACxD,CAAK;AAAA,EACL,OAAS;AACL,QAAI,KAAK,IAAI;AACX,UAAI,KAAK,IAAI,KAAK,EAAE,EAAE;AAAA,IACvB;AAGD,gBAAY,KAAK;AACjB,QAAI,aAAaC,YAAS,SAAS,GAAG;AACpC,gBAAU,UAAU,MAAM,KAAK;AAC/B,WAAK,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACnC,YAAI,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACD,QAAM,eAAe,CAAC,cAAc,QAAQ,QAAQ,SAAS,KAAK;AAClE,OAAK,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;AACxC,UAAM,aAAa,CAAC;AACpB,WAAO,KAAK,aAAa,GAAG;AAC5B,QAAI,MAAM;AACR,UAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI;AAAA,IAC9B;AAAA,EACF;AACD,SAAO,IAAI,KAAK,EAAE;AACpB;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,SAAS,gBAAe;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACD;AAED,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,IAC3B;AAED,WAAO,IAAI,QAAO,EAAG,KAAK,SAAS;AAAA,EACpC,SAAQ,
|
|
1
|
+
{"version":3,"file":"browser.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,SAAS,gBAAe;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACD;AAED,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,I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AAC;AACpB,WAAO,KAAK,aAAa,GAAG;AAC5B,QAAI,MAAM;AACR,UAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI;AAAA,IAC9B;AAAA,EACF;AACD,SAAO,IAAI,KAAK,EAAE;AACpB;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/cookie.js"],"sourcesContent":["/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nfunction parseCookie(str) {\n const obj = {};\n let index = 0;\n\n while (index < str.length) {\n const eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n } catch (e) {\n obj[key] = val;\n }\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\nexport { parseCookie };\n//# sourceMappingURL=cookie.js.map\n"],"names":[],"mappings":";;AAiCA,SAAS,YAAY,KAAK;AACxB,QAAM,MAAM,CAAA;AACZ,MAAI,QAAQ;AAEZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,UAAM,QAAQ,IAAI,QAAQ,KAAK,KAAK;AAGpC,QAAI,UAAU,IAAI;AAChB;AAAA,IACD;AAED,QAAI,SAAS,IAAI,QAAQ,KAAK,KAAK;AAEnC,QAAI,WAAW,IAAI;AACjB,eAAS,IAAI;AAAA,IACnB,WAAe,SAAS,OAAO;AAEzB,cAAQ,IAAI,YAAY,KAAK,QAAQ,CAAC,IAAI;AAC1C;AAAA,IACD;AAED,UAAM,MAAM,IAAI,MAAM,OAAO,KAAK,EAAE;AAGpC,QAAI,WAAc,IAAI,GAAG,GAAG;AAC1B,UAAI,MAAM,IAAI,MAAM,QAAQ,GAAG,MAAM,EAAE;AAGvC,UAAI,IAAI,WAAW,CAAC,MAAM,IAAM;AAC9B,cAAM,IAAI,MAAM,GAAG,EAAE;AAAA,MACtB;AAED,UAAI;AACF,YAAI,GAAG,IAAI,IAAI,QAAQ,GAAG,MAAM,KAAK,mBAAmB,GAAG,IAAI;AAAA,MAChE,SAAQ,
|
|
1
|
+
{"version":3,"file":"cookie.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/cookie.js"],"sourcesContent":["/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nfunction parseCookie(str) {\n const obj = {};\n let index = 0;\n\n while (index < str.length) {\n const eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n } catch (e) {\n obj[key] = val;\n }\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\nexport { parseCookie };\n//# sourceMappingURL=cookie.js.map\n"],"names":[],"mappings":";;AAiCA,SAAS,YAAY,KAAK;AACxB,QAAM,MAAM,CAAA;AACZ,MAAI,QAAQ;AAEZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,UAAM,QAAQ,IAAI,QAAQ,KAAK,KAAK;AAGpC,QAAI,UAAU,IAAI;AAChB;AAAA,IACD;AAED,QAAI,SAAS,IAAI,QAAQ,KAAK,KAAK;AAEnC,QAAI,WAAW,IAAI;AACjB,eAAS,IAAI;AAAA,IACnB,WAAe,SAAS,OAAO;AAEzB,cAAQ,IAAI,YAAY,KAAK,QAAQ,CAAC,IAAI;AAC1C;AAAA,IACD;AAED,UAAM,MAAM,IAAI,MAAM,OAAO,KAAK,EAAE;AAGpC,QAAI,WAAc,IAAI,GAAG,GAAG;AAC1B,UAAI,MAAM,IAAI,MAAM,QAAQ,GAAG,MAAM,EAAE;AAGvC,UAAI,IAAI,WAAW,CAAC,MAAM,IAAM;AAC9B,cAAM,IAAI,MAAM,GAAG,EAAE;AAAA,MACtB;AAED,UAAI;AACF,YAAI,GAAG,IAAI,IAAI,QAAQ,GAAG,MAAM,KAAK,mBAAmB,GAAG,IAAI;AAAA,MAChE,SAAQ,GAAG;AACV,YAAI,GAAG,IAAI;AAAA,MACZ;AAAA,IACF;AAED,YAAQ,SAAS;AAAA,EAClB;AAED,SAAO;AACT;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/cookie.js"],"sourcesContent":["/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nfunction parseCookie(str) {\n const obj = {};\n let index = 0;\n\n while (index < str.length) {\n const eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n } catch (e) {\n obj[key] = val;\n }\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\nexport { parseCookie };\n//# sourceMappingURL=cookie.js.map\n"],"names":[],"mappings":"AAiCA,SAAS,YAAY,KAAK;AACxB,QAAM,MAAM,CAAA;AACZ,MAAI,QAAQ;AAEZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,UAAM,QAAQ,IAAI,QAAQ,KAAK,KAAK;AAGpC,QAAI,UAAU,IAAI;AAChB;AAAA,IACD;AAED,QAAI,SAAS,IAAI,QAAQ,KAAK,KAAK;AAEnC,QAAI,WAAW,IAAI;AACjB,eAAS,IAAI;AAAA,IACnB,WAAe,SAAS,OAAO;AAEzB,cAAQ,IAAI,YAAY,KAAK,QAAQ,CAAC,IAAI;AAC1C;AAAA,IACD;AAED,UAAM,MAAM,IAAI,MAAM,OAAO,KAAK,EAAE;AAGpC,QAAI,WAAc,IAAI,GAAG,GAAG;AAC1B,UAAI,MAAM,IAAI,MAAM,QAAQ,GAAG,MAAM,EAAE;AAGvC,UAAI,IAAI,WAAW,CAAC,MAAM,IAAM;AAC9B,cAAM,IAAI,MAAM,GAAG,EAAE;AAAA,MACtB;AAED,UAAI;AACF,YAAI,GAAG,IAAI,IAAI,QAAQ,GAAG,MAAM,KAAK,mBAAmB,GAAG,IAAI;AAAA,MAChE,SAAQ,
|
|
1
|
+
{"version":3,"file":"cookie.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/cookie.js"],"sourcesContent":["/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nfunction parseCookie(str) {\n const obj = {};\n let index = 0;\n\n while (index < str.length) {\n const eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n\n let endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n\n const key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n let val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n try {\n obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n } catch (e) {\n obj[key] = val;\n }\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\nexport { parseCookie };\n//# sourceMappingURL=cookie.js.map\n"],"names":[],"mappings":"AAiCA,SAAS,YAAY,KAAK;AACxB,QAAM,MAAM,CAAA;AACZ,MAAI,QAAQ;AAEZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,UAAM,QAAQ,IAAI,QAAQ,KAAK,KAAK;AAGpC,QAAI,UAAU,IAAI;AAChB;AAAA,IACD;AAED,QAAI,SAAS,IAAI,QAAQ,KAAK,KAAK;AAEnC,QAAI,WAAW,IAAI;AACjB,eAAS,IAAI;AAAA,IACnB,WAAe,SAAS,OAAO;AAEzB,cAAQ,IAAI,YAAY,KAAK,QAAQ,CAAC,IAAI;AAC1C;AAAA,IACD;AAED,UAAM,MAAM,IAAI,MAAM,OAAO,KAAK,EAAE;AAGpC,QAAI,WAAc,IAAI,GAAG,GAAG;AAC1B,UAAI,MAAM,IAAI,MAAM,QAAQ,GAAG,MAAM,EAAE;AAGvC,UAAI,IAAI,WAAW,CAAC,MAAM,IAAM;AAC9B,cAAM,IAAI,MAAM,GAAG,EAAE;AAAA,MACtB;AAED,UAAI;AACF,YAAI,GAAG,IAAI,IAAI,QAAQ,GAAG,MAAM,KAAK,mBAAmB,GAAG,IAAI;AAAA,MAChE,SAAQ,GAAG;AACV,YAAI,GAAG,IAAI;AAAA,MACZ;AAAA,IACF;AAED,YAAQ,SAAS;AAAA,EAClB;AAED,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsn.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/dsn.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n"],"names":["consoleSandbox","DEBUG_BUILD","logger"],"mappings":";;;;AAIA,MAAM,YAAY;AAElB,SAAS,gBAAgB,UAAU;AACjC,SAAO,aAAa,UAAU,aAAa;AAC7C;AAWA,SAAS,YAAY,KAAK,eAAe,OAAO;AAC9C,QAAM,EAAE,MAAM,MAAM,MAAM,MAAM,WAAW,UAAU,UAAW,IAAG;AACnE,SACE,GAAG,
|
|
1
|
+
{"version":3,"file":"dsn.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/dsn.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n"],"names":["consoleSandbox","DEBUG_BUILD","logger"],"mappings":";;;;AAIA,MAAM,YAAY;AAElB,SAAS,gBAAgB,UAAU;AACjC,SAAO,aAAa,UAAU,aAAa;AAC7C;AAWA,SAAS,YAAY,KAAK,eAAe,OAAO;AAC9C,QAAM,EAAE,MAAM,MAAM,MAAM,MAAM,WAAW,UAAU,UAAW,IAAG;AACnE,SACE,GAAG,QAAQ,MAAM,SAAS,GAAG,gBAAgB,OAAO,IAAI,IAAI,KAAK,EAAE,IAC/D,IAAI,GAAG,OAAO,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,GAAG,IAAI,MAAM,IAAI,GAAG,SAAS;AAE7E;AAQA,SAAS,cAAc,KAAK;AAC1B,QAAM,QAAQ,UAAU,KAAK,GAAG;AAEhC,MAAI,CAAC,OAAO;AAEVA,WAAAA,eAAe,MAAM;AAEnB,cAAQ,MAAM,uBAAuB,GAAG,EAAE;AAAA,IAChD,CAAK;AACD,WAAO;AAAA,EACR;AAED,QAAM,CAAC,UAAU,WAAW,OAAO,IAAI,MAAM,OAAO,IAAI,QAAQ,IAAI,MAAM,MAAM,CAAC;AACjF,MAAI,OAAO;AACX,MAAI,YAAY;AAEhB,QAAM,QAAQ,UAAU,MAAM,GAAG;AACjC,MAAI,MAAM,SAAS,GAAG;AACpB,WAAO,MAAM,MAAM,GAAG,EAAE,EAAE,KAA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O;AACT;AAMA,SAAS,QAAQ,MAAM;AACrB,QAAM,aAAa,OAAO,SAAS,WAAW,cAAc,IAAI,IAAI,kBAAkB,IAAI;AAC1F,MAAI,CAAC,cAAc,CAAC,YAAY,UAAU,GAAG;AAC3C,WAAO;AAAA,EACR;AACD,SAAO;AACT;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsn.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/dsn.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,YAAY;AAElB,SAAS,gBAAgB,UAAU;AACjC,SAAO,aAAa,UAAU,aAAa;AAC7C;AAWA,SAAS,YAAY,KAAK,eAAe,OAAO;AAC9C,QAAM,EAAE,MAAM,MAAM,MAAM,MAAM,WAAW,UAAU,UAAW,IAAG;AACnE,SACE,GAAG,
|
|
1
|
+
{"version":3,"file":"dsn.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/dsn.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,YAAY;AAElB,SAAS,gBAAgB,UAAU;AACjC,SAAO,aAAa,UAAU,aAAa;AAC7C;AAWA,SAAS,YAAY,KAAK,eAAe,OAAO;AAC9C,QAAM,EAAE,MAAM,MAAM,MAAM,MAAM,WAAW,UAAU,UAAW,IAAG;AACnE,SACE,GAAG,QAAQ,MAAM,SAAS,GAAG,gBAAgB,OAAO,IAAI,IAAI,KAAK,EAAE,IAC/D,IAAI,GAAG,OAAO,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,GAAG,IAAI,MAAM,IAAI,GAAG,SAAS;AAE7E;AAQA,SAAS,cAAc,KAAK;AAC1B,QA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AC/B,WAAO;AAAA,EACR;AAED,MAAI,CAAC,UAAU,MAAM,OAAO,GAAG;AAC7B,WAAO,MAAM,yCAAyC,SAAS,EAAE;AACjE,WAAO;AAAA,EACR;AAED,MAAI,CAAC,gBAAgB,QAAQ,GAAG;AAC9B,WAAO,MAAM,wCAAwC,QAAQ,EAAE;AAC/D,WAAO;AAAA,EACR;AAED,MAAI,QAAQ,MAAM,SAAS,MAAM,EAAE,CAAC,GAAG;AACrC,WAAO,MAAM,oCAAoC,IAAI,EAAE;AACvD,WAAO;AAAA,EACR;AAED,SAAO;AACT;AAMA,SAAS,QAAQ,MAAM;AACrB,QAAM,aAAa,OAAO,SAAS,WAAW,cAAc,IAAI,IAAI,kBAAkB,IAAI;AAC1F,MAAI,CAAC,cAAc,CAAC,YAAY,UAAU,GAAG;AAC3C,WAAO;AAAA,EACR;AACD,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/envelope.js"],"sourcesContent":["import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":["normalize","dropUndefinedKeys","dsn","dsnToString"],"mappings":";;;;;AASA,SAAS,eAAe,SAAS,QAAQ,IAAI;AAC3C,SAAO,CAAC,SAAS,KAAK;AACxB;AAOA,SAAS,kBAAkB,UAAU,SAAS;AAC5C,QAAM,CAAC,SAAS,KAAK,IAAI;AACzB,SAAO,CAAC,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC;AACtC;AAQA,SAAS,oBACP,UACA,UACA;AACA,QAAM,gBAAgB,SAAS,CAAC;AAEhC,aAAW,gBAAgB,eAAe;AACxC,UAAM,mBAAmB,aAAa,CAAC,EAAE;AACzC,UAAM,SAAS,SAAS,cAAc,gBAAgB;AAEtD,QAAI,QAAQ;AACV,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAYA,SAAS,WAAW,OAAO,aAAa;AACtC,QAAM,OAAO,eAAe,IAAI;AAChC,SAAO,KAAK,OAAO,KAAK;AAC1B;AAKA,SAAS,kBAAkB,UAAU,aAAa;AAChD,QAAM,CAAC,YAAY,KAAK,IAAI;AAG5B,MAAI,QAAQ,KAAK,UAAU,UAAU;AAErC,WAAS,OAAO,MAAM;AACpB,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,OAAO,SAAS,WAAW,QAAQ,OAAO,CAAC,WAAW,OAAO,WAAW,GAAG,IAAI;AAAA,IAC7F,OAAW;AACL,YAAM,KAAK,OAAO,SAAS,WAAW,WAAW,MAAM,WAAW,IAAI,IAAI;AAAA,IAC3E;AAAA,EACF;AAED,aAAW,QAAQ,OAAO;AACxB,UAAM,CAAC,aAAa,OAAO,IAAI;AAE/B,WAAO;AAAA,EAAK,KAAK,UAAU,WAAW;AAAA,
|
|
1
|
+
{"version":3,"file":"envelope.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/envelope.js"],"sourcesContent":["import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":["normalize","dropUndefinedKeys","dsn","dsnToString"],"mappings":";;;;;AASA,SAAS,eAAe,SAAS,QAAQ,IAAI;AAC3C,SAAO,CAAC,SAAS,KAAK;AACxB;AAOA,SAAS,kBAAkB,UAAU,SAAS;AAC5C,QAAM,CAAC,SAAS,KAAK,IAAI;AACzB,SAAO,CAAC,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC;AACtC;AAQA,SAAS,oBACP,UACA,UACA;AACA,QAAM,gBAAgB,SAAS,CAAC;AAEhC,aAAW,gBAAgB,eAAe;AACxC,UAAM,mBAAmB,aAAa,CAAC,EAAE;AACzC,UAAM,SAAS,SAAS,cAAc,gBAAgB;AAEtD,QAAI,QAAQ;AACV,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAYA,SAAS,WAAW,OAAO,aAAa;AACtC,QAAM,OAAO,eAAe,IAAI;AAChC,SAAO,KAAK,OAAO,KAAK;AAC1B;AAKA,SAAS,kBAAkB,UAAU,aAAa;AAChD,QAAM,CAAC,YAAY,KAAK,IAAI;AAG5B,MAAI,QAAQ,KAAK,UAAU,UAAU;AAErC,WAAS,OAAO,MAAM;AACpB,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,OAAO,SAAS,WAAW,QAAQ,OAAO,CAAC,WAAW,OAAO,WAAW,GAAG,IAAI;AAAA,IAC7F,OAAW;AACL,YAAM,KAAK,OAAO,SAAS,WAAW,WAAW,MAAM,WAAW,IAAI,IAAI;AAAA,IAC3E;AAAA,EACF;AAED,aAAW,QAAQ,OAAO;AACxB,UAAM,CAAC,aAAa,OAAO,IAAI;AAE/B,WAAO;AAAA,EAAK,KAAK,UAAU,WAAW,CA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A,SAAS,gCAAgC,iBAAiB;AACxD,MAAI,CAAC,mBAAmB,CAAC,gBAAgB,KAAK;AAC5C;AAAA,EACD;AACD,QAAM,EAAE,MAAM,YAAY,gBAAgB;AAC1C,SAAO,EAAE,MAAM;AACjB;AAMA,SAAS,2BACP,OACA,SACA,QACAC,OACA;AACA,QAAM,yBAAyB,MAAM,yBAAyB,MAAM,sBAAsB;AAC1F,SAAO;AAAA,IACL,UAAU,MAAM;AAAA,IAChB,UAAS,oBAAI,KAAM,GAAC,YAAa;AAAA,IACjC,GAAI,WAAW,EAAE,KAAK;IACtB,GAAI,CAAC,CAAC,UAAUA,SAAO,EAAE,KAAKC,IAAW,YAACD,KAAG;IAC7C,GAAI,0BAA0B;AAAA,MAC5B,OAAOD,OAAiB,kBAAC,EAAE,GAAG,wBAAwB;AAAA,IAC5D;AAAA,EACA;AACA;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/envelope.js"],"sourcesContent":["import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":[],"mappings":";;;AASA,SAAS,eAAe,SAAS,QAAQ,IAAI;AAC3C,SAAO,CAAC,SAAS,KAAK;AACxB;AAOA,SAAS,kBAAkB,UAAU,SAAS;AAC5C,QAAM,CAAC,SAAS,KAAK,IAAI;AACzB,SAAO,CAAC,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC;AACtC;AAQA,SAAS,oBACP,UACA,UACA;AACA,QAAM,gBAAgB,SAAS,CAAC;AAEhC,aAAW,gBAAgB,eAAe;AACxC,UAAM,mBAAmB,aAAa,CAAC,EAAE;AACzC,UAAM,SAAS,SAAS,cAAc,gBAAgB;AAEtD,QAAI,QAAQ;AACV,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAYA,SAAS,WAAW,OAAO,aAAa;AACtC,QAAM,OAAO,eAAe,IAAI;AAChC,SAAO,KAAK,OAAO,KAAK;AAC1B;AAKA,SAAS,kBAAkB,UAAU,aAAa;AAChD,QAAM,CAAC,YAAY,KAAK,IAAI;AAG5B,MAAI,QAAQ,KAAK,UAAU,UAAU;AAErC,WAAS,OAAO,MAAM;AACpB,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,OAAO,SAAS,WAAW,QAAQ,OAAO,CAAC,WAAW,OAAO,WAAW,GAAG,IAAI;AAAA,IAC7F,OAAW;AACL,YAAM,KAAK,OAAO,SAAS,WAAW,WAAW,MAAM,WAAW,IAAI,IAAI;AAAA,IAC3E;AAAA,EACF;AAED,aAAW,QAAQ,OAAO;AACxB,UAAM,CAAC,aAAa,OAAO,IAAI;AAE/B,WAAO;AAAA,EAAK,KAAK,UAAU,WAAW;AAAA,
|
|
1
|
+
{"version":3,"file":"envelope.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/envelope.js"],"sourcesContent":["import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":[],"mappings":";;;AASA,SAAS,eAAe,SAAS,QAAQ,IAAI;AAC3C,SAAO,CAAC,SAAS,KAAK;AACxB;AAOA,SAAS,kBAAkB,UAAU,SAAS;AAC5C,QAAM,CAAC,SAAS,KAAK,IAAI;AACzB,SAAO,CAAC,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC;AACtC;AAQA,SAAS,oBACP,UACA,UACA;AACA,QAAM,gBAAgB,SAAS,CAAC;AAEhC,aAAW,gBAAgB,eAAe;AACxC,UAAM,mBAAmB,aAAa,CAAC,EAAE;AACzC,UAAM,SAAS,SAAS,cAAc,gBAAgB;AAEtD,QAAI,QAAQ;AACV,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAYA,SAAS,WAAW,OAAO,aAAa;AACtC,QAAM,OAAO,eAAe,IAAI;AAChC,SAAO,KAAK,OAAO,KAAK;AAC1B;AAKA,SAAS,kBAAkB,UAAU,aAAa;AAChD,QAAM,CAAC,YAAY,KAAK,IAAI;AAG5B,MAAI,QAAQ,KAAK,UAAU,UAAU;AAErC,WAAS,OAAO,MAAM;AACpB,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,OAAO,SAAS,WAAW,QAAQ,OAAO,CAAC,WAAW,OAAO,WAAW,GAAG,IAAI;AAAA,IAC7F,OAAW;AACL,YAAM,KAAK,OAAO,SAAS,WAAW,WAAW,MAAM,WAAW,IAAI,IAAI;AAAA,IAC3E;AAAA,EACF;AAED,aAAW,QAAQ,OAAO;AACxB,UAAM,CAAC,aAAa,OAAO,IAAI;AAE/B,WAAO;AAAA,EAAK,KAAK,UAAU,WAAW,CAAC;AAAA,CAAI;AAE3C,QAAI,OAAO,YAAY,YAAY,mBAAmB,YAAY;AAChE,a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