Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@baiducloud/sdk

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baiducloud/sdk - npm Package Compare versions

Comparing version 1.0.0-rc.19 to 1.0.0-rc.20

2

package.json
{
"name": "@baiducloud/sdk",
"version": "1.0.0-rc.19",
"version": "1.0.0-rc.20",
"description": "Baidu Cloud Engine JavaScript SDK",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -44,2 +44,3 @@ /**

var MAX_PART_NUMBER = 10000;
var MAX_RETRY_COUNT = 3;
var COMMAND_MAP = {

@@ -442,5 +443,21 @@ scale: 's',

};
var fp = fs.createReadStream(filename, streamOptions);
var me = this;
function putObjectWithRetry(lastRetryTimes) {
return me.putObject(bucketName, key, fs.createReadStream(filename, streamOptions), options)
.catch(function (err) {
var serverTimestamp = new Date(err[H.X_BCE_DATE]).getTime();
BceBaseClient.prototype.timeOffset = serverTimestamp - Date.now();
if (err[H.X_STATUS_CODE] === 400 && err[H.X_CODE] === 'Http400' && lastRetryTimes > 0) {
return putObjectWithRetry(--lastRetryTimes);
}
return Q.reject(err);
});
}
if (!u.has(options, H.CONTENT_MD5)) {
var me = this;
var fp2 = fs.createReadStream(filename, streamOptions);

@@ -450,7 +467,7 @@ return crypto.md5stream(fp2)

options[H.CONTENT_MD5] = md5sum;
return me.putObject(bucketName, key, fp, options);
return putObjectWithRetry(options.retryCount || MAX_RETRY_COUNT);
});
}
return this.putObject(bucketName, key, fp, options);
return putObjectWithRetry(options.retryCount || MAX_RETRY_COUNT);
};

@@ -1016,3 +1033,3 @@

return doRequest.call(client).catch(function(err) {
return doRequest.call(client).catch(function (err) {
var serverTimestamp = new Date(err[H.X_BCE_DATE]).getTime();

@@ -1025,5 +1042,2 @@

}
else if (err[H.X_STATUS_CODE] === 400 && err[H.X_CODE] === 'Http400') {
return doRequest.call(client);
}

@@ -1030,0 +1044,0 @@ return Q.reject(err);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc