@gudhub/core 1.0.37

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.
Files changed (67) hide show
  1. package/GUDHUB/Auth/Auth.js +137 -0
  2. package/GUDHUB/Auth/Auth.test.js +15 -0
  3. package/GUDHUB/Managers/ChunksManager/ChunksManager.js +80 -0
  4. package/GUDHUB/Managers/ChunksManager/ChunksManager.test.js +46 -0
  5. package/GUDHUB/Managers/DocumentManager/DocumentManager.js +48 -0
  6. package/GUDHUB/Managers/FileManager/FileManager.js +208 -0
  7. package/GUDHUB/Managers/FileManager/file_manager.test.js +17 -0
  8. package/GUDHUB/Managers/managers.js +5 -0
  9. package/GUDHUB/PipeService/PipeService.js +167 -0
  10. package/GUDHUB/PipeService/PipeService.test.js +64 -0
  11. package/GUDHUB/PipeService/utils.js +32 -0
  12. package/GUDHUB/Processors/AppProcessor/AppProcessor.js +433 -0
  13. package/GUDHUB/Processors/AppProcessor/AppProcessor.test.js +38 -0
  14. package/GUDHUB/Processors/AppProcessor/AppProcessorMocks.js +83 -0
  15. package/GUDHUB/Processors/FieldProcessor/FieldProcessor.js +139 -0
  16. package/GUDHUB/Processors/FieldProcessor/FieldProcessor.test.js +16 -0
  17. package/GUDHUB/Processors/FieldProcessor/Untitled-1.json +17 -0
  18. package/GUDHUB/Processors/FieldProcessor/field_processor.md +85 -0
  19. package/GUDHUB/Processors/ItemProcessor/ItemProcessor.js +247 -0
  20. package/GUDHUB/Processors/ItemProcessor/item_processor.md +50 -0
  21. package/GUDHUB/Processors/processors.js +5 -0
  22. package/GUDHUB/Storage/Storage.js +115 -0
  23. package/GUDHUB/Storage/Storage.test.js +112 -0
  24. package/GUDHUB/Utils/Utils.js +153 -0
  25. package/GUDHUB/Utils/compare_items_lists_worker/compare_items_lists.worker.js +50 -0
  26. package/GUDHUB/Utils/filter/filter.js +308 -0
  27. package/GUDHUB/Utils/filter/filter.test.js +94 -0
  28. package/GUDHUB/Utils/filter/filterPreparation.js +103 -0
  29. package/GUDHUB/Utils/filter/group.js +41 -0
  30. package/GUDHUB/Utils/filter/utils.js +119 -0
  31. package/GUDHUB/Utils/get_date/get_date.js +90 -0
  32. package/GUDHUB/Utils/get_date/get_date.test.js +53 -0
  33. package/GUDHUB/Utils/interpretation/interpretation.js +100 -0
  34. package/GUDHUB/Utils/json_constructor/json_constructor.js +130 -0
  35. package/GUDHUB/Utils/json_constructor/json_constructor.test.js +70 -0
  36. package/GUDHUB/Utils/json_to_items/json_to_items.js +161 -0
  37. package/GUDHUB/Utils/json_to_items/json_to_items.test.js +85 -0
  38. package/GUDHUB/Utils/merge_chunks/merge_chunks.js +30 -0
  39. package/GUDHUB/Utils/merge_compare_items/merge_compare_items.js +316 -0
  40. package/GUDHUB/Utils/merge_compare_items/merge_compare_items.test.js +632 -0
  41. package/GUDHUB/Utils/merge_objects/merge_objects.js +120 -0
  42. package/GUDHUB/Utils/merge_objects/merge_objects.test.js +137 -0
  43. package/GUDHUB/Utils/nested_list/nested_list.js +38 -0
  44. package/GUDHUB/Utils/nested_list/nested_list.test.js +70 -0
  45. package/GUDHUB/Utils/populate_items/populate_items.js +66 -0
  46. package/GUDHUB/WebSocket/WebSocket.js +136 -0
  47. package/GUDHUB/config.js +8 -0
  48. package/GUDHUB/consts.js +1 -0
  49. package/GUDHUB/gudhub-https-service.js +193 -0
  50. package/GUDHUB/gudhub.js +477 -0
  51. package/GUDHUB/gudhub.test.js +218 -0
  52. package/GUDHUB/utils.js +25 -0
  53. package/Readme.md +537 -0
  54. package/fake_server/fake_java_server.js +112 -0
  55. package/fake_server/fake_server_data/app_132.js +3037 -0
  56. package/fake_server/fake_server_data/app_16259.js +1152 -0
  57. package/fake_server/fake_server_data/app_214.js +2057 -0
  58. package/fake_server/fake_server_data/app_8263.js +4167 -0
  59. package/fake_server/fake_server_data/chunks_mocks/bcacjbgqorherqmtykrj_8263.js +44561 -0
  60. package/fake_server/fake_server_data/chunks_mocks/bcjyuoqaewybudfyhir_8263.js +44197 -0
  61. package/fake_server/fake_server_data/chunks_mocks/tpajkpolmzklodcba_8263.js +44977 -0
  62. package/fake_server/fake_server_data/fake_server_data.js +111 -0
  63. package/index.js +3 -0
  64. package/indexUMD.js +5 -0
  65. package/package.json +45 -0
  66. package/umd/library.min.js +186 -0
  67. package/umd/library.min.js.map +1 -0
@@ -0,0 +1,120 @@
1
+ // Value of properties for source object woun't be changed by target object
2
+ // If source of target hase unique properties they are going to be created in resulted object
3
+
4
+ export function mergeObjects(target, source, optionsArgument){
5
+ return deepmerge(target, source, optionsArgument)
6
+ }
7
+
8
+
9
+
10
+ /* Deepmerge - Start */
11
+ // this code was copied from https://codepen.io/pushpanathank/pen/owjJGG
12
+ // Basicaly I need it to marge field models
13
+ function isMergeableObject(val) {
14
+ var nonNullObject = val && typeof val === 'object'
15
+
16
+ return nonNullObject
17
+ && Object.prototype.toString.call(val) !== '[object RegExp]'
18
+ && Object.prototype.toString.call(val) !== '[object Date]'
19
+ }
20
+
21
+
22
+ function emptyTarget(val) {
23
+ return Array.isArray(val) ? [] : {}
24
+ }
25
+
26
+
27
+ function cloneIfNecessary(value, optionsArgument) {
28
+ var clone = optionsArgument && optionsArgument.clone === true
29
+ return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
30
+ }
31
+
32
+
33
+ function defaultArrayMerge(target, source, optionsArgument) {
34
+ var destination = target.slice()
35
+ source.forEach(function(e, i) {
36
+ if (typeof destination[i] === 'undefined') {
37
+ destination[i] = cloneIfNecessary(e, optionsArgument)
38
+ } else if (isMergeableObject(e)) {
39
+ destination[i] = deepmerge(target[i], e, optionsArgument)
40
+ } else if (target.indexOf(e) === -1) {
41
+ destination.push(cloneIfNecessary(e, optionsArgument))
42
+ }
43
+ })
44
+ return destination
45
+ }
46
+
47
+
48
+ function mergeObject(target, source, optionsArgument) {
49
+ var destination = {}
50
+ if (isMergeableObject(target)) {
51
+ Object.keys(target).forEach(function (key) {
52
+ destination[key] = cloneIfNecessary(target[key], optionsArgument)
53
+ })
54
+ }
55
+ Object.keys(source).forEach(function (key) {
56
+ if (!isMergeableObject(source[key]) || !target[key]) {
57
+ destination[key] = cloneIfNecessary(source[key], optionsArgument)
58
+ } else {
59
+ destination[key] = deepmerge(target[key], source[key], optionsArgument)
60
+ }
61
+ })
62
+ return destination
63
+ }
64
+
65
+ function deepmerge(target, source, optionsArgument) {
66
+ var array = Array.isArray(source);
67
+ var options = optionsArgument || { arrayMerge: defaultArrayMerge }
68
+ var arrayMerge = options.arrayMerge || defaultArrayMerge
69
+
70
+ if (array) {
71
+ return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
72
+ } else {
73
+ return mergeObject(target, source, optionsArgument)
74
+ }
75
+ }
76
+
77
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
78
+ if (!Array.isArray(array) || array.length < 2) {
79
+ throw new Error('first argument should be an array with at least two elements')
80
+ }
81
+
82
+ // we are sure there are at least 2 values, so it is safe to have no initial value
83
+ return array.reduce(function(prev, next) {
84
+ return deepmerge(prev, next, optionsArgument)
85
+ })
86
+ }
87
+ /* Deepmerge - Ends */
88
+
89
+
90
+ // // Sample
91
+ // const defaultPerson = {
92
+ // name: 'Push',
93
+ // gender: 'Male',
94
+ // hair: {
95
+ // color: 'Black',
96
+ // cut: 'Short'
97
+ // },
98
+ // eyes: 'blue',
99
+ // family: ['mom', 'dad']
100
+ // };
101
+
102
+ // const me = {
103
+ // name: 'Nathan',
104
+ // gender: 'Male',
105
+ // hair: {
106
+ // cut: 'Long'
107
+ // },
108
+ // family: ['wife', 'kids', 'dog']
109
+ // };
110
+
111
+ // const result1 = deepmerge(defaultPerson, me);
112
+ // document.getElementById('result1').innerHTML = JSON.stringify(result1, null, "\t");
113
+
114
+ // const result2 = deepmerge.all([,
115
+ // { level1: { level2: { name: 'Push', parts: ['head', 'shoulders'] } } },
116
+ // { level1: { level2: { face: 'Round', parts: ['knees', 'toes'] } } },
117
+ // { level1: { level2: { eyes: 'Black', parts: ['eyes'] } } },
118
+ // ]);
119
+
120
+ // document.getElementById('result2').innerHTML = JSON.stringify(result2, null, "\t");
@@ -0,0 +1,137 @@
1
+ import should from "should";
2
+ import {GudHub} from '../../gudhub.js';
3
+
4
+ describe("MERGE OBJECTS", function () {
5
+ const gudhub = new GudHub();
6
+
7
+
8
+ it("MERGE TWO SIMPLE OBJECTS : data_model should have a new property", function () {
9
+ gudhub.mergeObjects(simpleTarget, simpleSource).data_model.should.have.property("regular_expresion", "/[0.9]/")
10
+ gudhub.mergeObjects(simpleTarget, simpleSource).data_model.should.have.property("precision", "1")
11
+ });
12
+
13
+
14
+ it("MERGE INTERPRETATIONS : table interpretation should be changed", function () {
15
+ gudhub.mergeObjects(simpleTarget, simpleSource).data_model.should.have.property("regular_expresion", "/[0.9]/");
16
+
17
+ let tableInterpretation = gudhub.mergeObjects(interpretationTarget, interpretationSource).data_model.interpretation.find((interp) => interp.src == "table");
18
+ tableInterpretation.settings.should.have.property("show_field", 1);
19
+ tableInterpretation.settings.should.have.property("show_field_name", 0);
20
+ tableInterpretation.settings.should.have.property("editable", 1);
21
+
22
+ let containerInterpretation = gudhub.mergeObjects(interpretationTarget, interpretationSource).data_model.interpretation.find((interp) => interp.src == "31963");
23
+ tableInterpretation.settings.should.have.property("show_field", 1);
24
+ });
25
+ });
26
+
27
+
28
+
29
+
30
+ /*---------------------- MOCKS-----------------------*/
31
+ let simpleTarget = {
32
+ "field_id": 1446,
33
+ "element_id": 1446,
34
+ "name_space": "ph",
35
+ "field_priority": 0,
36
+ "field_name": "pH",
37
+ "data_model": {
38
+ "precision": "1",
39
+ "interpretation": []
40
+ },
41
+ "data_type": "number"
42
+ };
43
+
44
+ let simpleSource = {
45
+ "field_id": 1446,
46
+ "element_id": 1446,
47
+ "name_space": "ph",
48
+ "field_priority": 0,
49
+ "field_name": "pH",
50
+ "data_model": {
51
+ "regular_expresion" : "/[0.9]/",
52
+ "interpretation": []
53
+ },
54
+ "data_type": "number"
55
+ };
56
+
57
+
58
+ let interpretationSource = {
59
+ "field_id": 1446,
60
+ "element_id": 1446,
61
+ "name_space": "ph",
62
+ "field_priority": 0,
63
+ "field_name": "pH",
64
+ "data_model": {
65
+ "precision": "1",
66
+ "interpretation": [
67
+ {
68
+ "src": "table",
69
+ "id": "default",
70
+ "settings": {
71
+ "show_field_name": 0,
72
+ "editable":1
73
+ },
74
+ },{
75
+ "src": "31963",
76
+ "id": "default",
77
+ "settings": {
78
+ "editable": 1,
79
+ "show_field_name": 1,
80
+ "show_field": 1
81
+ }
82
+ }
83
+ ]
84
+ },
85
+ "data_type": "number"
86
+ };
87
+
88
+
89
+ let interpretationTarget = {
90
+ "field_id": 1449,
91
+ "element_id": 1449,
92
+ "name_space": "kh",
93
+ "field_priority": 0,
94
+ "field_name": "KH",
95
+ "data_model": {
96
+ "precision": "0",
97
+ "interpretation": [
98
+ {
99
+ "src": "table",
100
+ "id": "default",
101
+ "settings": {
102
+ "show_field": 1,
103
+ "editable":0
104
+ }
105
+ },
106
+ {
107
+ "src": "form",
108
+ "id": "input_with_name",
109
+ "settings": {
110
+ "show_field": 1
111
+ }
112
+ },
113
+ {
114
+ "src": "dropdown",
115
+ "id": "default",
116
+ "settings": {
117
+ "show_field": 1
118
+ }
119
+ },
120
+ {
121
+ "src": "input",
122
+ "id": "default",
123
+ "settings": {
124
+ "show_field": 1
125
+ }
126
+ },
127
+ {
128
+ "src": "input_list",
129
+ "id": "default",
130
+ "settings": {
131
+ "show_field": 1
132
+ }
133
+ }
134
+ ]
135
+ },
136
+ "data_type": "number"
137
+ };
@@ -0,0 +1,38 @@
1
+ export function makeNestedList(arr, id, parent_id, children_property) {
2
+ let array = JSON.parse(JSON.stringify(arr));
3
+ let children = Boolean(children_property) ? children_property : 'children';
4
+ let i;
5
+ for (i = 0; i < array.length; i++) {
6
+ if (array[i][parent_id] && array[i][parent_id] !== 0) {
7
+ array.forEach((parent) => {
8
+ if (array[i][parent_id] == parent[id]) {
9
+ if (!parent[children]) {
10
+ parent[children] = [];
11
+ }
12
+ parent[children].push(array[i]);
13
+ array.splice(i, 1);
14
+ i--;
15
+ } else if (parent[children]) {
16
+ findIdsOfChildren(parent);
17
+ }
18
+ });
19
+ }
20
+ }
21
+
22
+ function findIdsOfChildren(parent) {
23
+ parent[children].forEach((child) => {
24
+ if (child[id] == array[i][parent_id]) {
25
+ if (!child[children]) {
26
+ child[children] = [];
27
+ }
28
+ child[children].push(array[i]);
29
+ array.splice(i, 1);
30
+ i--;
31
+ } else if (child[children]) {
32
+ findIdsOfChildren(child);
33
+ }
34
+ });
35
+ }
36
+
37
+ return array;
38
+ }
@@ -0,0 +1,70 @@
1
+ import should from "should";
2
+ import { GudHub } from '../../gudhub.js';
3
+
4
+ describe("NESTED LIST", function () {
5
+ const gudhub = new GudHub();
6
+
7
+ it("Should return right name value of second children", function () {
8
+ let nestedList = gudhub.makeNestedList(input, 'id', 'parent_id');
9
+ nestedList[0].children[0].children[0].name.should.equal('Article 4')
10
+ });
11
+
12
+ it('Should return default children property name', function () {
13
+ let nestedList = gudhub.makeNestedList(input, 'id', 'parent_id');
14
+ nestedList[0].children[0].should.have.property('children');
15
+ })
16
+
17
+ it('Should return custom children property name', function () {
18
+ let nestedList = gudhub.makeNestedList(input, 'id', 'parent_id', 'custom_children');
19
+ nestedList[0].custom_children[0].should.have.property('custom_children');
20
+ })
21
+
22
+ });
23
+
24
+ let input = [
25
+ {
26
+ name: "Article 1",
27
+ id: 1,
28
+ parent_id: 0
29
+ },
30
+ {
31
+ name: "Article 2",
32
+ id: 2,
33
+ parent_id: 0
34
+ },
35
+ {
36
+ name: "Article 3",
37
+ id: 3,
38
+ parent_id: 1
39
+ },
40
+ {
41
+ name: "Article 4",
42
+ id: 4,
43
+ parent_id: 3
44
+ },
45
+ {
46
+ name: "Article 5",
47
+ id: 5,
48
+ parent_id: 3
49
+ },
50
+ {
51
+ name: "Article 6",
52
+ id: 6,
53
+ parent_id: 4
54
+ },
55
+ {
56
+ name: "Article 7",
57
+ id: 7,
58
+ parent_id: 6
59
+ },
60
+ {
61
+ name: "Article 8",
62
+ id: 8,
63
+ parent_id: 3
64
+ },
65
+ {
66
+ name: "Article 9",
67
+ id: 9,
68
+ parent_id: 8
69
+ },
70
+ ];
@@ -0,0 +1,66 @@
1
+ //********************************************//
2
+ //******************* ITEMS ******************//
3
+ //********************************************//
4
+
5
+ /*
6
+ |====================================== ITEMS UPDATE ================================|
7
+ |=========== updateItems (items, model, eraseOtherValues) ============|
8
+ |====================================================================================|
9
+ |
10
+ | items - GudHub items those we are going to be updated
11
+ | eraseOtherValues - if is 'true' then we erase fields those are not going to be updated
12
+ | model - by this model we update values. The model format should have folowing format:
13
+ |
14
+ |
15
+ | model = [
16
+ | {
17
+ | "element_id" : 228464,
18
+ | "field_value" : 777
19
+ | }]
20
+ |
21
+ |==================================================================================|
22
+ */
23
+
24
+
25
+ //********************** UPDATE ITEMS ************************/
26
+ export default function populateItems(items, model, keep_data) {
27
+ var itemsCopy = JSON.parse(JSON.stringify(items));
28
+ if (keep_data) {
29
+ return populateItemsAndKeepOtherValues(itemsCopy, model);
30
+ } else {
31
+ return populateItemsAndEraseOtherValues(itemsCopy, model);
32
+ }
33
+ }
34
+
35
+
36
+ //---- Update Items And KEEP Other Values ----//
37
+ function populateItemsAndKeepOtherValues(items, model) {
38
+ items.forEach(item => {
39
+ model.forEach(modelField => {
40
+ let field = item.fields.find(sourceField => sourceField.element_id == modelField.element_id);
41
+
42
+ if (field) {
43
+ field.field_value = modelField.field_value;
44
+ } else {//-- if we didn't find field with item then we add it
45
+ modelField.field_id = modelField.element_id; //backend send ERROR if don't send field_id
46
+ item.fields.push(modelField);
47
+ }
48
+ });
49
+ });
50
+
51
+ return items;
52
+ }
53
+
54
+
55
+ //---- Update Items And ERASE Other Values ----//
56
+ function populateItemsAndEraseOtherValues(items, model) {
57
+ items.forEach(item => {
58
+ item.fields = [].concat(model);
59
+ });
60
+
61
+ return items;
62
+ }
63
+
64
+
65
+
66
+
@@ -0,0 +1,136 @@
1
+ import Websocket from "ws";
2
+
3
+ export class WebSocketApi {
4
+ constructor(url, auth) {
5
+ this.websocket = null;
6
+ this.connected = false;
7
+ this.queue = [];
8
+ this.url = url;
9
+ this.auth = auth;
10
+ this.heartBeatTimeStemp = 10000000000000;
11
+ this.ALLOWED_HEART_BEAT_DELEY = 12000;
12
+ this.firstHeartBeat = true;
13
+ this.reload = true;
14
+ this.isBrowser = ![typeof window, typeof document].includes("undefined");
15
+ }
16
+
17
+ async addSubscription(app_id) {
18
+ //console.log("Added new subscription: app_id - ", app_id);
19
+
20
+ const token = await this.auth.getToken();
21
+ const subscription = `token=${token}/~/app_id=${app_id}`;
22
+
23
+ if (this.connected) {
24
+ this.websocket.send(subscription);
25
+ }
26
+
27
+ this.queue.push(app_id);
28
+ }
29
+
30
+ async onOpen() {
31
+ this.reload = true;
32
+ console.log("websocket opened");
33
+
34
+ this.connected = true;
35
+ const token = await this.auth.getToken();
36
+
37
+ this.queue.forEach((queue) => {
38
+ const subscription = `token=${token}/~/app_id=${queue}`;
39
+ this.websocket.send(subscription);
40
+ });
41
+ }
42
+
43
+ onError(error) {
44
+ console.log("websocket error: ", error);
45
+
46
+ this.websocket.close();
47
+ }
48
+
49
+ onClose() {
50
+ console.log("websocket close");
51
+
52
+ this.connected = false;
53
+ this.initWebSocket();
54
+ }
55
+
56
+ async onMessage(event) {
57
+ const message = this.isBrowser ? event.data : event
58
+ if (message.match(/HeartBeat/)) {
59
+ const hartBeatDelay = new Date().getTime() - this.heartBeatTimeStemp;
60
+
61
+ if (this.ALLOWED_HEART_BEAT_DELEY < hartBeatDelay) {
62
+ await this.onConnectionLost();
63
+ } else {
64
+ this.websocket.send("HeartBeat");
65
+ this.heartBeatTimeStemp = new Date().getTime();
66
+ }
67
+ }
68
+
69
+ if (this.firstHeartBeat) {
70
+ this.connectionChecker();
71
+ this.firstHeartBeat = false;
72
+ }
73
+
74
+ if (message.match(/[{}]/)) {
75
+ let incomeMessage = JSON.parse(message);
76
+ const token = await this.auth.getToken();
77
+
78
+ //-- We don't want to update storage of user who initieted the update. That is why we check if token from websocket is not the same as users token.
79
+ if (incomeMessage.token != token) {
80
+ this.onMassageHandler(incomeMessage);
81
+ }
82
+ }
83
+ }
84
+
85
+ initWebSocket(onMassageHandler, refreshAppsHandler) {
86
+ this.onMassageHandler = onMassageHandler;
87
+ this.refreshAppsHandler = refreshAppsHandler
88
+ if (this.isBrowser) {
89
+ this.websocket = new WebSocket(this.url);
90
+ this.websocket.onopen = this.onOpen.bind(this);
91
+
92
+ this.websocket.onerror = this.onError.bind(this);
93
+
94
+ this.websocket.onclose = this.onClose.bind(this);
95
+
96
+ this.websocket.onmessage = this.onMessage.bind(this);
97
+ } else {
98
+ this.websocket = new Websocket(this.url);
99
+ this.websocket.on("open", this.onOpen);
100
+
101
+ this.websocket.on("error", this.onError);
102
+
103
+ this.websocket.on("close", this.onClose);
104
+
105
+ this.websocket.on("message", this.onMessage);
106
+ }
107
+
108
+ console.log("websocket initialized");
109
+ }
110
+
111
+ connectionChecker() {
112
+ setInterval(async () => {
113
+ let hartBeatDelay = new Date().getTime() - this.heartBeatTimeStemp;
114
+ // console.log(hartBeatDelay, this.ALLOWED_HEART_BEAT_DELEY, "interval");
115
+ if (this.ALLOWED_HEART_BEAT_DELEY < hartBeatDelay) {
116
+ await this.onConnectionLost();
117
+ }
118
+ }, 1000);
119
+ }
120
+
121
+ async onConnectionLost() {
122
+ try {
123
+ await this.auth.getVersion();
124
+ if (this.reload) {
125
+ this.reload = false;
126
+ console.log("Connected");
127
+ this.heartBeatTimeStemp = 10000000000000;
128
+
129
+ this.websocket.close();
130
+ this.refreshAppsHandler(this.queue);
131
+ }
132
+ } catch (error) {
133
+ console.log(error);
134
+ }
135
+ }
136
+ }
@@ -0,0 +1,8 @@
1
+ export const server_url = "https://gudhub.com/GudHub";
2
+ //export const server_url = "https://gudhub.com/GudHub_Temp";
3
+ //export const server_url = "https://integration.gudhub.com/GudHub_Test";
4
+ //export const server_url = "http://localhost:9000";
5
+ export const wss_url = "wss://gudhub.com/GudHub/ws/app/";
6
+
7
+ // FOR TESTS
8
+ export const port = 9000;
@@ -0,0 +1 @@
1
+ export const IS_WEB = ![typeof window, typeof document].includes("undefined");