Skip to content

Commit 9b3668a

Browse files
author
Max Presman
committed
adjusting naming conventions
1 parent 5f7d7b0 commit 9b3668a

22 files changed

Lines changed: 147 additions & 119 deletions

File tree

core/lib/components/networking.js

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

core/lib/pubnub-common.js

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

core/src/components/networking.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ export default class {
3838
return this._providedFQDN;
3939
}
4040

41-
let newSubdomain: string;
41+
let newSubDomain: string;
4242

4343
if (failover) {
44-
newSubdomain = utils.generateUUID().split('-')[0];
44+
newSubDomain = utils.generateUUID().split('-')[0];
4545
} else {
4646
this._currentSubDomain = this._currentSubDomain + 1;
4747

4848
if (this._currentSubDomain >= this._maxSubDomain) { this._currentSubDomain = 1; }
4949

50-
newSubdomain = this._currentSubDomain.toString();
50+
newSubDomain = this._currentSubDomain.toString();
5151
}
5252

53-
return this._providedFQDN.replace('pubsub', 'ps' + newSubdomain);
53+
return this._providedFQDN.replace('pubsub', 'ps' + newSubDomain);
5454
}
5555

5656
// origin operations

core/src/pubnub-common.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @flow weak */
1+
/* @flow */
22

33
/* eslint camelcase: 0, no-use-before-define: 0, no-unused-expressions: 0 */
44
/* eslint eqeqeq: 0, one-var: 0 */
@@ -28,7 +28,7 @@ var SDK_VER = packageJSON.version;
2828
/**
2929
* UTILITIES
3030
*/
31-
function unique() {
31+
function unique(): string {
3232
return 'x' + ++NOW + '' + (+new Date);
3333
}
3434

@@ -487,7 +487,7 @@ function PN_API(setup) {
487487

488488
LEAVE_GROUP: function (channel_group, blocking, auth_key, callback, error) {
489489
var data: Object = { uuid: UUID, auth: auth_key || AUTH_KEY };
490-
var origin = networkingComponent.nextOrigin(networkingComponent.getOrigin());
490+
var origin = networkingComponent.nextOrigin(false);
491491
var url;
492492
var params;
493493
var callback = callback || function () {};
@@ -1833,8 +1833,6 @@ function PN_API(setup) {
18331833

18341834
if (USE_INSTANCEID) data['instanceid'] = INSTANCEID;
18351835

1836-
data['X-REQUEST-ID'] = utils.generateUUID();
1837-
18381836
xdr({
18391837
callback: jsonp,
18401838
data: _get_url_params(data),

modern/dist/pubnub.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 3.1X.0-MAX / modern */
1+
/*! 3.13.0 / modern */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory();
@@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
406406
module.exports = {
407407
"name": "pubnub",
408408
"preferGlobal": false,
409-
"version": "3.1X.0-MAX",
409+
"version": "3.13.0",
410410
"author": "PubNub <[email protected]>",
411411
"description": "Publish & Subscribe Real-time Messaging with PubNub",
412412
"contributors": [
@@ -509,7 +509,7 @@ return /******/ (function(modules) { // webpackBootstrap
509509

510510
'use strict';
511511

512-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /* weak */
512+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
513513

514514
/* eslint camelcase: 0, no-use-before-define: 0, no-unused-expressions: 0 */
515515
/* eslint eqeqeq: 0, one-var: 0 */
@@ -988,7 +988,7 @@ return /******/ (function(modules) { // webpackBootstrap
988988

989989
LEAVE_GROUP: function LEAVE_GROUP(channel_group, blocking, auth_key, callback, error) {
990990
var data = { uuid: UUID, auth: auth_key || AUTH_KEY };
991-
var origin = networkingComponent.nextOrigin(networkingComponent.origin);
991+
var origin = networkingComponent.nextOrigin(false);
992992
var url;
993993
var params;
994994
var callback = callback || function () {};
@@ -2276,8 +2276,6 @@ return /******/ (function(modules) { // webpackBootstrap
22762276

22772277
if (USE_INSTANCEID) data['instanceid'] = INSTANCEID;
22782278

2279-
data['X-REQUEST-ID'] = utils.generateUUID();
2280-
22812279
xdr({
22822280
callback: jsonp,
22832281
data: _get_url_params(data),
@@ -2440,21 +2438,21 @@ return /******/ (function(modules) { // webpackBootstrap
24402438
return this._providedFQDN;
24412439
}
24422440

2443-
var newSubdomain = undefined;
2441+
var newSubDomain = undefined;
24442442

24452443
if (failover) {
2446-
newSubdomain = utils.generateUUID().split('-')[0];
2444+
newSubDomain = utils.generateUUID().split('-')[0];
24472445
} else {
24482446
this._currentSubDomain = this._currentSubDomain + 1;
24492447

24502448
if (this._currentSubDomain >= this._maxSubDomain) {
24512449
this._currentSubDomain = 1;
24522450
}
24532451

2454-
newSubdomain = this._currentSubDomain.toString();
2452+
newSubDomain = this._currentSubDomain.toString();
24552453
}
24562454

2457-
return this._providedFQDN.replace('pubsub', 'ps' + newSubdomain);
2455+
return this._providedFQDN.replace('pubsub', 'ps' + newSubDomain);
24582456
}
24592457

24602458
// origin operations
@@ -2529,6 +2527,11 @@ return /******/ (function(modules) { // webpackBootstrap
25292527
value: function setPublishKey(publishKey) {
25302528
this._publishKey = publishKey;
25312529
}
2530+
}, {
2531+
key: 'getOrigin',
2532+
value: function getOrigin() {
2533+
return this._providedFQDN;
2534+
}
25322535

25332536
// getters
25342537

modern/dist/pubnub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modern/pubnub.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 3.1X.0-MAX / modern */
1+
/*! 3.13.0 / modern */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory();
@@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
406406
module.exports = {
407407
"name": "pubnub",
408408
"preferGlobal": false,
409-
"version": "3.1X.0-MAX",
409+
"version": "3.13.0",
410410
"author": "PubNub <[email protected]>",
411411
"description": "Publish & Subscribe Real-time Messaging with PubNub",
412412
"contributors": [
@@ -509,7 +509,7 @@ return /******/ (function(modules) { // webpackBootstrap
509509

510510
'use strict';
511511

512-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /* weak */
512+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
513513

514514
/* eslint camelcase: 0, no-use-before-define: 0, no-unused-expressions: 0 */
515515
/* eslint eqeqeq: 0, one-var: 0 */
@@ -988,7 +988,7 @@ return /******/ (function(modules) { // webpackBootstrap
988988

989989
LEAVE_GROUP: function LEAVE_GROUP(channel_group, blocking, auth_key, callback, error) {
990990
var data = { uuid: UUID, auth: auth_key || AUTH_KEY };
991-
var origin = networkingComponent.nextOrigin(networkingComponent.origin);
991+
var origin = networkingComponent.nextOrigin(false);
992992
var url;
993993
var params;
994994
var callback = callback || function () {};
@@ -2276,8 +2276,6 @@ return /******/ (function(modules) { // webpackBootstrap
22762276

22772277
if (USE_INSTANCEID) data['instanceid'] = INSTANCEID;
22782278

2279-
data['X-REQUEST-ID'] = utils.generateUUID();
2280-
22812279
xdr({
22822280
callback: jsonp,
22832281
data: _get_url_params(data),
@@ -2440,21 +2438,21 @@ return /******/ (function(modules) { // webpackBootstrap
24402438
return this._providedFQDN;
24412439
}
24422440

2443-
var newSubdomain = undefined;
2441+
var newSubDomain = undefined;
24442442

24452443
if (failover) {
2446-
newSubdomain = utils.generateUUID().split('-')[0];
2444+
newSubDomain = utils.generateUUID().split('-')[0];
24472445
} else {
24482446
this._currentSubDomain = this._currentSubDomain + 1;
24492447

24502448
if (this._currentSubDomain >= this._maxSubDomain) {
24512449
this._currentSubDomain = 1;
24522450
}
24532451

2454-
newSubdomain = this._currentSubDomain.toString();
2452+
newSubDomain = this._currentSubDomain.toString();
24552453
}
24562454

2457-
return this._providedFQDN.replace('pubsub', 'ps' + newSubdomain);
2455+
return this._providedFQDN.replace('pubsub', 'ps' + newSubDomain);
24582456
}
24592457

24602458
// origin operations
@@ -2529,6 +2527,11 @@ return /******/ (function(modules) { // webpackBootstrap
25292527
value: function setPublishKey(publishKey) {
25302528
this._publishKey = publishKey;
25312529
}
2530+
}, {
2531+
key: 'getOrigin',
2532+
value: function getOrigin() {
2533+
return this._providedFQDN;
2534+
}
25322535

25332536
// getters
25342537

modern/pubnub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parse/dist/pubnub.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 3.1X.0-MAX / parse */
1+
/*! 3.13.0 / parse */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory(require("crypto"), require("buffer"));
@@ -288,7 +288,7 @@ return /******/ (function(modules) { // webpackBootstrap
288288
module.exports = {
289289
"name": "pubnub",
290290
"preferGlobal": false,
291-
"version": "3.1X.0-MAX",
291+
"version": "3.13.0",
292292
"author": "PubNub <[email protected]>",
293293
"description": "Publish & Subscribe Real-time Messaging with PubNub",
294294
"contributors": [
@@ -391,7 +391,7 @@ return /******/ (function(modules) { // webpackBootstrap
391391

392392
'use strict';
393393

394-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /* weak */
394+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
395395

396396
/* eslint camelcase: 0, no-use-before-define: 0, no-unused-expressions: 0 */
397397
/* eslint eqeqeq: 0, one-var: 0 */
@@ -870,7 +870,7 @@ return /******/ (function(modules) { // webpackBootstrap
870870

871871
LEAVE_GROUP: function LEAVE_GROUP(channel_group, blocking, auth_key, callback, error) {
872872
var data = { uuid: UUID, auth: auth_key || AUTH_KEY };
873-
var origin = networkingComponent.nextOrigin(networkingComponent.origin);
873+
var origin = networkingComponent.nextOrigin(false);
874874
var url;
875875
var params;
876876
var callback = callback || function () {};
@@ -2158,8 +2158,6 @@ return /******/ (function(modules) { // webpackBootstrap
21582158

21592159
if (USE_INSTANCEID) data['instanceid'] = INSTANCEID;
21602160

2161-
data['X-REQUEST-ID'] = utils.generateUUID();
2162-
21632161
xdr({
21642162
callback: jsonp,
21652163
data: _get_url_params(data),
@@ -2322,21 +2320,21 @@ return /******/ (function(modules) { // webpackBootstrap
23222320
return this._providedFQDN;
23232321
}
23242322

2325-
var newSubdomain = undefined;
2323+
var newSubDomain = undefined;
23262324

23272325
if (failover) {
2328-
newSubdomain = utils.generateUUID().split('-')[0];
2326+
newSubDomain = utils.generateUUID().split('-')[0];
23292327
} else {
23302328
this._currentSubDomain = this._currentSubDomain + 1;
23312329

23322330
if (this._currentSubDomain >= this._maxSubDomain) {
23332331
this._currentSubDomain = 1;
23342332
}
23352333

2336-
newSubdomain = this._currentSubDomain.toString();
2334+
newSubDomain = this._currentSubDomain.toString();
23372335
}
23382336

2339-
return this._providedFQDN.replace('pubsub', 'ps' + newSubdomain);
2337+
return this._providedFQDN.replace('pubsub', 'ps' + newSubDomain);
23402338
}
23412339

23422340
// origin operations
@@ -2411,6 +2409,11 @@ return /******/ (function(modules) { // webpackBootstrap
24112409
value: function setPublishKey(publishKey) {
24122410
this._publishKey = publishKey;
24132411
}
2412+
}, {
2413+
key: 'getOrigin',
2414+
value: function getOrigin() {
2415+
return this._providedFQDN;
2416+
}
24142417

24152418
// getters
24162419

parse/dist/pubnub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)