akeyless-client-commons 1.1.17-test.1 → 1.1.17-test.3

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.
@@ -1209,7 +1209,6 @@ var SocketService = /*#__PURE__*/ function() {
1209
1209
  var _this = this;
1210
1210
  if (!this.socket) {
1211
1211
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
1212
- console.log("socketUrl", socketUrl);
1213
1212
  this.socket = (0, import_socket.io)(socketUrl, {
1214
1213
  path: "/api/data-socket/connect",
1215
1214
  transports: [
@@ -1255,6 +1254,9 @@ var SocketService = /*#__PURE__*/ function() {
1255
1254
  /// subscribe to collections
1256
1255
  key: "subscribeToCollections",
1257
1256
  value: function subscribeToCollections(config) {
1257
+ if (config.length === 0) {
1258
+ return function() {};
1259
+ }
1258
1260
  var s = this.getSocketInstance();
1259
1261
  var collectionsNames = config.map(function(c) {
1260
1262
  return c.collectionName;
@@ -987,7 +987,6 @@ var SocketService = /*#__PURE__*/ function() {
987
987
  var _this = this;
988
988
  if (!this.socket) {
989
989
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
990
- console.log("socketUrl", socketUrl);
991
990
  this.socket = io(socketUrl, {
992
991
  path: "/api/data-socket/connect",
993
992
  transports: [
@@ -1033,6 +1032,9 @@ var SocketService = /*#__PURE__*/ function() {
1033
1032
  /// subscribe to collections
1034
1033
  key: "subscribeToCollections",
1035
1034
  value: function subscribeToCollections(config) {
1035
+ if (config.length === 0) {
1036
+ return function() {};
1037
+ }
1036
1038
  var s = this.getSocketInstance();
1037
1039
  var collectionsNames = config.map(function(c) {
1038
1040
  return c.collectionName;
@@ -2315,7 +2315,6 @@ var SocketService = /*#__PURE__*/ function() {
2315
2315
  var _this = this;
2316
2316
  if (!this.socket) {
2317
2317
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
2318
- console.log("socketUrl", socketUrl);
2319
2318
  this.socket = (0, import_socket.io)(socketUrl, {
2320
2319
  path: "/api/data-socket/connect",
2321
2320
  transports: [
@@ -2361,6 +2360,9 @@ var SocketService = /*#__PURE__*/ function() {
2361
2360
  /// subscribe to collections
2362
2361
  key: "subscribeToCollections",
2363
2362
  value: function subscribeToCollections(config) {
2363
+ if (config.length === 0) {
2364
+ return function() {};
2365
+ }
2364
2366
  var s = this.getSocketInstance();
2365
2367
  var collectionsNames = config.map(function(c) {
2366
2368
  return c.collectionName;
@@ -1951,7 +1951,6 @@ var SocketService = /*#__PURE__*/ function() {
1951
1951
  var _this = this;
1952
1952
  if (!this.socket) {
1953
1953
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
1954
- console.log("socketUrl", socketUrl);
1955
1954
  this.socket = io(socketUrl, {
1956
1955
  path: "/api/data-socket/connect",
1957
1956
  transports: [
@@ -1997,6 +1996,9 @@ var SocketService = /*#__PURE__*/ function() {
1997
1996
  /// subscribe to collections
1998
1997
  key: "subscribeToCollections",
1999
1998
  value: function subscribeToCollections(config) {
1999
+ if (config.length === 0) {
2000
+ return function() {};
2001
+ }
2000
2002
  var s = this.getSocketInstance();
2001
2003
  var collectionsNames = config.map(function(c) {
2002
2004
  return c.collectionName;
@@ -660,7 +660,6 @@ var SocketService = /*#__PURE__*/ function() {
660
660
  var _this = this;
661
661
  if (!this.socket) {
662
662
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
663
- console.log("socketUrl", socketUrl);
664
663
  this.socket = (0, import_socket.io)(socketUrl, {
665
664
  path: "/api/data-socket/connect",
666
665
  transports: [
@@ -706,6 +705,9 @@ var SocketService = /*#__PURE__*/ function() {
706
705
  /// subscribe to collections
707
706
  key: "subscribeToCollections",
708
707
  value: function subscribeToCollections(config) {
708
+ if (config.length === 0) {
709
+ return function() {};
710
+ }
709
711
  var s = this.getSocketInstance();
710
712
  var collectionsNames = config.map(function(c) {
711
713
  return c.collectionName;
@@ -977,9 +979,6 @@ var useSocketSubscription = function(configs, label, settings) {
977
979
  socketServiceInstance.onDisconnect(uiOnDisconnect);
978
980
  setSocketConnected(socketServiceInstance.isConnected());
979
981
  return function() {
980
- if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs) && configs.length > 0) {
981
- console.log("==> ".concat(label || "Cache snapshots", " stopped. "));
982
- }
983
982
  if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
984
983
  cleanupSubscriptions.forEach(function(cleanup) {
985
984
  return cleanup();
@@ -987,6 +986,9 @@ var useSocketSubscription = function(configs, label, settings) {
987
986
  socketServiceInstance.offConnect(uiOnConnect);
988
987
  socketServiceInstance.offDisconnect(uiOnDisconnect);
989
988
  }
989
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs) && configs.length > 0) {
990
+ console.log("==> ".concat(label || "Cache snapshots", " unsubscribed. "));
991
+ }
990
992
  };
991
993
  }, [
992
994
  socketConnected,
@@ -566,7 +566,6 @@ var SocketService = /*#__PURE__*/ function() {
566
566
  var _this = this;
567
567
  if (!this.socket) {
568
568
  var socketUrl = isLocal ? "http://localhost:9009" : mode === "qa" ? "https://nx-api.xyz" : "https://nx-api.info";
569
- console.log("socketUrl", socketUrl);
570
569
  this.socket = io(socketUrl, {
571
570
  path: "/api/data-socket/connect",
572
571
  transports: [
@@ -612,6 +611,9 @@ var SocketService = /*#__PURE__*/ function() {
612
611
  /// subscribe to collections
613
612
  key: "subscribeToCollections",
614
613
  value: function subscribeToCollections(config) {
614
+ if (config.length === 0) {
615
+ return function() {};
616
+ }
615
617
  var s = this.getSocketInstance();
616
618
  var collectionsNames = config.map(function(c) {
617
619
  return c.collectionName;
@@ -883,9 +885,6 @@ var useSocketSubscription = function(configs, label, settings) {
883
885
  socketServiceInstance.onDisconnect(uiOnDisconnect);
884
886
  setSocketConnected(socketServiceInstance.isConnected());
885
887
  return function() {
886
- if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs) && configs.length > 0) {
887
- console.log("==> ".concat(label || "Cache snapshots", " stopped. "));
888
- }
889
888
  if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
890
889
  cleanupSubscriptions.forEach(function(cleanup) {
891
890
  return cleanup();
@@ -893,6 +892,9 @@ var useSocketSubscription = function(configs, label, settings) {
893
892
  socketServiceInstance.offConnect(uiOnConnect);
894
893
  socketServiceInstance.offDisconnect(uiOnDisconnect);
895
894
  }
895
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs) && configs.length > 0) {
896
+ console.log("==> ".concat(label || "Cache snapshots", " unsubscribed. "));
897
+ }
896
898
  };
897
899
  }, [
898
900
  socketConnected,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akeyless-client-commons",
3
- "version": "1.1.17-test.1",
3
+ "version": "1.1.17-test.3",
4
4
  "scripts": {
5
5
  "build": "tsup",
6
6
  "deploy": "npm run build && npm version patch --no-git-tag-version && npm publish",