Skip to content

Commit be21a1f

Browse files
committed
chore(release): v1.5.1
1 parent dca88fb commit be21a1f

File tree

9 files changed

+47
-20
lines changed

9 files changed

+47
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leancloud-storage",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"homepage": "https://github.com/leancloud/javascript-sdk",
55
"authors": [
66
"LeanCloud <[email protected]>"

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.5.0 (2016-9-23)
2+
* 修复了 `AV.Insight.startJob` 方法中 saveAs 参数未生效的问题
3+
14
# 1.5.0 (2016-9-23)
25
* 增加了 `AV.User#getRoles` 方法
36
* 增加了 TypeScript 定义文件

dist/av-es6.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10422,15 +10422,23 @@ const ajax = (method, resourceUrl, data, headers = {}, onprogress) => {
1042210422
return promise;
1042310423
};
1042410424

10425-
const setHeaders = (sessionToken) => {
10425+
const setHeaders = (sessionToken, signKey) => {
1042610426
const headers = {
1042710427
'X-LC-Id': AV.applicationId,
1042810428
'Content-Type': 'application/json;charset=UTF-8',
1042910429
};
1043010430
if (AV.masterKey && AV._useMasterKey) {
10431-
headers['X-LC-Sign'] = sign(AV.masterKey, true);
10431+
if (signKey) {
10432+
headers['X-LC-Sign'] = sign(AV.masterKey, true);
10433+
} else {
10434+
headers['X-LC-Key'] = `${AV.masterKey},master`;
10435+
}
1043210436
} else {
10433-
headers['X-LC-Sign'] = sign(AV.applicationKey);
10437+
if (signKey) {
10438+
headers['X-LC-Sign'] = sign(AV.applicationKey);
10439+
} else {
10440+
headers['X-LC-Key'] = AV.applicationKey;
10441+
}
1043410442
}
1043510443
if (AV._config.applicationProduction !== null) {
1043610444
headers['X-LC-Prod'] = AV._config.applicationProduction;
@@ -10625,7 +10633,7 @@ const AVRequest = (route, className, objectId, method, dataObject = {}, sessionT
1062510633
}
1062610634
return getServerURLPromise.then(() => {
1062710635
const apiURL = createApiUrl(route, className, objectId, method, dataObject);
10628-
return setHeaders(sessionToken).then(
10636+
return setHeaders(sessionToken, route !== 'bigquery').then(
1062910637
headers => ajax(method, apiURL, dataObject, headers)
1063010638
.then(
1063110639
null,
@@ -13294,7 +13302,7 @@ module.exports = {
1329413302
* Each engineer has a duty to keep the code elegant
1329513303
**/
1329613304

13297-
module.exports = 'js1.5.0';
13305+
module.exports = 'js1.5.1';
1329813306

1329913307
},{}]},{},[27])(27)
1330013308
});

dist/av-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/av.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10296,15 +10296,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1029610296
return promise;
1029710297
};
1029810298

10299-
var setHeaders = function setHeaders(sessionToken) {
10299+
var setHeaders = function setHeaders(sessionToken, signKey) {
1030010300
var headers = {
1030110301
'X-LC-Id': AV.applicationId,
1030210302
'Content-Type': 'application/json;charset=UTF-8'
1030310303
};
1030410304
if (AV.masterKey && AV._useMasterKey) {
10305-
headers['X-LC-Sign'] = sign(AV.masterKey, true);
10305+
if (signKey) {
10306+
headers['X-LC-Sign'] = sign(AV.masterKey, true);
10307+
} else {
10308+
headers['X-LC-Key'] = AV.masterKey + ",master";
10309+
}
1030610310
} else {
10307-
headers['X-LC-Sign'] = sign(AV.applicationKey);
10311+
if (signKey) {
10312+
headers['X-LC-Sign'] = sign(AV.applicationKey);
10313+
} else {
10314+
headers['X-LC-Key'] = AV.applicationKey;
10315+
}
1030810316
}
1030910317
if (AV._config.applicationProduction !== null) {
1031010318
headers['X-LC-Prod'] = AV._config.applicationProduction;
@@ -10506,7 +10514,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1050610514
}
1050710515
return getServerURLPromise.then(function () {
1050810516
var apiURL = createApiUrl(route, className, objectId, method, dataObject);
10509-
return setHeaders(sessionToken).then(function (headers) {
10517+
return setHeaders(sessionToken, route !== 'bigquery').then(function (headers) {
1051010518
return ajax(method, apiURL, dataObject, headers).then(null, function (res) {
1051110519
return handleError(res).then(function (location) {
1051210520
return ajax(method, location, dataObject, headers);
@@ -13098,6 +13106,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1309813106
* Each engineer has a duty to keep the code elegant
1309913107
**/
1310013108

13101-
module.exports = 'js1.5.0';
13109+
module.exports = 'js1.5.1';
1310213110
}, {}] }, {}, [27])(27);
1310313111
});

dist/node/request.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,23 @@ var ajax = function ajax(method, resourceUrl, data) {
7373
return promise;
7474
};
7575

76-
var setHeaders = function setHeaders(sessionToken) {
76+
var setHeaders = function setHeaders(sessionToken, signKey) {
7777
var headers = {
7878
'X-LC-Id': AV.applicationId,
7979
'Content-Type': 'application/json;charset=UTF-8'
8080
};
8181
if (AV.masterKey && AV._useMasterKey) {
82-
headers['X-LC-Sign'] = sign(AV.masterKey, true);
82+
if (signKey) {
83+
headers['X-LC-Sign'] = sign(AV.masterKey, true);
84+
} else {
85+
headers['X-LC-Key'] = AV.masterKey + ',master';
86+
}
8387
} else {
84-
headers['X-LC-Sign'] = sign(AV.applicationKey);
88+
if (signKey) {
89+
headers['X-LC-Sign'] = sign(AV.applicationKey);
90+
} else {
91+
headers['X-LC-Key'] = AV.applicationKey;
92+
}
8593
}
8694
if (AV._config.applicationProduction !== null) {
8795
headers['X-LC-Prod'] = AV._config.applicationProduction;
@@ -283,7 +291,7 @@ var AVRequest = function AVRequest(route, className, objectId, method) {
283291
}
284292
return getServerURLPromise.then(function () {
285293
var apiURL = createApiUrl(route, className, objectId, method, dataObject);
286-
return setHeaders(sessionToken).then(function (headers) {
294+
return setHeaders(sessionToken, route !== 'bigquery').then(function (headers) {
287295
return ajax(method, apiURL, dataObject, headers).then(null, function (res) {
288296
return handleError(res).then(function (location) {
289297
return ajax(method, location, dataObject, headers);

dist/node/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* Each engineer has a duty to keep the code elegant
66
**/
77

8-
module.exports = 'js1.5.0';
8+
module.exports = 'js1.5.1';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leancloud-storage",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"main": "./dist/node/index.js",
55
"description": "LeanCloud JavaScript SDK.",
66
"repository": {

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
* Each engineer has a duty to keep the code elegant
44
**/
55

6-
module.exports = 'js1.5.0';
6+
module.exports = 'js1.5.1';

0 commit comments

Comments
 (0)