Skip to content

Commit

Permalink
feat: bump 6.4.0 (#722)
Browse files Browse the repository at this point in the history
* docs:  put object with same name (#698)

docs: update headers link

* feat(browser): warnning when browser is not support (#703)

* refactor: use Buffer.from replace new Buffer (#701)

* feat: checkBucketName in setBucket/initOption/useBucket (#709)

* feat: checkBucketName in setBucket/initOption/useBucket (#712)

* chore(release): 6.4.0

* chore: bump 6.4.0

* chore: add detect-secrets

* fix: when value is Number,Buffer.alloc replace Buffer.from (#719)

* fix: remove completeMultipartUpload encryption header (#718)

close #715

* feat: bucket severside encryption (#707)

* feat: bucket severside encryption

* chore: ReadMe

* fix: remove test sleep

* fix: bucket encryption test (#721)

* chore: bump 6.4.0

Co-authored-by: San <1962511805@qq.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
  • Loading branch information
3 people committed Dec 27, 2019
1 parent 7f49303 commit f63e40b
Show file tree
Hide file tree
Showing 34 changed files with 759 additions and 420 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module.exports = {
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
// wait node version >= 5.10.0 will start this rule
'no-buffer-constructor': [0],
"comma-dangle": [2, "never"]
'no-buffer-constructor': [2],
"comma-dangle": [2, "never"],
}
};
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

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.

<a name="6.4.0"></a>
# [6.4.0](https://github.com/aliyun/oss-nodejs-sdk/compare/v6.3.1...v6.4.0) (2019-12-19)


### Features

* **browser:** warnning when browser is not support ([#703](https://github.com/aliyun/oss-nodejs-sdk/issues/703)) ([bd99280](https://github.com/aliyun/oss-nodejs-sdk/commit/bd99280))
* checkBucketName in setBucket/initOption/useBucket ([#709](https://github.com/aliyun/oss-nodejs-sdk/issues/709)) ([162dfb5](https://github.com/aliyun/oss-nodejs-sdk/commit/162dfb5))
* multipartupload support 'x-oss-server-side-encryption'
* add bucket severside encryption



<a name="6.3.1"></a>
## [6.3.1](https://github.com/aliyun/oss-nodejs-sdk/compare/v6.3.0...v6.3.1) (2019-12-03)
### Features
Expand Down
79 changes: 68 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ All operation use es7 async/await to implement. All api is async function.
- RequestPayment
- [.getBucketRequestPayment(bucketName[, options])](#getbucketrequestpaymentbucketname-options)
- [.putBucketRequestPayment(bucketName, payer[, options])](#putBucketRequestpaymentbucketname-payer-options)
- BucketEncryption
- [.putBucketEncryption(name[, options])](#putbucketencryptionbucketname-options)
- [.getBucketEncryption(name)](#getbucketencryptionbucketname-options)
- [.deleteBucketEncryption(name)](#deletebucketencryptionbucketname-options)
- [Object Operations](#object-operations)
- [.list(query[, options])](#listquery-options)
- [.put(name, file[, options])](#putname-file-options)
Expand All @@ -103,7 +107,7 @@ All operation use es7 async/await to implement. All api is async function.
- [.get(name[, file, options])](#getname-file-options)
- [.getStream(name[, options])](#getstreamname-options)
- [.delete(name[, options])](#deletename-options)
- [.copy(name, sourceName[, options])](#copyname-sourcename-options)
- [.copy(name, sourceName[, sourceBucket, options])](#copyname-sourcename-sourcebucket-options)
- [.putMeta(name, meta[, options])](#putmetaname-meta-options)
- [.deleteMulti(names[, options])](#deletemultinames-options)
- [.signatureUrl(name[, options])](#signatureurlname-options)
Expand Down Expand Up @@ -954,6 +958,57 @@ Success will return:

---

### .putBucketEncryption(name, rules)

put BucketEncryption value of the bucket object.

parameters:

- name {String} bucket name
- [rules] {Object} parameters
- SSEAlgorithm {String} encryption type, expect AES256 or KMS
- {KMSMasterKeyID} {String} needed when encryption type is KMS

Success will return:

- status {Number} response status
- res {Object} response info

---

### .getBucketEncryption(name)

get BucketEncryption rule value of the bucket object.

parameters:

- name {String} bucket name

Success will return:

- status {Number} response status
- res {Object} response info
- encryption {Object} rules
- SSEAlgorithm {String} encryption type, AES256 or KMS
- {KMSMasterKeyID} {String} will be return when encryption type is KMS

---

### .deleteBucketEncryption(name)

delete BucketEncryption rule value of the bucket object.

parameters:

- name {String} bucket name

Success will return:

- status {Number} response status
- res {Object} response info

---

## Object Operations

All operations function return Promise, except `signatureUrl`.
Expand Down Expand Up @@ -981,11 +1036,12 @@ parameters:
```js
var customValue = {var1: 'value1', var2: 'value2'}
```
- [headers] {Object} extra headers, detail see [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616.html)
- [headers] {Object} extra headers
- 'Cache-Control' cache control for download, e.g.: `Cache-Control: public, no-cache`
- 'Content-Disposition' object name for download, e.g.: `Content-Disposition: somename`
- 'Content-Encoding' object content encoding for download, e.g.: `Content-Encoding: gzip`
- 'Expires' expires time (milliseconds) for download, e.g.: `Expires: 3600000`
- See more: [PutObject](https://help.aliyun.com/document_detail/31978.html#title-yxe-96d-x61)

Success will return the object information.

Expand Down Expand Up @@ -1030,7 +1086,7 @@ store.put('ossdemo/demo.txt', filepath).then((result) => {
- Add an object through content buffer

```js
store.put('ossdemo/buffer', new Buffer('foo content')).then((result) => {
store.put('ossdemo/buffer', Buffer.from('foo content')).then((result) => {
console.log(result);
});
Expand Down Expand Up @@ -1184,10 +1240,10 @@ object:
example:
```js
let object = await store.append('ossdemo/buffer', new Buffer('foo'));
let object = await store.append('ossdemo/buffer', Buffer.from('foo'));
// append content to the existing object
object = await store.append('ossdemo/buffer', new Buffer('bar'), {
object = await store.append('ossdemo/buffer', Buffer.from('bar'), {
position: object.nextAppendPosition,
});
```
Expand Down Expand Up @@ -1257,7 +1313,7 @@ example:
- Head an exists object and get user meta
```js
await this.store.put('ossdemo/head-meta', new Buffer('foo'), {
await this.store.put('ossdemo/head-meta', Buffer.from('foo'), {
meta: {
uid: 1,
path: 'foo/demo.txt'
Expand Down Expand Up @@ -1304,7 +1360,7 @@ example:
- Head an exists object and get object meta info
```js
await this.store.put('ossdemo/object-meta', new Buffer('foo'));
await this.store.put('ossdemo/object-meta', Buffer.from('foo'));
const object = await this.store.getObjectMeta('ossdemo/object-meta');
console.log(object);

Expand Down Expand Up @@ -1490,6 +1546,7 @@ parameters:
otherwise throw PreconditionFailedError
- 'If-Unmodified-Since' do copy if source object modified before this time,
otherwise throw PreconditionFailedError
- See more: [CopyObject](https://help.aliyun.com/document_detail/31979.html?#title-tzy-vxc-ncx)
Success will return the copy result in `data` property.
Expand Down Expand Up @@ -1841,8 +1898,7 @@ parameters:
- [options] {Object} optional parameters
- [storageClass] {String} the storage type include (Standard,IA,Archive)
- [meta] {Object} user meta, will send with `x-oss-meta-` prefix string
Success will return
- [headers] {Object} extra headers, detail see [PutSymlink](https://help.aliyun.com/document_detail/45126.html#title-x71-l2b-7i8)
- res {Object} response info, including
- status {Number} response status
Expand Down Expand Up @@ -1901,14 +1957,15 @@ parameters:
- [timeout] {Number} the operation timeout
- [mime] Mime file type e.g.: application/octet-stream
- [meta] {Object} user meta, will send with `x-oss-meta-` prefix string
- [headers] {Object} extra headers, detail see [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616.html)
- [headers] {Object} extra headers
- 'Cache-Control' cache control for download, e.g.: `Cache-Control: public, no-cache`
- 'Content-Disposition' object name for download, e.g.: `Content-Disposition: somename`
- 'Content-Encoding' object content encoding for download, e.g.: `Content-Encoding: gzip`
- 'Expires' expires time (milliseconds) for download, e.g.: `Expires: 3600000`
- [x-oss-server-side-encryption]
Specify the server-side encryption algorithm used to upload each part of this object,Type: string, Valid value: AES256 `x-oss-server-side-encryption: AES256`<br>
if use in browser you should be set cors expose header x-oss-server-side-encryption
- See more: [InitiateMultipartUpload](https://help.aliyun.com/document_detail/31992.html?#title-wh0-a2h-rur)
Success will return:
Expand Down Expand Up @@ -2059,7 +2116,7 @@ parameters:
```js
var customValue = {var1: 'value1', var2: 'value2'}
```
- [headers] {Object} extra headers, detail see [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616.html)
- [headers] {Object} extra headers, detail see [CompleteMultipartUpload](https://help.aliyun.com/document_detail/31995.html?#title-nan-5y3-rjd)
Success will return:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"package.json"
],
"main": "dist/aliyun-oss-sdk.js",
"version": "6.3.1"
"version": "6.4.0"
}
Loading

0 comments on commit f63e40b

Please sign in to comment.