@streamlayer/sdk-web-core 1.21.5 → 1.21.7
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/lib/index.js +11 -17
- package/package.json +14 -7
package/lib/index.js
CHANGED
|
@@ -64,23 +64,17 @@ export const core = (instance, opts, done) => {
|
|
|
64
64
|
instance.storeSubscribe();
|
|
65
65
|
instance.stores.enabled.setValue('on');
|
|
66
66
|
instance.stores.status.setValue(CoreStatus.INITIALIZATION);
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
catch (err) {
|
|
79
|
-
instance.stores.enabled.setValue();
|
|
80
|
-
instance.stores.status.setValue(CoreStatus.FAILED);
|
|
81
|
-
return resolve({ err: `${err}` });
|
|
82
|
-
}
|
|
83
|
-
});
|
|
67
|
+
return instance.stores.organizationSettings.getValue().then((organizationSettings) => {
|
|
68
|
+
if (organizationSettings) {
|
|
69
|
+
instance.stores.status.setValue(CoreStatus.READY);
|
|
70
|
+
return { enabled: !!organizationSettings };
|
|
71
|
+
}
|
|
72
|
+
instance.stores.status.setValue(CoreStatus.FAILED);
|
|
73
|
+
return { err: 'failed' };
|
|
74
|
+
}, (err) => {
|
|
75
|
+
instance.stores.enabled.setValue();
|
|
76
|
+
instance.stores.status.setValue(CoreStatus.FAILED);
|
|
77
|
+
return { err: `${err}` };
|
|
84
78
|
});
|
|
85
79
|
};
|
|
86
80
|
instance.sdk.disableApp = () => {
|
package/package.json
CHANGED
|
@@ -7,53 +7,60 @@
|
|
|
7
7
|
"@nanostores/query": "^0.3.4",
|
|
8
8
|
"@streamlayer/sl-eslib": "^5.229.1",
|
|
9
9
|
"nanostores": "^1.1.0",
|
|
10
|
-
"@streamlayer/sdk-web-api": "^1.16.
|
|
11
|
-
"@streamlayer/sdk-web-interfaces": "^1.9.
|
|
12
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
13
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
14
|
-
"@streamlayer/sdk-web-types": "^1.17.
|
|
10
|
+
"@streamlayer/sdk-web-api": "^1.16.7",
|
|
11
|
+
"@streamlayer/sdk-web-interfaces": "^1.9.15",
|
|
12
|
+
"@streamlayer/sdk-web-logger": "^1.0.109",
|
|
13
|
+
"@streamlayer/sdk-web-storage": "^1.0.109",
|
|
14
|
+
"@streamlayer/sdk-web-types": "^1.17.7"
|
|
15
15
|
},
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./lib/index.d.ts",
|
|
19
19
|
"import": "./lib/index.js",
|
|
20
|
+
"module": "./lib/index.js",
|
|
20
21
|
"default": "./lib/index.js"
|
|
21
22
|
},
|
|
22
23
|
"./store": {
|
|
23
24
|
"types": "./lib/store/index.d.ts",
|
|
24
25
|
"import": "./lib/store/index.js",
|
|
26
|
+
"module": "./lib/store/index.js",
|
|
25
27
|
"default": "./lib/store/index.js"
|
|
26
28
|
},
|
|
27
29
|
"./storage": {
|
|
28
30
|
"types": "./lib/storage.d.ts",
|
|
29
31
|
"import": "./lib/storage.js",
|
|
32
|
+
"module": "./lib/storage.js",
|
|
30
33
|
"default": "./lib/storage.js"
|
|
31
34
|
},
|
|
32
35
|
"./store/store": {
|
|
33
36
|
"types": "./lib/store/store.d.ts",
|
|
34
37
|
"import": "./lib/store/store.js",
|
|
38
|
+
"module": "./lib/store/store.js",
|
|
35
39
|
"default": "./lib/store/store.js"
|
|
36
40
|
},
|
|
37
41
|
"./notifications": {
|
|
38
42
|
"types": "./lib/notifications/index.d.ts",
|
|
39
43
|
"import": "./lib/notifications/index.js",
|
|
44
|
+
"module": "./lib/notifications/index.js",
|
|
40
45
|
"default": "./lib/notifications/index.js"
|
|
41
46
|
},
|
|
42
47
|
"./auth": {
|
|
43
48
|
"types": "./lib/auth/index.d.ts",
|
|
44
49
|
"import": "./lib/auth/index.js",
|
|
50
|
+
"module": "./lib/auth/index.js",
|
|
45
51
|
"default": "./lib/auth/index.js"
|
|
46
52
|
},
|
|
47
53
|
"./ui": {
|
|
48
54
|
"types": "./lib/ui/index.d.ts",
|
|
49
55
|
"import": "./lib/ui/index.js",
|
|
56
|
+
"module": "./lib/ui/index.js",
|
|
50
57
|
"default": "./lib/ui/index.js"
|
|
51
58
|
}
|
|
52
59
|
},
|
|
53
|
-
"version": "1.21.
|
|
60
|
+
"version": "1.21.7",
|
|
54
61
|
"type": "module",
|
|
55
62
|
"main": "./lib/index.js",
|
|
56
|
-
"
|
|
63
|
+
"import": "./lib/index.js",
|
|
57
64
|
"typings": "./lib/index.d.ts",
|
|
58
65
|
"files": [
|
|
59
66
|
"lib/",
|