chayns-api 2.6.12 → 2.6.13
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.
|
@@ -50,13 +50,13 @@ const ChaynsProvider = ({
|
|
|
50
50
|
if (data && functions) {
|
|
51
51
|
customWrapper.current = new _ModuleFederationWrapper.ModuleFederationWrapper(data, functions, customFunctions);
|
|
52
52
|
} else {
|
|
53
|
-
console.
|
|
53
|
+
console.error('[chayns-api] ModuleFederationWrapper requires data and functions');
|
|
54
54
|
}
|
|
55
55
|
} else if (isServer) {
|
|
56
56
|
if (data && functions) {
|
|
57
57
|
customWrapper.current = new _SsrWrapper.SsrWrapper(data, functions, customFunctions);
|
|
58
58
|
} else {
|
|
59
|
-
console.
|
|
59
|
+
console.error('[chayns-api] SsrWrapper requires data and functions');
|
|
60
60
|
}
|
|
61
61
|
} else {
|
|
62
62
|
var _deviceInfo$app$name, _deviceInfo$app;
|
|
@@ -68,8 +68,10 @@ const ChaynsProvider = ({
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
_moduleWrapper.moduleWrapper.current = customWrapper.current;
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if (customWrapper.current) {
|
|
72
|
+
_moduleWrapper.chaynsApis[idRef.current] = customWrapper.current.functions;
|
|
73
|
+
customWrapper.current.chaynsApiId = idRef.current;
|
|
74
|
+
}
|
|
73
75
|
}
|
|
74
76
|
const [isInitialized, setIsInitialized] = (0, _react.useState)(!!((_customWrapper$curren = customWrapper.current) !== null && _customWrapper$curren !== void 0 && _customWrapper$curren.values));
|
|
75
77
|
(0, _react.useEffect)(() => {
|
|
@@ -42,13 +42,13 @@ const ChaynsProvider = ({
|
|
|
42
42
|
if (data && functions) {
|
|
43
43
|
customWrapper.current = new ModuleFederationWrapper(data, functions, customFunctions);
|
|
44
44
|
} else {
|
|
45
|
-
console.
|
|
45
|
+
console.error('[chayns-api] ModuleFederationWrapper requires data and functions');
|
|
46
46
|
}
|
|
47
47
|
} else if (isServer) {
|
|
48
48
|
if (data && functions) {
|
|
49
49
|
customWrapper.current = new SsrWrapper(data, functions, customFunctions);
|
|
50
50
|
} else {
|
|
51
|
-
console.
|
|
51
|
+
console.error('[chayns-api] SsrWrapper requires data and functions');
|
|
52
52
|
}
|
|
53
53
|
} else {
|
|
54
54
|
var _deviceInfo$app$name, _deviceInfo$app;
|
|
@@ -60,8 +60,10 @@ const ChaynsProvider = ({
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
moduleWrapper.current = customWrapper.current;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
if (customWrapper.current) {
|
|
64
|
+
chaynsApis[idRef.current] = customWrapper.current.functions;
|
|
65
|
+
customWrapper.current.chaynsApiId = idRef.current;
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
const [isInitialized, setIsInitialized] = useState(!!((_customWrapper$curren = customWrapper.current) !== null && _customWrapper$curren !== void 0 && _customWrapper$curren.values));
|
|
67
69
|
useEffect(() => {
|