react-native-update 10.11.4 → 10.11.6
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/ios/RCTPushy/RCTPushy.mm +1 -1
- package/package.json +1 -1
- package/src/client.ts +8 -2
- package/src/provider.tsx +2 -3
package/ios/RCTPushy/RCTPushy.mm
CHANGED
|
@@ -610,7 +610,7 @@ RCT_EXPORT_METHOD(markSuccess:
|
|
|
610
610
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
611
611
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
612
612
|
{
|
|
613
|
-
return std::make_shared<facebook::react::
|
|
613
|
+
return std::make_shared<facebook::react::NativePushySpecJSI>(params);
|
|
614
614
|
}
|
|
615
615
|
#endif
|
|
616
616
|
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -172,7 +172,6 @@ export class Pushy {
|
|
|
172
172
|
return await this.lastRespJson;
|
|
173
173
|
}
|
|
174
174
|
this.lastChecking = now;
|
|
175
|
-
this.report({ type: 'checking' });
|
|
176
175
|
const fetchBody = {
|
|
177
176
|
packageVersion,
|
|
178
177
|
hash: currentVersion,
|
|
@@ -183,16 +182,21 @@ export class Pushy {
|
|
|
183
182
|
if (__DEV__) {
|
|
184
183
|
delete fetchBody.buildTime;
|
|
185
184
|
}
|
|
185
|
+
const body = JSON.stringify(fetchBody);
|
|
186
186
|
const fetchPayload = {
|
|
187
187
|
method: 'POST',
|
|
188
188
|
headers: {
|
|
189
189
|
Accept: 'application/json',
|
|
190
190
|
'Content-Type': 'application/json',
|
|
191
191
|
},
|
|
192
|
-
body
|
|
192
|
+
body,
|
|
193
193
|
};
|
|
194
194
|
let resp;
|
|
195
195
|
try {
|
|
196
|
+
this.report({
|
|
197
|
+
type: 'checking',
|
|
198
|
+
message: this.options.appKey + ': ' + body,
|
|
199
|
+
});
|
|
196
200
|
resp = await fetch(this.getCheckUrl(), fetchPayload);
|
|
197
201
|
} catch (e: any) {
|
|
198
202
|
this.report({
|
|
@@ -221,6 +225,8 @@ export class Pushy {
|
|
|
221
225
|
|
|
222
226
|
const result: CheckResult = await this.lastRespJson;
|
|
223
227
|
|
|
228
|
+
log('checking result:', result);
|
|
229
|
+
|
|
224
230
|
if (resp.status !== 200) {
|
|
225
231
|
this.report({
|
|
226
232
|
type: 'errorChecking',
|
package/src/provider.tsx
CHANGED
|
@@ -290,10 +290,9 @@ export const PushyProvider = ({
|
|
|
290
290
|
);
|
|
291
291
|
|
|
292
292
|
const parseTestQrCode = useCallback(
|
|
293
|
-
(code: string) => {
|
|
294
|
-
let payload: PushyTestPayload;
|
|
293
|
+
(code: string | PushyTestPayload) => {
|
|
295
294
|
try {
|
|
296
|
-
payload = JSON.parse(code);
|
|
295
|
+
const payload = typeof code === 'string' ? JSON.parse(code) : code;
|
|
297
296
|
return parseTestPayload(payload);
|
|
298
297
|
} catch {
|
|
299
298
|
return false;
|