react-native-iap 16.3.1 → 16.3.2
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/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
[](https://npmjs.org/package/react-native-iap) [](https://npmjs.org/package/react-native-iap) [](https://openiap.dev) [](https://opencollective.com/openiap) [](https://github.com/hyodotdev/openiap/actions/workflows/ci-react-native-iap.yml?query=branch%3Amain) [](https://app.codecov.io/gh/hyodotdev/openiap/tree/main/libraries/react-native-iap) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyochan%2Freact-native-iap?ref=badge_shield&issueType=license)
|
|
7
7
|
|
|
8
|
-
**React Native IAP** is a high-performance in-app purchase library using Nitro Modules that **conforms to the [
|
|
8
|
+
**React Native IAP** is a high-performance in-app purchase library using Nitro Modules that **conforms to the [OpenIAP specification](https://openiap.dev)**. It provides a unified API for handling in-app purchases across iOS and Android platforms with comprehensive error handling and modern TypeScript support.
|
|
9
9
|
|
|
10
|
-
<a href="https://openiap.dev"><img src="https://raw.githubusercontent.com/hyodotdev/openiap/main/logo.webp" alt="
|
|
10
|
+
<a href="https://openiap.dev"><img src="https://raw.githubusercontent.com/hyodotdev/openiap/main/logo.webp" alt="OpenIAP" height="40" /></a>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
## 📚 Documentation
|
|
@@ -67,7 +67,7 @@ internal object RnIapLog {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
internal fun sanitizeMap(source: Map<*, *>): Map<String, Any?> {
|
|
71
71
|
fun isSensitiveKey(key: String): Boolean {
|
|
72
72
|
val normalized = key.lowercase(Locale.ROOT).filter { it.isLetterOrDigit() }
|
|
73
73
|
return SENSITIVE_KEY_FRAGMENTS.any { normalized.contains(it) } ||
|
|
@@ -77,6 +77,10 @@ internal object RnIapLog {
|
|
|
77
77
|
val sanitized = linkedMapOf<String, Any?>()
|
|
78
78
|
for ((rawKey, rawValue) in source) {
|
|
79
79
|
val key = rawKey as? String ?: continue
|
|
80
|
+
if (rawValue == null || rawValue === JSONObject.NULL) {
|
|
81
|
+
sanitized[key] = JSONObject.NULL
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
80
84
|
if (isSensitiveKey(key)) {
|
|
81
85
|
sanitized[key] = "hidden"
|
|
82
86
|
continue
|
package/ios/RnIapLog.swift
CHANGED
|
@@ -105,22 +105,22 @@ enum RnIapLog {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
private static func sanitize(_ value: Any?) -> Any? {
|
|
108
|
-
guard let value else { return nil }
|
|
109
|
-
|
|
110
|
-
if let dictionary = value as? [String: Any] {
|
|
111
|
-
return sanitizeDictionary(dictionary)
|
|
112
|
-
}
|
|
108
|
+
guard let value, !(value is NSNull) else { return nil }
|
|
113
109
|
|
|
114
110
|
if let optionalDictionary = value as? [String: Any?] {
|
|
115
111
|
var compact: [String: Any] = [:]
|
|
116
112
|
for (key, optionalValue) in optionalDictionary {
|
|
117
|
-
if let optionalValue {
|
|
113
|
+
if let optionalValue, !(optionalValue is NSNull) {
|
|
118
114
|
compact[key] = optionalValue
|
|
119
115
|
}
|
|
120
116
|
}
|
|
121
117
|
return sanitizeDictionary(compact)
|
|
122
118
|
}
|
|
123
119
|
|
|
120
|
+
if let dictionary = value as? [String: Any] {
|
|
121
|
+
return sanitizeDictionary(dictionary)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
124
|
if let array = value as? [Any] {
|
|
125
125
|
return array.compactMap { sanitize($0) }
|
|
126
126
|
}
|
package/openiap-versions.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iap",
|
|
3
|
-
"version": "16.3.
|
|
3
|
+
"version": "16.3.2",
|
|
4
4
|
"description": "React Native In-App Purchases module for iOS and Android using Nitro",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
},
|
|
174
174
|
"packageManager": "yarn@3.6.1",
|
|
175
175
|
"resolutions": {
|
|
176
|
-
"nitrogen@^0.36.5": "patch:nitrogen@npm%3A0.36.5#./.yarn/patches/nitrogen-npm-0.36.5-array-equatable.patch"
|
|
176
|
+
"nitrogen@^0.36.5": "patch:nitrogen@npm%3A0.36.5#./.yarn/patches/nitrogen-npm-0.36.5-array-equatable.patch",
|
|
177
|
+
"uuid@^7.0.3": "11.1.1"
|
|
177
178
|
}
|
|
178
179
|
}
|