Skip to content

Commit

Permalink
Released 1.0.0-rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyeh committed Nov 12, 2015
1 parent 3108614 commit a0909ff
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leancloud-jssdk.js",
"version": "1.0.0-rc3",
"name": "avoscloud-sdk",
"version": "1.0.0-rc4",
"homepage": "https://github.com/leancloud/javascript-sdk",
"authors": [
"killme2008 <[email protected]>"
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.0.0-rc4 日期:2015 年 11 月 12 日
* **(BREAKING)** 移除了 av-core[-mini].js,请直接使用 av[-mini].js。移除了 `Collection``Router` 等 Backbone 兼容模块,请直接使用 Backbone。
* 新增第三方平台帐号登录 API:`AV.User.signUpOrlogInWithAuthData()`。 感谢 @jacktator
* 修复海外节点文件上传方式错误的问题。

# 1.0.0-rc3 日期:2015 年 10 月 27 日
* 修复 `AV._request` 某些情况下无法正常工作的 Bug。
* 修复某些登录 API 没有更新 currentUser 的问题
Expand Down
8 changes: 4 additions & 4 deletions dist/av-mini.js

Large diffs are not rendered by default.

46 changes: 42 additions & 4 deletions dist/av.js
Original file line number Diff line number Diff line change
Expand Up @@ -7039,7 +7039,6 @@ module.exports = function(AV) {
});
})._thenRunCallbacks(options, this);
},

/**
* @see AV.Object#save
*/
Expand Down Expand Up @@ -7412,6 +7411,43 @@ module.exports = function(AV) {
return user.logIn(options);
},

/**
* Sign up or logs in a user with a third party auth data(AccessToken).
* On success, this saves the session to disk, so you can retrieve the currently
* logged in user using <code>current</code>.
*
* <p>Calls options.success or options.error on completion.</p>
*
* @param {Object} data The response json data returned from third party token.
* @param {string} platform Available platform for sign up.
* @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.
* @return {AV.Promise} A promise that is fulfilled with the user when
* the login completes.
* @example AV.User.signUpOrlogInWithAuthData(data, platform, {
* success: function(user) {
* //Access user here
* },
* error: function(error) {
* //console.log("error: ", error);
* }
* });
* @see {@link https://leancloud.cn/docs/js_guide.html#绑定第三方平台账户}
*/
signUpOrlogInWithAuthData: function (data, platform, callback) {
/**
* Construct accessToken
*/
return AV.User._logInWith(platform, {
"authData": data,
success: function (user) {
callback.success(user);
},
error: function (error) {
callback.error(error);
}
});
},

/**
* Logs out the currently logged in user session. This will remove the
* session from disk, log out of linked services, and future calls to
Expand Down Expand Up @@ -8114,6 +8150,7 @@ module.exports = function(AV) {
route !== 'search/select' &&
route !== 'subscribe/statuses/count' &&
route !== 'subscribe/statuses' &&
route !== 'installations' &&
!(/users\/[^\/]+\/updatePassword/.test(route)) &&
!(/users\/[^\/]+\/friendship\/[^\/]+/.test(route))) {
throw "Bad route: '" + route + "'.";
Expand Down Expand Up @@ -8415,7 +8452,7 @@ module.exports = function(AV) {
},{"_process":29,"underscore":31}],27:[function(require,module,exports){
'use strict';

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

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

Expand Down Expand Up @@ -8452,7 +8489,9 @@ function drainQueue() {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
currentQueue[queueIndex].run();
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
Expand Down Expand Up @@ -8504,7 +8543,6 @@ process.binding = function (name) {
throw new Error('process.binding is not supported');
};

// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
Expand Down
2 changes: 1 addition & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = "js1.0.0-rc3";
module.exports = "js1.0.0-rc4";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avoscloud-sdk",
"version": "1.0.0-rc3",
"version": "1.0.0-rc4",
"main": "./lib/av.js",
"description": "AVOSCloud JavaScript SDK.",
"repository": {
Expand Down

0 comments on commit a0909ff

Please sign in to comment.