Skip to content

Commit a0909ff

Browse files
committed
Released 1.0.0-rc4
1 parent 3108614 commit a0909ff

File tree

6 files changed

+55
-12
lines changed

6 files changed

+55
-12
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "leancloud-jssdk.js",
3-
"version": "1.0.0-rc3",
2+
"name": "avoscloud-sdk",
3+
"version": "1.0.0-rc4",
44
"homepage": "https://github.com/leancloud/javascript-sdk",
55
"authors": [
66
"killme2008 <[email protected]>"

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.0.0-rc4 日期:2015 年 11 月 12 日
2+
* **(BREAKING)** 移除了 av-core[-mini].js,请直接使用 av[-mini].js。移除了 `Collection``Router` 等 Backbone 兼容模块,请直接使用 Backbone。
3+
* 新增第三方平台帐号登录 API:`AV.User.signUpOrlogInWithAuthData()`。 感谢 @jacktator
4+
* 修复海外节点文件上传方式错误的问题。
5+
16
# 1.0.0-rc3 日期:2015 年 10 月 27 日
27
* 修复 `AV._request` 某些情况下无法正常工作的 Bug。
38
* 修复某些登录 API 没有更新 currentUser 的问题

dist/av-mini.js

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

dist/av.js

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7039,7 +7039,6 @@ module.exports = function(AV) {
70397039
});
70407040
})._thenRunCallbacks(options, this);
70417041
},
7042-
70437042
/**
70447043
* @see AV.Object#save
70457044
*/
@@ -7412,6 +7411,43 @@ module.exports = function(AV) {
74127411
return user.logIn(options);
74137412
},
74147413

7414+
/**
7415+
* Sign up or logs in a user with a third party auth data(AccessToken).
7416+
* On success, this saves the session to disk, so you can retrieve the currently
7417+
* logged in user using <code>current</code>.
7418+
*
7419+
* <p>Calls options.success or options.error on completion.</p>
7420+
*
7421+
* @param {Object} data The response json data returned from third party token.
7422+
* @param {string} platform Available platform for sign up.
7423+
* @param {Object} [callback] An object that has an optional success function, that takes no arguments and will be called on a successful puSH. and an error function that takes a AV.Error and will be called if the push failed.
7424+
* @return {AV.Promise} A promise that is fulfilled with the user when
7425+
* the login completes.
7426+
* @example AV.User.signUpOrlogInWithAuthData(data, platform, {
7427+
* success: function(user) {
7428+
* //Access user here
7429+
* },
7430+
* error: function(error) {
7431+
* //console.log("error: ", error);
7432+
* }
7433+
* });
7434+
* @see {@link https://leancloud.cn/docs/js_guide.html#绑定第三方平台账户}
7435+
*/
7436+
signUpOrlogInWithAuthData: function (data, platform, callback) {
7437+
/**
7438+
* Construct accessToken
7439+
*/
7440+
return AV.User._logInWith(platform, {
7441+
"authData": data,
7442+
success: function (user) {
7443+
callback.success(user);
7444+
},
7445+
error: function (error) {
7446+
callback.error(error);
7447+
}
7448+
});
7449+
},
7450+
74157451
/**
74167452
* Logs out the currently logged in user session. This will remove the
74177453
* session from disk, log out of linked services, and future calls to
@@ -8114,6 +8150,7 @@ module.exports = function(AV) {
81148150
route !== 'search/select' &&
81158151
route !== 'subscribe/statuses/count' &&
81168152
route !== 'subscribe/statuses' &&
8153+
route !== 'installations' &&
81178154
!(/users\/[^\/]+\/updatePassword/.test(route)) &&
81188155
!(/users\/[^\/]+\/friendship\/[^\/]+/.test(route))) {
81198156
throw "Bad route: '" + route + "'.";
@@ -8415,7 +8452,7 @@ module.exports = function(AV) {
84158452
},{"_process":29,"underscore":31}],27:[function(require,module,exports){
84168453
'use strict';
84178454

8418-
module.exports = "js1.0.0-rc3";
8455+
module.exports = "js1.0.0-rc4";
84198456

84208457
},{}],28:[function(require,module,exports){
84218458

@@ -8452,7 +8489,9 @@ function drainQueue() {
84528489
currentQueue = queue;
84538490
queue = [];
84548491
while (++queueIndex < len) {
8455-
currentQueue[queueIndex].run();
8492+
if (currentQueue) {
8493+
currentQueue[queueIndex].run();
8494+
}
84568495
}
84578496
queueIndex = -1;
84588497
len = queue.length;
@@ -8504,7 +8543,6 @@ process.binding = function (name) {
85048543
throw new Error('process.binding is not supported');
85058544
};
85068545

8507-
// TODO(shtylman)
85088546
process.cwd = function () { return '/' };
85098547
process.chdir = function (dir) {
85108548
throw new Error('process.chdir is not supported');

lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict';
22

3-
module.exports = "js1.0.0-rc3";
3+
module.exports = "js1.0.0-rc4";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avoscloud-sdk",
3-
"version": "1.0.0-rc3",
3+
"version": "1.0.0-rc4",
44
"main": "./lib/av.js",
55
"description": "AVOSCloud JavaScript SDK.",
66
"repository": {

0 commit comments

Comments
 (0)