UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

107 lines 3.74 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["flutter"] = "flutter"; Integration["ios"] = "ios"; Integration["android"] = "android"; Integration["cordova"] = "cordova"; Integration["angular"] = "angular"; Integration["electron"] = "electron"; Integration["nextjs"] = "nextjs"; Integration["nuxt"] = "nuxt"; Integration["remix"] = "remix"; 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((platform) => ({ 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.android: return 'Android'; case Integration.reactNative: return 'React Native'; case Integration.flutter: return 'Flutter'; case Integration.cordova: return 'Cordova'; case Integration.electron: return 'Electron'; case Integration.nextjs: return 'Next.js'; case Integration.remix: return 'Remix'; case Integration.sveltekit: return 'SvelteKit'; case Integration.sourcemaps: return 'Configure Source Maps Upload'; case Integration.ios: return 'iOS'; default: return 'React Native'; } } exports.getIntegrationDescription = getIntegrationDescription; function mapIntegrationToPlatform(type) { switch (type) { case Integration.android: return 'android'; case Integration.reactNative: return 'react-native'; case Integration.flutter: return 'flutter'; case Integration.cordova: return 'cordova'; case Integration.angular: return 'javascript-angular'; case Integration.electron: return 'javascript-electron'; case Integration.nextjs: return 'javascript-nextjs'; case Integration.remix: return 'javascript-remix'; case Integration.sveltekit: return 'javascript-sveltekit'; case Integration.sourcemaps: return undefined; case Integration.ios: return 'iOS'; default: throw new Error(`Unknown integration ${type}`); } } exports.mapIntegrationToPlatform = mapIntegrationToPlatform; function getIntegrationChoices() { return Object.keys(Integration).map((type) => ({ name: getIntegrationDescription(type), value: type, })); } exports.getIntegrationChoices = getIntegrationChoices; exports.DEFAULT_URL = 'https://sentry.io/'; //# sourceMappingURL=Constants.js.map