@ardrive/turbo-sdk 1.20.1 → 1.20.2
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/bundles/web.bundle.min.js +4 -5
- package/lib/cjs/common/http.js +1 -1
- package/lib/cjs/common/upload.js +2 -3
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/http.js +1 -1
- package/lib/esm/common/upload.js +2 -3
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
@@ -310551,7 +310551,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
310551
310551
|
init_dirname();
|
310552
310552
|
init_buffer2();
|
310553
310553
|
init_process2();
|
310554
|
-
var version16 = "1.20.
|
310554
|
+
var version16 = "1.20.2-alpha.1";
|
310555
310555
|
|
310556
310556
|
// src/common/logger.ts
|
310557
310557
|
var TurboWinstonLogger = class _TurboWinstonLogger {
|
@@ -314725,7 +314725,7 @@ var TurboHTTPService = class {
|
|
314725
314725
|
throw new FailedRequestError(
|
314726
314726
|
status,
|
314727
314727
|
// Return error message from server if available
|
314728
|
-
typeof
|
314728
|
+
typeof response === "string" ? response : statusText
|
314729
314729
|
);
|
314730
314730
|
}
|
314731
314731
|
return response;
|
@@ -349532,7 +349532,6 @@ init_dirname();
|
|
349532
349532
|
init_buffer2();
|
349533
349533
|
init_process2();
|
349534
349534
|
init_buffer();
|
349535
|
-
init_stream();
|
349536
349535
|
|
349537
349536
|
// node_modules/plimit-lit/dist/index.js
|
349538
349537
|
init_dirname();
|
@@ -349888,7 +349887,7 @@ var TurboAuthenticatedBaseUploadService = class extends TurboUnauthenticatedUplo
|
|
349888
349887
|
approvedAddress + approvedWincAmount + Date.now()
|
349889
349888
|
);
|
349890
349889
|
const { createdApproval, ...uploadResponse } = await this.uploadFile({
|
349891
|
-
fileStreamFactory: () =>
|
349890
|
+
fileStreamFactory: () => nonceData,
|
349892
349891
|
fileSizeFactory: () => nonceData.byteLength,
|
349893
349892
|
dataItemOpts
|
349894
349893
|
});
|
@@ -349912,7 +349911,7 @@ var TurboAuthenticatedBaseUploadService = class extends TurboUnauthenticatedUplo
|
|
349912
349911
|
};
|
349913
349912
|
const nonceData = Buffer.from(revokedAddress + Date.now());
|
349914
349913
|
const { revokedApprovals, ...uploadResponse } = await this.uploadFile({
|
349915
|
-
fileStreamFactory: () =>
|
349914
|
+
fileStreamFactory: () => nonceData,
|
349916
349915
|
fileSizeFactory: () => nonceData.byteLength,
|
349917
349916
|
dataItemOpts
|
349918
349917
|
});
|
package/lib/cjs/common/http.js
CHANGED
@@ -45,7 +45,7 @@ class TurboHTTPService {
|
|
45
45
|
if (!allowedStatuses.includes(status)) {
|
46
46
|
throw new errors_js_1.FailedRequestError(status,
|
47
47
|
// Return error message from server if available
|
48
|
-
typeof
|
48
|
+
typeof response === 'string' ? response : statusText);
|
49
49
|
}
|
50
50
|
return response;
|
51
51
|
}
|
package/lib/cjs/common/upload.js
CHANGED
@@ -17,7 +17,6 @@ exports.TurboAuthenticatedBaseUploadService = exports.TurboUnauthenticatedUpload
|
|
17
17
|
* limitations under the License.
|
18
18
|
*/
|
19
19
|
const node_buffer_1 = require("node:buffer");
|
20
|
-
const node_stream_1 = require("node:stream");
|
21
20
|
const plimit_lit_1 = require("plimit-lit");
|
22
21
|
const http_js_1 = require("./http.js");
|
23
22
|
const logger_js_1 = require("./logger.js");
|
@@ -218,7 +217,7 @@ class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUploadServ
|
|
218
217
|
}
|
219
218
|
const nonceData = node_buffer_1.Buffer.from(approvedAddress + approvedWincAmount + Date.now());
|
220
219
|
const { createdApproval, ...uploadResponse } = await this.uploadFile({
|
221
|
-
fileStreamFactory: () =>
|
220
|
+
fileStreamFactory: () => nonceData,
|
222
221
|
fileSizeFactory: () => nonceData.byteLength,
|
223
222
|
dataItemOpts,
|
224
223
|
});
|
@@ -239,7 +238,7 @@ class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUploadServ
|
|
239
238
|
};
|
240
239
|
const nonceData = node_buffer_1.Buffer.from(revokedAddress + Date.now());
|
241
240
|
const { revokedApprovals, ...uploadResponse } = await this.uploadFile({
|
242
|
-
fileStreamFactory: () =>
|
241
|
+
fileStreamFactory: () => nonceData,
|
243
242
|
fileSizeFactory: () => nonceData.byteLength,
|
244
243
|
dataItemOpts,
|
245
244
|
});
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/http.js
CHANGED
@@ -42,7 +42,7 @@ export class TurboHTTPService {
|
|
42
42
|
if (!allowedStatuses.includes(status)) {
|
43
43
|
throw new FailedRequestError(status,
|
44
44
|
// Return error message from server if available
|
45
|
-
typeof
|
45
|
+
typeof response === 'string' ? response : statusText);
|
46
46
|
}
|
47
47
|
return response;
|
48
48
|
}
|
package/lib/esm/common/upload.js
CHANGED
@@ -14,7 +14,6 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { Buffer } from 'node:buffer';
|
17
|
-
import { Readable } from 'node:stream';
|
18
17
|
import { pLimit } from 'plimit-lit';
|
19
18
|
import { TurboHTTPService } from './http.js';
|
20
19
|
import { TurboWinstonLogger } from './logger.js';
|
@@ -214,7 +213,7 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
214
213
|
}
|
215
214
|
const nonceData = Buffer.from(approvedAddress + approvedWincAmount + Date.now());
|
216
215
|
const { createdApproval, ...uploadResponse } = await this.uploadFile({
|
217
|
-
fileStreamFactory: () =>
|
216
|
+
fileStreamFactory: () => nonceData,
|
218
217
|
fileSizeFactory: () => nonceData.byteLength,
|
219
218
|
dataItemOpts,
|
220
219
|
});
|
@@ -235,7 +234,7 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
235
234
|
};
|
236
235
|
const nonceData = Buffer.from(revokedAddress + Date.now());
|
237
236
|
const { revokedApprovals, ...uploadResponse } = await this.uploadFile({
|
238
|
-
fileStreamFactory: () =>
|
237
|
+
fileStreamFactory: () => nonceData,
|
239
238
|
fileSizeFactory: () => nonceData.byteLength,
|
240
239
|
dataItemOpts,
|
241
240
|
});
|
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED