@super-protocol/sdk-js 0.13.5 → 0.13.6-beta.0

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.
@@ -11,7 +11,8 @@ export default class StorJStorageProvider implements IStorageProvider {
11
11
  private _access?;
12
12
  private _project?;
13
13
  private _storj?;
14
- constructor(credentials: any);
14
+ private maximumConcurrent?;
15
+ constructor(credentials: any, maximumConcurrent?: number);
15
16
  uploadFile(inputStream: stream.Readable, remotePath: string, contentLength: number, progressListener?: (total: number, current: number) => void): Promise<void>;
16
17
  downloadFile(remotePath: string, config: DownloadConfig, progressListener?: (total: number, current: number) => void): Promise<stream.Readable>;
17
18
  deleteObject(remotePath: string): Promise<void>;
@@ -63,7 +63,7 @@ var utils_1 = require("../../utils");
63
63
  var stream_1 = __importDefault(require("stream"));
64
64
  var logger_1 = __importDefault(require("../../logger"));
65
65
  var StorJStorageProvider = /** @class */ (function () {
66
- function StorJStorageProvider(credentials) {
66
+ function StorJStorageProvider(credentials, maximumConcurrent) {
67
67
  this.logger = logger_1.default.child({ className: "StorJStorageProvider" });
68
68
  if (!(0, utils_1.isNodeJS)()) {
69
69
  throw Error("StorageProvider: StorJ is supported only in the node.js execution environment");
@@ -79,6 +79,7 @@ var StorJStorageProvider = /** @class */ (function () {
79
79
  this.bucket = credentials.storageId;
80
80
  }
81
81
  this.accessToken = credentials.token;
82
+ this.maximumConcurrent = maximumConcurrent;
82
83
  }
83
84
  StorJStorageProvider.prototype.uploadFile = function (inputStream, remotePath, contentLength, progressListener) {
84
85
  var _a, inputStream_1, inputStream_1_1;
@@ -367,7 +368,7 @@ var StorJStorageProvider = /** @class */ (function () {
367
368
  case 1:
368
369
  access = _b.sent();
369
370
  _a = this;
370
- return [4 /*yield*/, access.openProject()];
371
+ return [4 /*yield*/, access.openProject(this.maximumConcurrent)];
371
372
  case 2:
372
373
  _a._project = _b.sent();
373
374
  _b.label = 3;
@@ -9,7 +9,7 @@ exports.default = (function (storageAccess) {
9
9
  var key = storageAccess.storageType;
10
10
  switch (key) {
11
11
  case dto_js_1.StorageType.StorJ:
12
- return new StorjStorageProvider_1.default(storageAccess.credentials);
12
+ return new StorjStorageProvider_1.default(storageAccess.credentials, storageAccess.maximumConcurrent);
13
13
  default:
14
14
  throw Error("Unsupported storageType ".concat(key));
15
15
  }
@@ -2,5 +2,6 @@ import { StorageType } from "@super-protocol/dto-js";
2
2
  type StorageAccess = {
3
3
  storageType: StorageType;
4
4
  credentials: any;
5
+ maximumConcurrent?: number;
5
6
  };
6
7
  export default StorageAccess;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-protocol/sdk-js",
3
- "version": "0.13.5",
3
+ "version": "0.13.6-beta.0",
4
4
  "main": "build/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "@super-protocol/dto-js": "0.0.24",
56
56
  "@super-protocol/tee-lib": "^0.1.2",
57
- "@super-protocol/uplink-nodejs": "1.2.12",
57
+ "@super-protocol/uplink-nodejs": "1.2.16",
58
58
  "ethers": "^5.5.3",
59
59
  "hybrid-crypto-js": "^0.2.4",
60
60
  "lodash": "^4.17.21",
@@ -64,5 +64,8 @@
64
64
  "web3": "^1.7.1",
65
65
  "web3-parse-receipt-events": "^1.0.2"
66
66
  },
67
- "repository": "git://github.com/Super-Protocol/sdk-js.git"
67
+ "repository": "git://github.com/Super-Protocol/sdk-js.git",
68
+ "resolutions": {
69
+ "wrap-ansi": "7.0.0"
70
+ }
68
71
  }