react-native-update 10.37.9 → 10.37.11
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.
|
@@ -428,7 +428,9 @@ export class DownloadTask {
|
|
|
428
428
|
for (const [from, targets] of copyList.entries()) {
|
|
429
429
|
currentFrom = from;
|
|
430
430
|
if (from.startsWith('resources/base/media/')) {
|
|
431
|
-
const mediaName = from
|
|
431
|
+
const mediaName = from
|
|
432
|
+
.replace('resources/base/media/', '')
|
|
433
|
+
.split('.')[0];
|
|
432
434
|
const mediaBuffer = await resourceManager.getMediaByName(mediaName);
|
|
433
435
|
for (const target of targets) {
|
|
434
436
|
const fileStream = fileIo.createStreamSync(target, 'w+');
|
|
@@ -444,7 +446,14 @@ export class DownloadTask {
|
|
|
444
446
|
}
|
|
445
447
|
} catch (error) {
|
|
446
448
|
error.message =
|
|
447
|
-
'Copy from resource failed:' +
|
|
449
|
+
'Copy from resource failed:' +
|
|
450
|
+
currentFrom +
|
|
451
|
+
',' +
|
|
452
|
+
error.code +
|
|
453
|
+
',' +
|
|
454
|
+
error.message +
|
|
455
|
+
',' +
|
|
456
|
+
error.stack;
|
|
448
457
|
console.error(error);
|
|
449
458
|
throw error;
|
|
450
459
|
}
|
|
@@ -49,12 +49,12 @@ export class PushyTurboModule extends TurboModule {
|
|
|
49
49
|
if (!buildTime) {
|
|
50
50
|
try {
|
|
51
51
|
const resourceManager = this.mUiCtx.resourceManager;
|
|
52
|
-
const content = resourceManager.getRawFileContentSync('
|
|
52
|
+
const content = resourceManager.getRawFileContentSync('meta.json');
|
|
53
53
|
const metaData = JSON.parse(
|
|
54
54
|
new util.TextDecoder().decodeToString(content),
|
|
55
55
|
);
|
|
56
|
-
if (metaData.
|
|
57
|
-
buildTime = String(metaData.
|
|
56
|
+
if (metaData.pushy_build_time) {
|
|
57
|
+
buildTime = String(metaData.pushy_build_time);
|
|
58
58
|
preferencesManager.putSync('buildTime', buildTime);
|
|
59
59
|
}
|
|
60
60
|
} catch {}
|