kinvey-js-sdk
Advanced tools
Comparing version 3.13.0-next.18 to 3.13.0-next.19
@@ -6,5 +6,6 @@ export declare enum ConfigKey { | ||
StorageAdapter = 3, | ||
Popup = 4 | ||
Popup = 4, | ||
PubNub = 5 | ||
} | ||
export declare function getConfig<T>(key: ConfigKey): T; | ||
export declare function setConfig(key: ConfigKey, value: any): Map<any, any>; |
@@ -11,2 +11,3 @@ "use strict"; | ||
ConfigKey[ConfigKey["Popup"] = 4] = "Popup"; | ||
ConfigKey[ConfigKey["PubNub"] = 5] = "PubNub"; | ||
})(ConfigKey = exports.ConfigKey || (exports.ConfigKey = {})); | ||
@@ -13,0 +14,0 @@ function getConfig(key) { |
@@ -11,3 +11,4 @@ import { SessionStore, HttpAdapter } from './http'; | ||
storageAdapter: StorageAdapter; | ||
pubnub: any; | ||
} | ||
export declare function init(config: Config): Config; |
@@ -10,2 +10,3 @@ "use strict"; | ||
config_1.setConfig(config_1.ConfigKey.StorageAdapter, config.storageAdapter); | ||
config_1.setConfig(config_1.ConfigKey.PubNub, config.pubnub); | ||
return config; | ||
@@ -12,0 +13,0 @@ } |
@@ -6,3 +6,3 @@ "use strict"; | ||
var events_1 = require("events"); | ||
var pubnub_1 = tslib_1.__importDefault(require("pubnub")); | ||
var config_1 = require("./config"); | ||
var errors_1 = require("./errors"); | ||
@@ -65,3 +65,4 @@ var STATUS_PREFIX = 'status:'; | ||
} | ||
pubnub = new pubnub_1.default(Object.assign({}, { ssl: true, dedupeOnSubscribe: true }, config)); | ||
var PubNub = config_1.getConfig(config_1.ConfigKey.PubNub); | ||
pubnub = new PubNub(Object.assign({}, { ssl: true, dedupeOnSubscribe: true }, config)); | ||
pubnub.subscribe({ channelGroups: [config.userChannelGroup] }); | ||
@@ -68,0 +69,0 @@ pubnub.addListener(listener); |
{ | ||
"name": "kinvey-js-sdk", | ||
"description": "Kinvey JavaScript SDK for JavaScript applications.", | ||
"version": "3.13.0-next.18", | ||
"version": "3.13.0-next.19", | ||
"license": "Apache-2.0", | ||
@@ -34,3 +34,2 @@ "homepage": "https://github.com/Kinvey/js-sdk/tree/master/packages/js-sdk", | ||
"p-queue": "~4.0.0", | ||
"pubnub": "git+https://github.com/thomasconner/javascript.git#develop", | ||
"rxjs": "~6.4.0", | ||
@@ -48,3 +47,2 @@ "sift": "~7.0.1", | ||
"@types/node": "~11.11.6", | ||
"@types/pubnub": "~4.0.5", | ||
"@types/url-join": "~4.0.0", | ||
@@ -51,0 +49,0 @@ "del-cli": "~1.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
447688
11
20
6432