Comparing version 4.2.2 to 4.3.0
4.3.0 / 2016-04-14 | ||
================== | ||
* deps: uglify-js | ||
* Add a wrapper to return Promise (#95) | ||
4.2.2 / 2016-04-12 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -118,2 +118,7 @@ /** | ||
/** | ||
* Aysnc wrapper | ||
*/ | ||
Client.Wrapper = require('./wrapper'); | ||
/** | ||
* get OSS signature | ||
@@ -120,0 +125,0 @@ * @param {String} stringToSign |
{ | ||
"name": "ali-oss", | ||
"version": "4.2.2", | ||
"version": "4.3.0", | ||
"description": "aliyun oss(open storage service) node client", | ||
@@ -46,5 +46,5 @@ "main": "lib/client.js", | ||
"autod": "^2.4.2", | ||
"babel-runtime": "^6.6.1", | ||
"babel-plugin-transform-runtime": "^6.7.5", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-runtime": "^6.6.1", | ||
"babelify": "^7.2.0", | ||
@@ -61,3 +61,4 @@ "bluebird": "^3.1.5", | ||
"should": "^8.2.0", | ||
"thunk-mocha": "^1.0.2" | ||
"thunk-mocha": "^1.0.2", | ||
"uglify-js": "^2.6.2" | ||
}, | ||
@@ -64,0 +65,0 @@ "dependencies": { |
@@ -1908,2 +1908,40 @@ oss-nodejs-sdk | ||
## Wrapper Usage | ||
We provide an async wrapper which can be used without `co`. All the | ||
methods are preserved, just in a async way: | ||
```js | ||
var OSS = require('ali-oss').Wrapper; | ||
var STS = OSS.STS; | ||
var client = new OSS({ /* same options */}); | ||
client.put('hello', new Buffer('world')).then(function (val) { | ||
console.log('result: %j', val); | ||
}).catch (function (err) { | ||
console.log('error: %j', err); | ||
}); | ||
client.get('helloxxxx').then(function (val) { | ||
console.log('result: %j', val); | ||
}).catch (function (err) { | ||
console.log('error: %j', err); | ||
}); | ||
var url = client.signatureUrl('hello'); | ||
console.log(url); | ||
var stsClient = new STS({ /* same options */}); | ||
var role = 'role'; | ||
stsClient.assumeRole(role).then(function (val) { | ||
console.log('result: %j', val); | ||
}).catch (function (err) { | ||
console.log('error: %j', err); | ||
}); | ||
``` | ||
## Browser Usage | ||
@@ -1910,0 +1948,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
132362
12
1999
2114
18