Skip to content

Commit

Permalink
feat: expose sdk version with OSS (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
binghaiwang authored and popomore committed Apr 3, 2018
1 parent 02fef3f commit b796854
Show file tree
Hide file tree
Showing 69 changed files with 6,779 additions and 56,652 deletions.
15 changes: 15 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules/
coverage/
.tmp/
.git/
lib/browser/version.js
shims/
example/node_modules/
example/public/
example/public/index.js
test/.tmp/
test/browser/.tmp
test/browser/build
test/benchmark/
test/fixtures/
task/
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint max-len: [0] */
module.exports = {
extends: 'airbnb',
env: {
browser: true,
node: true,
es6: true,
mocha: true,
jasmine: true,
jest: true,
},
rules: {
indent: ['error', 2],
// override default options
'no-underscore-dangle': [0],
'no-plusplus': [0],
'no-param-reassign': [0],
'max-len': ['warn', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
// wait node version >= 5.10.0 will start this rule
'no-buffer-constructor': [0],
}
};
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Thank you for reporting an issue.
1. It's RECOMMENDED to submit PR for typo or tiny bug fix.
3. If this's a BUG, please provide: course repetition, network error log and configuration. Fill in as much of the template below as you're able.
4. It will be nice to use example project to provide a mini GitHub repository which can reproduce the issue.
感谢您向我们反馈问题。
1. 我们推荐如果是小问题(错别字修改,小的 bug fix)直接提交 PR。
2. 如果是一个 BUG,请提供:复现步骤,错误请求和响应日志以及相关配置,并尽量填写下面的模板中的条目(请网络响应中x-oss-request-id字段值)。
5. 如果可以,请使用项目中 example工程提供一个最小可复现的代码仓库,方便我们排查问题。
6. 扩展阅读:[如何向开源项目提交无法解答的问题](https://zhuanlan.zhihu.com/p/25795393)
-->

* **Browser Version or Node Version**:
* **ali-oss Version**:
* **Mini Showcase Repository**:
* **Network Resoponse Header x-oss-request-id**:

<!-- Enter your issue details below this comment. -->
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ build/Release
node_modules

build
test/.tmp
test/node/.tmp
test/browser/.tmp
test/demo.js
yarn.lock

Expand Down
4 changes: 0 additions & 4 deletions .jshintignore

This file was deleted.

95 changes: 0 additions & 95 deletions .jshintrc

This file was deleted.

32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@

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="4.14.1"></a>
## [4.14.1](https://github.com/aliyun/oss-nodejs-sdk/compare/v4.14.0...v4.14.1) (2018-04-03)


### Bug Fixes

* signUtils header sort err fix ([#418](https://github.com/aliyun/oss-nodejs-sdk/issues/418)) ([60383ee](https://github.com/aliyun/oss-nodejs-sdk/commit/60383ee))



<a name="4.14.0"></a>
# [4.14.0](https://github.com/aliyun/oss-nodejs-sdk/compare/v4.13.2...v4.14.0) (2018-03-30)


### Bug Fixes

* **Browser:** multipartUpload InvalidPartOrderError by doneParts repeat ([#414](https://github.com/aliyun/oss-nodejs-sdk/issues/414)) ([2b0967f](https://github.com/aliyun/oss-nodejs-sdk/commit/2b0967f))
* _resumeMultipart not use yield ([ba2382b](https://github.com/aliyun/oss-nodejs-sdk/commit/ba2382b))
* issues https://github.com/ali-sdk/ali-oss/issues/386 ([#390](https://github.com/aliyun/oss-nodejs-sdk/issues/390)) ([5b5ae3e](https://github.com/aliyun/oss-nodejs-sdk/commit/5b5ae3e))


### Features

* add ignore ([#397](https://github.com/aliyun/oss-nodejs-sdk/issues/397)) ([0f003aa](https://github.com/aliyun/oss-nodejs-sdk/commit/0f003aa))
* **browser:** multipartUpload err will cancel this task ([#399](https://github.com/aliyun/oss-nodejs-sdk/issues/399)) ([64f8d68](https://github.com/aliyun/oss-nodejs-sdk/commit/64f8d68))
* browser support blob ([#409](https://github.com/aliyun/oss-nodejs-sdk/issues/409)) ([e8a78b5](https://github.com/aliyun/oss-nodejs-sdk/commit/e8a78b5)), closes [#401](https://github.com/aliyun/oss-nodejs-sdk/issues/401)
* expose sdk version with OSS ([#389](https://github.com/aliyun/oss-nodejs-sdk/issues/389)) ([0bdc876](https://github.com/aliyun/oss-nodejs-sdk/commit/0bdc876))
* rm unused test data ([#401](https://github.com/aliyun/oss-nodejs-sdk/issues/401)) ([3d2ce4e](https://github.com/aliyun/oss-nodejs-sdk/commit/3d2ce4e))
* signatureUrl refactor and support callback ([#408](https://github.com/aliyun/oss-nodejs-sdk/issues/408)) ([343938f](https://github.com/aliyun/oss-nodejs-sdk/commit/343938f))



<a name="4.13.2"></a>
## [4.13.2](https://github.com/aliyun/oss-nodejs-sdk/compare/v4.13.1...v4.13.2) (2018-03-13)

Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,12 @@ parameters:
- [content-disposition] {String} set the response content disposition
- [cache-control] {String} set the response cache control
- See more: https://help.aliyun.com/document_detail/oss/api-reference/object/GetObject.html
- [callback] {Object} set the callback for the operation
- url {String} set the url for callback
- [host] {String} set the host for callback
- body {String} set the body for callback
- [contentType] {String} set the type for body
- [customValue] {Object} set the custom value for callback,eg. {var1: value1,var2:value2}
Success will return signature url.
Expand Down Expand Up @@ -1771,7 +1777,7 @@ example:
### .multipartUpload*(name, file[, options])
Upload file with [OSS multipart][oss-multipart].<br>
this function contains initMultipartUpload, uploadPartCopy, completeMultipartUpload.
this function contains initMultipartUpload, uploadPart, completeMultipartUpload.
parameters:
Expand All @@ -1786,6 +1792,14 @@ parameters:
- [checkpoint] {Object} the checkpoint to resume upload, if this is
provided, it will continue the upload from where interrupted,
otherwise a new multipart upload will be created.
- file {File} The file object selected by the user, if the browser is restarted, it needs the user to manually trigger the settings
- name {String} object key
- fileSize {Number} file size
- partSize {Number} part size
- uploadId {String} upload id
- doneParts {Array} An array of pieces that have been completed, including the object structure as follows
- number {Number} part number
- etag {String} part etag
- [meta] {Object} user meta, will send with `x-oss-meta-` prefix string
- [mime] {String} custom mime , will send with `Content-Type` entity header
- [callback] {Object} The callback parameter is composed of a JSON string encoded in Base64,detail [see](https://www.alibabacloud.com/help/doc-detail/31989.htm)<br>
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": "4.13.2"
"version": "4.14.1"
}
4 changes: 2 additions & 2 deletions browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ function build(options, callback) {
"global": true,
"presets": ["es2015"],
"plugins": ["transform-runtime"],
"only": ['lib/*', 'node_modules/co-gather/*', 'shims/*'],
"only": ['lib/*', 'node_modules/co-gather/*', 'shims/*', 'shims/crypto/*'],
}).transform(aliasify, {
global: true,
aliases: {
'zlib': false,
'iconv-lite': false,
'crypto': './shims/crypto.js',
'crypto': './shims/crypto/crypto.js',
},
verbose: false
}).bundle(function(err, data) {
Expand Down
Loading

0 comments on commit b796854

Please sign in to comment.