featureflow-node-sdk 0.6.12 → 0.6.14
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/dist/PollingClient.js +10 -7
- package/dist/User.d.ts +1 -0
- package/dist/User.js +5 -0
- package/package.json +1 -1
package/dist/PollingClient.js
CHANGED
|
@@ -23,8 +23,8 @@ var PollingClient = function () {
|
|
|
23
23
|
_classCallCheck(this, PollingClient);
|
|
24
24
|
|
|
25
25
|
this.DEFAULT_TIMEOUT = 5 * 1000;
|
|
26
|
-
this.DEFAULT_INTERVAL =
|
|
27
|
-
this.clientVersion = 'NodeJsClient/0.6.
|
|
26
|
+
this.DEFAULT_INTERVAL = 20 * 1000;
|
|
27
|
+
this.clientVersion = 'NodeJsClient/0.6.12';
|
|
28
28
|
|
|
29
29
|
this.url = url;
|
|
30
30
|
this.apiKey = config.apiKey;
|
|
@@ -35,12 +35,15 @@ var PollingClient = function () {
|
|
|
35
35
|
}
|
|
36
36
|
this.timeout = this.DEFAULT_TIMEOUT;
|
|
37
37
|
this.etag = "";
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
if (this.apiKey && this.apiKey.length > 10) {
|
|
39
|
+
this.getFeatures(callback);
|
|
40
|
+
if (this.pollingInterval > 0) {
|
|
41
|
+
this.interval = setInterval(this.getFeatures.bind(this), this.pollingInterval);
|
|
42
|
+
} else {
|
|
43
|
+
(0, _debug2.default)("Polling interval set to 0. Featureflow will NOT poll for feature changes.");
|
|
44
|
+
}
|
|
42
45
|
} else {
|
|
43
|
-
(0, _debug2.default)("
|
|
46
|
+
(0, _debug2.default)("API key is missing or too short. Features will not be fetched.");
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
|
package/dist/User.d.ts
CHANGED
package/dist/User.js
CHANGED