cos-wx-sdk-v5 1.0.13 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/README.md +9 -3
- package/build.js +8 -2
- package/demo/demo-sdk.js +354 -38
- package/demo/lib/cos-wx-sdk-v5.js +2888 -2778
- package/demo/lib/cos-wx-sdk-v5.min.js +1 -0
- package/demo/pages/index/index.js +15 -3
- package/demo/pages/index/index.wxml +5 -2
- package/demo/pages/index/index.wxss +18 -1
- package/demo/project.config.json +7 -3
- package/demo/test.js +99 -5
- package/demo-album/lib/cos-wx-sdk-v5.js +2888 -2778
- package/demo-album/lib/cos-wx-sdk-v5.min.js +1 -0
- package/lib/request.js +31 -5
- package/package.json +10 -6
- package/src/base.js +107 -9
- package/src/cos.js +9 -1
- package/src/util.js +58 -26
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
9
9
|
|
|
10
|
+
## [v1.1.2](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.1.1...v1.1.2) - 2021-12-01
|
|
11
|
+
|
|
12
|
+
- host参与签名
|
|
13
|
+
- getObjectUrl签名签入Query
|
|
14
|
+
- 新增参与签名的headers白名单
|
|
15
|
+
- 支持打包出.min.js
|
|
16
|
+
|
|
17
|
+
### Merged
|
|
18
|
+
|
|
19
|
+
- Feat/1.1.2 [`#57`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/57)
|
|
20
|
+
- fix:CIHost兼容处理 [`#56`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/56)
|
|
21
|
+
|
|
22
|
+
### Commits
|
|
23
|
+
|
|
24
|
+
- feat:1.1.2 [`cdd3f1b`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/cdd3f1b8f405d8d13f990b6b4c65253df5f3f725)
|
|
25
|
+
- upd:getObjectUrl的qUrlParamList encode处理 [`2deb189`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/2deb1899386c66c714e88e65291278c8261c80bb)
|
|
26
|
+
- upd [`2c1f670`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/2c1f6701e9755dbcc34ea1e875017cecf6419bdd)
|
|
27
|
+
- upd:删除重复代码 [`dbaa639`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/dbaa639a51513bb548306e88b0f1858cb530067d)
|
|
28
|
+
- Updated CHANGELOG.md [`96d4679`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/96d467902d0a447508ea7157cf93e431bf3af07b)
|
|
29
|
+
- fix:request queryString [`54e7c31`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/54e7c31f4e0a115fe268fbb911c5dea959ce2397)
|
|
30
|
+
|
|
31
|
+
## [v1.1.1](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.1.0...v1.1.1) - 2021-11-18
|
|
32
|
+
|
|
33
|
+
fix:CIHost兼容处理
|
|
34
|
+
|
|
35
|
+
## [v1.1.0](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.0.13...v1.1.0) - 2021-11-17
|
|
36
|
+
|
|
37
|
+
- 新增appendObject接口
|
|
38
|
+
- 新增媒体处理demo
|
|
39
|
+
- 修复已知d.ts错误
|
|
40
|
+
|
|
41
|
+
### Merged
|
|
42
|
+
|
|
43
|
+
- Feat/1.1.0 [`#55`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/55)
|
|
44
|
+
- feat: 改变demo 展示形式,分类别展示。demo 增加数据万象示例。 [`#45`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/45)
|
|
45
|
+
|
|
46
|
+
### Commits
|
|
47
|
+
|
|
48
|
+
- feat:增加appendObject;增加三个媒体处理接口 [`daf4387`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/daf4387e2d69ab428e2ecac465e3e657eaba34ae)
|
|
49
|
+
- upd:支持ci demo [`8f87f31`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/8f87f31b232b2f5e04c44609371c3f9a0829cf69)
|
|
50
|
+
- feat/支持appendObject;新增媒体处理三个接口; [`4cfb136`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/4cfb13695cb483d97bc6f95b754c15b09fbc1a33)
|
|
51
|
+
- upd:obj2str方法 [`52da287`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/52da2871c5abaa288fc9f00fe9d19e0c55aaaa81)
|
|
52
|
+
- feat:demo整合 [`f16699f`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/f16699f55b40ba721060cdc52de1ef0c8a71d8a8)
|
|
53
|
+
- upd [`dfe356d`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/dfe356de86c5c04abb46f6758bd90aad0bfcbc99)
|
|
54
|
+
- feat:新增test用例与测试说明 [`8d5571f`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/8d5571fe498321c18461444abe09d5164287e925)
|
|
55
|
+
- upd [`b84d3fc`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/b84d3fc0a95645486a5dc227e9c67c11de0d3a85)
|
|
56
|
+
- upd demo [`c10c7de`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/c10c7debf9146a2719fec902b9b5637df0357fcc)
|
|
57
|
+
- Updated CHANGELOG.md [`dcbe236`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/dcbe236787333e694fb84ce5d6394c28cc6c700a)
|
|
58
|
+
- upd:test.js [`f22ce39`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/f22ce39ec68ad0732b4a9b06ec86edd2efe5328e)
|
|
59
|
+
|
|
60
|
+
## [v1.0.13](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.0.12...v1.0.13) - 2021-11-11
|
|
61
|
+
|
|
62
|
+
fix:修复uploadSliceItem
|
|
63
|
+
|
|
64
|
+
### Commits
|
|
65
|
+
|
|
66
|
+
- Updated CHANGELOG.md [`6c52c38`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/6c52c382a2e5ff5edf346fb94869b67097f6f9dc)
|
|
67
|
+
- fix:修复uploadSliceItem [`6ffd3cf`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/6ffd3cf5ab21880e3db42503d2586653f0f02734)
|
|
68
|
+
|
|
10
69
|
## [v1.0.12](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.0.11...v1.0.12) - 2021-11-11
|
|
11
70
|
|
|
12
71
|
fix:修复getBucketReferer已知错误
|
package/README.md
CHANGED
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
1. 把 demo/lib/cos-wx-sdk-v5.js 复制到自己小程序项目代码里,在需要上传文件的地方贴以下代码
|
|
19
19
|
|
|
20
20
|
```javascript
|
|
21
|
+
|
|
22
|
+
// 存储桶名称,由bucketname-appid 组成,appid必须填入,可以在COS控制台查看存储桶名称。 https://console.cloud.tencent.com/cos5/bucket
|
|
21
23
|
var Bucket = 'test-1250000000';
|
|
24
|
+
// 存储桶Region可以在COS控制台指定存储桶的概览页查看 https://console.cloud.tencent.com/cos5/bucket/
|
|
25
|
+
// 关于地域的详情见 https://cloud.tencent.com/document/product/436/6224
|
|
22
26
|
var Region = 'ap-guangzhou';
|
|
23
27
|
|
|
24
28
|
// 初始化实例
|
|
@@ -68,8 +72,10 @@ wx.chooseImage({
|
|
|
68
72
|
});
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
## 说明文档
|
|
75
|
+
## 说明文档
|
|
76
|
+
|
|
77
|
+
[使用例子](demo/demo-sdk.js)
|
|
72
78
|
|
|
73
|
-
|
|
79
|
+
[快速入门](https://cloud.tencent.com/document/product/436/31953)
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
[接口文档](https://cloud.tencent.com/document/product/436/31953)
|
package/build.js
CHANGED
|
@@ -45,7 +45,10 @@ var config = {
|
|
|
45
45
|
rules: [
|
|
46
46
|
{
|
|
47
47
|
test: /\.m?js$/,
|
|
48
|
-
|
|
48
|
+
loader: 'babel-loader',
|
|
49
|
+
options: {
|
|
50
|
+
presets: ['es2015']
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
]
|
|
51
54
|
},
|
|
@@ -66,7 +69,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
66
69
|
'demo-album/project.config.json',
|
|
67
70
|
]);
|
|
68
71
|
config.watch = false;
|
|
69
|
-
config.output.filename = 'cos-wx-sdk-v5.js';
|
|
72
|
+
config.output.filename = 'cos-wx-sdk-v5.min.js';
|
|
70
73
|
config.plugins = (config.plugins || []).concat([
|
|
71
74
|
new webpack.DefinePlugin({
|
|
72
75
|
'process.env': {
|
|
@@ -92,7 +95,10 @@ webpack(config, function (err, stats) {
|
|
|
92
95
|
// 每次运行 npm run build,将 sourcePath 代码复制一份放入 targetPath
|
|
93
96
|
var sourcePath = path.resolve(__dirname, './demo/lib/cos-wx-sdk-v5.js');
|
|
94
97
|
var targetPath = path.resolve(__dirname, './demo-album/lib/cos-wx-sdk-v5.js');
|
|
98
|
+
var minSourcePath = path.resolve(__dirname, './demo/lib/cos-wx-sdk-v5.min.js');
|
|
99
|
+
var mintTargetPath = path.resolve(__dirname, './demo-album/lib/cos-wx-sdk-v5.min.js');
|
|
95
100
|
fs.createReadStream(sourcePath).pipe(fs.createWriteStream(targetPath));
|
|
101
|
+
fs.createReadStream(minSourcePath).pipe(fs.createWriteStream(mintTargetPath));
|
|
96
102
|
if (err) throw err
|
|
97
103
|
process.stdout.write(stats.toString({
|
|
98
104
|
colors: true,
|