Merge pull request #3825 from keymanapp/feat/android/kmw-sentry

feat(android/engine): Add embedded KeymanWeb engine crash reporting to Sentry
This commit is contained in:
Darcy Wong 2020-11-19 20:53:13 +07:00 committed by GitHub
commit 063eeaf0f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 207 additions and 141 deletions

11
android/.gitignore vendored
View file

@ -31,8 +31,15 @@ gradle_models.ser
**/keyman-engine.aar
# keymanweb dependencies
KMEA/app/src/main/assets/
KMAPro/assets/keyman.js
KMEA/**/assets/ajax-loader.gif
KMEA/**/assets/keymanandroid.js
KMEA/**/assets/keyman.js.map
KMEA/**/assets/keyman-sentry.js
KMEA/**/assets/kmwosk.css
KMEA/**/assets/resources
# keymanweb OSK font
KMEA/**/assets/keymanweb-osk.*
# KMAPRo default packages
KMAPro/**/assets/*.kmp

View file

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.35'
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.36'
classpath 'name.remal:gradle-plugins:1.0.157'
classpath 'com.stepstone.stepper:material-stepper:4.3.1'
}

View file

@ -29,15 +29,27 @@ display_usage ( ) {
echo
echo "Build Keyman for Android"
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
echo " -upload-sentry Uploads debug symbols, etc, to Sentry"
echo " -debug Compile only Debug variant"
echo " -download-resources Download sil_euro_latin.kmp and nrc.en.mtnt.model.kmp from downloads.keyman.com"
exit 1
}
function makeLocalSentryRelease() {
local SENTRY_RELEASE_VERSION="release-$VERSION_WITH_TAG"
echo "Making a Sentry release for tag $SENTRY_RELEASE_VERSION"
sentry-cli upload-dif -p keyman-android --include-sources
sentry-cli releases -p keyman-android files $SENTRY_RELEASE_VERSION upload-sourcemaps ./
echo "Finalizing release tag $SENTRY_RELEASE_VERSION"
sentry-cli releases finalize "$SENTRY_RELEASE_VERSION"
}
NO_DAEMON=false
ONLY_DEBUG=false
DO_KEYBOARDS_DOWNLOAD=false
DO_MODELS_DOWNLOAD=false
DO_SENTRY_LOCAL_UPLOAD=false
# Parse args
while [[ $# -gt 0 ]] ; do
@ -46,6 +58,10 @@ while [[ $# -gt 0 ]] ; do
-no-daemon)
NO_DAEMON=true
;;
-upload-sentry)
# Overrides default set by build-utils.sh
UPLOAD_SENTRY=true
;;
-debug)
ONLY_DEBUG=true
;;
@ -76,11 +92,17 @@ if [[ ! -f "$MODELS_TARGET" ]]; then
DO_MODELS_DOWNLOAD=true
fi
# Local development optimization to upload local symbols to Sentry
if [[ $VERSION_ENVIRONMENT == "local" && $ONLY_DEBUG == true && $UPLOAD_SENTRY == true ]]; then
DO_SENTRY_LOCAL_UPLOAD=true
fi
echo
echo "NO_DAEMON: $NO_DAEMON"
echo "ONLY_DEBUG: $ONLY_DEBUG"
echo "DO_KEYBOARDS_DOWNLOAD: $DO_KEYBOARDS_DOWNLOAD"
echo "DO_MODELS_DOWNLOAD: $DO_MODELS_DOWNLOAD"
echo "DO_SENTRY_LOCAL_UPLOAD: $DO_SENTRY_LOCAL_UPLOAD"
echo
if [ "$NO_DAEMON" = true ]; then
@ -108,3 +130,7 @@ fi
echo "BUILD_FLAGS $BUILD_FLAGS"
./gradlew $DAEMON_FLAG clean $BUILD_FLAGS
if [ "$DO_SENTRY_LOCAL_UPLOAD" = true ]; then
makeLocalSentryRelease
fi

View file

@ -123,7 +123,7 @@ dependencies {
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.stepstone.stepper:material-stepper:4.3.1'
api(name: 'keyman-engine', ext: 'aar')
implementation 'io.sentry:sentry-android:2.3.0'
implementation 'io.sentry:sentry-android:3.1.0'
implementation 'androidx.preference:preference:1.1.1'
// Add dependency for generating QR Codes

View file

@ -29,7 +29,7 @@ import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
import io.sentry.android.core.SentryAndroid;
import io.sentry.core.Sentry;
import io.sentry.Sentry;
public class SystemKeyboard extends InputMethodService implements OnKeyboardEventListener {

View file

@ -9,6 +9,7 @@ public class KeymanSettingsActivity extends AppCompatActivity {
protected static final String installedLanguagesKey = "InstalledLanguages";
protected static final String installKeyboardOrDictionaryKey = "InstallKeyboardOrDictionary";
protected static final String showBannerKey = "ShowBanner";
protected static final String sendCrashReport = "SendCrashReport";
protected KeymanSettingsFragment innerFragment;

View file

@ -61,9 +61,15 @@ public class KeymanSettingsFragment extends PreferenceFragmentCompat {
SwitchPreference getStartedPreference = new SwitchPreference(context);
getStartedPreference.setKey(GetStartedActivity.showGetStartedKey);
getStartedPreference.setTitle(String.format(getString(R.string.show_get_started), getString(R.string.get_started)));
getStartedPreference.setDefaultValue(true);
SwitchPreference sendCrashReportPreference = new SwitchPreference(context);
sendCrashReportPreference.setKey(KeymanSettingsActivity.sendCrashReport);
sendCrashReportPreference.setTitle(getString(R.string.show_send_crash_report));
sendCrashReportPreference.setSummaryOn(getString(R.string.show_send_crash_report_on));
sendCrashReportPreference.setSummaryOff(getString(R.string.show_send_crash_report_off));
sendCrashReportPreference.setDefaultValue(true);
// Blocks the default checkmark interaction; we want to control the checkmark's state separately
// from within update() based on if the user has taken the appropriate actions with the OS.
final Preference.OnPreferenceChangeListener checkBlocker = new Preference.OnPreferenceChangeListener() {
@ -106,6 +112,7 @@ public class KeymanSettingsFragment extends PreferenceFragmentCompat {
screen.addPreference(bannerPreference);
screen.addPreference(getStartedPreference);
screen.addPreference(sendCrashReportPreference);
setPreferenceScreen(screen);
}

View file

@ -91,7 +91,6 @@ import android.widget.TextView;
import android.widget.Toast;
import io.sentry.android.core.SentryAndroid;
import io.sentry.core.Sentry;
public class MainActivity extends AppCompatActivity implements OnKeyboardEventListener, OnKeyboardDownloadEventListener,
ActivityCompat.OnRequestPermissionsResultCallback {
@ -127,10 +126,13 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
super.onCreate(savedInstanceState);
context = this;
SentryAndroid.init(context, options -> {
options.setRelease("release-"+com.tavultesoft.kmapro.BuildConfig.VERSION_NAME);
options.setEnvironment(com.tavultesoft.kmapro.BuildConfig.VERSION_ENVIRONMENT);
});
checkSendCrashReport();
if (KMManager.getMaySendCrashReport()) {
SentryAndroid.init(context, options -> {
options.setRelease("release-" + com.tavultesoft.kmapro.BuildConfig.VERSION_NAME);
options.setEnvironment(com.tavultesoft.kmapro.BuildConfig.VERSION_ENVIRONMENT);
});
}
checkStoragePermission(null);
resultReceiver = new DownloadResultReceiver(new Handler(), context);
@ -744,6 +746,12 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
}
}
private void checkSendCrashReport() {
SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
boolean maySendCrashReport = prefs.getBoolean(KeymanSettingsActivity.sendCrashReport, true);
KMManager.setMaySendCrashReport(maySendCrashReport);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);

View file

@ -96,6 +96,14 @@
<!-- Context: Keyman Settings menu -->
<string name="show_banner_off" comment="Description when toggle is off">When off, only shown when predictive text is enabled</string>
<!-- Context: Keyman Settings menu -->
<string name="show_send_crash_report" comment="permission for sending crash reports">Allow sending crash reports over network</string>
<!-- Context: Keyman Settings menu -->
<string name="show_send_crash_report_on" comment="Description when toggle is on">When on, crash reports will be sent</string>
<!-- Context: Keyman Settings menu -->
<string name="show_send_crash_report_off" comment="Description when toggle is off">When off, crash reports won\'t be sent</string>
<!-- Context: Keyman Settings "Install Keyboard or Dictionary" menu -->
<string name="install_from_keyman_dot_com" comment="Install package from Keyman server">Install from keyman.com</string>

View file

@ -65,7 +65,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
implementation 'com.google.android.material:material:1.2.1'
implementation 'commons-io:commons-io:2.6'
implementation 'io.sentry:sentry-android:2.3.0'
implementation 'io.sentry:sentry-android:3.1.0'
// Robolectric
testImplementation 'androidx.test:core:1.2.0'

View file

@ -7,12 +7,19 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Keyman</title>
<script src="keyman.js"></script>
<script src="keymanandroid.js"></script>
<script src="keyman-sentry.js"></script>
<script type="text/javascript">
var device = window.jsInterface.getDeviceType();
var oskHeight = window.jsInterface.getKeyboardHeight();
var oskWidth = 0;
var fragmentToggle = 0;
var sentryManager = new com.keyman.KeymanSentryManager({
hostPlatform: "android"
});
sentryManager.init();
window.addEventListener('load', init, false);
function init() {

View file

@ -53,9 +53,9 @@ import android.widget.PopupWindow.OnDismissListener;
import android.widget.TextView;
import android.widget.Toast;
import io.sentry.core.Breadcrumb;
import io.sentry.core.Sentry;
import io.sentry.core.SentryLevel;
import io.sentry.Breadcrumb;
import io.sentry.Sentry;
import io.sentry.SentryLevel;
final class KMKeyboard extends WebView {
private static final String TAG = "KMKeyboard";
@ -116,7 +116,11 @@ final class KMKeyboard extends WebView {
setFocusable(false);
clearCache(true);
getSettings().setJavaScriptEnabled(true);
getSettings().setBlockNetworkLoads(true);
// Normally, this would be true to prevent the WebView from accessing the network.
// But this needs to false for sending embedded KMW crash reports to Sentry (keymanapp/keyman#3825)
getSettings().setBlockNetworkLoads(!KMManager.getMaySendCrashReport());
getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
getSettings().setSupportZoom(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
@ -144,13 +148,12 @@ final class KMKeyboard extends WebView {
}
}
// Send console errors to Sentry.
// Not sending console errors to Sentry anymore since they should be handled by KMW sentryManager
// (Ignoring spurious message "No keyboard stubs exist = ...")
// TODO: Analyze if this error warrants reverting to default keyboard
// TODO: Fix base error rather than trying to ignore it "No keyboard stubs exist"
if ((cm.messageLevel() == ConsoleMessage.MessageLevel.ERROR) && (!cm.message().startsWith("No keyboard stubs exist"))) {
sendKMWError(cm.lineNumber(), cm.sourceId(), cm.message());
Toast.makeText(context, "Fatal Error with " + currentKeyboard +
". Loading default keyboard", Toast.LENGTH_LONG).show();
@ -618,43 +621,6 @@ final class KMKeyboard extends WebView {
return keyboardPath;
}
private void sendKMWError(int lineNumber, String sourceId, String message) {
if (Sentry.isEnabled()) {
Breadcrumb breadcrumb = new Breadcrumb();
breadcrumb.setMessage("KMKeyboard.sendKMWError");
breadcrumb.setCategory("KMWError");
breadcrumb.setLevel(SentryLevel.ERROR);
// Error info
breadcrumb.setData("cm_lineNumber", lineNumber);
breadcrumb.setData("cm_sourceID", sourceId);
breadcrumb.setData("cm_message", message);
// Keyboard info
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
breadcrumb.setData("keyboardType", "INAPP");
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
breadcrumb.setData("keyboardType", "SYSTEM");
} else {
breadcrumb.setData("keyboardType", "UNDEFINED");
}
if (this.packageID != null) {
breadcrumb.setData("packageID", this.packageID);
}
if (this.keyboardID != null) {
breadcrumb.setData("keyboardID", this.keyboardID);
}
if (this.keyboardName != null) {
breadcrumb.setData("keyboardName", this.keyboardName);
}
if (this.keyboardVersion != null) {
breadcrumb.setData("keyboardVersion", this.keyboardVersion);
}
Sentry.addBreadcrumb(breadcrumb);
Sentry.captureMessage("sendKMWError", SentryLevel.ERROR);
}
}
// Extract Unicode numbers (\\uxxxx) from a layer to character string.
// Ignores empty strings and layer names
// Returns: String

View file

@ -53,9 +53,9 @@ import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import io.sentry.core.Breadcrumb;
import io.sentry.core.Sentry;
import io.sentry.core.SentryLevel;
import io.sentry.Breadcrumb;
import io.sentry.Sentry;
import io.sentry.SentryLevel;
import com.tavultesoft.kmea.KeyboardEventHandler.EventType;
import com.tavultesoft.kmea.KeyboardEventHandler.OnKeyboardDownloadEventListener;
@ -166,6 +166,11 @@ public final class KMManager {
// regardless what the Settings preference is.
private static boolean mayPredictOverride = false;
// Boolean for whether a keyboard can send embedded KMW crash reports to Sentry
// When maySendCrashReport is false, KMW will still attempt to send crash reports, but it
// will be blocked.
private static boolean maySendCrashReport = true;
// Keyman public keys
public static final String KMKey_ID = "id";
public static final String KMKey_Name = "name";
@ -236,8 +241,9 @@ public final class KMManager {
// Keyman files
protected static final String KMFilename_KeyboardHtml = "keyboard.html";
protected static final String KMFilename_JSEngine = "keyman.js";
protected static final String KMFilename_JSEngine = "keymanandroid.js";
protected static final String KMFilename_JSEngine_Sourcemap = "keyman.js.map";
protected static final String KMFilename_JSSentry = "keyman-sentry.js";
protected static final String KMFilename_KmwCss = "kmwosk.css";
protected static final String KMFilename_Osk_Ttf_Font = "keymanweb-osk.ttf";
@ -569,6 +575,7 @@ public final class KMManager {
// Copy KMW files
copyAsset(context, KMFilename_KeyboardHtml, "", true);
copyAsset(context, KMFilename_JSEngine, "", true);
copyAsset(context, KMFilename_JSSentry, "", true);
if(KMManager.isDebugMode()) {
copyAsset(context, KMFilename_JSEngine_Sourcemap, "", true);
}
@ -974,6 +981,20 @@ public final class KMManager {
return mayPredictOverride;
}
/**
* If override is true, embedded KMW crash reports are allowed to be sent to sentry.keyman.com
* @param override - boolean
*/
public static void setMaySendCrashReport(boolean override) {
maySendCrashReport = override;
}
/**
* Get the value of maySendCrashReport. Default is true
* @return boolean
*/
public static boolean getMaySendCrashReport() { return maySendCrashReport; };
/**
* Get the font typeface from a fully pathed font name
* @param context

View file

@ -5,8 +5,8 @@
package com.tavultesoft.kmea.util;
import android.util.Log;
import io.sentry.core.Sentry;
import io.sentry.core.SentryLevel;
import io.sentry.Sentry;
import io.sentry.SentryLevel;
public final class KMLog {
private static final String TAG = "KMLog";

View file

@ -21,7 +21,7 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA
## END STANDARD BUILD SCRIPT INCLUDE
display_usage ( ) {
echo "build.sh [-no-kmw-build] | [-no-kmw] [-no-daemon] | [-no-test] | [-debug]"
echo "build.sh [-no-kmw-build] | [-no-kmw] [-no-daemon] | [-no-test] | [-upload-sentry] | [-debug]"
echo
echo "Build Keyman Engine Android (KMEA) using Keyman Web (KMW) artifacts"
echo " -no-kmw-build Don't build KMW. Just copy existing artifacts"
@ -29,6 +29,7 @@ display_usage ( ) {
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
echo " -no-test Don't run the unit-test suite. Use for development builds"
echo " to facilitate manual debugging and testing"
echo " -upload-sentry Uploads debug symbols, etc, to Sentry"
echo " -debug Local debug build; use for development builds"
exit 1
}
@ -64,7 +65,7 @@ DO_COPY=true
DO_TEST=true
NO_DAEMON=false
DEBUG_BUILD=false
EMBED_BUILD=-embed
KMWFLAGS=-embed
KMW_PATH=
# Parse args
@ -82,9 +83,13 @@ while [[ $# -gt 0 ]] ; do
-no-daemon)
NO_DAEMON=true
;;
-upload-sentry)
# Overrides default set by build-utils.sh
UPLOAD_SENTRY=true
;;
-debug)
DEBUG_BUILD=true
EMBED_BUILD=-debug_embedded
KMWFLAGS=-debug_embedded
KMW_PATH=unminified
;;
-h|-?)
@ -97,13 +102,20 @@ while [[ $# -gt 0 ]] ; do
shift # past argument
done
# Local development optimization - cross-target Sentry uploading when requested
# by developer. As it's not CI, the Web artifacts won't exist otherwise...
# unless the developer manually runs the correct build configuration accordingly.
if [[ $VERSION_ENVIRONMENT == "local" ]] && [[ $UPLOAD_SENTRY == true ]]; then
KMWFLAGS="$KMWFLAGS -upload-sentry"
fi
echo
echo "DO_BUILD: $DO_BUILD"
echo "DO_COPY: $DO_COPY"
echo "DO_TEST: $DO_TEST"
echo "NO_DAEMON: $NO_DAEMON"
echo "DEBUG_BUILD: $DEBUG_BUILD"
echo "EMBED_BUILD: $EMBED_BUILD"
echo "KMWFLAGS: $KMWFLAGS"
echo "KMW_PATH: $KMW_PATH"
echo
@ -121,7 +133,7 @@ if [ "$DO_BUILD" = true ]; then
echo "Building keyman web engine"
cd $KMW_SOURCE
./build.sh $EMBED_BUILD
./build.sh $KMWFLAGS
if [ $? -ne 0 ]; then
die "ERROR: keymanweb build failed. Exiting"
@ -130,16 +142,16 @@ fi
if [ "$DO_COPY" = true ]; then
echo "Copying KMW artifacts"
cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/ajax-loader.gif $KMEA_ASSETS/ajax-loader.gif
cp $KMW_ROOT/release/$KMW_PATH/embedded/keyman.js $KMEA_ASSETS/keyman.js
cp $KMW_ROOT/release/$KMW_PATH/embedded/keyman.js $KMEA_ASSETS/keymanandroid.js
cp $KMW_ROOT/release/$KMW_PATH/embedded/keyman.js.map $KMEA_ASSETS/keyman.js.map
cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/kmwosk.css $KMEA_ASSETS/kmwosk.css
cp $KMW_ROOT/release/$KMW_PATH/embedded/resources/osk/keymanweb-osk.ttf $KMEA_ASSETS/keymanweb-osk.ttf
cp $KMW_ROOT/node_modules/@keymanapp/web-sentry-manager/dist/index.js $KMEA_ASSETS/keyman-sentry.js
if [ $? -ne 0 ]; then
die "ERROR: copying artifacts failed"
fi
if [ "$DEBUG_BUILD" = true ]; then
echo "Copying debug artifacts"
cp -R $KMW_ROOT/release/$KMW_PATH/embedded/* $KMEA_ASSETS/
fi
fi
echo "Gradle Build of KMEA"

View file

@ -5,66 +5,68 @@
"requires": true,
"dependencies": {
"@sentry/browser": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.15.5.tgz",
"integrity": "sha512-rqDvjk/EvogfdbZ4TiEpxM/lwpPKmq23z9YKEO4q81+1SwJNua53H60dOk9HpRU8nOJ1g84TMKT2Ov8H7sqDWA==",
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.27.4.tgz",
"integrity": "sha512-L8Fsnkl3PIak4zJ1pcGDmV92XTQjS2/H6EBgp1rhuOF4OE3L59K8RR73C9w+wVtsIi7nyfYg/FIe8lvG++3Mow==",
"requires": {
"@sentry/core": "5.15.5",
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"@sentry/core": "5.27.4",
"@sentry/types": "5.27.4",
"@sentry/utils": "5.27.4",
"tslib": "^1.9.3"
},
"dependencies": {
"@sentry/core": {
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.27.4.tgz",
"integrity": "sha512-IbI37cIZU/qBQouuUXaLbGF/9xYFp5STqmj1Gv64l0IZe4JnEp06V3yD5GxQ/mJ78vSfOqfwLooVCUw9FA61sQ==",
"requires": {
"@sentry/hub": "5.27.4",
"@sentry/minimal": "5.27.4",
"@sentry/types": "5.27.4",
"@sentry/utils": "5.27.4",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.27.4.tgz",
"integrity": "sha512-Ba1AqcjvSd2S+fpdXtXCrVXdrzq9E2Etb2eHUOkEYwSsq7StMOw7E8YHDPAo+to8zUbpMPz/Z9XGhFkyAbImGQ==",
"requires": {
"@sentry/types": "5.27.4",
"@sentry/utils": "5.27.4",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.27.4.tgz",
"integrity": "sha512-biw5YfIQwvDoaRhLarfeRQ6MJ9UJOoDTmu8Kgg18prJy4rtfDowNJP0OBs5XAsTk6SWAXiE3g7vqUJBXgs7BWA==",
"requires": {
"@sentry/hub": "5.27.4",
"@sentry/types": "5.27.4",
"tslib": "^1.9.3"
}
},
"@sentry/types": {
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.27.4.tgz",
"integrity": "sha512-41h3c7tgtSS8UBmfvEckSr+7V7/IVOjt/EiydyOd6s0N18zSFfGY5HdA6g+eFtIJK3DhWkUHCHZNanD5IY5YCQ=="
},
"@sentry/utils": {
"version": "5.27.4",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.27.4.tgz",
"integrity": "sha512-shV1I/q+Tob3hUxRj11DfMhe9PNDiv85hUUoRloZGGwu275dMwpswb2uwgSmjc2Ao4pnMKVx8TL1hC3kGLVHTQ==",
"requires": {
"@sentry/types": "5.27.4",
"tslib": "^1.9.3"
}
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@sentry/core": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.15.5.tgz",
"integrity": "sha512-enxBLv5eibBMqcWyr+vApqeix8uqkfn0iGsD3piKvoMXCgKsrfMwlb/qo9Ox0lKr71qIlZVt+9/A2vZohdgnlg==",
"requires": {
"@sentry/hub": "5.15.5",
"@sentry/minimal": "5.15.5",
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.15.5.tgz",
"integrity": "sha512-zX9o49PcNIVMA4BZHe//GkbQ4Jx+nVofqU/Il32/IbwKhcpPlhGX3c1sOVQo4uag3cqd/JuQsk+DML9TKkN0Lw==",
"requires": {
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.15.5.tgz",
"integrity": "sha512-zQkkJ1l9AjmU/Us5IrOTzu7bic4sTPKCatptXvLSTfyKW7N6K9MPIIFeSpZf9o1yM2sRYdK7GV08wS2eCT3JYw==",
"requires": {
"@sentry/hub": "5.15.5",
"@sentry/types": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/types": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.15.5.tgz",
"integrity": "sha512-F9A5W7ucgQLJUG4LXw1ZIy4iLevrYZzbeZ7GJ09aMlmXH9PqGThm1t5LSZlVpZvUfQ2rYA8NU6BdKJSt7B5LPw=="
},
"@sentry/utils": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.15.5.tgz",
"integrity": "sha512-Nl9gl/MGnzSkuKeo3QaefoD/OJrFLB8HmwQ7HUbTXb6E7yyEzNKAQMHXGkwNAjbdYyYbd42iABP6Y5F/h39NtA==",
"requires": {
"@sentry/types": "5.15.5",
"tslib": "^1.9.3"
}
},
"tslib": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
"integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA=="
}
}
}

View file

@ -21,6 +21,6 @@
},
"dependencies": {
"@keymanapp/web-environment": "^14.0.185",
"@sentry/browser": "^5.15.5"
"@sentry/browser": "^5.27.4"
}
}

View file

@ -15,12 +15,13 @@ namespace com.keyman {
keymanPlatform: string;
static STANDARD_ALIASABLE_FILES = {
'keymanweb.js': 'keymanweb.js',
'keymanios.js': 'keyman.js', // iOS's embedded name -> embedded compilation
'kmwuibutton.js': 'kmwuibutton.js',
'kmwuifloat.js': 'kmwuifloat.js',
'kmwuitoggle.js': 'kmwuitoggle.js',
'kmwuitoolbar.js': 'kmwuitoolbar.js'
'keymanweb.js': 'keymanweb.js',
'keymanandroid.js': 'keyman.js', // Android's embedded name -> embedded compilation
'keymanios.js': 'keyman.js', // iOS's embedded name -> embedded compilation
'kmwuibutton.js': 'kmwuibutton.js',
'kmwuifloat.js': 'kmwuifloat.js',
'kmwuitoggle.js': 'kmwuitoggle.js',
'kmwuitoolbar.js': 'kmwuitoolbar.js'
// Also add entries for the naming system used by Android and iOS - and map them to the EMBEDDED upload, not the std 'native' one.
}
@ -32,7 +33,7 @@ namespace com.keyman {
this.keymanPlatform = options.hostPlatform;
}
// If we've recognized one of our source files,
// If we've recognized one of our source files,
aliasFilename(filename: string): string|null {
if(!this.mayAlias(filename)) {
return null;
@ -95,7 +96,7 @@ namespace com.keyman {
}
/**
* Pre-processes a Sentry event object (in-place) to provide more metadata and enhance
* Pre-processes a Sentry event object (in-place) to provide more metadata and enhance
* the Sentry server's ability to match the error against release artifacts.
* @param event A Sentry-generated event
*/
@ -115,8 +116,8 @@ namespace com.keyman {
/**
* Allows debugging our custom event preparation code without bombarding Sentry with errors
* during development.
*
* Note that Sentry expects us either to return the event object to be sent or to return `null`
*
* Note that Sentry expects us either to return the event object to be sent or to return `null`
* if we want to prevent the event from being sent to the server.
* @param event
*/
@ -154,4 +155,4 @@ namespace com.keyman {
});
}
}
}
}