featureflow-node-sdk 0.6.9 → 0.6.10
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/Client.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export default class Featureflow {
|
|
1
|
+
export default class Featureflow extends EventEmitter {
|
|
2
2
|
constructor(config: any, callback?: (_err: any, self: any) => void);
|
|
3
3
|
failoverVariants: {};
|
|
4
4
|
isReady: boolean;
|
|
5
5
|
config: any;
|
|
6
6
|
eventsClient: EventsClient;
|
|
7
7
|
close: PollingClient;
|
|
8
|
-
ready(callback?: () => void):
|
|
8
|
+
ready(callback?: () => void): Featureflow | undefined;
|
|
9
9
|
evaluateAll(): any;
|
|
10
10
|
evaluate(key: any): any;
|
|
11
11
|
}
|
|
12
|
+
import EventEmitter = require("events");
|
|
12
13
|
import EventsClient from "./EventsClient";
|
|
13
14
|
import PollingClient from "./PollingClient";
|
package/dist/EventsClient.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export default class EventsClient {
|
|
|
9
9
|
eventsUrl: string;
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
sendInterval: number;
|
|
12
|
-
interval:
|
|
12
|
+
interval: NodeJS.Timer;
|
|
13
13
|
registerFeaturesEvent(features: any): void;
|
|
14
14
|
evaluateEvent(featureKey: any, evaluatedVariant: any, expectedVariant: any, user: any): void;
|
|
15
15
|
queueEvaluateEvent(event: any): void;
|
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 = 30 * 1000;
|
|
27
|
+
this.clientVersion = 'NodeJsClient/0.6.10';
|
|
28
28
|
|
|
29
29
|
this.url = url;
|
|
30
30
|
this.apiKey = config.apiKey;
|
|
@@ -35,7 +35,10 @@ var PollingClient = function () {
|
|
|
35
35
|
}
|
|
36
36
|
this.timeout = this.DEFAULT_TIMEOUT;
|
|
37
37
|
this.etag = "";
|
|
38
|
-
|
|
38
|
+
if (this.apiKey.length < 8) {
|
|
39
|
+
(0, _debug2.default)("Api Key is not valid. Please set your environment api key. Not calling featureflow");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
39
42
|
this.getFeatures(callback);
|
|
40
43
|
if (this.interval > 0) {
|
|
41
44
|
var interval = setInterval(this.getFeatures.bind(this), this.interval);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare function PollingProcessor(config: any): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "featureflow-node-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "Featureflow sdk for Node",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"big-integer": "^1.6.17",
|
|
33
33
|
"debug": "^2.6.2",
|
|
34
34
|
"request": "^2.88.0",
|
|
35
|
-
"sha1-hex": "^1.0.0"
|
|
36
|
-
"typescript": "^4.8.2"
|
|
35
|
+
"sha1-hex": "^1.0.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
38
|
+
"@jest/globals": "^29.5.0",
|
|
39
39
|
"babel-cli": "^6.26.0",
|
|
40
40
|
"babel-core": "^6.26.0",
|
|
41
41
|
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
|
@@ -43,7 +43,12 @@
|
|
|
43
43
|
"babel-preset-es2015": "^6.24.0",
|
|
44
44
|
"babel-preset-stage-2": "^6.22.0",
|
|
45
45
|
"chai": "^3.5.0",
|
|
46
|
+
"cookie-parser": "~1.4.3",
|
|
46
47
|
"cucumber": "^2.3.1",
|
|
47
|
-
"
|
|
48
|
+
"express": "~4.17.1",
|
|
49
|
+
"jest": "^27.0.4",
|
|
50
|
+
"morgan": "~1.7.0",
|
|
51
|
+
"moment": "^2.18.1",
|
|
52
|
+
"typescript": "^4.8.2"
|
|
48
53
|
}
|
|
49
54
|
}
|