react-native-update 10.4.0 → 10.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.4.0",
3
+ "version": "10.4.1",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/client.tsx CHANGED
@@ -35,6 +35,7 @@ export class Pushy {
35
35
  useAlert: true,
36
36
  strategy: 'both',
37
37
  logger: noop,
38
+ debug: false,
38
39
  };
39
40
 
40
41
  lastChecking?: number;
@@ -146,6 +147,12 @@ export class Pushy {
146
147
  }
147
148
  };
148
149
  checkUpdate = async () => {
150
+ if (__DEV__ && !this.options.debug) {
151
+ console.info(
152
+ '您当前处于开发环境且未启用debug,不会进行热更检查。如需在开发环境中调试热更,请在client中设置debug为true',
153
+ );
154
+ return;
155
+ }
149
156
  const now = Date.now();
150
157
  if (
151
158
  this.lastRespJson &&
package/src/type.ts CHANGED
@@ -73,4 +73,5 @@ export interface PushyOptions {
73
73
  strategy?: 'onAppStart' | 'onAppResume' | 'both' | null;
74
74
  autoMarkSuccess?: boolean;
75
75
  dismissErrorAfter?: number;
76
+ debug?: boolean;
76
77
  }