@applicaster/zapp-react-native-bridge 12.0.0-alpha.5251355865 → 12.0.0-alpha.5347482137

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.
@@ -91,7 +91,8 @@ export const remapAssetPath = (
91
91
  if (!localFile) {
92
92
  bridgeLogger.warning({
93
93
  message: `remapAssetPath: Could not replace asset with local file for url: ${url}`,
94
- data: { path, obj }});
94
+ data: { path, obj },
95
+ });
95
96
 
96
97
  return obj;
97
98
  }
@@ -104,7 +105,10 @@ export const remapAssetPath = (
104
105
  }
105
106
 
106
107
  if (!target) {
107
- bridgeLogger.error({message: `remapAssetPath: Could not find path ${path.join(".")}`, data: obj});
108
+ bridgeLogger.error({
109
+ message: `remapAssetPath: Could not find path ${path.join(".")}`,
110
+ data: obj,
111
+ });
108
112
  } else {
109
113
  // Set the final value
110
114
  target[path[path.length - 1]] = localFile;
@@ -113,7 +117,11 @@ export const remapAssetPath = (
113
117
  return obj;
114
118
  }, JSON.parse(JSON.stringify(source)));
115
119
 
116
- bridgeLogger.log({ message: `remapAssetPath: remapping took ${performance.now() - startTime} ms, tag: ${tag}` });
120
+ bridgeLogger.log({
121
+ message: `remapAssetPath: remapping took ${
122
+ performance.now() - startTime
123
+ } ms, tag: ${tag}`,
124
+ });
117
125
 
118
126
  return result;
119
127
  };
@@ -25,14 +25,14 @@ export enum PushTopicManagerConsts {
25
25
  export enum PushTopicManagerEvents {
26
26
  push_topics_changed = "push_topics_changed",
27
27
  plugin_enabled = "plugin_enabled",
28
- plugin_disabled = "plugin_disabled"
28
+ plugin_disabled = "plugin_disabled",
29
29
  }
30
30
 
31
31
  export class PushTopicManager {
32
32
  private registeredTags: string[] | null;
33
33
  private pushTopicSubject: BehaviorSubject<string[] | null>;
34
34
 
35
- constructor() { }
35
+ constructor() {}
36
36
 
37
37
  getEntryObservable = (): BehaviorSubject<string[]> => {
38
38
  return this.pushTopicSubject;
@@ -53,11 +53,9 @@ export class PushTopicManager {
53
53
  )}'`
54
54
  );
55
55
  } else {
56
- log_error(
57
- `routeEvent: Unknown event received: ${event.type}`,
58
- );
56
+ log_error(`routeEvent: Unknown event received: ${event.type}`);
59
57
  }
60
- }
58
+ };
61
59
 
62
60
  prepareTags = async () => {
63
61
  try {
@@ -110,12 +110,20 @@ export abstract class Storage {
110
110
 
111
111
  // Storage methods
112
112
 
113
- getItem = async (key, namespace = DEFAULT_NAMESPACE) => {
113
+ getItem = async (
114
+ key,
115
+ namespace = DEFAULT_NAMESPACE,
116
+ skipJsonParse = false
117
+ ) => {
114
118
  if (!key) throwUndefinedKeyError(this.storageName, UNDEFINED_KEY_MESSAGE);
115
119
 
116
120
  try {
117
121
  const result = await this.nativeStorageModule.getItem(key, namespace);
118
122
 
123
+ if (skipJsonParse) {
124
+ return result;
125
+ }
126
+
119
127
  return parseJsonIfNeeded(result);
120
128
  } catch (error) {
121
129
  throwNativeStorageError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-bridge",
3
- "version": "12.0.0-alpha.5251355865",
3
+ "version": "12.0.0-alpha.5347482137",
4
4
  "description": "Applicaster Zapp React Native modules",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "homepage": "https://github.com/applicaster/quickbrick#readme",
34
34
  "dependencies": {
35
35
  "@applicaster/zapp-pipes-dev-kit": "1.4.7",
36
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5251355865",
36
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5347482137",
37
37
  "md5": "^2.3.0",
38
38
  "uuid": "^3.3.2"
39
39
  },