react-native-nitro-sse 1.0.2 → 1.1.0
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.
|
@@ -56,7 +56,7 @@ namespace margelo::nitro::nitrosse::bridge::swift {
|
|
|
56
56
|
return optional.has_value();
|
|
57
57
|
}
|
|
58
58
|
inline HttpMethod get_std__optional_HttpMethod_(const std::optional<HttpMethod>& optional) noexcept {
|
|
59
|
-
return
|
|
59
|
+
return optional.value();
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// pragma MARK: std::unordered_map<std::string, std::string>
|
|
@@ -96,7 +96,7 @@ namespace margelo::nitro::nitrosse::bridge::swift {
|
|
|
96
96
|
return optional.has_value();
|
|
97
97
|
}
|
|
98
98
|
inline std::unordered_map<std::string, std::string> get_std__optional_std__unordered_map_std__string__std__string__(const std::optional<std::unordered_map<std::string, std::string>>& optional) noexcept {
|
|
99
|
-
return
|
|
99
|
+
return optional.value();
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// pragma MARK: std::optional<std::string>
|
|
@@ -111,7 +111,7 @@ namespace margelo::nitro::nitrosse::bridge::swift {
|
|
|
111
111
|
return optional.has_value();
|
|
112
112
|
}
|
|
113
113
|
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
114
|
-
return
|
|
114
|
+
return optional.value();
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// pragma MARK: std::optional<bool>
|
|
@@ -126,7 +126,7 @@ namespace margelo::nitro::nitrosse::bridge::swift {
|
|
|
126
126
|
return optional.has_value();
|
|
127
127
|
}
|
|
128
128
|
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
129
|
-
return
|
|
129
|
+
return optional.value();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// pragma MARK: std::optional<double>
|
|
@@ -141,7 +141,7 @@ namespace margelo::nitro::nitrosse::bridge::swift {
|
|
|
141
141
|
return optional.has_value();
|
|
142
142
|
}
|
|
143
143
|
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
144
|
-
return
|
|
144
|
+
return optional.value();
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// pragma MARK: std::vector<SseEvent>
|
|
@@ -120,11 +120,25 @@ public extension SseConfig {
|
|
|
120
120
|
|
|
121
121
|
@inline(__always)
|
|
122
122
|
var batchingIntervalMs: Double? {
|
|
123
|
-
return
|
|
123
|
+
return { () -> Double? in
|
|
124
|
+
if bridge.has_value_std__optional_double_(self.__batchingIntervalMs) {
|
|
125
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__batchingIntervalMs)
|
|
126
|
+
return __unwrapped
|
|
127
|
+
} else {
|
|
128
|
+
return nil
|
|
129
|
+
}
|
|
130
|
+
}()
|
|
124
131
|
}
|
|
125
132
|
|
|
126
133
|
@inline(__always)
|
|
127
134
|
var maxBufferSize: Double? {
|
|
128
|
-
return
|
|
135
|
+
return { () -> Double? in
|
|
136
|
+
if bridge.has_value_std__optional_double_(self.__maxBufferSize) {
|
|
137
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__maxBufferSize)
|
|
138
|
+
return __unwrapped
|
|
139
|
+
} else {
|
|
140
|
+
return nil
|
|
141
|
+
}
|
|
142
|
+
}()
|
|
129
143
|
}
|
|
130
144
|
}
|
|
@@ -46,7 +46,14 @@ public extension SseStats {
|
|
|
46
46
|
|
|
47
47
|
@inline(__always)
|
|
48
48
|
var lastErrorTime: Double? {
|
|
49
|
-
return
|
|
49
|
+
return { () -> Double? in
|
|
50
|
+
if bridge.has_value_std__optional_double_(self.__lastErrorTime) {
|
|
51
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__lastErrorTime)
|
|
52
|
+
return __unwrapped
|
|
53
|
+
} else {
|
|
54
|
+
return nil
|
|
55
|
+
}
|
|
56
|
+
}()
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
@inline(__always)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-sse",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "High-performance Server-Sent Events (SSE) for React Native, powered by Nitro Modules.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"eslint-plugin-prettier": "^5.5.4",
|
|
84
84
|
"jest": "^29.7.0",
|
|
85
85
|
"lefthook": "^2.0.3",
|
|
86
|
-
"nitrogen": "0.33.
|
|
86
|
+
"nitrogen": "0.33.9",
|
|
87
87
|
"prettier": "^2.8.8",
|
|
88
88
|
"react": "19.2.0",
|
|
89
89
|
"react-native": "0.83.0",
|
|
90
90
|
"react-native-builder-bob": "^0.40.17",
|
|
91
|
-
"react-native-nitro-modules": "0.33.
|
|
91
|
+
"react-native-nitro-modules": "0.33.9",
|
|
92
92
|
"release-it": "^19.0.4",
|
|
93
93
|
"turbo": "^2.5.6",
|
|
94
94
|
"typescript": "^5.9.2"
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"react": "*",
|
|
98
98
|
"react-native": "*",
|
|
99
|
-
"react-native-nitro-modules": "0.33.
|
|
99
|
+
"react-native-nitro-modules": "0.33.9"
|
|
100
100
|
},
|
|
101
101
|
"workspaces": [
|
|
102
102
|
"example"
|
|
@@ -176,4 +176,4 @@
|
|
|
176
176
|
],
|
|
177
177
|
"version": "0.57.0"
|
|
178
178
|
}
|
|
179
|
-
}
|
|
179
|
+
}
|