comprodls-sdk 2.70.1 → 2.71.0-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/comprodls.js CHANGED
@@ -83,6 +83,8 @@ function comproDLS(environment, realm, options) {
83
83
  try {
84
84
  config.DEFAULT_HOSTS = config.REALM_HOSTS[realm.toUpperCase()][environment.toUpperCase()];
85
85
  if(!config.DEFAULT_HOSTS){ throw 'Invalid Environment'; }
86
+
87
+ config.PUBNUB_ORIGINS = config.PUBNUB_ORIGINS[realm.toUpperCase()][environment.toUpperCase()];
86
88
  }
87
89
  catch (e){
88
90
  var realmObj = config.REALM_HOSTS[realm.toUpperCase()];
@@ -379,3 +379,23 @@ exports.RULES_API_URLS = {
379
379
  updateRuleDisplay: '/org/{orgId}/context/{context}/rule_type/{ruleType}/rules/{ruleId}/update-rule-display',
380
380
  getUserRule: '/org/{orgId}/context/{context}/rule_type/{ruleType}/users/{userId}/rules'
381
381
  };
382
+
383
+ exports.PUBNUB_ORIGINS = {
384
+ ASGARD: {
385
+ THOR: {
386
+ CUSTOM: 'pushdlsthor.pubnubapi.com'
387
+ }
388
+ },
389
+ GLOBAL: {
390
+ PRODUCTION: {
391
+ },
392
+ PROD1: {}
393
+ },
394
+ CUP: {
395
+ QA: {},
396
+ REL: {},
397
+ HFX: {},
398
+ ALPHA: {},
399
+ PROD1: {}
400
+ }
401
+ };
@@ -53,7 +53,7 @@ function pushX() {
53
53
  /*********************************
54
54
  * Public Function definitions
55
55
  **********************************/
56
- // This is a dummy comment to test release.
56
+
57
57
  function _connect(pubnubCW, options) {
58
58
  var bpubnubV7 = true; // If pubnub v7 or higher in package.json, set it true
59
59
  if (bpubnubV7 && !options.userid) {
@@ -70,7 +70,8 @@ function _connect(pubnubCW, options) {
70
70
  'publishKey': options.publishKey,
71
71
  'subscribeKey': options.subscribeKey,
72
72
  'authKey': options.authKey,
73
- 'ssl': true
73
+ 'ssl': true,
74
+ 'origin': this.config.PUBNUB_ORIGINS.CUSTOM
74
75
  }
75
76
  });
76
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "comprodls-sdk",
3
3
  "description": "comproDLS SDK for JavaScript",
4
- "version": "2.70.1",
4
+ "version": "2.71.0-development",
5
5
  "author": {
6
6
  "name": "Compro Technologies Private Limited",
7
7
  "url": "http://www.comprotechnologies.com/"