Files
doneit-web/.angular/cache/14.2.12/babel-webpack/96f090289c9529a3645a1e3adb8e5244.json
T

1 line
8.2 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import { urlEncode, makeDsn, dsnToString } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n var port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && {\n sentry_client: `${sdkInfo.name}/${sdkInfo.version}`\n })\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn,\n// TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n// options: ClientOptions = {} as ClientOptions,\ntunnelOrOptions = {}) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n var tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n var sdkInfo = typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n var endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n var user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`;\n }\n }\n return `${endpoint}?${encodedOptions}`;\n}\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };","map":{"version":3,"names":["urlEncode","makeDsn","dsnToString","SENTRY_API_VERSION","getBaseApiEndpoint","dsn","protocol","port","host","path","_getIngestEndpoint","projectId","_encodedAuth","sdkInfo","sentry_key","publicKey","sentry_version","sentry_client","name","version","getEnvelopeEndpointWithUrlEncodedAuth","tunnelOrOptions","tunnel","_metadata","undefined","sdk","getReportDialogEndpoint","dsnLike","dialogOptions","endpoint","encodedOptions","key","user","encodeURIComponent","email"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@sentry/core/esm/api.js"],"sourcesContent":["import { urlEncode, makeDsn, dsnToString } from '@sentry/utils';\n\nvar SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n var port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth co