Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
const core = require('@sentry/core');
|
|
|
|
/**
|
|
* This is a shim for the LaunchDarkly integration.
|
|
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
|
|
*/
|
|
const launchDarklyIntegrationShim = core.defineIntegration((_options) => {
|
|
if (!core.isBrowser()) {
|
|
core.consoleSandbox(() => {
|
|
// eslint-disable-next-line no-console
|
|
console.warn('The launchDarklyIntegration() can only be used in the browser.');
|
|
});
|
|
}
|
|
|
|
return {
|
|
name: 'LaunchDarkly',
|
|
};
|
|
});
|
|
|
|
/**
|
|
* This is a shim for the LaunchDarkly flag used handler.
|
|
*/
|
|
function buildLaunchDarklyFlagUsedHandlerShim() {
|
|
if (!core.isBrowser()) {
|
|
core.consoleSandbox(() => {
|
|
// eslint-disable-next-line no-console
|
|
console.warn('The buildLaunchDarklyFlagUsedHandler() can only be used in the browser.');
|
|
});
|
|
}
|
|
|
|
return {
|
|
name: 'sentry-flag-auditor',
|
|
type: 'flag-used',
|
|
synchronous: true,
|
|
method: () => null,
|
|
};
|
|
}
|
|
|
|
exports.buildLaunchDarklyFlagUsedHandlerShim = buildLaunchDarklyFlagUsedHandlerShim;
|
|
exports.launchDarklyIntegrationShim = launchDarklyIntegrationShim;
|
|
//# sourceMappingURL=launchDarkly.js.map
|