@launchdarkly/js-sdk-common 2.0.0-alpha.1 → 2.0.0
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/CHANGELOG.md +11 -0
- package/dist/api/platform/Encoding.d.ts +4 -0
- package/dist/api/platform/Encoding.d.ts.map +1 -0
- package/dist/api/platform/Encoding.js +3 -0
- package/dist/api/platform/Encoding.js.map +1 -0
- package/dist/api/platform/Platform.d.ts +5 -0
- package/dist/api/platform/Platform.d.ts.map +1 -1
- package/dist/api/platform/index.d.ts +1 -0
- package/dist/api/platform/index.d.ts.map +1 -1
- package/dist/api/platform/index.js +1 -0
- package/dist/api/platform/index.js.map +1 -1
- package/dist/internal/evaluation/ErrorKinds.d.ts +12 -0
- package/dist/internal/evaluation/ErrorKinds.d.ts.map +1 -0
- package/dist/internal/evaluation/ErrorKinds.js +15 -0
- package/dist/internal/evaluation/ErrorKinds.js.map +1 -0
- package/dist/internal/evaluation/EventFactoryBase.d.ts +27 -0
- package/dist/internal/evaluation/EventFactoryBase.d.ts.map +1 -0
- package/dist/internal/evaluation/EventFactoryBase.js +38 -0
- package/dist/internal/evaluation/EventFactoryBase.js.map +1 -0
- package/dist/internal/evaluation/evaluationDetail.d.ts +16 -0
- package/dist/internal/evaluation/evaluationDetail.d.ts.map +1 -0
- package/dist/internal/evaluation/evaluationDetail.js +16 -0
- package/dist/internal/evaluation/evaluationDetail.js.map +1 -0
- package/dist/internal/evaluation/index.d.ts +5 -0
- package/dist/internal/evaluation/index.d.ts.map +1 -0
- package/dist/internal/evaluation/index.js +11 -0
- package/dist/internal/evaluation/index.js.map +1 -0
- package/dist/internal/events/ClientMessages.d.ts +7 -0
- package/dist/internal/events/ClientMessages.d.ts.map +1 -0
- package/dist/internal/events/ClientMessages.js +10 -0
- package/dist/internal/events/ClientMessages.js.map +1 -0
- package/dist/internal/events/InputEvalEvent.d.ts +3 -3
- package/dist/internal/events/InputEvalEvent.d.ts.map +1 -1
- package/dist/internal/events/InputEvalEvent.js +3 -5
- package/dist/internal/events/InputEvalEvent.js.map +1 -1
- package/dist/internal/events/index.d.ts +2 -1
- package/dist/internal/events/index.d.ts.map +1 -1
- package/dist/internal/events/index.js +3 -1
- package/dist/internal/events/index.js.map +1 -1
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/stream/StreamingProcessor.d.ts +1 -1
- package/dist/internal/stream/StreamingProcessor.d.ts.map +1 -1
- package/dist/internal/stream/StreamingProcessor.js +2 -2
- package/dist/internal/stream/StreamingProcessor.js.map +1 -1
- package/dist/utils/clone.d.ts +2 -0
- package/dist/utils/clone.d.ts.map +1 -0
- package/dist/utils/clone.js +7 -0
- package/dist/utils/clone.js.map +1 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@launchdarkly/js-sdk-common` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
|
|
4
4
|
|
|
5
|
+
## [2.0.0](https://github.com/launchdarkly/js-core/compare/js-sdk-common-v1.1.0...js-sdk-common-v2.0.0) (2023-10-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* Implement Migrations. Refactor for client SDKs. ([#293](https://github.com/launchdarkly/js-core/issues/293))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* Implement Migrations. Refactor for client SDKs. ([#293](https://github.com/launchdarkly/js-core/issues/293)) ([c66aa6e](https://github.com/launchdarkly/js-core/commit/c66aa6ea0d12e1e4e565cb8378d367c31fab9c1b))
|
|
15
|
+
|
|
5
16
|
## [1.1.0](https://github.com/launchdarkly/js-core/compare/js-sdk-common-v1.0.3...js-sdk-common-v1.1.0) (2023-08-14)
|
|
6
17
|
|
|
7
18
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encoding.d.ts","sourceRoot":"","sources":["../../../src/api/platform/Encoding.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encoding.js","sourceRoot":"","sources":["../../../src/api/platform/Encoding.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Crypto } from './Crypto';
|
|
2
|
+
import { Encoding } from './Encoding';
|
|
2
3
|
import { Filesystem } from './Filesystem';
|
|
3
4
|
import { Info } from './Info';
|
|
4
5
|
import { Requests } from './Requests';
|
|
5
6
|
export interface Platform {
|
|
7
|
+
/**
|
|
8
|
+
* The interface for performing encoding operations.
|
|
9
|
+
*/
|
|
10
|
+
encoding?: Encoding;
|
|
6
11
|
/**
|
|
7
12
|
* The interface for getting information about the platform and the execution
|
|
8
13
|
* environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Platform.d.ts","sourceRoot":"","sources":["../../../src/api/platform/Platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"Platform.d.ts","sourceRoot":"","sources":["../../../src/api/platform/Platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Encoding"), exports);
|
|
17
18
|
__exportStar(require("./Crypto"), exports);
|
|
18
19
|
__exportStar(require("./Filesystem"), exports);
|
|
19
20
|
__exportStar(require("./Info"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Different kinds of error which may be encountered during evaluation.
|
|
3
|
+
*/
|
|
4
|
+
declare enum ErrorKinds {
|
|
5
|
+
MalformedFlag = "MALFORMED_FLAG",
|
|
6
|
+
UserNotSpecified = "USER_NOT_SPECIFIED",
|
|
7
|
+
FlagNotFound = "FLAG_NOT_FOUND",
|
|
8
|
+
ClientNotReady = "CLIENT_NOT_READY",
|
|
9
|
+
WrongType = "WRONG_TYPE"
|
|
10
|
+
}
|
|
11
|
+
export default ErrorKinds;
|
|
12
|
+
//# sourceMappingURL=ErrorKinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorKinds.d.ts","sourceRoot":"","sources":["../../../src/internal/evaluation/ErrorKinds.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,aAAK,UAAU;IACb,aAAa,mBAAmB;IAChC,gBAAgB,uBAAuB;IACvC,YAAY,mBAAmB;IAC/B,cAAc,qBAAqB;IACnC,SAAS,eAAe;CACzB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Different kinds of error which may be encountered during evaluation.
|
|
5
|
+
*/
|
|
6
|
+
var ErrorKinds;
|
|
7
|
+
(function (ErrorKinds) {
|
|
8
|
+
ErrorKinds["MalformedFlag"] = "MALFORMED_FLAG";
|
|
9
|
+
ErrorKinds["UserNotSpecified"] = "USER_NOT_SPECIFIED";
|
|
10
|
+
ErrorKinds["FlagNotFound"] = "FLAG_NOT_FOUND";
|
|
11
|
+
ErrorKinds["ClientNotReady"] = "CLIENT_NOT_READY";
|
|
12
|
+
ErrorKinds["WrongType"] = "WRONG_TYPE";
|
|
13
|
+
})(ErrorKinds || (ErrorKinds = {}));
|
|
14
|
+
exports.default = ErrorKinds;
|
|
15
|
+
//# sourceMappingURL=ErrorKinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorKinds.js","sourceRoot":"","sources":["../../../src/internal/evaluation/ErrorKinds.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,IAAK,UAMJ;AAND,WAAK,UAAU;IACb,8CAAgC,CAAA;IAChC,qDAAuC,CAAA;IACvC,6CAA+B,CAAA;IAC/B,iDAAmC,CAAA;IACnC,sCAAwB,CAAA;AAC1B,CAAC,EANI,UAAU,KAAV,UAAU,QAMd;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LDEvaluationReason, LDFlagValue } from '../../api';
|
|
2
|
+
import Context from '../../Context';
|
|
3
|
+
import { InputCustomEvent, InputEvalEvent, InputIdentifyEvent } from '../events';
|
|
4
|
+
export type EvalEventArgs = {
|
|
5
|
+
addExperimentData?: boolean;
|
|
6
|
+
context: Context;
|
|
7
|
+
debugEventsUntilDate?: number;
|
|
8
|
+
defaultVal: any;
|
|
9
|
+
excludeFromSummaries?: boolean;
|
|
10
|
+
flagKey: string;
|
|
11
|
+
prereqOfFlagKey?: string;
|
|
12
|
+
reason?: LDEvaluationReason;
|
|
13
|
+
samplingRatio?: number;
|
|
14
|
+
trackEvents: boolean;
|
|
15
|
+
value: LDFlagValue;
|
|
16
|
+
variation?: number;
|
|
17
|
+
version: number;
|
|
18
|
+
};
|
|
19
|
+
export default class EventFactoryBase {
|
|
20
|
+
private readonly withReasons;
|
|
21
|
+
constructor(withReasons: boolean);
|
|
22
|
+
evalEvent(e: EvalEventArgs): InputEvalEvent;
|
|
23
|
+
unknownFlagEvent(key: string, defVal: LDFlagValue, context: Context): InputEvalEvent;
|
|
24
|
+
identifyEvent(context: Context): InputIdentifyEvent;
|
|
25
|
+
customEvent(key: string, context: Context, data?: any, metricValue?: number, samplingRatio?: number): InputCustomEvent;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=EventFactoryBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventFactoryBase.d.ts","sourceRoot":"","sources":["../../../src/internal/evaluation/EventFactoryBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEjF,MAAM,MAAM,aAAa,GAAG;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,GAAG,CAAC;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,OAAO;IAEjD,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc;IAmB3C,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO;IAqBnE,aAAa,CAAC,OAAO,EAAE,OAAO;IAM9B,WAAW,CACT,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,GAAG,EACV,WAAW,CAAC,EAAE,MAAM,EACpB,aAAa,GAAE,MAAU;CAU5B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const events_1 = require("../events");
|
|
4
|
+
class EventFactoryBase {
|
|
5
|
+
constructor(withReasons) {
|
|
6
|
+
this.withReasons = withReasons;
|
|
7
|
+
}
|
|
8
|
+
evalEvent(e) {
|
|
9
|
+
var _a;
|
|
10
|
+
return new events_1.InputEvalEvent(this.withReasons, e.context, e.flagKey, e.value, e.defaultVal, e.version,
|
|
11
|
+
// Exclude null as a possibility.
|
|
12
|
+
(_a = e.variation) !== null && _a !== void 0 ? _a : undefined, e.trackEvents || e.addExperimentData, e.prereqOfFlagKey, this.withReasons || e.addExperimentData ? e.reason : undefined, e.debugEventsUntilDate, e.excludeFromSummaries, e.samplingRatio);
|
|
13
|
+
}
|
|
14
|
+
unknownFlagEvent(key, defVal, context) {
|
|
15
|
+
return new events_1.InputEvalEvent(this.withReasons, context, key, defVal, defVal,
|
|
16
|
+
// This isn't ideal, but the purpose of the factory is to at least
|
|
17
|
+
// handle this situation.
|
|
18
|
+
undefined, // version
|
|
19
|
+
undefined, // variation index
|
|
20
|
+
undefined, // track events
|
|
21
|
+
undefined, // prereqOf
|
|
22
|
+
undefined, // reason
|
|
23
|
+
undefined, // debugEventsUntilDate
|
|
24
|
+
undefined, // exclude from summaries
|
|
25
|
+
undefined);
|
|
26
|
+
}
|
|
27
|
+
/* eslint-disable-next-line class-methods-use-this */
|
|
28
|
+
identifyEvent(context) {
|
|
29
|
+
// Currently sampling for identify events is always 1.
|
|
30
|
+
return new events_1.InputIdentifyEvent(context, 1);
|
|
31
|
+
}
|
|
32
|
+
/* eslint-disable-next-line class-methods-use-this */
|
|
33
|
+
customEvent(key, context, data, metricValue, samplingRatio = 1) {
|
|
34
|
+
return new events_1.InputCustomEvent(context, key, data !== null && data !== void 0 ? data : undefined, metricValue !== null && metricValue !== void 0 ? metricValue : undefined, samplingRatio);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = EventFactoryBase;
|
|
38
|
+
//# sourceMappingURL=EventFactoryBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventFactoryBase.js","sourceRoot":"","sources":["../../../src/internal/evaluation/EventFactoryBase.ts"],"names":[],"mappings":";;AAEA,sCAAiF;AAkBjF,MAAqB,gBAAgB;IACnC,YAA6B,WAAoB;QAApB,gBAAW,GAAX,WAAW,CAAS;IAAG,CAAC;IAErD,SAAS,CAAC,CAAgB;;QACxB,OAAO,IAAI,uBAAc,CACvB,IAAI,CAAC,WAAW,EAChB,CAAC,CAAC,OAAO,EACT,CAAC,CAAC,OAAO,EACT,CAAC,CAAC,KAAK,EACP,CAAC,CAAC,UAAU,EACZ,CAAC,CAAC,OAAO;QACT,iCAAiC;QACjC,MAAA,CAAC,CAAC,SAAS,mCAAI,SAAS,EACxB,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,iBAAiB,EACpC,CAAC,CAAC,eAAe,EACjB,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC9D,CAAC,CAAC,oBAAoB,EACtB,CAAC,CAAC,oBAAoB,EACtB,CAAC,CAAC,aAAa,CAChB,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,GAAW,EAAE,MAAmB,EAAE,OAAgB;QACjE,OAAO,IAAI,uBAAc,CACvB,IAAI,CAAC,WAAW,EAChB,OAAO,EACP,GAAG,EACH,MAAM,EACN,MAAM;QACN,kEAAkE;QAClE,yBAAyB;QACzB,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,kBAAkB;QAC7B,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,uBAAuB;QAClC,SAAS,EAAE,yBAAyB;QACpC,SAAS,CACV,CAAC;IACJ,CAAC;IAED,qDAAqD;IACrD,aAAa,CAAC,OAAgB;QAC5B,sDAAsD;QACtD,OAAO,IAAI,2BAAkB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,qDAAqD;IACrD,WAAW,CACT,GAAW,EACX,OAAgB,EAChB,IAAU,EACV,WAAoB,EACpB,gBAAwB,CAAC;QAEzB,OAAO,IAAI,yBAAgB,CACzB,OAAO,EACP,GAAG,EACH,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,SAAS,EACjB,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,EACxB,aAAa,CACd,CAAC;IACJ,CAAC;CACF;AAhED,mCAgEC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LDEvaluationReason, LDFlagValue } from '../../api';
|
|
2
|
+
import ErrorKinds from './ErrorKinds';
|
|
3
|
+
export declare const createErrorEvaluationDetail: (errorKind: ErrorKinds, def?: LDFlagValue) => {
|
|
4
|
+
value: any;
|
|
5
|
+
variationIndex: null;
|
|
6
|
+
reason: {
|
|
7
|
+
kind: string;
|
|
8
|
+
errorKind: ErrorKinds;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const createSuccessEvaluationDetail: (value: LDFlagValue, variationIndex?: number, reason?: LDEvaluationReason) => {
|
|
12
|
+
value: any;
|
|
13
|
+
variationIndex: number | null;
|
|
14
|
+
reason: LDEvaluationReason | null;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=evaluationDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluationDetail.d.ts","sourceRoot":"","sources":["../../../src/internal/evaluation/evaluationDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,eAAO,MAAM,2BAA2B,cAAe,UAAU,QAAQ,WAAW;;;;;;;CAIlF,CAAC;AAEH,eAAO,MAAM,6BAA6B,UACjC,WAAW,mBACD,MAAM,WACd,kBAAkB;;;;CAK3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSuccessEvaluationDetail = exports.createErrorEvaluationDetail = void 0;
|
|
4
|
+
const createErrorEvaluationDetail = (errorKind, def) => ({
|
|
5
|
+
value: def !== null && def !== void 0 ? def : null,
|
|
6
|
+
variationIndex: null,
|
|
7
|
+
reason: { kind: 'ERROR', errorKind },
|
|
8
|
+
});
|
|
9
|
+
exports.createErrorEvaluationDetail = createErrorEvaluationDetail;
|
|
10
|
+
const createSuccessEvaluationDetail = (value, variationIndex, reason) => ({
|
|
11
|
+
value,
|
|
12
|
+
variationIndex: variationIndex !== null && variationIndex !== void 0 ? variationIndex : null,
|
|
13
|
+
reason: reason !== null && reason !== void 0 ? reason : null,
|
|
14
|
+
});
|
|
15
|
+
exports.createSuccessEvaluationDetail = createSuccessEvaluationDetail;
|
|
16
|
+
//# sourceMappingURL=evaluationDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluationDetail.js","sourceRoot":"","sources":["../../../src/internal/evaluation/evaluationDetail.ts"],"names":[],"mappings":";;;AAGO,MAAM,2BAA2B,GAAG,CAAC,SAAqB,EAAE,GAAiB,EAAE,EAAE,CAAC,CAAC;IACxF,KAAK,EAAE,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI;IAClB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAJU,QAAA,2BAA2B,+BAIrC;AAEI,MAAM,6BAA6B,GAAG,CAC3C,KAAkB,EAClB,cAAuB,EACvB,MAA2B,EAC3B,EAAE,CAAC,CAAC;IACJ,KAAK;IACL,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI;IACtC,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI;CACvB,CAAC,CAAC;AARU,QAAA,6BAA6B,iCAQvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ErrorKinds from './ErrorKinds';
|
|
2
|
+
import { createErrorEvaluationDetail, createSuccessEvaluationDetail } from './evaluationDetail';
|
|
3
|
+
import EventFactoryBase, { EvalEventArgs } from './EventFactoryBase';
|
|
4
|
+
export { createSuccessEvaluationDetail, createErrorEvaluationDetail, ErrorKinds, EvalEventArgs, EventFactoryBase, };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/evaluation/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,gBAAgB,EAAE,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventFactoryBase = exports.ErrorKinds = exports.createErrorEvaluationDetail = exports.createSuccessEvaluationDetail = void 0;
|
|
4
|
+
const ErrorKinds_1 = require("./ErrorKinds");
|
|
5
|
+
exports.ErrorKinds = ErrorKinds_1.default;
|
|
6
|
+
const evaluationDetail_1 = require("./evaluationDetail");
|
|
7
|
+
Object.defineProperty(exports, "createErrorEvaluationDetail", { enumerable: true, get: function () { return evaluationDetail_1.createErrorEvaluationDetail; } });
|
|
8
|
+
Object.defineProperty(exports, "createSuccessEvaluationDetail", { enumerable: true, get: function () { return evaluationDetail_1.createSuccessEvaluationDetail; } });
|
|
9
|
+
const EventFactoryBase_1 = require("./EventFactoryBase");
|
|
10
|
+
exports.EventFactoryBase = EventFactoryBase_1.default;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/evaluation/index.ts"],"names":[],"mappings":";;;AAAA,6CAAsC;AAOpC,qBAPK,oBAAU,CAOL;AANZ,yDAAgG;AAK9F,4GALO,8CAA2B,OAKP;AAD3B,8GAJoC,gDAA6B,OAIpC;AAH/B,yDAAqE;AAOnE,2BAPK,0BAAgB,CAOL"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messages for issues which can be encountered processing client requests.
|
|
3
|
+
*/
|
|
4
|
+
export default class ClientMessages {
|
|
5
|
+
static readonly missingContextKeyNoEvent = "Context was unspecified or had no key; event will not be sent";
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ClientMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientMessages.d.ts","sourceRoot":"","sources":["../../../src/internal/events/ClientMessages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,mEAC0B;CACnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Messages for issues which can be encountered processing client requests.
|
|
5
|
+
*/
|
|
6
|
+
class ClientMessages {
|
|
7
|
+
}
|
|
8
|
+
ClientMessages.missingContextKeyNoEvent = 'Context was unspecified or had no key; event will not be sent';
|
|
9
|
+
exports.default = ClientMessages;
|
|
10
|
+
//# sourceMappingURL=ClientMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientMessages.js","sourceRoot":"","sources":["../../../src/internal/events/ClientMessages.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,MAAqB,cAAc;;AACjB,uCAAwB,GACtC,+DAA+D,CAAC;kBAF/C,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LDEvaluationReason, LDFlagValue } from '../../api/data';
|
|
2
2
|
import Context from '../../Context';
|
|
3
3
|
export default class InputEvalEvent {
|
|
4
4
|
readonly withReasons: boolean;
|
|
@@ -16,7 +16,7 @@ export default class InputEvalEvent {
|
|
|
16
16
|
readonly variation?: number;
|
|
17
17
|
readonly version?: number;
|
|
18
18
|
readonly excludeFromSummaries?: boolean;
|
|
19
|
-
constructor(withReasons: boolean, context: Context, key: string, defValue: any, // default is a reserved keyword in this context.
|
|
20
|
-
|
|
19
|
+
constructor(withReasons: boolean, context: Context, key: string, value: LDFlagValue, defValue: any, // default is a reserved keyword in this context.
|
|
20
|
+
version?: number, variation?: number, trackEvents?: boolean, prereqOf?: string, reason?: LDEvaluationReason, debugEventsUntilDate?: number, excludeFromSummaries?: boolean, samplingRatio?: number);
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=InputEvalEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputEvalEvent.d.ts","sourceRoot":"","sources":["../../../src/internal/events/InputEvalEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"InputEvalEvent.d.ts","sourceRoot":"","sources":["../../../src/internal/events/InputEvalEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,cAAc;aAwBf,WAAW,EAAE,OAAO;aACpB,OAAO,EAAE,OAAO;aAChB,GAAG,EAAE,MAAM;aAUX,aAAa,EAAE,MAAM;IAnCvC,SAAgB,IAAI,aAAa;IAEjC,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC,SAAgB,OAAO,EAAE,GAAG,CAAC;IAE7B,SAAgB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtC,SAAgB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9C,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElC,SAAgB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAE5C,SAAgB,KAAK,EAAE,GAAG,CAAC;IAE3B,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjC,SAAgB,oBAAoB,CAAC,EAAE,OAAO,CAAC;gBAG7B,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EAC3B,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,GAAG,EAAE,iDAAiD;IAChE,OAAO,CAAC,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,OAAO,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,oBAAoB,CAAC,EAAE,MAAM,EAC7B,oBAAoB,CAAC,EAAE,OAAO,EACd,aAAa,GAAE,MAAU;CAkC5C"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class InputEvalEvent {
|
|
4
|
-
constructor(withReasons, context, key, defValue, // default is a reserved keyword in this context.
|
|
5
|
-
|
|
6
|
-
var _a;
|
|
4
|
+
constructor(withReasons, context, key, value, defValue, // default is a reserved keyword in this context.
|
|
5
|
+
version, variation, trackEvents, prereqOf, reason, debugEventsUntilDate, excludeFromSummaries, samplingRatio = 1) {
|
|
7
6
|
this.withReasons = withReasons;
|
|
8
7
|
this.context = context;
|
|
9
8
|
this.key = key;
|
|
10
9
|
this.samplingRatio = samplingRatio;
|
|
11
10
|
this.kind = 'feature';
|
|
12
11
|
this.creationDate = Date.now();
|
|
12
|
+
this.value = value;
|
|
13
13
|
this.default = defValue;
|
|
14
|
-
this.variation = (_a = detail.variationIndex) !== null && _a !== void 0 ? _a : undefined;
|
|
15
|
-
this.value = detail.value;
|
|
16
14
|
if (version !== undefined) {
|
|
17
15
|
this.version = version;
|
|
18
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputEvalEvent.js","sourceRoot":"","sources":["../../../src/internal/events/InputEvalEvent.ts"],"names":[],"mappings":";;AAGA,MAAqB,cAAc;IAuBjC,YACkB,WAAoB,EACpB,OAAgB,EAChB,GAAW,EAC3B,QAAa,EAAE,iDAAiD;IAChE,
|
|
1
|
+
{"version":3,"file":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CAsEC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ClientMessages from './ClientMessages';
|
|
1
2
|
import EventProcessor from './EventProcessor';
|
|
2
3
|
import InputCustomEvent from './InputCustomEvent';
|
|
3
4
|
import InputEvalEvent from './InputEvalEvent';
|
|
@@ -6,5 +7,5 @@ import InputIdentifyEvent from './InputIdentifyEvent';
|
|
|
6
7
|
import InputMigrationEvent from './InputMigrationEvent';
|
|
7
8
|
import NullEventProcessor from './NullEventProcessor';
|
|
8
9
|
import shouldSample from './sampling';
|
|
9
|
-
export { InputCustomEvent, InputEvalEvent, InputEvent, InputIdentifyEvent, InputMigrationEvent, EventProcessor, shouldSample, NullEventProcessor, };
|
|
10
|
+
export { ClientMessages, InputCustomEvent, InputEvalEvent, InputEvent, InputIdentifyEvent, InputMigrationEvent, EventProcessor, shouldSample, NullEventProcessor, };
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,YAAY,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,YAAY,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NullEventProcessor = exports.shouldSample = exports.EventProcessor = exports.InputIdentifyEvent = exports.InputEvalEvent = exports.InputCustomEvent = void 0;
|
|
3
|
+
exports.NullEventProcessor = exports.shouldSample = exports.EventProcessor = exports.InputIdentifyEvent = exports.InputEvalEvent = exports.InputCustomEvent = exports.ClientMessages = void 0;
|
|
4
|
+
const ClientMessages_1 = require("./ClientMessages");
|
|
5
|
+
exports.ClientMessages = ClientMessages_1.default;
|
|
4
6
|
const EventProcessor_1 = require("./EventProcessor");
|
|
5
7
|
exports.EventProcessor = EventProcessor_1.default;
|
|
6
8
|
const InputCustomEvent_1 = require("./InputCustomEvent");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAW5C,yBAXK,wBAAc,CAWL;AAVhB,qDAA8C;AAgB5C,yBAhBK,wBAAc,CAgBL;AAfhB,yDAAkD;AAUhD,2BAVK,0BAAgB,CAUL;AATlB,qDAA8C;AAU5C,yBAVK,wBAAc,CAUL;AARhB,6DAAsD;AAUpD,6BAVK,4BAAkB,CAUL;AARpB,6DAAsD;AAYpD,6BAZK,4BAAkB,CAYL;AAXpB,yCAAsC;AAUpC,uBAVK,kBAAY,CAUL"}
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/dist/internal/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./diagnostics"), exports);
|
|
18
|
+
__exportStar(require("./evaluation"), exports);
|
|
18
19
|
__exportStar(require("./events"), exports);
|
|
19
20
|
__exportStar(require("./stream"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,+CAA6B;AAC7B,2CAAyB;AACzB,2CAAyB"}
|
|
@@ -14,7 +14,7 @@ declare class StreamingProcessor implements LDStreamProcessor {
|
|
|
14
14
|
private eventSource?;
|
|
15
15
|
private requests;
|
|
16
16
|
private connectionAttemptStartTime?;
|
|
17
|
-
constructor(sdkKey: string, clientContext: ClientContext, listeners: Map<EventName, ProcessStreamResponse>, diagnosticsManager?: DiagnosticsManager | undefined, errorHandler?: StreamingErrorHandler | undefined, streamInitialReconnectDelay?: number);
|
|
17
|
+
constructor(sdkKey: string, clientContext: ClientContext, streamUriPath: string, listeners: Map<EventName, ProcessStreamResponse>, diagnosticsManager?: DiagnosticsManager | undefined, errorHandler?: StreamingErrorHandler | undefined, streamInitialReconnectDelay?: number);
|
|
18
18
|
private logConnectionStarted;
|
|
19
19
|
private logConnectionResult;
|
|
20
20
|
start(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingProcessor.d.ts","sourceRoot":"","sources":["../../../src/internal/stream/StreamingProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,qBAAqB,EAAY,MAAM,WAAW,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAgBhD,cAAM,kBAAmB,YAAW,iBAAiB;
|
|
1
|
+
{"version":3,"file":"StreamingProcessor.d.ts","sourceRoot":"","sources":["../../../src/internal/stream/StreamingProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,qBAAqB,EAAY,MAAM,WAAW,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAgBhD,cAAM,kBAAmB,YAAW,iBAAiB;IAajD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAf9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAC/D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAW;IAEnC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,0BAA0B,CAAC,CAAS;gBAG1C,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,MAAM,EACJ,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,qBAAqB,CAAC,EAChD,kBAAkB,CAAC,gCAAoB,EACvC,YAAY,CAAC,mCAAuB,EACpC,2BAA2B,SAAI;IAYlD,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,mBAAmB;IAY3B,KAAK;IAiEL,IAAI;IAKJ,KAAK;CAGN;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -10,7 +10,7 @@ const reportJsonError = (type, data, logger, errorHandler) => {
|
|
|
10
10
|
errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(new errors_1.LDStreamingError('Malformed JSON data in event stream'));
|
|
11
11
|
};
|
|
12
12
|
class StreamingProcessor {
|
|
13
|
-
constructor(sdkKey, clientContext, listeners, diagnosticsManager, errorHandler, streamInitialReconnectDelay = 1) {
|
|
13
|
+
constructor(sdkKey, clientContext, streamUriPath, listeners, diagnosticsManager, errorHandler, streamInitialReconnectDelay = 1) {
|
|
14
14
|
this.listeners = listeners;
|
|
15
15
|
this.diagnosticsManager = diagnosticsManager;
|
|
16
16
|
this.errorHandler = errorHandler;
|
|
@@ -21,7 +21,7 @@ class StreamingProcessor {
|
|
|
21
21
|
this.headers = (0, utils_1.defaultHeaders)(sdkKey, info, tags);
|
|
22
22
|
this.logger = logger;
|
|
23
23
|
this.requests = requests;
|
|
24
|
-
this.streamUri = `${basicConfiguration.serviceEndpoints.streaming}
|
|
24
|
+
this.streamUri = `${basicConfiguration.serviceEndpoints.streaming}${streamUriPath}`;
|
|
25
25
|
}
|
|
26
26
|
logConnectionStarted() {
|
|
27
27
|
this.connectionAttemptStartTime = Date.now();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingProcessor.js","sourceRoot":"","sources":["../../../src/internal/stream/StreamingProcessor.ts"],"names":[],"mappings":";;AAEA,yCAAmE;AAEnE,uCAA+D;AAI/D,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAC7C,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,MAAM,eAAe,GAAG,CACtB,IAAY,EACZ,IAAY,EACZ,MAAiB,EACjB,YAAoC,EACpC,EAAE;IACF,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,oCAAoC,IAAI,WAAW,CAAC,CAAC;IACnE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;IAC/C,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,IAAI,yBAAgB,CAAC,qCAAqC,CAAC,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,kBAAkB;IAStB,YACE,MAAc,EACd,aAA4B,
|
|
1
|
+
{"version":3,"file":"StreamingProcessor.js","sourceRoot":"","sources":["../../../src/internal/stream/StreamingProcessor.ts"],"names":[],"mappings":";;AAEA,yCAAmE;AAEnE,uCAA+D;AAI/D,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE,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AAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;wBACjE,OAAO;qBACR;oBACD,WAAW,CAAC,QAAQ,CAAC,CAAC;iBACvB;qBAAM;oBACL,MAAA,IAAI,CAAC,YAAY,qDAAG,IAAI,yBAAgB,CAAC,sCAAsC,CAAC,CAAC,CAAC;iBACnF;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI;;QACF,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/utils/clone.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAG,EAAE,GAAG,OAErC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/utils/clone.ts"],"names":[],"mappings":";;AAAA,SAAwB,KAAK,CAAC,GAAQ;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAFD,wBAEC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import clone from './clone';
|
|
1
2
|
import { secondsToMillis } from './date';
|
|
2
3
|
import { defaultHeaders, httpErrorMessage, LDHeaders } from './http';
|
|
3
4
|
import noop from './noop';
|
|
4
5
|
import sleep from './sleep';
|
|
5
6
|
import { VoidFunction } from './VoidFunction';
|
|
6
|
-
export { defaultHeaders, httpErrorMessage, noop, LDHeaders, secondsToMillis, sleep, VoidFunction };
|
|
7
|
+
export { clone, defaultHeaders, httpErrorMessage, noop, LDHeaders, secondsToMillis, sleep, VoidFunction, };
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EACL,KAAK,EACL,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,SAAS,EACT,eAAe,EACf,KAAK,EACL,YAAY,GACb,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sleep = exports.secondsToMillis = exports.noop = exports.httpErrorMessage = exports.defaultHeaders = void 0;
|
|
3
|
+
exports.sleep = exports.secondsToMillis = exports.noop = exports.httpErrorMessage = exports.defaultHeaders = exports.clone = void 0;
|
|
4
|
+
const clone_1 = require("./clone");
|
|
5
|
+
exports.clone = clone_1.default;
|
|
4
6
|
const date_1 = require("./date");
|
|
5
7
|
Object.defineProperty(exports, "secondsToMillis", { enumerable: true, get: function () { return date_1.secondsToMillis; } });
|
|
6
8
|
const http_1 = require("./http");
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,mCAA4B;AAQ1B,gBARK,eAAK,CAQL;AAPP,iCAAyC;AAYvC,gGAZO,sBAAe,OAYP;AAXjB,iCAAqE;AAOnE,+FAPO,qBAAc,OAOP;AACd,iGARuB,uBAAgB,OAQvB;AAPlB,iCAA0B;AAQxB,eARK,cAAI,CAQL;AAPN,mCAA4B;AAU1B,gBAVK,eAAK,CAUL"}
|