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

ali-oss

Package Overview
Dependencies
Maintainers
3
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ali-oss - npm Package Compare versions

Comparing version 4.1.3 to 4.1.4

7

History.md
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 @@ ==================

46

lib/client.js

@@ -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",

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