@glassly/crust 0.4.0-dev.1064 → 0.4.0-dev.1066
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.
package/android/build.gradle
CHANGED
|
@@ -101,11 +101,11 @@ dependencies {
|
|
|
101
101
|
// Version pinned to 3.25.0 — re-check https://docs.mapbox.com/android/navigation/releases/
|
|
102
102
|
def isChinaBuild = System.getenv("EXPO_PUBLIC_DEPLOYMENT_REGION") == "china"
|
|
103
103
|
if (isChinaBuild) {
|
|
104
|
-
compileOnly 'com.mapbox.navigationcore:navigation-ndk27:3.
|
|
105
|
-
compileOnly 'com.mapbox.navigationcore:tripdata-ndk27:3.
|
|
104
|
+
compileOnly 'com.mapbox.navigationcore:navigation-ndk27:3.34.2'
|
|
105
|
+
compileOnly 'com.mapbox.navigationcore:tripdata-ndk27:3.34.2'
|
|
106
106
|
} else {
|
|
107
|
-
implementation 'com.mapbox.navigationcore:navigation-ndk27:3.
|
|
108
|
-
implementation 'com.mapbox.navigationcore:tripdata-ndk27:3.
|
|
107
|
+
implementation 'com.mapbox.navigationcore:navigation-ndk27:3.34.2'
|
|
108
|
+
implementation 'com.mapbox.navigationcore:tripdata-ndk27:3.34.2'
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// Required for Java 8+ APIs on minSdk < 26 (was needed by Google Nav SDK;
|
|
@@ -114,8 +114,8 @@ dependencies {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
dependencies {
|
|
117
|
-
implementation 'com.google.android.gms:play-services-location:21.0
|
|
118
|
-
implementation 'com.google.android.gms:play-services-base:18.
|
|
117
|
+
implementation 'com.google.android.gms:play-services-location:21.4.0'
|
|
118
|
+
implementation 'com.google.android.gms:play-services-base:18.11.1'
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
dependencies {
|
|
@@ -137,10 +137,10 @@ dependencies {
|
|
|
137
137
|
// Tink for X25519 (Android stdlib X25519 is API 33+ only; minSdk is 24).
|
|
138
138
|
// ~1.2 MB AAR. Crypto.subtle's SHA / AES-GCM / HMAC stay on javax.crypto
|
|
139
139
|
// which ships on the platform.
|
|
140
|
-
implementation 'com.google.crypto.tink:tink-android:1.
|
|
140
|
+
implementation 'com.google.crypto.tink:tink-android:1.24.0'
|
|
141
141
|
|
|
142
142
|
// Kotlin coroutines: dokar3's `evaluate()` is suspend; we bridge it via
|
|
143
143
|
// `runBlocking(dispatcher)` from the per-miniapp single-thread executor.
|
|
144
|
-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.
|
|
145
|
-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.
|
|
144
|
+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0'
|
|
145
|
+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
|
|
146
146
|
}
|
|
@@ -179,13 +179,22 @@ object JSCPolyfillBridge {
|
|
|
179
179
|
val sid = req["sid"] as? String
|
|
180
180
|
?: return@register JSCDispatchOutcome.Error("INVALID_ARGS", "ws.close: missing sid")
|
|
181
181
|
val rec = sockets[sid] ?: return@register JSCDispatchOutcome.Sync("null")
|
|
182
|
-
val
|
|
182
|
+
val rawCode = (req["code"] as? Number)?.toInt() ?: 1000
|
|
183
183
|
val reason = (req["reason"] as? String) ?: ""
|
|
184
|
-
rec.socket.close(
|
|
184
|
+
rec.socket.close(if (isSendableCloseCode(rawCode)) rawCode else 1001, reason)
|
|
185
|
+
if (!rec.closedSent) {
|
|
186
|
+
rec.closedSent = true
|
|
187
|
+
sockets.remove(sid)
|
|
188
|
+
deliverEvent(runtime, rec.packageName, sid, "close", mapOf("code" to rawCode, "reason" to reason))
|
|
189
|
+
}
|
|
185
190
|
JSCDispatchOutcome.Sync("null")
|
|
186
191
|
}
|
|
187
192
|
}
|
|
188
193
|
|
|
194
|
+
// Mirrors OkHttp's close-code validation, which throws instead of sending.
|
|
195
|
+
private fun isSendableCloseCode(code: Int): Boolean =
|
|
196
|
+
code in 1000..4999 && code !in 1004..1006 && code !in 1015..2999
|
|
197
|
+
|
|
189
198
|
private fun deliverEvent(
|
|
190
199
|
runtime: JSCRuntime,
|
|
191
200
|
packageName: String,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glassly/crust",
|
|
3
|
-
"version": "0.4.0-dev.
|
|
3
|
+
"version": "0.4.0-dev.1066",
|
|
4
4
|
"description": "Glassly Native Module",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"homepage": "https://github.com/fossephate/crust#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@glassly/jspolyfill": "0.4.0-dev.
|
|
38
|
+
"@glassly/jspolyfill": "0.4.0-dev.1066"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@expo/config-plugins": ">=8.0.0",
|