@capgo/capacitor-webview-crash 8.1.9 → 8.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,7 @@ import java.time.ZoneId;
|
|
|
9
9
|
import java.time.ZonedDateTime;
|
|
10
10
|
import java.time.temporal.ChronoUnit;
|
|
11
11
|
import org.json.JSONException;
|
|
12
|
+
import org.json.JSONObject;
|
|
12
13
|
|
|
13
14
|
final class WebViewCrash {
|
|
14
15
|
|
|
@@ -97,6 +98,10 @@ final class WebViewCrash {
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
|
|
101
|
+
static Object coalescePendingCrashInfo(JSObject pendingCrashInfo, Object jsonNullSentinel) {
|
|
102
|
+
return pendingCrashInfo != null ? pendingCrashInfo : jsonNullSentinel;
|
|
103
|
+
}
|
|
104
|
+
|
|
100
105
|
static final class RestartOptions {
|
|
101
106
|
|
|
102
107
|
final boolean restartOnCrash;
|
|
@@ -91,8 +91,7 @@ public class WebViewCrashPlugin extends Plugin {
|
|
|
91
91
|
@PluginMethod
|
|
92
92
|
public void getPendingCrashInfo(PluginCall call) {
|
|
93
93
|
JSObject result = new JSObject();
|
|
94
|
-
|
|
95
|
-
result.put("value", pendingCrashInfo != null ? pendingCrashInfo : JSONObject.NULL);
|
|
94
|
+
result.put("value", WebViewCrash.coalescePendingCrashInfo(implementation.readPendingCrashInfo(getContext()), JSONObject.NULL));
|
|
96
95
|
call.resolve(result);
|
|
97
96
|
}
|
|
98
97
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-webview-crash",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.10",
|
|
4
4
|
"description": "Capacitor plugin for detecting WebView crash recovery and restarting long-running WebViews natively.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"watch": "tsc --watch",
|
|
54
54
|
"prepublishOnly": "bun run build",
|
|
55
55
|
"check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
|
|
56
|
+
"check:cap9-deprecated": "node scripts/check-cap9-deprecated.mjs",
|
|
56
57
|
"example:install": "cd example-app && bun install --frozen-lockfile",
|
|
57
58
|
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
|
|
58
59
|
"changelog:ai": "node scripts/generate-ai-changelog.mjs"
|