akeyless-client-commons 1.1.48 → 1.1.49
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/dist/hooks/index.d.mts +0 -3
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/index.js +3 -7
- package/dist/hooks/index.mjs +3 -7
- package/package.json +1 -1
package/dist/hooks/index.d.mts
CHANGED
|
@@ -90,9 +90,6 @@ interface UseDbSnapshotsSettings {
|
|
|
90
90
|
disableLogs?: boolean;
|
|
91
91
|
worker?: UseWebWorkerOptions;
|
|
92
92
|
socket?: {
|
|
93
|
-
onDisconnect?: (unsubscribe: () => void) => void;
|
|
94
|
-
onConnect?: (unsubscribe: () => void) => void;
|
|
95
|
-
callback?: () => void;
|
|
96
93
|
getSocket?: (socket: typeof socketServiceInstance) => void;
|
|
97
94
|
};
|
|
98
95
|
}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -90,9 +90,6 @@ interface UseDbSnapshotsSettings {
|
|
|
90
90
|
disableLogs?: boolean;
|
|
91
91
|
worker?: UseWebWorkerOptions;
|
|
92
92
|
socket?: {
|
|
93
|
-
onDisconnect?: (unsubscribe: () => void) => void;
|
|
94
|
-
onConnect?: (unsubscribe: () => void) => void;
|
|
95
|
-
callback?: () => void;
|
|
96
93
|
getSocket?: (socket: typeof socketServiceInstance) => void;
|
|
97
94
|
};
|
|
98
95
|
}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1555,7 +1555,7 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1555
1555
|
});
|
|
1556
1556
|
};
|
|
1557
1557
|
useDeepCompareEffect(function() {
|
|
1558
|
-
var _offConnectRef_current, _offDisconnectRef_current
|
|
1558
|
+
var _offConnectRef_current, _offDisconnectRef_current;
|
|
1559
1559
|
if (!auth.currentUser) {
|
|
1560
1560
|
return;
|
|
1561
1561
|
}
|
|
@@ -1623,14 +1623,11 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1623
1623
|
(_offConnectRef_current = offConnectRef.current) === null || _offConnectRef_current === void 0 ? void 0 : _offConnectRef_current.call(offConnectRef);
|
|
1624
1624
|
(_offDisconnectRef_current = offDisconnectRef.current) === null || _offDisconnectRef_current === void 0 ? void 0 : _offDisconnectRef_current.call(offDisconnectRef);
|
|
1625
1625
|
offConnectRef.current = socketServiceInstance.onConnect(function() {
|
|
1626
|
-
var _settings_socket_onConnect, _settings_socket;
|
|
1627
1626
|
setSocketConnected(true);
|
|
1628
1627
|
socketStarted.current = false;
|
|
1629
1628
|
subscribe();
|
|
1630
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_onConnect = _settings_socket.onConnect) === null || _settings_socket_onConnect === void 0 ? void 0 : _settings_socket_onConnect.call(_settings_socket, offConnectRef.current);
|
|
1631
1629
|
});
|
|
1632
1630
|
offDisconnectRef.current = socketServiceInstance.onDisconnect(function() {
|
|
1633
|
-
var _settings_socket_onDisconnect, _settings_socket;
|
|
1634
1631
|
setSocketConnected(false);
|
|
1635
1632
|
cleanupSubscriptionsRef.current.forEach(function(cleanup) {
|
|
1636
1633
|
return cleanup();
|
|
@@ -1638,10 +1635,7 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1638
1635
|
cleanupSubscriptionsRef.current = [];
|
|
1639
1636
|
activeSubscriptionKeyRef.current = null;
|
|
1640
1637
|
activeCollectionsRef.current = /* @__PURE__ */ new Set();
|
|
1641
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_onDisconnect = _settings_socket.onDisconnect) === null || _settings_socket_onDisconnect === void 0 ? void 0 : _settings_socket_onDisconnect.call(_settings_socket, offDisconnectRef.current);
|
|
1642
1638
|
});
|
|
1643
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_callback = _settings_socket.callback) === null || _settings_socket_callback === void 0 ? void 0 : _settings_socket_callback.call(_settings_socket);
|
|
1644
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket1 = settings.socket) === null || _settings_socket1 === void 0 ? void 0 : (_settings_socket_getSocket = _settings_socket1.getSocket) === null || _settings_socket_getSocket === void 0 ? void 0 : _settings_socket_getSocket.call(_settings_socket1, socketServiceInstance);
|
|
1645
1639
|
if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
|
|
1646
1640
|
return function() {
|
|
1647
1641
|
var _offConnectRef_current, _offDisconnectRef_current;
|
|
@@ -1665,6 +1659,8 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1665
1659
|
(_auth_currentUser = auth.currentUser) === null || _auth_currentUser === void 0 ? void 0 : _auth_currentUser.uid
|
|
1666
1660
|
]);
|
|
1667
1661
|
(0, import_react5.useEffect)(function() {
|
|
1662
|
+
var _settings_socket_getSocket, _settings_socket;
|
|
1663
|
+
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_getSocket = _settings_socket.getSocket) === null || _settings_socket_getSocket === void 0 ? void 0 : _settings_socket_getSocket.call(_settings_socket, socketServiceInstance);
|
|
1668
1664
|
return function() {
|
|
1669
1665
|
var _offConnectRef_current, _offDisconnectRef_current;
|
|
1670
1666
|
cleanupSubscriptionsRef.current.forEach(function(cleanup) {
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1458,7 +1458,7 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1458
1458
|
});
|
|
1459
1459
|
};
|
|
1460
1460
|
useDeepCompareEffect(function() {
|
|
1461
|
-
var _offConnectRef_current, _offDisconnectRef_current
|
|
1461
|
+
var _offConnectRef_current, _offDisconnectRef_current;
|
|
1462
1462
|
if (!auth.currentUser) {
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
@@ -1526,14 +1526,11 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1526
1526
|
(_offConnectRef_current = offConnectRef.current) === null || _offConnectRef_current === void 0 ? void 0 : _offConnectRef_current.call(offConnectRef);
|
|
1527
1527
|
(_offDisconnectRef_current = offDisconnectRef.current) === null || _offDisconnectRef_current === void 0 ? void 0 : _offDisconnectRef_current.call(offDisconnectRef);
|
|
1528
1528
|
offConnectRef.current = socketServiceInstance.onConnect(function() {
|
|
1529
|
-
var _settings_socket_onConnect, _settings_socket;
|
|
1530
1529
|
setSocketConnected(true);
|
|
1531
1530
|
socketStarted.current = false;
|
|
1532
1531
|
subscribe();
|
|
1533
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_onConnect = _settings_socket.onConnect) === null || _settings_socket_onConnect === void 0 ? void 0 : _settings_socket_onConnect.call(_settings_socket, offConnectRef.current);
|
|
1534
1532
|
});
|
|
1535
1533
|
offDisconnectRef.current = socketServiceInstance.onDisconnect(function() {
|
|
1536
|
-
var _settings_socket_onDisconnect, _settings_socket;
|
|
1537
1534
|
setSocketConnected(false);
|
|
1538
1535
|
cleanupSubscriptionsRef.current.forEach(function(cleanup) {
|
|
1539
1536
|
return cleanup();
|
|
@@ -1541,10 +1538,7 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1541
1538
|
cleanupSubscriptionsRef.current = [];
|
|
1542
1539
|
activeSubscriptionKeyRef.current = null;
|
|
1543
1540
|
activeCollectionsRef.current = /* @__PURE__ */ new Set();
|
|
1544
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_onDisconnect = _settings_socket.onDisconnect) === null || _settings_socket_onDisconnect === void 0 ? void 0 : _settings_socket_onDisconnect.call(_settings_socket, offDisconnectRef.current);
|
|
1545
1541
|
});
|
|
1546
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_callback = _settings_socket.callback) === null || _settings_socket_callback === void 0 ? void 0 : _settings_socket_callback.call(_settings_socket);
|
|
1547
|
-
settings === null || settings === void 0 ? void 0 : (_settings_socket1 = settings.socket) === null || _settings_socket1 === void 0 ? void 0 : (_settings_socket_getSocket = _settings_socket1.getSocket) === null || _settings_socket_getSocket === void 0 ? void 0 : _settings_socket_getSocket.call(_settings_socket1, socketServiceInstance);
|
|
1548
1542
|
if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
|
|
1549
1543
|
return function() {
|
|
1550
1544
|
var _offConnectRef_current, _offDisconnectRef_current;
|
|
@@ -1568,6 +1562,8 @@ var useSocketSnapshots = function(configs, label, settings) {
|
|
|
1568
1562
|
(_auth_currentUser = auth.currentUser) === null || _auth_currentUser === void 0 ? void 0 : _auth_currentUser.uid
|
|
1569
1563
|
]);
|
|
1570
1564
|
useEffect4(function() {
|
|
1565
|
+
var _settings_socket_getSocket, _settings_socket;
|
|
1566
|
+
settings === null || settings === void 0 ? void 0 : (_settings_socket = settings.socket) === null || _settings_socket === void 0 ? void 0 : (_settings_socket_getSocket = _settings_socket.getSocket) === null || _settings_socket_getSocket === void 0 ? void 0 : _settings_socket_getSocket.call(_settings_socket, socketServiceInstance);
|
|
1571
1567
|
return function() {
|
|
1572
1568
|
var _offConnectRef_current, _offDisconnectRef_current;
|
|
1573
1569
|
cleanupSubscriptionsRef.current.forEach(function(cleanup) {
|