@splitsoftware/splitio-commons 1.13.2-rc.5 → 1.13.2-rc.7

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.
Files changed (144) hide show
  1. package/CHANGES.txt +2 -0
  2. package/cjs/evaluator/Engine.js +5 -6
  3. package/cjs/evaluator/combiners/ifelseif.js +2 -3
  4. package/cjs/evaluator/condition/index.js +2 -3
  5. package/cjs/evaluator/index.js +4 -5
  6. package/cjs/evaluator/matchers/all.js +1 -3
  7. package/cjs/evaluator/matchers/between.js +1 -3
  8. package/cjs/evaluator/matchers/boolean.js +1 -3
  9. package/cjs/evaluator/matchers/cont_all.js +1 -3
  10. package/cjs/evaluator/matchers/cont_any.js +1 -3
  11. package/cjs/evaluator/matchers/cont_str.js +1 -3
  12. package/cjs/evaluator/matchers/dependency.js +1 -1
  13. package/cjs/evaluator/matchers/eq.js +1 -3
  14. package/cjs/evaluator/matchers/eq_set.js +1 -3
  15. package/cjs/evaluator/matchers/ew.js +1 -3
  16. package/cjs/evaluator/matchers/gte.js +1 -3
  17. package/cjs/evaluator/matchers/index.js +1 -1
  18. package/cjs/evaluator/matchers/lte.js +1 -3
  19. package/cjs/evaluator/matchers/part_of.js +1 -3
  20. package/cjs/evaluator/matchers/segment.js +1 -6
  21. package/cjs/evaluator/matchers/semver_between.js +1 -3
  22. package/cjs/evaluator/matchers/semver_eq.js +1 -3
  23. package/cjs/evaluator/matchers/semver_gte.js +1 -3
  24. package/cjs/evaluator/matchers/semver_inlist.js +4 -6
  25. package/cjs/evaluator/matchers/semver_lte.js +1 -3
  26. package/cjs/evaluator/matchers/string.js +1 -3
  27. package/cjs/evaluator/matchers/sw.js +1 -3
  28. package/cjs/evaluator/matchers/whitelist.js +3 -4
  29. package/cjs/evaluator/matchersTransform/index.js +6 -8
  30. package/cjs/evaluator/matchersTransform/whitelist.js +2 -3
  31. package/cjs/evaluator/parser/index.js +13 -14
  32. package/cjs/logger/constants.js +4 -24
  33. package/cjs/logger/index.js +8 -1
  34. package/cjs/logger/messages/debug.js +5 -25
  35. package/cjs/logger/messages/warn.js +1 -1
  36. package/cjs/services/splitApi.js +5 -5
  37. package/cjs/storages/KeyBuilder.js +3 -2
  38. package/cjs/utils/constants/index.js +2 -1
  39. package/esm/evaluator/Engine.js +5 -5
  40. package/esm/evaluator/combiners/ifelseif.js +2 -2
  41. package/esm/evaluator/condition/index.js +2 -2
  42. package/esm/evaluator/index.js +4 -4
  43. package/esm/evaluator/matchers/all.js +1 -3
  44. package/esm/evaluator/matchers/between.js +1 -3
  45. package/esm/evaluator/matchers/boolean.js +1 -3
  46. package/esm/evaluator/matchers/cont_all.js +1 -3
  47. package/esm/evaluator/matchers/cont_any.js +1 -3
  48. package/esm/evaluator/matchers/cont_str.js +1 -3
  49. package/esm/evaluator/matchers/dependency.js +1 -1
  50. package/esm/evaluator/matchers/eq.js +1 -3
  51. package/esm/evaluator/matchers/eq_set.js +1 -3
  52. package/esm/evaluator/matchers/ew.js +1 -3
  53. package/esm/evaluator/matchers/gte.js +1 -3
  54. package/esm/evaluator/matchers/index.js +1 -1
  55. package/esm/evaluator/matchers/lte.js +1 -3
  56. package/esm/evaluator/matchers/part_of.js +1 -3
  57. package/esm/evaluator/matchers/segment.js +1 -6
  58. package/esm/evaluator/matchers/semver_between.js +1 -3
  59. package/esm/evaluator/matchers/semver_eq.js +1 -3
  60. package/esm/evaluator/matchers/semver_gte.js +1 -3
  61. package/esm/evaluator/matchers/semver_inlist.js +5 -7
  62. package/esm/evaluator/matchers/semver_lte.js +1 -3
  63. package/esm/evaluator/matchers/string.js +1 -3
  64. package/esm/evaluator/matchers/sw.js +1 -3
  65. package/esm/evaluator/matchers/whitelist.js +4 -5
  66. package/esm/evaluator/matchersTransform/index.js +6 -8
  67. package/esm/evaluator/matchersTransform/whitelist.js +2 -3
  68. package/esm/evaluator/parser/index.js +14 -15
  69. package/esm/logger/constants.js +1 -21
  70. package/esm/logger/index.js +9 -2
  71. package/esm/logger/messages/debug.js +5 -25
  72. package/esm/logger/messages/warn.js +1 -1
  73. package/esm/services/splitApi.js +6 -6
  74. package/esm/storages/KeyBuilder.js +3 -2
  75. package/esm/utils/constants/index.js +1 -0
  76. package/package.json +1 -1
  77. package/src/evaluator/Engine.ts +5 -6
  78. package/src/evaluator/combiners/ifelseif.ts +2 -2
  79. package/src/evaluator/condition/index.ts +2 -2
  80. package/src/evaluator/index.ts +4 -4
  81. package/src/evaluator/matchers/all.ts +1 -5
  82. package/src/evaluator/matchers/between.ts +3 -7
  83. package/src/evaluator/matchers/boolean.ts +2 -6
  84. package/src/evaluator/matchers/cont_all.ts +1 -5
  85. package/src/evaluator/matchers/cont_any.ts +1 -5
  86. package/src/evaluator/matchers/cont_str.ts +2 -6
  87. package/src/evaluator/matchers/dependency.ts +1 -1
  88. package/src/evaluator/matchers/eq.ts +2 -6
  89. package/src/evaluator/matchers/eq_set.ts +1 -5
  90. package/src/evaluator/matchers/ew.ts +2 -6
  91. package/src/evaluator/matchers/gte.ts +2 -6
  92. package/src/evaluator/matchers/index.ts +1 -1
  93. package/src/evaluator/matchers/lte.ts +2 -6
  94. package/src/evaluator/matchers/part_of.ts +1 -5
  95. package/src/evaluator/matchers/segment.ts +1 -8
  96. package/src/evaluator/matchers/semver_between.ts +1 -5
  97. package/src/evaluator/matchers/semver_eq.ts +1 -5
  98. package/src/evaluator/matchers/semver_gte.ts +1 -5
  99. package/src/evaluator/matchers/semver_inlist.ts +5 -9
  100. package/src/evaluator/matchers/semver_lte.ts +1 -5
  101. package/src/evaluator/matchers/string.ts +1 -6
  102. package/src/evaluator/matchers/sw.ts +2 -6
  103. package/src/evaluator/matchers/whitelist.ts +5 -7
  104. package/src/evaluator/matchersTransform/index.ts +5 -8
  105. package/src/evaluator/matchersTransform/whitelist.ts +2 -3
  106. package/src/evaluator/parser/index.ts +12 -8
  107. package/src/evaluator/types.ts +2 -2
  108. package/src/logger/constants.ts +1 -21
  109. package/src/logger/index.ts +8 -2
  110. package/src/logger/messages/debug.ts +5 -25
  111. package/src/logger/messages/warn.ts +1 -1
  112. package/src/services/splitApi.ts +5 -6
  113. package/src/storages/KeyBuilder.ts +3 -2
  114. package/src/utils/constants/index.ts +2 -0
  115. package/types/evaluator/matchers/all.d.ts +1 -2
  116. package/types/evaluator/matchers/between.d.ts +1 -2
  117. package/types/evaluator/matchers/boolean.d.ts +1 -2
  118. package/types/evaluator/matchers/cont_all.d.ts +1 -2
  119. package/types/evaluator/matchers/cont_any.d.ts +1 -2
  120. package/types/evaluator/matchers/cont_str.d.ts +1 -2
  121. package/types/evaluator/matchers/dependency.d.ts +1 -1
  122. package/types/evaluator/matchers/eq.d.ts +1 -2
  123. package/types/evaluator/matchers/eq_set.d.ts +1 -2
  124. package/types/evaluator/matchers/ew.d.ts +1 -2
  125. package/types/evaluator/matchers/gte.d.ts +1 -2
  126. package/types/evaluator/matchers/lte.d.ts +1 -2
  127. package/types/evaluator/matchers/part_of.d.ts +1 -2
  128. package/types/evaluator/matchers/segment.d.ts +1 -2
  129. package/types/evaluator/matchers/semver_between.d.ts +1 -2
  130. package/types/evaluator/matchers/semver_eq.d.ts +1 -2
  131. package/types/evaluator/matchers/semver_gte.d.ts +1 -2
  132. package/types/evaluator/matchers/semver_inlist.d.ts +1 -3
  133. package/types/evaluator/matchers/semver_lte.d.ts +1 -2
  134. package/types/evaluator/matchers/string.d.ts +1 -2
  135. package/types/evaluator/matchers/sw.d.ts +1 -2
  136. package/types/evaluator/matchers/whitelist.d.ts +1 -3
  137. package/types/evaluator/matchersTransform/whitelist.d.ts +2 -2
  138. package/types/evaluator/types.d.ts +2 -2
  139. package/types/logger/constants.d.ts +1 -21
  140. package/types/storages/KeyBuilder.d.ts +1 -1
  141. package/types/utils/constants/index.d.ts +1 -0
  142. package/cjs/evaluator/matchersTransform/set.js +0 -10
  143. package/esm/evaluator/matchersTransform/set.js +0 -6
  144. package/src/evaluator/matchersTransform/set.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  import { ISplitMatcher } from '../../dtos/types';
2
2
  /**
3
- * Extract whitelist as a set. Used by 'WHITELIST' matcher.
3
+ * Extract whitelist array.
4
4
  */
5
- export declare function whitelistTransform(whitelistObject: ISplitMatcher['whitelistMatcherData']): import("../../utils/lang/sets").ISet<string>;
5
+ export declare function whitelistTransform(whitelistObject: ISplitMatcher['whitelistMatcherData']): string[] | null | undefined;
@@ -1,6 +1,5 @@
1
1
  import { IBetweenMatcherData, IBetweenStringMatcherData, IDependencyMatcherData, MaybeThenable } from '../dtos/types';
2
2
  import { IStorageAsync, IStorageSync } from '../storages/types';
3
- import { ISet } from '../utils/lang/sets';
4
3
  import { SplitIO } from '../types';
5
4
  import { ILogger } from '../logger/types';
6
5
  export interface IDependencyMatcherValue {
@@ -9,7 +8,8 @@ export interface IDependencyMatcherValue {
9
8
  }
10
9
  export interface IMatcherDto {
11
10
  type: number;
12
- value?: string | number | boolean | string[] | IDependencyMatcherData | ISet<string> | IBetweenMatcherData | IBetweenStringMatcherData | null;
11
+ name: string;
12
+ value?: string | number | boolean | string[] | IDependencyMatcherData | IBetweenMatcherData | IBetweenStringMatcherData | null;
13
13
  attribute: string | null;
14
14
  negate: boolean;
15
15
  dataType: string;
@@ -9,24 +9,8 @@ export declare const ENGINE_COMBINER_AND = 0;
9
9
  export declare const ENGINE_COMBINER_IFELSEIF = 1;
10
10
  export declare const ENGINE_COMBINER_IFELSEIF_NO_TREATMENT = 2;
11
11
  export declare const ENGINE_BUCKET = 3;
12
- export declare const ENGINE_MATCHER_ALL = 4;
13
- export declare const ENGINE_MATCHER_BETWEEN = 5;
14
- export declare const ENGINE_MATCHER_BOOLEAN = 6;
15
- export declare const ENGINE_MATCHER_CONTAINS_ALL = 7;
16
- export declare const ENGINE_MATCHER_CONTAINS_ANY = 8;
17
- export declare const ENGINE_MATCHER_CONTAINS_STRING = 9;
18
12
  export declare const ENGINE_MATCHER_DEPENDENCY = 10;
19
13
  export declare const ENGINE_MATCHER_DEPENDENCY_PRE = 11;
20
- export declare const ENGINE_MATCHER_EQUAL = 12;
21
- export declare const ENGINE_MATCHER_EQUAL_TO_SET = 13;
22
- export declare const ENGINE_MATCHER_ENDS_WITH = 14;
23
- export declare const ENGINE_MATCHER_GREATER = 15;
24
- export declare const ENGINE_MATCHER_LESS = 16;
25
- export declare const ENGINE_MATCHER_PART_OF = 17;
26
- export declare const ENGINE_MATCHER_SEGMENT = 18;
27
- export declare const ENGINE_MATCHER_STRING = 19;
28
- export declare const ENGINE_MATCHER_STARTS_WITH = 21;
29
- export declare const ENGINE_MATCHER_WHITELIST = 22;
30
14
  export declare const ENGINE_VALUE = 23;
31
15
  export declare const ENGINE_SANITIZE = 24;
32
16
  export declare const CLEANUP_REGISTERING = 25;
@@ -44,11 +28,7 @@ export declare const SYNC_TASK_START = 36;
44
28
  export declare const SYNC_TASK_EXECUTE = 37;
45
29
  export declare const SYNC_TASK_STOP = 38;
46
30
  export declare const SETTINGS_SPLITS_FILTER = 39;
47
- export declare const ENGINE_MATCHER_EQUAL_SEMVER = 40;
48
- export declare const ENGINE_MATCHER_GREATER_SEMVER = 41;
49
- export declare const ENGINE_MATCHER_LESS_SEMVER = 42;
50
- export declare const ENGINE_MATCHER_BETWEEN_SEMVER = 43;
51
- export declare const ENGINE_MATCHER_IN_LIST_SEMVER = 44;
31
+ export declare const ENGINE_MATCHER_RESULT = 40;
52
32
  export declare const CLIENT_READY_FROM_CACHE = 100;
53
33
  export declare const CLIENT_READY = 101;
54
34
  export declare const IMPRESSION = 102;
@@ -16,7 +16,7 @@ export declare class KeyBuilder {
16
16
  buildHashKey(): string;
17
17
  }
18
18
  /**
19
- * Generates a murmur32 hash based on the authorization key and the feature flags filter query.
19
+ * Generates a murmur32 hash based on the authorization key, the feature flags filter query, and version of SplitChanges API.
20
20
  * The hash is in hexadecimal format (8 characters max, 32 bits).
21
21
  */
22
22
  export declare function getStorageHash(settings: ISettings): string;
@@ -78,3 +78,4 @@ export declare const NON_REQUESTED = 1;
78
78
  export declare const DISABLED = 0;
79
79
  export declare const ENABLED = 1;
80
80
  export declare const PAUSED = 2;
81
+ export declare const FLAGS_SPEC = "1.1";
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setTransform = void 0;
4
- /**
5
- * Extract whitelist array. Used by set and string matchers
6
- */
7
- function setTransform(whitelistObject) {
8
- return whitelistObject && whitelistObject.whitelist;
9
- }
10
- exports.setTransform = setTransform;
@@ -1,6 +0,0 @@
1
- /**
2
- * Extract whitelist array. Used by set and string matchers
3
- */
4
- export function setTransform(whitelistObject) {
5
- return whitelistObject && whitelistObject.whitelist;
6
- }
@@ -1,8 +0,0 @@
1
- import { ISplitMatcher } from '../../dtos/types';
2
-
3
- /**
4
- * Extract whitelist array. Used by set and string matchers
5
- */
6
- export function setTransform(whitelistObject: ISplitMatcher['whitelistMatcherData']) {
7
- return whitelistObject && whitelistObject.whitelist;
8
- }