diff --git a/lib/index.web.js b/lib/index.web.js new file mode 100644 index 0000000..b9a691e --- /dev/null +++ b/lib/index.web.js @@ -0,0 +1,17 @@ +export const downloadRootDir = ''; +export const packageVersion = ''; +export const currentVersion = ''; +export const isFirstTime = false; +export const isRolledBack = false; + +const noop = () => {}; + +export const checkUpdate = noop; +export const downloadUpdate = noop; +export const switchVersion = noop; +export const switchVersionLater = noop; +export const markSuccess = noop; +export const downloadAndInstallApk = noop; +export const setCustomEndpoints = noop; +export const getCurrentVersionInfo = noop; +export const simpleUpdate = noop; diff --git a/lib/main.js b/lib/main.js index 4b7ed0f..61edd47 100644 --- a/lib/main.js +++ b/lib/main.js @@ -140,7 +140,7 @@ export async function checkUpdate(APPKEY, isRetry) { if (isRetry) { throw new Error('无法连接更新服务器,请检查网络连接后重试'); } - await tryBackupEndpoints(APPKEY); + await tryBackupEndpoints(); return checkUpdate(APPKEY, true); } const result = await resp.json(); diff --git a/package.json b/package.json index da18e38..256bd2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "8.0.0", + "version": "8.0.1", "description": "react-native hot update", "main": "lib/index.js", "scripts": {