react-native-update 8.0.0 → 8.1.0
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/lib/index.d.ts +8 -1
- package/lib/index.web.js +17 -0
- package/lib/main.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -84,4 +84,11 @@ interface ProgressData {
|
|
|
84
84
|
total: number;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
interface SimpleUpdateOptions {
|
|
88
|
+
appKey: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function simpleUpdate(
|
|
92
|
+
wrappedComponent: any,
|
|
93
|
+
options: SimpleUpdateOptions,
|
|
94
|
+
): any;
|
package/lib/index.web.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const downloadRootDir = '';
|
|
2
|
+
export const packageVersion = '';
|
|
3
|
+
export const currentVersion = '';
|
|
4
|
+
export const isFirstTime = false;
|
|
5
|
+
export const isRolledBack = false;
|
|
6
|
+
|
|
7
|
+
const noop = () => {};
|
|
8
|
+
|
|
9
|
+
export const checkUpdate = noop;
|
|
10
|
+
export const downloadUpdate = noop;
|
|
11
|
+
export const switchVersion = noop;
|
|
12
|
+
export const switchVersionLater = noop;
|
|
13
|
+
export const markSuccess = noop;
|
|
14
|
+
export const downloadAndInstallApk = noop;
|
|
15
|
+
export const setCustomEndpoints = noop;
|
|
16
|
+
export const getCurrentVersionInfo = noop;
|
|
17
|
+
export const simpleUpdate = noop;
|
package/lib/main.js
CHANGED
|
@@ -140,7 +140,7 @@ export async function checkUpdate(APPKEY, isRetry) {
|
|
|
140
140
|
if (isRetry) {
|
|
141
141
|
throw new Error('无法连接更新服务器,请检查网络连接后重试');
|
|
142
142
|
}
|
|
143
|
-
await tryBackupEndpoints(
|
|
143
|
+
await tryBackupEndpoints();
|
|
144
144
|
return checkUpdate(APPKEY, true);
|
|
145
145
|
}
|
|
146
146
|
const result = await resp.json();
|