@kameleoon/javascript-sdk-core 1.0.0 → 1.1.1
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/LICENSE.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Copyright 2023 Kameleoon
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
4
|
+
|
|
5
|
+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
6
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export { KameleoonStorageKey, IExternalStorage, IExternalStorageConstructor, } f
|
|
|
5
5
|
export { Cookie, VISITOR_CODE_LENGTH } from './constants';
|
|
6
6
|
export { JSONType } from './campaignConfiguration';
|
|
7
7
|
export { Ok, Result, Err } from 'ts-res';
|
|
8
|
-
export { Environment, ExperimentType, FeatureFlagType, SDKCoreParameters, SDKConfigurationType, TrackConversionParamsType, FeatureVariableResultType, InternalSDKConfigurationType, GetFeatureFlagVariableParamsType, ServerGetVisitorCodeParametersType, ClientGetVisitorCodeParametersType, MobileGetVisitorCodeParametersType, } from './types';
|
|
8
|
+
export { Environment, VariableType, ExperimentType, FeatureFlagType, SDKCoreParameters, SDKConfigurationType, TrackConversionParamsType, FeatureVariableResultType, InternalSDKConfigurationType, GetFeatureFlagVariableParamsType, ServerGetVisitorCodeParametersType, ClientGetVisitorCodeParametersType, MobileGetVisitorCodeParametersType, } from './types';
|
|
9
9
|
export { CustomData, Conversion, Device, Browser, DeviceType, BrowserType, PageView, KameleoonDataType, PageViewParametersType, ConversionParametersType, } from './kameleoonData';
|
|
10
10
|
export { RealTimeEventType, IExternalEventSource, EventSourceOpenParametersType, IExternalEventSourceConstructor, } from './eventSource';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageView = exports.BrowserType = exports.DeviceType = exports.Browser = exports.Device = exports.Conversion = exports.CustomData = exports.Environment = exports.Err = exports.Ok = exports.VISITOR_CODE_LENGTH = exports.Cookie = exports.KameleoonStorageKey = exports.KameleoonError = exports.KameleoonException = exports.KameleoonCoreUtils = exports.KameleoonCore = void 0;
|
|
3
|
+
exports.PageView = exports.BrowserType = exports.DeviceType = exports.Browser = exports.Device = exports.Conversion = exports.CustomData = exports.VariableType = exports.Environment = exports.Err = exports.Ok = exports.VISITOR_CODE_LENGTH = exports.Cookie = exports.KameleoonStorageKey = exports.KameleoonError = exports.KameleoonException = exports.KameleoonCoreUtils = exports.KameleoonCore = void 0;
|
|
4
4
|
var kameleoonClient_1 = require("./kameleoonClient");
|
|
5
5
|
Object.defineProperty(exports, "KameleoonCore", { enumerable: true, get: function () { return kameleoonClient_1.KameleoonClient; } });
|
|
6
6
|
var kameleoonUtils_1 = require("./kameleoonUtils");
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "Ok", { enumerable: true, get: function () { retu
|
|
|
18
18
|
Object.defineProperty(exports, "Err", { enumerable: true, get: function () { return ts_res_1.Err; } });
|
|
19
19
|
var types_1 = require("./types");
|
|
20
20
|
Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return types_1.Environment; } });
|
|
21
|
+
Object.defineProperty(exports, "VariableType", { enumerable: true, get: function () { return types_1.VariableType; } });
|
|
21
22
|
var kameleoonData_1 = require("./kameleoonData");
|
|
22
23
|
Object.defineProperty(exports, "CustomData", { enumerable: true, get: function () { return kameleoonData_1.CustomData; } });
|
|
23
24
|
Object.defineProperty(exports, "Conversion", { enumerable: true, get: function () { return kameleoonData_1.Conversion; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAG2B;AAFzB,gHAAA,eAAe,OAAiB;AAGlC,mDAAwE;AAA/D,oHAAA,cAAc,OAAsB;AAC7C,mDAAsE;AAA7D,oHAAA,kBAAkB,OAAA;AAAE,gHAAA,cAAc,OAAA;AAC3C,qCAImB;AAHjB,8GAAA,mBAAmB,OAAA;AAIrB,yCAA0D;AAAjD,mGAAA,MAAM,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAEpC,iCAAyC;AAAhC,4FAAA,EAAE,OAAA;AAAU,6FAAA,GAAG,OAAA;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAG2B;AAFzB,gHAAA,eAAe,OAAiB;AAGlC,mDAAwE;AAA/D,oHAAA,cAAc,OAAsB;AAC7C,mDAAsE;AAA7D,oHAAA,kBAAkB,OAAA;AAAE,gHAAA,cAAc,OAAA;AAC3C,qCAImB;AAHjB,8GAAA,mBAAmB,OAAA;AAIrB,yCAA0D;AAAjD,mGAAA,MAAM,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAEpC,iCAAyC;AAAhC,4FAAA,EAAE,OAAA;AAAU,6FAAA,GAAG,OAAA;AACxB,iCAciB;AAbf,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AAad,iDAWyB;AAVvB,2GAAA,UAAU,OAAA;AACV,2GAAA,UAAU,OAAA;AACV,uGAAA,MAAM,OAAA;AACN,wGAAA,OAAO,OAAA;AACP,2GAAA,UAAU,OAAA;AACV,4GAAA,WAAW,OAAA;AACX,yGAAA,QAAQ,OAAA"}
|
|
@@ -23,7 +23,7 @@ export interface IKameleoonClient {
|
|
|
23
23
|
*
|
|
24
24
|
* - `KameleoonException.VisitorCodeMaxLength` The visitor code length was exceeded
|
|
25
25
|
* - `KameleoonException.StorageWrite` Couldn't update storage data
|
|
26
|
-
* - `KameleoonException.Initialization`
|
|
26
|
+
* - `KameleoonException.Initialization` - Method was executed before `initialize` was done for `kameleoonClient`
|
|
27
27
|
* */
|
|
28
28
|
addData: (visitorCode: string, ...data: KameleoonDataType[]) => void;
|
|
29
29
|
/**
|
|
@@ -96,7 +96,7 @@ class VariationConfiguration {
|
|
|
96
96
|
});
|
|
97
97
|
// --- Note ---
|
|
98
98
|
// - Double check with different `hashDouble` is performed here in order
|
|
99
|
-
// to first
|
|
99
|
+
// to first check rule's exposition for allocation and then inner `variationByExposition`
|
|
100
100
|
// - If `hashDouble` would be same then some of the variations couldn't have never been reached
|
|
101
101
|
if (hashDouble < exposition) {
|
|
102
102
|
let totalDeviation = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kameleoon/javascript-sdk-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Kameleoon JS SDK Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"crypto-js": "^4.1.1",
|
|
39
39
|
"node-fetch": "^2.6.1",
|
|
40
|
-
"ts-res": "^1.1.
|
|
40
|
+
"ts-res": "^1.1.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/crypto-js": "^4.1.1",
|