cozy-client 59.1.1 → 59.2.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.
@@ -3264,7 +3264,7 @@ var CozyClient = /*#__PURE__*/function () {
3264
3264
  CozyClient.hooks = CozyClient.hooks || {};
3265
3265
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
3266
3266
 
3267
- CozyClient.version = "59.1.1";
3267
+ CozyClient.version = "59.2.0";
3268
3268
 
3269
3269
  _microee.default.mixin(CozyClient);
3270
3270
 
package/dist/utils.js CHANGED
@@ -5,7 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.isReactNativeOfflineError = exports.hasQueriesBeenLoaded = exports.isQueriesLoading = exports.hasQueryBeenLoaded = exports.isQueryLoading = exports.cancelable = void 0;
8
+ exports.isDebug = exports.isReactNativeOfflineError = exports.hasQueriesBeenLoaded = exports.isQueriesLoading = exports.hasQueryBeenLoaded = exports.isQueryLoading = exports.cancelable = void 0;
9
+
10
+ var _cozyFlags = _interopRequireDefault(require("cozy-flags"));
9
11
 
10
12
  var _logger = _interopRequireDefault(require("./logger"));
11
13
 
@@ -104,5 +106,17 @@ var isReactNativeOfflineError = function isReactNativeOfflineError(err) {
104
106
  // Network errors on a browser would produce another error.message
105
107
  return err.message === 'Network request failed';
106
108
  };
109
+ /**
110
+ * Check if the instance has a debug flag set to true
111
+ *
112
+ * @returns {boolean} Whether or not the instance is in debug mode
113
+ */
114
+
115
+
116
+ exports.isReactNativeOfflineError = isReactNativeOfflineError;
117
+
118
+ var isDebug = function isDebug() {
119
+ return Boolean((0, _cozyFlags.default)('debug'));
120
+ };
107
121
 
108
- exports.isReactNativeOfflineError = isReactNativeOfflineError;
122
+ exports.isDebug = isDebug;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "59.1.1",
3
+ "version": "59.2.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -74,5 +74,5 @@
74
74
  "react-native-ios11-devicecheck": "^0.0.3"
75
75
  },
76
76
  "sideEffects": false,
77
- "gitHead": "b5f239115811ed4f4bc9f064da17377ee5c48dd6"
77
+ "gitHead": "be4082e8c9bb534dbd6ab16cdc0b1ad9ea99693d"
78
78
  }
package/types/utils.d.ts CHANGED
@@ -3,6 +3,7 @@ export function hasQueryBeenLoaded(col: any): any;
3
3
  export function isQueriesLoading(queriesResults: any): boolean;
4
4
  export function hasQueriesBeenLoaded(queriesResults: any): boolean;
5
5
  export function isReactNativeOfflineError(err: Error): boolean;
6
+ export function isDebug(): boolean;
6
7
  export type CancelablePromise = Promise<any>;
7
8
  /**
8
9
  * @typedef {Promise} CancelablePromise