@audius/sdk 2.0.3-beta.23 → 2.0.3-beta.25

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/web-libs.js CHANGED
@@ -29796,7 +29796,7 @@ var RendezvousHash = /*#__PURE__*/function () {
29796
29796
  */
29797
29797
 
29798
29798
  var getNStorageNodes = /*#__PURE__*/function () {
29799
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(allNodes) {
29799
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(allNodes) {
29800
29800
  var numNodes,
29801
29801
  rendezvousKey,
29802
29802
  logger,
@@ -29810,15 +29810,15 @@ var getNStorageNodes = /*#__PURE__*/function () {
29810
29810
  healthCheckPromises,
29811
29811
  healthCheckResults,
29812
29812
  j,
29813
- _args = arguments;
29814
- return regeneratorRuntime.wrap(function _callee$(_context) {
29813
+ _args2 = arguments;
29814
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
29815
29815
  while (1) {
29816
- switch (_context.prev = _context.next) {
29816
+ switch (_context2.prev = _context2.next) {
29817
29817
  case 0:
29818
- numNodes = _args.length > 1 && _args[1] !== undefined ? _args[1] : 0;
29819
- rendezvousKey = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
29820
- logger = _args.length > 3 && _args[3] !== undefined ? _args[3] : console;
29821
- _context.prev = 3;
29818
+ numNodes = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
29819
+ rendezvousKey = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : '';
29820
+ logger = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : console;
29821
+ _context2.prev = 3;
29822
29822
  if (numNodes === 0) numNodes = allNodes.length;
29823
29823
  nodeOwnerWallets = allNodes.map(function (n) {
29824
29824
  return n.delegateOwnerWallet;
@@ -29845,19 +29845,40 @@ var getNStorageNodes = /*#__PURE__*/function () {
29845
29845
 
29846
29846
  case 9:
29847
29847
  if (!(i < endpoints.length)) {
29848
- _context.next = 19;
29848
+ _context2.next = 19;
29849
29849
  break;
29850
29850
  }
29851
29851
 
29852
29852
  batch = endpoints.slice(i, i + numNodes);
29853
- healthCheckPromises = batch.map(function (endpoint) {
29854
- return isNodeHealthy(endpoint, logger);
29855
- });
29856
- _context.next = 14;
29853
+ healthCheckPromises = batch.map( /*#__PURE__*/function () {
29854
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(endpoint) {
29855
+ return regeneratorRuntime.wrap(function _callee$(_context) {
29856
+ while (1) {
29857
+ switch (_context.prev = _context.next) {
29858
+ case 0:
29859
+ _context.next = 2;
29860
+ return isNodeHealthy(endpoint, logger);
29861
+
29862
+ case 2:
29863
+ return _context.abrupt("return", _context.sent);
29864
+
29865
+ case 3:
29866
+ case "end":
29867
+ return _context.stop();
29868
+ }
29869
+ }
29870
+ }, _callee);
29871
+ }));
29872
+
29873
+ return function (_x2) {
29874
+ return _ref2.apply(this, arguments);
29875
+ };
29876
+ }());
29877
+ _context2.next = 14;
29857
29878
  return Promise.all(healthCheckPromises);
29858
29879
 
29859
29880
  case 14:
29860
- healthCheckResults = _context.sent;
29881
+ healthCheckResults = _context2.sent;
29861
29882
 
29862
29883
  for (j = 0; j < healthCheckResults.length; j++) {
29863
29884
  if (healthCheckResults[j]) {
@@ -29867,7 +29888,7 @@ var getNStorageNodes = /*#__PURE__*/function () {
29867
29888
 
29868
29889
  case 16:
29869
29890
  i += numNodes;
29870
- _context.next = 9;
29891
+ _context2.next = 9;
29871
29892
  break;
29872
29893
 
29873
29894
  case 19:
@@ -29875,20 +29896,20 @@ var getNStorageNodes = /*#__PURE__*/function () {
29875
29896
  logger.error("getNStorageNodes: Could not select ".concat(numNodes, " healthy nodes from ").concat(allNodes.length, " nodes"));
29876
29897
  }
29877
29898
 
29878
- return _context.abrupt("return", healthyEndpoints);
29899
+ return _context2.abrupt("return", healthyEndpoints);
29879
29900
 
29880
29901
  case 23:
29881
- _context.prev = 23;
29882
- _context.t0 = _context["catch"](3);
29883
- logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context.t0));
29884
- return _context.abrupt("return", []);
29902
+ _context2.prev = 23;
29903
+ _context2.t0 = _context2["catch"](3);
29904
+ logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context2.t0));
29905
+ return _context2.abrupt("return", []);
29885
29906
 
29886
29907
  case 27:
29887
29908
  case "end":
29888
- return _context.stop();
29909
+ return _context2.stop();
29889
29910
  }
29890
29911
  }
29891
- }, _callee, null, [[3, 23]]);
29912
+ }, _callee2, null, [[3, 23]]);
29892
29913
  }));
29893
29914
 
29894
29915
  return function getNStorageNodes(_x) {
@@ -29896,17 +29917,17 @@ var getNStorageNodes = /*#__PURE__*/function () {
29896
29917
  };
29897
29918
  }();
29898
29919
  var isNodeHealthy = /*#__PURE__*/function () {
29899
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(endpoint) {
29920
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(endpoint) {
29900
29921
  var logger,
29901
29922
  resp,
29902
- _args2 = arguments;
29903
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
29923
+ _args3 = arguments;
29924
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
29904
29925
  while (1) {
29905
- switch (_context2.prev = _context2.next) {
29926
+ switch (_context3.prev = _context3.next) {
29906
29927
  case 0:
29907
- logger = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : console;
29908
- _context2.prev = 1;
29909
- _context2.next = 4;
29928
+ logger = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : console;
29929
+ _context3.prev = 1;
29930
+ _context3.next = 4;
29910
29931
  return axios__default["default"]({
29911
29932
  baseURL: endpoint,
29912
29933
  url: "/status",
@@ -29915,39 +29936,39 @@ var isNodeHealthy = /*#__PURE__*/function () {
29915
29936
  });
29916
29937
 
29917
29938
  case 4:
29918
- resp = _context2.sent;
29939
+ resp = _context3.sent;
29919
29940
 
29920
29941
  if (!(resp.status === 200)) {
29921
- _context2.next = 9;
29942
+ _context3.next = 9;
29922
29943
  break;
29923
29944
  }
29924
29945
 
29925
- return _context2.abrupt("return", true);
29946
+ return _context3.abrupt("return", true);
29926
29947
 
29927
29948
  case 9:
29928
29949
  logger.warn("isNodeHealthy: ".concat(endpoint, " returned non-200 status ").concat(resp.status));
29929
- return _context2.abrupt("return", false);
29950
+ return _context3.abrupt("return", false);
29930
29951
 
29931
29952
  case 11:
29932
- _context2.next = 17;
29953
+ _context3.next = 17;
29933
29954
  break;
29934
29955
 
29935
29956
  case 13:
29936
- _context2.prev = 13;
29937
- _context2.t0 = _context2["catch"](1);
29938
- logger.error("isNodeHealthy: Error checking health: ".concat(_context2.t0));
29939
- return _context2.abrupt("return", false);
29957
+ _context3.prev = 13;
29958
+ _context3.t0 = _context3["catch"](1);
29959
+ logger.error("isNodeHealthy: Error checking health: ".concat(_context3.t0));
29960
+ return _context3.abrupt("return", false);
29940
29961
 
29941
29962
  case 17:
29942
29963
  case "end":
29943
- return _context2.stop();
29964
+ return _context3.stop();
29944
29965
  }
29945
29966
  }
29946
- }, _callee2, null, [[1, 13]]);
29967
+ }, _callee3, null, [[1, 13]]);
29947
29968
  }));
29948
29969
 
29949
- return function isNodeHealthy(_x2) {
29950
- return _ref2.apply(this, arguments);
29970
+ return function isNodeHealthy(_x3) {
29971
+ return _ref3.apply(this, arguments);
29951
29972
  };
29952
29973
  }();
29953
29974
 
@@ -30383,9 +30404,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
30383
30404
  }();
30384
30405
 
30385
30406
  var name = "@audius/sdk";
30386
- var version = "2.0.3-beta.23";
30407
+ var version = "2.0.3-beta.25";
30387
30408
  var audius = {
30388
- releaseSHA: "0098d11a05e6a85cc2081cefb8c21d3108ec5478"
30409
+ releaseSHA: "febcdf96c3c45f2efdd6a5f757dbf1792edd4bda"
30389
30410
  };
30390
30411
  var description = "Audius SDK";
30391
30412
  var main = "dist/index.cjs.js";
@@ -55095,32 +55116,28 @@ var definitions$1 = {
55095
55116
  "string",
55096
55117
  "null"
55097
55118
  ],
55098
- "default": null,
55099
- $ref: "#/definitions/CID"
55119
+ "default": null
55100
55120
  },
55101
55121
  profile_picture_sizes: {
55102
55122
  type: [
55103
55123
  "string",
55104
55124
  "null"
55105
55125
  ],
55106
- "default": null,
55107
- $ref: "#/definitions/CID"
55126
+ "default": null
55108
55127
  },
55109
55128
  cover_photo: {
55110
55129
  type: [
55111
55130
  "string",
55112
55131
  "null"
55113
55132
  ],
55114
- "default": null,
55115
- $ref: "#/definitions/CID"
55133
+ "default": null
55116
55134
  },
55117
55135
  cover_photo_sizes: {
55118
55136
  type: [
55119
55137
  "string",
55120
55138
  "null"
55121
55139
  ],
55122
- "default": null,
55123
- $ref: "#/definitions/CID"
55140
+ "default": null
55124
55141
  },
55125
55142
  bio: {
55126
55143
  type: [
@@ -55402,8 +55419,7 @@ var definitions = {
55402
55419
  "string",
55403
55420
  "null"
55404
55421
  ],
55405
- "default": null,
55406
- $ref: "#/definitions/CID"
55422
+ "default": null
55407
55423
  },
55408
55424
  description: {
55409
55425
  type: [
@@ -67052,7 +67068,8 @@ var Users = /*#__PURE__*/function (_Base) {
67052
67068
  return updateEntityManagerReplicaSet;
67053
67069
  }()
67054
67070
  /**
67055
- * Updates a creator (updates their data on the creator node)
67071
+ * Updates a creator (updates their data on the creator node).
67072
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
67056
67073
  */
67057
67074
 
67058
67075
  }, {