@gudhub/core 1.2.4-beta.21 → 1.2.4-beta.22

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.
@@ -92,10 +92,6 @@ export class AppProcessor {
92
92
  return app && app.field_list.length ? app : null;
93
93
  }
94
94
 
95
- getAppFromStorageWithoutChecks(id) {
96
- return this.storage.getApp(id);
97
- }
98
-
99
95
  addNewAppToStorage(app) {
100
96
  return this.storage.getAppsList().push(app);
101
97
  }
@@ -124,7 +120,7 @@ export class AppProcessor {
124
120
  }
125
121
 
126
122
  updateAppFieldsAndViews(app) {
127
- const storageApp = this.getAppFromStorageWithoutChecks(app.app_id);
123
+ const storageApp = this.getAppFromStorage(app.app_id);
128
124
  app.items_list = storageApp.items_list;
129
125
  app.file_list = storageApp.file_list;
130
126
  app.from_apps_list = storageApp.from_apps_list;
@@ -239,7 +235,7 @@ export class AppProcessor {
239
235
  // Here we get default user's app
240
236
  // We do it here to do it only once
241
237
  // We do it because we need to initialize WebSockets, which we do in getApp method
242
- this.getApp(this.storage.getUser().app_init);
238
+ // this.getApp(this.storage.getUser().app_init); // commented due to unfinished app_init development, its shape causes exceptions
243
239
  }
244
240
 
245
241
  return app_list;
@@ -17,6 +17,9 @@ let appDataService = {};
17
17
  self.onmessage = async function(e) {
18
18
  if (e.data.type === 'init') {
19
19
 
20
+
21
+ e.data.gudhubSerialized.options.initWebsocket = false;
22
+
20
23
  gudhub = new GudHub(e.data.gudhubSerialized.authKey, e.data.gudhubSerialized.options);
21
24
  appDataService = new IndexedDBAppServiceForWorker(gudhub.req, appsConf, gudhub);
22
25
 
@@ -120,7 +120,7 @@ export class ItemProcessor {
120
120
 
121
121
  //here
122
122
 
123
- ///
123
+ /////
124
124
  handleItemsChange(id, prevVersion, nextVersion) {
125
125
  let compareRes = this.util.compareItems(prevVersion.items_list, nextVersion.items_list);
126
126
 
@@ -225,6 +225,7 @@ export class Utils {
225
225
  return compareObjects(obj1, obj2);
226
226
  }
227
227
 
228
+ //
228
229
  compareAppsItemsLists(items_list1, items_list2, callback) {
229
230
  const chunkWorkerBlob = new Blob([compare_items_lists_Worker()], {
230
231
  type: "application/javascript",
@@ -5,6 +5,10 @@ import { mergeChunks as mergeChunksByMainThread, mergeChunksWorker } from "./mer
5
5
 
6
6
 
7
7
  export function mergeChunks(chunks) {
8
+ //dont launch new thread because already used in worker.
9
+ // Main reason is that renderer process allocates memory for structured clones for communication between trheads
10
+ return mergeChunksByMainThread(chunks);
11
+
8
12
  if (
9
13
  typeof Worker !== 'undefined'
10
14
  ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/core",
3
- "version": "1.2.4-beta.21",
3
+ "version": "1.2.4-beta.22",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {