Comparing version 4.1.3 to 4.1.4
4.1.4 / 2016-01-28 | ||
================== | ||
* improve user-agent test | ||
* use platform to detect browser user agent | ||
* add script to publish dist/ to cdn after each release | ||
4.1.3 / 2016-01-27 | ||
@@ -3,0 +10,0 @@ ================== |
@@ -28,2 +28,3 @@ /** | ||
var is = require('is-type-of'); | ||
var platform = require('platform'); | ||
var pkg = require('../package.json'); | ||
@@ -202,21 +203,8 @@ | ||
* create request params | ||
* @param {Object} params | ||
* - {String} name | ||
* - {String} method | ||
* - {String} [resource] | ||
* - {String} [region] | ||
* - {Object} [headers] | ||
* - {Object} [query] | ||
* - {Number} [timeout] | ||
* - {Buffer} [content] | ||
* - {Stream} [writeStream] | ||
* - {String} [mime] | ||
* - {Boolean} [customResponse] | ||
* See `request` | ||
* @api private | ||
*/ | ||
proto.createRequest = function (params) { | ||
// User-Agent: aliyun-sdk-(nodejs|js)/4.1.2 node-v5.3.0/darwin | ||
var agent = (process && process.browser) ? 'js' : 'nodejs'; | ||
var userAgent = 'aliyun-sdk-' + agent + '/' + pkg.version + | ||
' node-' + process.version + '/' + process.platform; | ||
var userAgent = this._userAgent(); | ||
@@ -286,13 +274,13 @@ var headers = { | ||
* @param {Object} params | ||
* - {String} name | ||
* - {String} method | ||
* - {String} [resource] | ||
* - {String} [region] | ||
* - {String} object | ||
* - {String} bucket | ||
* - {Object} [headers] | ||
* - {Object} [query] | ||
* - {Number} [timeout] | ||
* - {Buffer} [content] | ||
* - {Stream} [stream] | ||
* - {Stream} [writeStream] | ||
* - {String} [mime] | ||
* - {Boolean} [xmlResponse] | ||
* - {Boolean} [customResponse] | ||
* - {Number} [timeout] | ||
* | ||
@@ -397,2 +385,18 @@ * @api private | ||
/* | ||
* Get User-Agent for browser & node.js | ||
* @example | ||
* aliyun-sdk-nodejs/4.1.2 Node.js 5.3.0 on Darwin 64-bit | ||
* aliyun-sdk-js/4.1.2 Safari 9.0 on Apple iPhone(iOS 9.2.1) | ||
* aliyun-sdk-js/4.1.2 Chrome 43.0.2357.134 32-bit on Windows Server 2008 R2 / 7 64-bit | ||
*/ | ||
proto._userAgent = function() { | ||
var agent = (process && process.browser) ? 'js' : 'nodejs'; | ||
var sdk = 'aliyun-sdk-' + agent + '/' + pkg.version; | ||
var plat = platform.description; | ||
return sdk + ' ' + plat; | ||
}; | ||
/** | ||
@@ -399,0 +403,0 @@ * thunkify xml.parseString |
{ | ||
"name": "ali-oss", | ||
"version": "4.1.3", | ||
"version": "4.1.4", | ||
"description": "aliyun oss(open storage service) node client", | ||
@@ -14,7 +14,8 @@ "main": "lib/client.js", | ||
"autod": "autod", | ||
"build-dist": "browserify browser.js -t babelify -s OSS > dist/aliyun-oss-sdk.js && uglifyjs dist/aliyun-oss-sdk.js -c > dist/aliyun-oss-sdk.min.js" | ||
"build-dist": "browserify browser.js -t babelify -s OSS > dist/aliyun-oss-sdk.js && uglifyjs dist/aliyun-oss-sdk.js -c > dist/aliyun-oss-sdk.min.js", | ||
"publish-to-cdn": "node publish.js" | ||
}, | ||
"git-pre-hooks": { | ||
"pre-release": "npm run build-dist", | ||
"post-release": "npm publish" | ||
"post-release": "npm publish && npm run publish-to-cdn" | ||
}, | ||
@@ -71,2 +72,3 @@ "repository": { | ||
"mime": "~1.3.4", | ||
"platform": "~1.3.1", | ||
"sdk-base": "~1.1.0", | ||
@@ -73,0 +75,0 @@ "urllib": "~2.7.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122990
1891
18
+ Addedplatform@~1.3.1
+ Addedplatform@1.3.6(transitive)