v10.4.1
This commit is contained in:
parent
571c2819b9
commit
d1ecfb3f93
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "10.4.0",
|
"version": "10.4.1",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -35,6 +35,7 @@ export class Pushy {
|
|||||||
useAlert: true,
|
useAlert: true,
|
||||||
strategy: 'both',
|
strategy: 'both',
|
||||||
logger: noop,
|
logger: noop,
|
||||||
|
debug: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
lastChecking?: number;
|
lastChecking?: number;
|
||||||
@ -146,6 +147,12 @@ export class Pushy {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
checkUpdate = async () => {
|
checkUpdate = async () => {
|
||||||
|
if (__DEV__ && !this.options.debug) {
|
||||||
|
console.info(
|
||||||
|
'您当前处于开发环境且未启用debug,不会进行热更检查。如需在开发环境中调试热更,请在client中设置debug为true',
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
if (
|
if (
|
||||||
this.lastRespJson &&
|
this.lastRespJson &&
|
||||||
|
@ -73,4 +73,5 @@ export interface PushyOptions {
|
|||||||
strategy?: 'onAppStart' | 'onAppResume' | 'both' | null;
|
strategy?: 'onAppStart' | 'onAppResume' | 'both' | null;
|
||||||
autoMarkSuccess?: boolean;
|
autoMarkSuccess?: boolean;
|
||||||
dismissErrorAfter?: number;
|
dismissErrorAfter?: number;
|
||||||
|
debug?: boolean;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user