mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 10:51:38 +08:00
feat: web mock
This commit is contained in:
17
lib/index.web.js
Normal file
17
lib/index.web.js
Normal file
@@ -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;
|
@@ -140,7 +140,7 @@ export async function checkUpdate(APPKEY, isRetry) {
|
|||||||
if (isRetry) {
|
if (isRetry) {
|
||||||
throw new Error('无法连接更新服务器,请检查网络连接后重试');
|
throw new Error('无法连接更新服务器,请检查网络连接后重试');
|
||||||
}
|
}
|
||||||
await tryBackupEndpoints(APPKEY);
|
await tryBackupEndpoints();
|
||||||
return checkUpdate(APPKEY, true);
|
return checkUpdate(APPKEY, true);
|
||||||
}
|
}
|
||||||
const result = await resp.json();
|
const result = await resp.json();
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user