@eluvio/elv-client-js 4.0.55 → 4.0.57

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.55",
3
+ "version": "4.0.57",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
package/src/Utils.js CHANGED
@@ -755,7 +755,7 @@ const Utils = {
755
755
  "maxBufferLength": 5,
756
756
  "backBufferLength": 5,
757
757
  "liveSyncDuration": 5,
758
- "liveMaxLatencyDuration": !lowLatency || isSafari ? 15 : 6,
758
+ "liveMaxLatencyDuration": !lowLatency || isSafari ? 15 : 10,
759
759
  "liveDurationInfinity": false,
760
760
  "highBufferWatchdogPeriod": 1
761
761
  };
@@ -516,14 +516,35 @@ exports.UploadJobStatus = async function({libraryId, objectId, writeToken, uploa
516
516
 
517
517
  const path = UrlJoin("q", writeToken, "file_jobs", uploadId, "uploads", jobId);
518
518
 
519
- return await this.utils.ResponseToJson(
519
+ let response = await this.utils.ResponseToJson(
520
520
  this.HttpClient.Request({
521
521
  headers: await this.authClient.AuthorizationHeader({libraryId, objectId, update: true}),
522
522
  method: "GET",
523
523
  path: path,
524
- allowFailover: false
524
+ allowFailover: false,
525
+ queryParams: { start: 0, limit: 10000 }
525
526
  })
526
527
  );
528
+
529
+ while(response.next !== response.total && response.next >= 0) {
530
+ const newResponse = await this.utils.ResponseToJson(
531
+ this.HttpClient.Request({
532
+ headers: await this.authClient.AuthorizationHeader({libraryId, objectId, update: true}),
533
+ method: "GET",
534
+ path: path,
535
+ allowFailover: false,
536
+ queryParams: { start: response.next }
537
+ })
538
+ );
539
+
540
+ response.files = [
541
+ ...response.files,
542
+ ...newResponse.files
543
+ ];
544
+ response.next = newResponse.next;
545
+ }
546
+
547
+ return response;
527
548
  };
528
549
 
529
550
  exports.UploadFileData = async function({libraryId, objectId, writeToken, encryption, uploadId, jobId, filePath, fileData}) {
@@ -16,20 +16,6 @@ const Test = async () => {
16
16
  });
17
17
 
18
18
  client.SetSigner({signer});
19
-
20
- client.ToggleLogging(true);
21
- const response = await client.CallContractMethod({
22
- cacheContract: true,
23
- contractAddress: "0xc4958836b7f883a02e9fedcc11f7ebbcc8c2d5bb",
24
- formatAgruments: true,
25
- methodArgs: [1],
26
- methodName: "membersList",
27
- overrideCachedContract: false,
28
- overrides: {}
29
- });
30
- client.ToggleLogging(false);
31
-
32
- console.log("response", response)
33
19
  } catch(error) {
34
20
  console.error(error);
35
21
  console.error(JSON.stringify(error, null, 2));