Skip to content

Commit

Permalink
v12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jondubois committed Apr 29, 2018
1 parent f6bbfa7 commit 3856610
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "socketcluster-client",
"main": "socketcluster.js",
"version": "11.2.2",
"version": "12.0.0",
"homepage": "https://github.com/SocketCluster/socketcluster-client",
"description": "SocketCluster JavaScript client",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ module.exports.destroy = function (socket) {

module.exports.clients = SCSocketCreator.clients;

module.exports.version = '11.2.2';
module.exports.version = '12.0.0';
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "socketcluster-client",
"description": "SocketCluster JavaScript client",
"version": "11.2.2",
"version": "12.0.0",
"homepage": "http://socketcluster.io",
"contributors": [
{
Expand Down
14 changes: 5 additions & 9 deletions socketcluster.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* SocketCluster JavaScript client v11.2.2
* SocketCluster JavaScript client v12.0.0
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.socketCluster = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
var SCSocket = _dereq_('./lib/scsocket');
Expand All @@ -22,7 +22,7 @@ module.exports.destroy = function (socket) {

module.exports.clients = SCSocketCreator.clients;

module.exports.version = '11.2.2';
module.exports.version = '12.0.0';

},{"./lib/scsocket":4,"./lib/scsocketcreator":5,"component-emitter":12}],2:[function(_dereq_,module,exports){
(function (global){
Expand Down Expand Up @@ -222,7 +222,6 @@ var SCSocket = function (opts) {
'unsubscribe': 1,
'subscribeStateChange': 1,
'authStateChange': 1,
'authTokenChange': 1,
'authenticate': 1,
'deauthenticate': 1,
'removeAuthToken': 1,
Expand Down Expand Up @@ -485,6 +484,7 @@ SCSocket.prototype.destroy = function (code, data) {
SCSocket.prototype._changeToUnauthenticatedStateAndClearTokens = function () {
if (this.authState != this.UNAUTHENTICATED) {
var oldState = this.authState;
var oldSignedToken = this.signedAuthToken;
this.authState = this.UNAUTHENTICATED;
this.signedAuthToken = null;
this.authToken = null;
Expand All @@ -494,10 +494,7 @@ SCSocket.prototype._changeToUnauthenticatedStateAndClearTokens = function () {
newState: this.authState
};
Emitter.prototype.emit.call(this, 'authStateChange', stateChangeData);
if (oldState == this.AUTHENTICATED) {
Emitter.prototype.emit.call(this, 'deauthenticate');
}
Emitter.prototype.emit.call(this, 'authTokenChange', this.signedAuthToken);
Emitter.prototype.emit.call(this, 'deauthenticate', oldSignedToken);
}
};

Expand All @@ -519,9 +516,8 @@ SCSocket.prototype._changeToAuthenticatedState = function (signedAuthToken) {
}

Emitter.prototype.emit.call(this, 'authStateChange', stateChangeData);
Emitter.prototype.emit.call(this, 'authenticate', signedAuthToken);
}
Emitter.prototype.emit.call(this, 'authTokenChange', signedAuthToken);
Emitter.prototype.emit.call(this, 'authenticate', signedAuthToken);
};

SCSocket.prototype.decodeBase64 = function (encodedString) {
Expand Down
8 changes: 4 additions & 4 deletions socketcluster.min.js

Large diffs are not rendered by default.

0 comments on commit 3856610

Please sign in to comment.