@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/index.esm.js CHANGED
@@ -29750,7 +29750,7 @@ var RendezvousHash = /*#__PURE__*/function () {
29750
29750
  */
29751
29751
 
29752
29752
  var getNStorageNodes = /*#__PURE__*/function () {
29753
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(allNodes) {
29753
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(allNodes) {
29754
29754
  var numNodes,
29755
29755
  rendezvousKey,
29756
29756
  logger,
@@ -29764,15 +29764,15 @@ var getNStorageNodes = /*#__PURE__*/function () {
29764
29764
  healthCheckPromises,
29765
29765
  healthCheckResults,
29766
29766
  j,
29767
- _args = arguments;
29768
- return regeneratorRuntime.wrap(function _callee$(_context) {
29767
+ _args2 = arguments;
29768
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
29769
29769
  while (1) {
29770
- switch (_context.prev = _context.next) {
29770
+ switch (_context2.prev = _context2.next) {
29771
29771
  case 0:
29772
- numNodes = _args.length > 1 && _args[1] !== undefined ? _args[1] : 0;
29773
- rendezvousKey = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
29774
- logger = _args.length > 3 && _args[3] !== undefined ? _args[3] : console;
29775
- _context.prev = 3;
29772
+ numNodes = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
29773
+ rendezvousKey = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : '';
29774
+ logger = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : console;
29775
+ _context2.prev = 3;
29776
29776
  if (numNodes === 0) numNodes = allNodes.length;
29777
29777
  nodeOwnerWallets = allNodes.map(function (n) {
29778
29778
  return n.delegateOwnerWallet;
@@ -29799,19 +29799,40 @@ var getNStorageNodes = /*#__PURE__*/function () {
29799
29799
 
29800
29800
  case 9:
29801
29801
  if (!(i < endpoints.length)) {
29802
- _context.next = 19;
29802
+ _context2.next = 19;
29803
29803
  break;
29804
29804
  }
29805
29805
 
29806
29806
  batch = endpoints.slice(i, i + numNodes);
29807
- healthCheckPromises = batch.map(function (endpoint) {
29808
- return isNodeHealthy(endpoint, logger);
29809
- });
29810
- _context.next = 14;
29807
+ healthCheckPromises = batch.map( /*#__PURE__*/function () {
29808
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(endpoint) {
29809
+ return regeneratorRuntime.wrap(function _callee$(_context) {
29810
+ while (1) {
29811
+ switch (_context.prev = _context.next) {
29812
+ case 0:
29813
+ _context.next = 2;
29814
+ return isNodeHealthy(endpoint, logger);
29815
+
29816
+ case 2:
29817
+ return _context.abrupt("return", _context.sent);
29818
+
29819
+ case 3:
29820
+ case "end":
29821
+ return _context.stop();
29822
+ }
29823
+ }
29824
+ }, _callee);
29825
+ }));
29826
+
29827
+ return function (_x2) {
29828
+ return _ref2.apply(this, arguments);
29829
+ };
29830
+ }());
29831
+ _context2.next = 14;
29811
29832
  return Promise.all(healthCheckPromises);
29812
29833
 
29813
29834
  case 14:
29814
- healthCheckResults = _context.sent;
29835
+ healthCheckResults = _context2.sent;
29815
29836
 
29816
29837
  for (j = 0; j < healthCheckResults.length; j++) {
29817
29838
  if (healthCheckResults[j]) {
@@ -29821,7 +29842,7 @@ var getNStorageNodes = /*#__PURE__*/function () {
29821
29842
 
29822
29843
  case 16:
29823
29844
  i += numNodes;
29824
- _context.next = 9;
29845
+ _context2.next = 9;
29825
29846
  break;
29826
29847
 
29827
29848
  case 19:
@@ -29829,20 +29850,20 @@ var getNStorageNodes = /*#__PURE__*/function () {
29829
29850
  logger.error("getNStorageNodes: Could not select ".concat(numNodes, " healthy nodes from ").concat(allNodes.length, " nodes"));
29830
29851
  }
29831
29852
 
29832
- return _context.abrupt("return", healthyEndpoints);
29853
+ return _context2.abrupt("return", healthyEndpoints);
29833
29854
 
29834
29855
  case 23:
29835
- _context.prev = 23;
29836
- _context.t0 = _context["catch"](3);
29837
- logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context.t0));
29838
- return _context.abrupt("return", []);
29856
+ _context2.prev = 23;
29857
+ _context2.t0 = _context2["catch"](3);
29858
+ logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context2.t0));
29859
+ return _context2.abrupt("return", []);
29839
29860
 
29840
29861
  case 27:
29841
29862
  case "end":
29842
- return _context.stop();
29863
+ return _context2.stop();
29843
29864
  }
29844
29865
  }
29845
- }, _callee, null, [[3, 23]]);
29866
+ }, _callee2, null, [[3, 23]]);
29846
29867
  }));
29847
29868
 
29848
29869
  return function getNStorageNodes(_x) {
@@ -29850,17 +29871,17 @@ var getNStorageNodes = /*#__PURE__*/function () {
29850
29871
  };
29851
29872
  }();
29852
29873
  var isNodeHealthy = /*#__PURE__*/function () {
29853
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(endpoint) {
29874
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(endpoint) {
29854
29875
  var logger,
29855
29876
  resp,
29856
- _args2 = arguments;
29857
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
29877
+ _args3 = arguments;
29878
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
29858
29879
  while (1) {
29859
- switch (_context2.prev = _context2.next) {
29880
+ switch (_context3.prev = _context3.next) {
29860
29881
  case 0:
29861
- logger = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : console;
29862
- _context2.prev = 1;
29863
- _context2.next = 4;
29882
+ logger = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : console;
29883
+ _context3.prev = 1;
29884
+ _context3.next = 4;
29864
29885
  return axios({
29865
29886
  baseURL: endpoint,
29866
29887
  url: "/status",
@@ -29869,39 +29890,39 @@ var isNodeHealthy = /*#__PURE__*/function () {
29869
29890
  });
29870
29891
 
29871
29892
  case 4:
29872
- resp = _context2.sent;
29893
+ resp = _context3.sent;
29873
29894
 
29874
29895
  if (!(resp.status === 200)) {
29875
- _context2.next = 9;
29896
+ _context3.next = 9;
29876
29897
  break;
29877
29898
  }
29878
29899
 
29879
- return _context2.abrupt("return", true);
29900
+ return _context3.abrupt("return", true);
29880
29901
 
29881
29902
  case 9:
29882
29903
  logger.warn("isNodeHealthy: ".concat(endpoint, " returned non-200 status ").concat(resp.status));
29883
- return _context2.abrupt("return", false);
29904
+ return _context3.abrupt("return", false);
29884
29905
 
29885
29906
  case 11:
29886
- _context2.next = 17;
29907
+ _context3.next = 17;
29887
29908
  break;
29888
29909
 
29889
29910
  case 13:
29890
- _context2.prev = 13;
29891
- _context2.t0 = _context2["catch"](1);
29892
- logger.error("isNodeHealthy: Error checking health: ".concat(_context2.t0));
29893
- return _context2.abrupt("return", false);
29911
+ _context3.prev = 13;
29912
+ _context3.t0 = _context3["catch"](1);
29913
+ logger.error("isNodeHealthy: Error checking health: ".concat(_context3.t0));
29914
+ return _context3.abrupt("return", false);
29894
29915
 
29895
29916
  case 17:
29896
29917
  case "end":
29897
- return _context2.stop();
29918
+ return _context3.stop();
29898
29919
  }
29899
29920
  }
29900
- }, _callee2, null, [[1, 13]]);
29921
+ }, _callee3, null, [[1, 13]]);
29901
29922
  }));
29902
29923
 
29903
- return function isNodeHealthy(_x2) {
29904
- return _ref2.apply(this, arguments);
29924
+ return function isNodeHealthy(_x3) {
29925
+ return _ref3.apply(this, arguments);
29905
29926
  };
29906
29927
  }();
29907
29928
 
@@ -30337,9 +30358,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
30337
30358
  }();
30338
30359
 
30339
30360
  var name = "@audius/sdk";
30340
- var version = "2.0.3-beta.23";
30361
+ var version = "2.0.3-beta.25";
30341
30362
  var audius = {
30342
- releaseSHA: "0098d11a05e6a85cc2081cefb8c21d3108ec5478"
30363
+ releaseSHA: "febcdf96c3c45f2efdd6a5f757dbf1792edd4bda"
30343
30364
  };
30344
30365
  var description = "Audius SDK";
30345
30366
  var main = "dist/index.cjs.js";
@@ -55049,32 +55070,28 @@ var definitions$1 = {
55049
55070
  "string",
55050
55071
  "null"
55051
55072
  ],
55052
- "default": null,
55053
- $ref: "#/definitions/CID"
55073
+ "default": null
55054
55074
  },
55055
55075
  profile_picture_sizes: {
55056
55076
  type: [
55057
55077
  "string",
55058
55078
  "null"
55059
55079
  ],
55060
- "default": null,
55061
- $ref: "#/definitions/CID"
55080
+ "default": null
55062
55081
  },
55063
55082
  cover_photo: {
55064
55083
  type: [
55065
55084
  "string",
55066
55085
  "null"
55067
55086
  ],
55068
- "default": null,
55069
- $ref: "#/definitions/CID"
55087
+ "default": null
55070
55088
  },
55071
55089
  cover_photo_sizes: {
55072
55090
  type: [
55073
55091
  "string",
55074
55092
  "null"
55075
55093
  ],
55076
- "default": null,
55077
- $ref: "#/definitions/CID"
55094
+ "default": null
55078
55095
  },
55079
55096
  bio: {
55080
55097
  type: [
@@ -55356,8 +55373,7 @@ var definitions = {
55356
55373
  "string",
55357
55374
  "null"
55358
55375
  ],
55359
- "default": null,
55360
- $ref: "#/definitions/CID"
55376
+ "default": null
55361
55377
  },
55362
55378
  description: {
55363
55379
  type: [
@@ -67633,7 +67649,8 @@ var Users = /*#__PURE__*/function (_Base) {
67633
67649
  return updateEntityManagerReplicaSet;
67634
67650
  }()
67635
67651
  /**
67636
- * Updates a creator (updates their data on the creator node)
67652
+ * Updates a creator (updates their data on the creator node).
67653
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
67637
67654
  */
67638
67655
 
67639
67656
  }, {