1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 22:16:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

5 Commits

Author SHA1 Message Date
sunnylqm
dba4a98fd0 v6.0.5 2021-06-24 15:13:35 +08:00
sunnylqm
d4d12e1889 Fix until int conversion 2021-06-24 15:13:03 +08:00
sunnylqm
daf870fd75 v6.0.4 2021-06-19 14:38:51 +08:00
sunnylqm
33641fcbef Try pdiff if diff error 2021-06-19 13:01:07 +08:00
sunnylqm
a02ca4fa71 Update npmignore 2021-06-18 09:20:10 +08:00
3 changed files with 18 additions and 7 deletions

View File

@@ -36,6 +36,8 @@ project.xcworkspace
.idea
.gradle
local.properties
android/build
android/obj
# node.js
#

View File

@@ -138,7 +138,7 @@ function checkOperation(op) {
if (action.type === 'block') {
blockUpdate = {
reason: action.reason,
until: (Date.now() + action.duration) / 1000,
until: Math.round((Date.now() + action.duration) / 1000),
};
Pushy.setBlockUpdate(blockUpdate);
}
@@ -166,11 +166,20 @@ export async function downloadUpdate(options, eventListeners) {
}
if (options.diffUrl) {
logger('downloading diff');
await Pushy.downloadPatchFromPpk({
updateUrl: options.diffUrl,
hash: options.hash,
originHash: currentVersion,
});
try {
await Pushy.downloadPatchFromPpk({
updateUrl: options.diffUrl,
hash: options.hash,
originHash: currentVersion,
});
} catch (e) {
logger(e.message);
logger('diff error, try pdiff');
await Pushy.downloadPatchFromPackage({
updateUrl: options.pdiffUrl,
hash: options.hash,
});
}
} else if (options.pdiffUrl) {
logger('downloading pdiff');
await Pushy.downloadPatchFromPackage({

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "6.0.3",
"version": "6.0.5",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {