Skip to content

Commit 8e724ca

Browse files
PeterRaoweiyie
andauthored
chore: bump v6.6.0 (#766)
* fix: _unSupportBrowserTip (#755) * fix: checkBucketName bug (#749) * feat: image processing (#744) close #676 * feat: putBucketWebsite support new parameter (#736) * feat: support for the latest putBucketLifecycle api features (#757) * feat: signatureUrl support trafficLimit (#756) * feat(node): bucket policy (#751) * test: getBucketTags/getObjectTagging/calculatePostSignature (#739) * test: getBucketTags/getObjectTagging/calculatePostSignature * fix: trafficLimit error * chore: browserify close debug (#759) * fix: add successStatus (#762) * fix: checkBucketName bug (#763) * fix: add CORS for server-side-encryption * chore: bump 6.6.0 Co-authored-by: 冷若霜寒 <912881342@qq.com>
1 parent ab73899 commit 8e724ca

45 files changed

Lines changed: 2627 additions & 771 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
<a name="6.6.0"></a>
6+
# [6.6.0](https://github.com/aliyun/oss-nodejs-sdk/compare/v6.5.0...v6.6.0) (2020-04-07)
7+
8+
9+
### Bug Fixes
10+
11+
* _unSupportBrowserTip ([#755](https://github.com/aliyun/oss-nodejs-sdk/issues/755)) ([8ed3228](https://github.com/aliyun/oss-nodejs-sdk/commit/8ed3228))
12+
* add successStatus ([#762](https://github.com/aliyun/oss-nodejs-sdk/issues/762)) ([0ef0fe2](https://github.com/aliyun/oss-nodejs-sdk/commit/0ef0fe2))
13+
* checkBucketName bug ([#763](https://github.com/aliyun/oss-nodejs-sdk/issues/763)) ([0a3c64c](https://github.com/aliyun/oss-nodejs-sdk/commit/0a3c64c))
14+
15+
16+
### Features
17+
18+
* add CORS for server-side-encryption ([449f908](https://github.com/aliyun/oss-nodejs-sdk/commit/449f908))
19+
* image processing ([#744](https://github.com/aliyun/oss-nodejs-sdk/issues/744)) ([02d59da](https://github.com/aliyun/oss-nodejs-sdk/commit/02d59da)), closes [#676](https://github.com/aliyun/oss-nodejs-sdk/issues/676)
20+
* putBucketWebsite support new parameter ([#736](https://github.com/aliyun/oss-nodejs-sdk/issues/736)) ([e1cb438](https://github.com/aliyun/oss-nodejs-sdk/commit/e1cb438))
21+
* signatureUrl support trafficLimit ([#756](https://github.com/aliyun/oss-nodejs-sdk/issues/756)) ([a57315f](https://github.com/aliyun/oss-nodejs-sdk/commit/a57315f))
22+
* support for the latest putBucketLifecycle api features ([#757](https://github.com/aliyun/oss-nodejs-sdk/issues/757)) ([17c2984](https://github.com/aliyun/oss-nodejs-sdk/commit/17c2984))
23+
* **node:** bucket policy ([#751](https://github.com/aliyun/oss-nodejs-sdk/issues/751)) ([2d2b33a](https://github.com/aliyun/oss-nodejs-sdk/commit/2d2b33a))
24+
25+
26+
527
<a name="6.5.0"></a>
628
# [6.5.0](https://github.com/aliyun/oss-nodejs-sdk/compare/v6.4.0...v6.5.0) (2020-01-16)
729

README.md

Lines changed: 122 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ All operation use es7 async/await to implement. All api is async function.
9999
- [.putBucketTags(name, tag[, options])](#putBucketTagsname-tag-options)
100100
- [.getBucketTags(name, [, options])](#getBucketTagsname-options)
101101
- [.deleteBucketTags(name, [, options])](#deleteBucketTagsname-options)
102+
- policy
103+
- [.putBucketPolicy(name, policy[, options])](#putBucketPolicyname-policy-options)
104+
- [.getBucketPolicy(name, [, options])](#getBucketPolicyname-options)
105+
- [.deleteBucketPolicy(name, [, options])](#deleteBucketPolicyname-options)
102106
- [Object Operations](#object-operations)
103107
- [.list(query[, options])](#listquery-options)
104108
- [.put(name, file[, options])](#putname-file-options)
@@ -638,6 +642,9 @@ parameters:
638642
- config {Object} website config, contains blow properties:
639643
- index {String} default page, e.g.: `index.html`
640644
- [error] {String} error page, e.g.: 'error.html'
645+
- [supportSubDir] {String} default vaule false
646+
- [type] {String} default value 0
647+
- [routingRules] {Array} RoutingRules
641648
- [options] {Object} optional parameters
642649
- [timeout] {Number} the operation timeout
643650

@@ -672,6 +679,9 @@ Success will return:
672679

673680
- index {String} index page
674681
- error {String} error page, maybe `null`
682+
- supportSubDir {String}
683+
- type {String}
684+
- routingRules {Array}
675685
- res {Object} response info, including
676686
- status {Number} response status
677687
- headers {Object} response headers
@@ -785,9 +795,24 @@ parameters:
785795
- [id] {String} rule id, if not set, OSS will auto create it with random string.
786796
- prefix {String} store prefix
787797
- status {String} rule status, allow values: `Enabled` or `Disabled`
788-
- [days] {Number|String} expire after the `days`
789-
- [date] {String} expire date, e.g.: `2022-10-11T00:00:00.000Z`
790-
`date` and `days` only set one.
798+
- [expiration] {Object} specifies the expiration attribute of the lifecycle rules for the object.
799+
- [days] {Number|String} expire after the `days`
800+
- [createdBeforeDate] {String} expire date, e.g.: `2022-10-11T00:00:00.000Z`
801+
`createdBeforeDate` and `days` must have one.
802+
- [abortMultipartUpload] {Object} Specifies the expiration attribute of the multipart upload tasks that are not complete.
803+
- [days] {Number|String} expire after the `days`
804+
- [createdBeforeDate] {String} expire date, e.g.: `2022-10-11T00:00:00.000Z`
805+
`createdBeforeDate` and `days` must have one.
806+
- [transition] {Object} Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle.
807+
- storageClass {String} Specifies the storage class that objects that conform to the rule are converted into. allow values: `IA` or `Archive`
808+
- [days] {Number|String} expire after the `days`
809+
- [createdBeforeDate] {String} expire date, e.g.: `2022-10-11T00:00:00.000Z`
810+
`createdBeforeDate` and `days` must have one.
811+
`expiration``abortMultipartUpload``transition` must have one.
812+
- [tag] {Object} Specifies the object tag applicable to a rule. Multiple tags are supported.
813+
- key {String} Indicates the tag key.
814+
- value {String} Indicates the tag value.
815+
`tag` cannot be used with `abortMultipartUpload`
791816
- [options] {Object} optional parameters
792817
- [timeout] {Number} the operation timeout
793818

@@ -1066,6 +1091,72 @@ Success will return:
10661091

10671092
---
10681093

1094+
### .putBucketPolicy(name, policy[, options])
1095+
1096+
Adds or modify policy for a bucket.
1097+
1098+
parameters:
1099+
1100+
- name {String} the bucket name
1101+
- policy {Object} bucket policy
1102+
- [options] {Object} optional args
1103+
1104+
Success will return:
1105+
1106+
- status {Number} response status
1107+
- res {Object} response info
1108+
1109+
example:
1110+
```js
1111+
const policy = {
1112+
Version: '1',
1113+
Statement: [
1114+
{
1115+
Action: ['oss:PutObject', 'oss:GetObject'],
1116+
Effect: 'Deny',
1117+
Principal: ['1234567890'],
1118+
Resource: ['acs:oss:*:1234567890:*/*']
1119+
}
1120+
]
1121+
};
1122+
const result = await store.putBucketPolicy(bucket, policy);
1123+
console.log(result);
1124+
```
1125+
---
1126+
1127+
### .getBucketPolicy(name[, options])
1128+
1129+
Obtains the policy for a bucket.
1130+
1131+
parameters:
1132+
1133+
- name {String} the bucket name
1134+
- [options] {Object} optional args
1135+
1136+
Success will return:
1137+
1138+
- policy {Object} the policy of bucket, if not exist, the value is null
1139+
- res {Object} response info
1140+
- status {Number} response status
1141+
1142+
---
1143+
1144+
### .deleteBucketPolicy(name[, options])
1145+
1146+
Deletes the policy added for a bucket.
1147+
1148+
parameters:
1149+
1150+
- name {String} the bucket name
1151+
- [options] {Object} optional args
1152+
1153+
Success will return:
1154+
1155+
- status {Number} response status
1156+
- res {Object} response info
1157+
1158+
---
1159+
10691160
## Object Operations
10701161

10711162
All operations function return Promise, except `signatureUrl`.
@@ -1796,6 +1887,7 @@ parameters:
17961887
- [Content-Type] {String} set the request content type
17971888
- [process] {String} image process params, will send with `x-oss-process`
17981889
e.g.: `{process: 'image/resize,w_200'}`
1890+
- [trafficLimit] {Number} traffic limit, range: `819200`~`838860800`.
17991891
- [response] {Object} set the response headers for download
18001892
- [content-type] {String} set the response content type
18011893
- [content-disposition] {String} set the response content disposition
@@ -2673,6 +2765,33 @@ object:
26732765
- status {Number} response status
26742766
- res {Object} response info
26752767
2768+
### .processObjectSave(sourceObject, targetObject, process[, targetBucket])
2769+
2770+
Persistency indicates that images are asynchronously stored in the specified Bucket
2771+
2772+
parameters:
2773+
2774+
- sourceObject {String} source object name
2775+
- targetObject {String} target object name
2776+
- process {String} process string
2777+
- [targetBucket] {String} target bucket
2778+
2779+
Success will return the channel information.
2780+
2781+
object:
2782+
2783+
- status {Number} response status
2784+
- res {Object} response info
2785+
2786+
2787+
```js
2788+
const sourceObject = 'a.png'
2789+
const targetObject = 'b.png'
2790+
const process = 'image/watermark,text_aGVsbG8g5Zu+54mH5pyN5Yqh77yB,color_ff6a00'
2791+
2792+
await this.store.processObjectSave(sourceObject, targetObject, process);
2793+
```
2794+
26762795
## RTMP Operations
26772796
26782797
All operations function is [async], except `getRtmpUrl`.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"package.json"
99
],
1010
"main": "dist/aliyun-oss-sdk.js",
11-
"version": "6.5.0"
11+
"version": "6.6.0"
1212
}

browser-build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function build(options, callback) {
2828
basedir: path.resolve(__dirname, '.'),
2929
fullPaths: false,
3030
standalone: 'OSS',
31-
debug: true
31+
debug: false
3232
};
3333
browserify(brOpts).add('./lib/browser.js')
3434
.transform(babelify, {

0 commit comments

Comments
 (0)