All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.esm.utils.sdkMetadata.js.map Maven / Gradle / Ivy

There is a newer version: 8.39.0
Show newest version
{"version":3,"file":"sdkMetadata.js","sources":["../../../src/utils/sdkMetadata.ts"],"sourcesContent":["import type { Options } from '@sentry/types';\nimport { SDK_VERSION } from '@sentry/utils';\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 */\nexport function applySdkMetadata(options: Options, name: string, names = [name], source = 'npm'): void {\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"],"names":[],"mappings":";;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,OAAO,EAAW,IAAI,EAAU,KAAA,GAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK,EAAQ;AACvG,EAAE,MAAM,WAAW,OAAO,CAAC,SAAU,IAAG,EAAE,CAAA;AAC1C;AACA,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;AACrB,IAAI,QAAQ,CAAC,GAAA,GAAM;AACnB,MAAM,IAAI,EAAE,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAA;AACA,MAAA,QAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA;AACA,QAAA,IAAA,EAAA,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,IAAA,CAAA,CAAA;AACA,QAAA,OAAA,EAAA,WAAA;AACA,OAAA,CAAA,CAAA;AACA,MAAA,OAAA,EAAA,WAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,CAAA,SAAA,GAAA,QAAA,CAAA;AACA;;;;"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy