UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

83 lines 2.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_URL = exports.getIntegrationChoices = exports.mapIntegrationToPlatform = exports.getIntegrationDescription = exports.getPlatformDescription = exports.getPlatformChoices = exports.Platform = exports.Integration = void 0; /** Key value should be the same here */ var Integration; (function (Integration) { Integration["reactNative"] = "reactNative"; Integration["cordova"] = "cordova"; Integration["electron"] = "electron"; Integration["nextjs"] = "nextjs"; Integration["sveltekit"] = "sveltekit"; Integration["sourcemaps"] = "sourcemaps"; })(Integration = exports.Integration || (exports.Integration = {})); /** Key value should be the same here */ var Platform; (function (Platform) { Platform["ios"] = "ios"; Platform["android"] = "android"; })(Platform = exports.Platform || (exports.Platform = {})); function getPlatformChoices() { return Object.keys(Platform).map(function (platform) { return ({ checked: true, name: getPlatformDescription(platform), value: platform, }); }); } exports.getPlatformChoices = getPlatformChoices; function getPlatformDescription(type) { switch (type) { case Platform.ios: return 'iOS'; default: return 'Android'; } } exports.getPlatformDescription = getPlatformDescription; function getIntegrationDescription(type) { switch (type) { case Integration.reactNative: return 'React Native'; case Integration.cordova: return 'Cordova'; case Integration.electron: return 'Electron'; case Integration.nextjs: return 'Next.js'; case Integration.sveltekit: return 'SvelteKit'; case Integration.sourcemaps: return 'Configure Source Maps Upload'; default: return 'React Native'; } } exports.getIntegrationDescription = getIntegrationDescription; function mapIntegrationToPlatform(type) { switch (type) { case Integration.reactNative: return 'react-native'; case Integration.cordova: return 'cordova'; case Integration.electron: return 'javascript-electron'; case Integration.nextjs: return 'javascript-nextjs'; case Integration.sveltekit: return 'javascript-sveltekit'; case Integration.sourcemaps: return undefined; default: throw new Error("Unknown integration ".concat(type)); } } exports.mapIntegrationToPlatform = mapIntegrationToPlatform; function getIntegrationChoices() { return Object.keys(Integration).map(function (type) { return ({ name: getIntegrationDescription(type), value: type, }); }); } exports.getIntegrationChoices = getIntegrationChoices; exports.DEFAULT_URL = 'https://sentry.io/'; //# sourceMappingURL=Constants.js.map