UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

21 lines 786 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchSdkVersion = void 0; const axios_1 = __importDefault(require("axios")); const debug_1 = require("./debug"); const registryUrl = 'https://release-registry.services.sentry.io/'; async function fetchSdkVersion(sdk) { try { const data = (await axios_1.default.get(`${registryUrl}/sdks`)).data; return data[sdk]?.version; } catch { (0, debug_1.debug)('Failed to fetch latest version from release registry.'); } return undefined; } exports.fetchSdkVersion = fetchSdkVersion; //# sourceMappingURL=release-registry.js.map