@sentry/wizard
Version:
Sentry wizard helping you to configure your project
23 lines • 2.92 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFastlaneSnippet = exports.getObjcSnippet = exports.getSwiftSnippet = exports.scriptInputPath = exports.getRunScriptTemplate = void 0;
function getRunScriptTemplate(orgSlug, projectSlug, uploadSource) {
if (uploadSource === void 0) { uploadSource = true; }
// eslint-disable-next-line no-useless-escape
return "# This script is responsable to upload debug symbols and source context for Sentry.\\nif which sentry-cli >/dev/null; then\\nexport SENTRY_ORG=".concat(orgSlug, "\\nexport SENTRY_PROJECT=").concat(projectSlug, "\\nERROR=$(sentry-cli debug-files upload ").concat(uploadSource ? '--include-sources ' : '', "\"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\\nif [ ! $? -eq 0 ]; then\\necho \"warning: sentry-cli - $ERROR\"\\nfi\\nelse\\necho \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\\nfi\\n");
}
exports.getRunScriptTemplate = getRunScriptTemplate;
exports.scriptInputPath = '"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}"';
function getSwiftSnippet(dsn) {
return " SentrySDK.start { options in\n options.dsn = \"".concat(dsn, "\"\n options.debug = true // Enabled debug when first installing is always helpful\n options.enableTracing = true \n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n");
}
exports.getSwiftSnippet = getSwiftSnippet;
function getObjcSnippet(dsn) {
return " [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"".concat(dsn, "\";\n options.debug = YES; // Enabled debug when first installing is always helpful\n options.enableTracing = YES;\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n");
}
exports.getObjcSnippet = getObjcSnippet;
function getFastlaneSnippet(org, project) {
return " sentry_cli(\n org_slug: '".concat(org, "',\n project_slug: '").concat(project, "',\n include_sources: true\n )");
}
exports.getFastlaneSnippet = getFastlaneSnippet;
//# sourceMappingURL=templates.js.map