@splitsoftware/splitio-commons 1.13.2-rc.9 → 1.14.1-rc.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.
Files changed (137) hide show
  1. package/CHANGES.txt +4 -1
  2. package/cjs/evaluator/matchers/all.js +1 -3
  3. package/cjs/evaluator/matchers/between.js +1 -3
  4. package/cjs/evaluator/matchers/boolean.js +1 -3
  5. package/cjs/evaluator/matchers/cont_all.js +1 -3
  6. package/cjs/evaluator/matchers/cont_any.js +1 -3
  7. package/cjs/evaluator/matchers/cont_str.js +1 -3
  8. package/cjs/evaluator/matchers/dependency.js +1 -1
  9. package/cjs/evaluator/matchers/eq.js +1 -3
  10. package/cjs/evaluator/matchers/eq_set.js +1 -3
  11. package/cjs/evaluator/matchers/ew.js +1 -3
  12. package/cjs/evaluator/matchers/gte.js +1 -3
  13. package/cjs/evaluator/matchers/index.js +1 -1
  14. package/cjs/evaluator/matchers/lte.js +1 -3
  15. package/cjs/evaluator/matchers/part_of.js +1 -3
  16. package/cjs/evaluator/matchers/segment.js +1 -6
  17. package/cjs/evaluator/matchers/semver_between.js +1 -1
  18. package/cjs/evaluator/matchers/semver_eq.js +1 -1
  19. package/cjs/evaluator/matchers/semver_gte.js +1 -1
  20. package/cjs/evaluator/matchers/semver_inlist.js +1 -1
  21. package/cjs/evaluator/matchers/semver_lte.js +1 -1
  22. package/cjs/evaluator/matchers/string.js +1 -3
  23. package/cjs/evaluator/matchers/sw.js +1 -3
  24. package/cjs/evaluator/matchers/whitelist.js +1 -3
  25. package/cjs/evaluator/parser/index.js +7 -4
  26. package/cjs/logger/constants.js +4 -19
  27. package/cjs/logger/messages/debug.js +5 -20
  28. package/cjs/logger/messages/warn.js +1 -1
  29. package/cjs/services/splitApi.js +3 -2
  30. package/cjs/storages/KeyBuilder.js +1 -2
  31. package/cjs/sync/streaming/SSEClient/index.js +2 -2
  32. package/cjs/utils/constants/index.js +2 -2
  33. package/cjs/utils/settingsValidation/index.js +14 -11
  34. package/esm/evaluator/matchers/all.js +1 -3
  35. package/esm/evaluator/matchers/between.js +1 -3
  36. package/esm/evaluator/matchers/boolean.js +1 -3
  37. package/esm/evaluator/matchers/cont_all.js +1 -3
  38. package/esm/evaluator/matchers/cont_any.js +1 -3
  39. package/esm/evaluator/matchers/cont_str.js +1 -3
  40. package/esm/evaluator/matchers/dependency.js +1 -1
  41. package/esm/evaluator/matchers/eq.js +1 -3
  42. package/esm/evaluator/matchers/eq_set.js +1 -3
  43. package/esm/evaluator/matchers/ew.js +1 -3
  44. package/esm/evaluator/matchers/gte.js +1 -3
  45. package/esm/evaluator/matchers/index.js +1 -1
  46. package/esm/evaluator/matchers/lte.js +1 -3
  47. package/esm/evaluator/matchers/part_of.js +1 -3
  48. package/esm/evaluator/matchers/segment.js +1 -6
  49. package/esm/evaluator/matchers/semver_between.js +1 -1
  50. package/esm/evaluator/matchers/semver_eq.js +1 -1
  51. package/esm/evaluator/matchers/semver_gte.js +1 -1
  52. package/esm/evaluator/matchers/semver_inlist.js +1 -1
  53. package/esm/evaluator/matchers/semver_lte.js +1 -1
  54. package/esm/evaluator/matchers/string.js +1 -3
  55. package/esm/evaluator/matchers/sw.js +1 -3
  56. package/esm/evaluator/matchers/whitelist.js +1 -3
  57. package/esm/evaluator/parser/index.js +8 -5
  58. package/esm/logger/constants.js +1 -16
  59. package/esm/logger/messages/debug.js +5 -20
  60. package/esm/logger/messages/warn.js +1 -1
  61. package/esm/services/splitApi.js +4 -3
  62. package/esm/storages/KeyBuilder.js +1 -2
  63. package/esm/sync/streaming/SSEClient/index.js +2 -2
  64. package/esm/utils/constants/index.js +1 -1
  65. package/esm/utils/settingsValidation/index.js +15 -12
  66. package/package.json +1 -1
  67. package/src/evaluator/matchers/all.ts +1 -5
  68. package/src/evaluator/matchers/between.ts +3 -7
  69. package/src/evaluator/matchers/boolean.ts +2 -6
  70. package/src/evaluator/matchers/cont_all.ts +1 -5
  71. package/src/evaluator/matchers/cont_any.ts +1 -5
  72. package/src/evaluator/matchers/cont_str.ts +2 -6
  73. package/src/evaluator/matchers/dependency.ts +1 -1
  74. package/src/evaluator/matchers/eq.ts +2 -6
  75. package/src/evaluator/matchers/eq_set.ts +1 -5
  76. package/src/evaluator/matchers/ew.ts +2 -6
  77. package/src/evaluator/matchers/gte.ts +2 -6
  78. package/src/evaluator/matchers/index.ts +1 -1
  79. package/src/evaluator/matchers/lte.ts +2 -6
  80. package/src/evaluator/matchers/part_of.ts +1 -5
  81. package/src/evaluator/matchers/segment.ts +1 -8
  82. package/src/evaluator/matchers/semver_between.ts +1 -2
  83. package/src/evaluator/matchers/semver_eq.ts +1 -2
  84. package/src/evaluator/matchers/semver_gte.ts +1 -2
  85. package/src/evaluator/matchers/semver_inlist.ts +2 -2
  86. package/src/evaluator/matchers/semver_lte.ts +1 -2
  87. package/src/evaluator/matchers/string.ts +1 -6
  88. package/src/evaluator/matchers/sw.ts +2 -6
  89. package/src/evaluator/matchers/whitelist.ts +1 -5
  90. package/src/evaluator/parser/index.ts +9 -5
  91. package/src/logger/constants.ts +1 -16
  92. package/src/logger/messages/debug.ts +5 -20
  93. package/src/logger/messages/warn.ts +1 -1
  94. package/src/services/splitApi.ts +4 -3
  95. package/src/storages/KeyBuilder.ts +1 -2
  96. package/src/sync/streaming/SSEClient/index.ts +2 -2
  97. package/src/types.ts +2 -1
  98. package/src/utils/constants/index.ts +1 -1
  99. package/src/utils/settingsValidation/index.ts +15 -12
  100. package/src/utils/settingsValidation/types.ts +2 -0
  101. package/types/evaluator/matchers/all.d.ts +1 -2
  102. package/types/evaluator/matchers/between.d.ts +1 -2
  103. package/types/evaluator/matchers/boolean.d.ts +1 -2
  104. package/types/evaluator/matchers/cont_all.d.ts +1 -2
  105. package/types/evaluator/matchers/cont_any.d.ts +1 -2
  106. package/types/evaluator/matchers/cont_str.d.ts +1 -2
  107. package/types/evaluator/matchers/dependency.d.ts +1 -1
  108. package/types/evaluator/matchers/eq.d.ts +1 -2
  109. package/types/evaluator/matchers/eq_set.d.ts +1 -2
  110. package/types/evaluator/matchers/ew.d.ts +1 -2
  111. package/types/evaluator/matchers/gte.d.ts +1 -2
  112. package/types/evaluator/matchers/lte.d.ts +1 -2
  113. package/types/evaluator/matchers/part_of.d.ts +1 -2
  114. package/types/evaluator/matchers/segment.d.ts +1 -2
  115. package/types/evaluator/matchers/sember_inlist.d.ts +3 -0
  116. package/types/evaluator/matchers/semver_between.d.ts +1 -2
  117. package/types/evaluator/matchers/semver_eq.d.ts +1 -2
  118. package/types/evaluator/matchers/semver_gte.d.ts +1 -2
  119. package/types/evaluator/matchers/semver_inlist.d.ts +1 -2
  120. package/types/evaluator/matchers/semver_lte.d.ts +1 -2
  121. package/types/evaluator/matchers/string.d.ts +1 -2
  122. package/types/evaluator/matchers/sw.d.ts +1 -2
  123. package/types/evaluator/matchers/whitelist.d.ts +1 -2
  124. package/types/evaluator/matchersTransform/set.d.ts +2 -2
  125. package/types/evaluator/matchersTransform/string.d.ts +7 -0
  126. package/types/logger/constants.d.ts +1 -16
  127. package/types/sdkClient/identity.d.ts +6 -0
  128. package/types/storages/AbstractSplitsCache.d.ts +46 -0
  129. package/types/sync/streaming/mySegmentsV2utils.d.ts +27 -0
  130. package/types/trackers/impressionObserver/utils.d.ts +1 -1
  131. package/types/types.d.ts +1 -0
  132. package/types/utils/constants/index.d.ts +1 -1
  133. package/types/utils/inputValidation/sdkKey.d.ts +7 -0
  134. package/types/utils/settingsValidation/index.d.ts +1 -0
  135. package/types/utils/settingsValidation/logger/globalLogLevel.d.ts +8 -0
  136. package/types/utils/settingsValidation/types.d.ts +2 -0
  137. /package/types/utils/{Semver.d.ts → semVer.d.ts} +0 -0
@@ -1,12 +1,8 @@
1
1
  import { isString } from '../../utils/lang';
2
- import { ILogger } from '../../logger/types';
3
- import { ENGINE_MATCHER_CONTAINS_STRING } from '../../logger/constants';
4
2
 
5
- export function containsStringMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function containsStringMatcherContext(ruleAttr: string[]) {
6
4
  return function containsStringMatcher(runtimeAttr: string): boolean {
7
- let contains = ruleAttr.some(e => isString(runtimeAttr) && runtimeAttr.indexOf(e) > -1);
8
-
9
- log.debug(ENGINE_MATCHER_CONTAINS_STRING, [runtimeAttr, ruleAttr, contains]);
5
+ const contains = ruleAttr.some(e => isString(runtimeAttr) && runtimeAttr.indexOf(e) > -1);
10
6
 
11
7
  return contains;
12
8
  };
@@ -5,7 +5,7 @@ import { thenable } from '../../utils/promise/thenable';
5
5
  import { IDependencyMatcherValue, IEvaluation, ISplitEvaluator } from '../types';
6
6
  import { ENGINE_MATCHER_DEPENDENCY, ENGINE_MATCHER_DEPENDENCY_PRE } from '../../logger/constants';
7
7
 
8
- export function dependencyMatcherContext(log: ILogger, { split, treatments }: IDependencyMatcherData, storage: IStorageSync | IStorageAsync) {
8
+ export function dependencyMatcherContext({ split, treatments }: IDependencyMatcherData, storage: IStorageSync | IStorageAsync, log: ILogger) {
9
9
 
10
10
  function checkTreatment(evaluation: IEvaluation, acceptableTreatments: string[], parentName: string) {
11
11
  let matches = false;
@@ -1,11 +1,7 @@
1
- import { ENGINE_MATCHER_EQUAL } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
1
+ export function equalToMatcherContext(ruleAttr: number) {
3
2
 
4
- export function equalToMatcherContext(log: ILogger, ruleAttr: number) {
5
3
  return function equalToMatcher(runtimeAttr: number): boolean {
6
- let isEqual = runtimeAttr === ruleAttr;
7
-
8
- log.debug(ENGINE_MATCHER_EQUAL, [runtimeAttr, ruleAttr, isEqual]);
4
+ const isEqual = runtimeAttr === ruleAttr;
9
5
 
10
6
  return isEqual;
11
7
  };
@@ -1,8 +1,6 @@
1
- import { ENGINE_MATCHER_EQUAL_TO_SET } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
3
1
  import { findIndex } from '../../utils/lang';
4
2
 
5
- export function equalToSetMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function equalToSetMatcherContext(ruleAttr: string[]) {
6
4
  return function equalToSetMatcher(runtimeAttr: string[]): boolean {
7
5
  // Length being the same is the first condition.
8
6
  let isEqual = runtimeAttr.length === ruleAttr.length;
@@ -12,8 +10,6 @@ export function equalToSetMatcherContext(log: ILogger, ruleAttr: string[]) {
12
10
  if (findIndex(ruleAttr, e => e === runtimeAttr[i]) < 0) isEqual = false;
13
11
  }
14
12
 
15
- log.debug(ENGINE_MATCHER_EQUAL_TO_SET, [runtimeAttr, ruleAttr, isEqual]);
16
-
17
13
  return isEqual;
18
14
  };
19
15
  }
@@ -1,12 +1,8 @@
1
- import { ENGINE_MATCHER_ENDS_WITH } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
3
1
  import { endsWith } from '../../utils/lang';
4
2
 
5
- export function endsWithMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function endsWithMatcherContext(ruleAttr: string[]) {
6
4
  return function endsWithMatcher(runtimeAttr: string): boolean {
7
- let strEndsWith = ruleAttr.some(e => endsWith(runtimeAttr, e));
8
-
9
- log.debug(ENGINE_MATCHER_ENDS_WITH, [runtimeAttr, ruleAttr, strEndsWith]);
5
+ const strEndsWith = ruleAttr.some(e => endsWith(runtimeAttr, e));
10
6
 
11
7
  return strEndsWith;
12
8
  };
@@ -1,11 +1,7 @@
1
- import { ENGINE_MATCHER_GREATER } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
1
+ export function greaterThanEqualMatcherContext(ruleAttr: number) {
3
2
 
4
- export function greaterThanEqualMatcherContext(log: ILogger, ruleAttr: number) {
5
3
  return function greaterThanEqualMatcher(runtimeAttr: number): boolean {
6
- let isGreaterThanEqual = runtimeAttr >= ruleAttr;
7
-
8
- log.debug(ENGINE_MATCHER_GREATER, [runtimeAttr, ruleAttr, isGreaterThanEqual]);
4
+ const isGreaterThanEqual = runtimeAttr >= ruleAttr;
9
5
 
10
6
  return isGreaterThanEqual;
11
7
  };
@@ -61,6 +61,6 @@ export function matcherFactory(log: ILogger, matcherDto: IMatcherDto, storage?:
61
61
 
62
62
  let matcherFn;
63
63
  // @ts-ignore
64
- if (matchers[type]) matcherFn = matchers[type](log, value, storage); // There is no index-out-of-bound exception in JavaScript
64
+ if (matchers[type]) matcherFn = matchers[type](value, storage, log); // There is no index-out-of-bound exception in JavaScript
65
65
  return matcherFn;
66
66
  }
@@ -1,11 +1,7 @@
1
- import { ENGINE_MATCHER_LESS } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
1
+ export function lessThanEqualMatcherContext(ruleAttr: number) {
3
2
 
4
- export function lessThanEqualMatcherContext(log: ILogger, ruleAttr: number) {
5
3
  return function lessThanEqualMatcher(runtimeAttr: number): boolean {
6
- let isLessThanEqual = runtimeAttr <= ruleAttr;
7
-
8
- log.debug(ENGINE_MATCHER_LESS, [runtimeAttr, ruleAttr, isLessThanEqual]);
4
+ const isLessThanEqual = runtimeAttr <= ruleAttr;
9
5
 
10
6
  return isLessThanEqual;
11
7
  };
@@ -1,8 +1,6 @@
1
1
  import { findIndex } from '../../utils/lang';
2
- import { ILogger } from '../../logger/types';
3
- import { ENGINE_MATCHER_PART_OF } from '../../logger/constants';
4
2
 
5
- export function partOfSetMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function partOfSetMatcherContext(ruleAttr: string[]) {
6
4
  return function partOfMatcher(runtimeAttr: string[]): boolean {
7
5
  // To be part of the length should be minor or equal.
8
6
  let isPartOf = runtimeAttr.length <= ruleAttr.length;
@@ -12,8 +10,6 @@ export function partOfSetMatcherContext(log: ILogger, ruleAttr: string[]) {
12
10
  if (findIndex(ruleAttr, e => e === runtimeAttr[i]) < 0) isPartOf = false;
13
11
  }
14
12
 
15
- log.debug(ENGINE_MATCHER_PART_OF, [runtimeAttr, ruleAttr, isPartOf]);
16
-
17
13
  return isPartOf;
18
14
  };
19
15
  }
@@ -1,25 +1,18 @@
1
1
  import { MaybeThenable } from '../../dtos/types';
2
2
  import { ISegmentsCacheBase } from '../../storages/types';
3
- import { ILogger } from '../../logger/types';
4
3
  import { thenable } from '../../utils/promise/thenable';
5
- import { ENGINE_MATCHER_SEGMENT } from '../../logger/constants';
6
4
 
7
- export function segmentMatcherContext(log: ILogger, segmentName: string, storage: { segments: ISegmentsCacheBase }) {
5
+ export function segmentMatcherContext(segmentName: string, storage: { segments: ISegmentsCacheBase }) {
8
6
 
9
7
  return function segmentMatcher(key: string): MaybeThenable<boolean> {
10
8
  const isInSegment = storage.segments.isInSegment(segmentName, key);
11
9
 
12
10
  if (thenable(isInSegment)) {
13
11
  isInSegment.then(result => {
14
- log.debug(ENGINE_MATCHER_SEGMENT, [segmentName, key, isInSegment]);
15
-
16
12
  return result;
17
13
  });
18
- } else {
19
- log.debug(ENGINE_MATCHER_SEGMENT, [segmentName, key, isInSegment]);
20
14
  }
21
15
 
22
16
  return isInSegment;
23
17
  };
24
-
25
18
  }
@@ -1,8 +1,7 @@
1
1
  import { IBetweenStringMatcherData } from '../../dtos/types';
2
- import { ILogger } from '../../logger/types';
3
2
  import { Semver } from '../../utils/Semver';
4
3
 
5
- export function betweenSemverMatcherContext(log: ILogger, ruleAttr: IBetweenStringMatcherData) {
4
+ export function betweenSemverMatcherContext(ruleAttr: IBetweenStringMatcherData) {
6
5
  const startSemver = new Semver(ruleAttr.start);
7
6
  const endSemver = new Semver(ruleAttr.end);
8
7
 
@@ -1,7 +1,6 @@
1
- import { ILogger } from '../../logger/types';
2
1
  import { Semver } from '../../utils/Semver';
3
2
 
4
- export function equalToSemverMatcherContext(log: ILogger, ruleAttr: string) {
3
+ export function equalToSemverMatcherContext(ruleAttr: string) {
5
4
  const ruleSemver = new Semver(ruleAttr);
6
5
 
7
6
  return function equalToSemverMatcher(runtimeAttr: string): boolean {
@@ -1,7 +1,6 @@
1
- import { ILogger } from '../../logger/types';
2
1
  import { Semver } from '../../utils/Semver';
3
2
 
4
- export function greaterThanEqualToSemverMatcherContext(log: ILogger, ruleAttr: string) {
3
+ export function greaterThanEqualToSemverMatcherContext(ruleAttr: string) {
5
4
  const ruleSemver = new Semver(ruleAttr);
6
5
 
7
6
  return function greaterThanEqualToSemverMatcher(runtimeAttr: string): boolean {
@@ -1,8 +1,7 @@
1
1
  import { _Set } from '../../utils/lang/sets';
2
- import { ILogger } from '../../logger/types';
3
2
  import { Semver } from '../../utils/Semver';
4
3
 
5
- export function inListSemverMatcherContext(log: ILogger, ruleAttr: string[]) {
4
+ export function inListSemverMatcherContext(ruleAttr: string[]) {
6
5
  // @TODO ruleAttr validation should be done at the `parser` or `matchersTransform` level to reuse for all matchers
7
6
  if (!ruleAttr || ruleAttr.length === 0) throw new Error('whitelistMatcherData is required for IN_LIST_SEMVER matcher type');
8
7
 
@@ -10,6 +9,7 @@ export function inListSemverMatcherContext(log: ILogger, ruleAttr: string[]) {
10
9
 
11
10
  return function inListSemverMatcher(runtimeAttr: string): boolean {
12
11
  const runtimeSemver = new Semver(runtimeAttr).version;
12
+
13
13
  const isInList = listOfSemvers.has(runtimeSemver);
14
14
 
15
15
  return isInList;
@@ -1,7 +1,6 @@
1
- import { ILogger } from '../../logger/types';
2
1
  import { Semver } from '../../utils/Semver';
3
2
 
4
- export function lessThanEqualToSemverMatcherContext(log: ILogger, ruleAttr: string) {
3
+ export function lessThanEqualToSemverMatcherContext(ruleAttr: string) {
5
4
  const ruleSemver = new Semver(ruleAttr);
6
5
 
7
6
  return function lessThanEqualToSemverMatcher(runtimeAttr: string): boolean {
@@ -1,14 +1,9 @@
1
- import { ENGINE_MATCHER_STRING } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
3
-
4
- export function stringMatcherContext(log: ILogger, ruleAttr: string) {
1
+ export function stringMatcherContext(ruleAttr: string) {
5
2
  const regex = new RegExp(ruleAttr);
6
3
 
7
4
  return function stringMatcher(runtimeAttr: string): boolean {
8
5
  const regexMatches = regex.test(runtimeAttr);
9
6
 
10
- log.debug(ENGINE_MATCHER_STRING, [runtimeAttr, ruleAttr, regexMatches ? 'yes' : 'no']);
11
-
12
7
  return regexMatches;
13
8
  };
14
9
  }
@@ -1,12 +1,8 @@
1
- import { ENGINE_MATCHER_STARTS_WITH } from '../../logger/constants';
2
- import { ILogger } from '../../logger/types';
3
1
  import { startsWith } from '../../utils/lang';
4
2
 
5
- export function startsWithMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function startsWithMatcherContext(ruleAttr: string[]) {
6
4
  return function startsWithMatcher(runtimeAttr: string): boolean {
7
- let matches = ruleAttr.some(e => startsWith(runtimeAttr, e));
8
-
9
- log.debug(ENGINE_MATCHER_STARTS_WITH, [runtimeAttr, ruleAttr, matches]);
5
+ const matches = ruleAttr.some(e => startsWith(runtimeAttr, e));
10
6
 
11
7
  return matches;
12
8
  };
@@ -1,15 +1,11 @@
1
1
  import { _Set } from '../../utils/lang/sets';
2
- import { ILogger } from '../../logger/types';
3
- import { ENGINE_MATCHER_WHITELIST } from '../../logger/constants';
4
2
 
5
- export function whitelistMatcherContext(log: ILogger, ruleAttr: string[]) {
3
+ export function whitelistMatcherContext(ruleAttr: string[]) {
6
4
  const whitelistSet = new _Set(ruleAttr);
7
5
 
8
6
  return function whitelistMatcher(runtimeAttr: string): boolean {
9
7
  const isInWhitelist = whitelistSet.has(runtimeAttr);
10
8
 
11
- log.debug(ENGINE_MATCHER_WHITELIST, [runtimeAttr, ruleAttr.join(','), isInWhitelist]);
12
-
13
9
  return isInWhitelist;
14
10
  };
15
11
  }
@@ -11,7 +11,7 @@ import { ISplitCondition, MaybeThenable } from '../../dtos/types';
11
11
  import { IStorageAsync, IStorageSync } from '../../storages/types';
12
12
  import { SplitIO } from '../../types';
13
13
  import { ILogger } from '../../logger/types';
14
- import { ENGINE_MATCHER_ERROR } from '../../logger/constants';
14
+ import { ENGINE_MATCHER_ERROR, ENGINE_MATCHER_RESULT } from '../../logger/constants';
15
15
 
16
16
  export function parser(log: ILogger, conditions: ISplitCondition[], storage: IStorageSync | IStorageAsync): IEvaluator {
17
17
  let predicates = [];
@@ -49,10 +49,14 @@ export function parser(log: ILogger, conditions: ISplitCondition[], storage: ISt
49
49
  }
50
50
  }
51
51
 
52
- if (thenable(result)) { // @ts-ignore
53
- return result.then(res => Boolean(res ^ matcherDto.negate));
54
- } // @ts-ignore
55
- return Boolean(result ^ matcherDto.negate);
52
+ function handleResult(result: boolean) {
53
+ log.debug(ENGINE_MATCHER_RESULT, [matcherDto.name, result, matcherDto.value, value]); // @ts-ignore
54
+ return Boolean(result ^ matcherDto.negate);
55
+ }
56
+
57
+ return thenable(result) ?
58
+ result.then(handleResult) :
59
+ handleResult(result);
56
60
  };
57
61
  });
58
62
 
@@ -9,24 +9,8 @@ export const ENGINE_COMBINER_AND = 0;
9
9
  export const ENGINE_COMBINER_IFELSEIF = 1;
10
10
  export const ENGINE_COMBINER_IFELSEIF_NO_TREATMENT = 2;
11
11
  export const ENGINE_BUCKET = 3;
12
- export const ENGINE_MATCHER_ALL = 4;
13
- export const ENGINE_MATCHER_BETWEEN = 5;
14
- export const ENGINE_MATCHER_BOOLEAN = 6;
15
- export const ENGINE_MATCHER_CONTAINS_ALL = 7;
16
- export const ENGINE_MATCHER_CONTAINS_ANY = 8;
17
- export const ENGINE_MATCHER_CONTAINS_STRING = 9;
18
12
  export const ENGINE_MATCHER_DEPENDENCY = 10;
19
13
  export const ENGINE_MATCHER_DEPENDENCY_PRE = 11;
20
- export const ENGINE_MATCHER_EQUAL = 12;
21
- export const ENGINE_MATCHER_EQUAL_TO_SET = 13;
22
- export const ENGINE_MATCHER_ENDS_WITH = 14;
23
- export const ENGINE_MATCHER_GREATER = 15;
24
- export const ENGINE_MATCHER_LESS = 16;
25
- export const ENGINE_MATCHER_PART_OF = 17;
26
- export const ENGINE_MATCHER_SEGMENT = 18;
27
- export const ENGINE_MATCHER_STRING = 19;
28
- export const ENGINE_MATCHER_STARTS_WITH = 21;
29
- export const ENGINE_MATCHER_WHITELIST = 22;
30
14
  export const ENGINE_VALUE = 23;
31
15
  export const ENGINE_SANITIZE = 24;
32
16
  export const CLEANUP_REGISTERING = 25;
@@ -44,6 +28,7 @@ export const SYNC_TASK_START = 36;
44
28
  export const SYNC_TASK_EXECUTE = 37;
45
29
  export const SYNC_TASK_STOP = 38;
46
30
  export const SETTINGS_SPLITS_FILTER = 39;
31
+ export const ENGINE_MATCHER_RESULT = 40;
47
32
 
48
33
  export const CLIENT_READY_FROM_CACHE = 100;
49
34
  export const CLIENT_READY = 101;
@@ -7,26 +7,11 @@ export const codesDebug: [number, string][] = codesInfo.concat([
7
7
  [c.ENGINE_COMBINER_IFELSEIF, c.LOG_PREFIX_ENGINE_COMBINER + 'Treatment found: %s'],
8
8
  [c.ENGINE_COMBINER_IFELSEIF_NO_TREATMENT, c.LOG_PREFIX_ENGINE_COMBINER + 'All predicates evaluated, no treatment found.'],
9
9
  [c.ENGINE_BUCKET, c.LOG_PREFIX_ENGINE + ': using algo "murmur" bucket %s for key %s using seed %s - treatment %s'],
10
- [c.ENGINE_MATCHER_ALL, c.LOG_PREFIX_ENGINE_MATCHER + '[allMatcher] is always true'],
11
- [c.ENGINE_MATCHER_BETWEEN, c.LOG_PREFIX_ENGINE_MATCHER + '[betweenMatcher] is %s between %s and %s? %s'],
12
- [c.ENGINE_MATCHER_BOOLEAN, c.LOG_PREFIX_ENGINE_MATCHER + '[booleanMatcher] %s === %s'],
13
- [c.ENGINE_MATCHER_CONTAINS_ALL, c.LOG_PREFIX_ENGINE_MATCHER + '[containsAllMatcher] %s contains all elements of %s? %s'],
14
- [c.ENGINE_MATCHER_CONTAINS_ANY, c.LOG_PREFIX_ENGINE_MATCHER + '[containsAnyMatcher] %s contains at least an element of %s? %s'],
15
- [c.ENGINE_MATCHER_CONTAINS_STRING, c.LOG_PREFIX_ENGINE_MATCHER + '[containsStringMatcher] %s contains %s? %s'],
16
- [c.ENGINE_MATCHER_DEPENDENCY, c.LOG_PREFIX_ENGINE_MATCHER + '[dependencyMatcher] parent feature flag "%s" evaluated to "%s" with label "%s". %s evaluated treatment is part of [%s] ? %s.'],
17
- [c.ENGINE_MATCHER_DEPENDENCY_PRE, c.LOG_PREFIX_ENGINE_MATCHER + '[dependencyMatcher] will evaluate parent feature flag: "%s" with key: %s %s'],
18
- [c.ENGINE_MATCHER_EQUAL, c.LOG_PREFIX_ENGINE_MATCHER + '[equalToMatcher] is %s equal to %s? %s'],
19
- [c.ENGINE_MATCHER_EQUAL_TO_SET, c.LOG_PREFIX_ENGINE_MATCHER + '[equalToSetMatcher] is %s equal to set %s? %s'],
20
- [c.ENGINE_MATCHER_ENDS_WITH, c.LOG_PREFIX_ENGINE_MATCHER + '[endsWithMatcher] %s ends with %s? %s'],
21
- [c.ENGINE_MATCHER_GREATER, c.LOG_PREFIX_ENGINE_MATCHER + '[greaterThanEqualMatcher] is %s greater than %s? %s'],
22
- [c.ENGINE_MATCHER_LESS, c.LOG_PREFIX_ENGINE_MATCHER + '[lessThanEqualMatcher] is %s less than %s? %s'],
23
- [c.ENGINE_MATCHER_PART_OF, c.LOG_PREFIX_ENGINE_MATCHER + '[partOfMatcher] %s is part of %s? %s'],
24
- [c.ENGINE_MATCHER_SEGMENT, c.LOG_PREFIX_ENGINE_MATCHER + '[segmentMatcher] evaluated %s / %s => %s'],
25
- [c.ENGINE_MATCHER_STRING, c.LOG_PREFIX_ENGINE_MATCHER + '[stringMatcher] does %s matches with %s? %s'],
26
- [c.ENGINE_MATCHER_STARTS_WITH, c.LOG_PREFIX_ENGINE_MATCHER + '[startsWithMatcher] %s starts with %s? %s'],
27
- [c.ENGINE_MATCHER_WHITELIST, c.LOG_PREFIX_ENGINE_MATCHER + '[whitelistMatcher] evaluated %s in [%s] => %s'],
28
- [c.ENGINE_VALUE, c.LOG_PREFIX_ENGINE_VALUE + 'Extracted attribute [%s], [%s] will be used for matching.'],
29
- [c.ENGINE_SANITIZE, c.LOG_PREFIX_ENGINE + ':sanitize: Attempted to sanitize [%s] which should be of type [%s]. Sanitized and processed value => [%s]'],
10
+ [c.ENGINE_MATCHER_DEPENDENCY, c.LOG_PREFIX_ENGINE_MATCHER + '[IN_SPLIT_TREATMENT] parent feature flag "%s" evaluated to "%s" with label "%s". %s evaluated treatment is part of %s ? %s.'],
11
+ [c.ENGINE_MATCHER_DEPENDENCY_PRE, c.LOG_PREFIX_ENGINE_MATCHER + '[IN_SPLIT_TREATMENT] will evaluate parent feature flag: "%s" with key: %s %s'],
12
+ [c.ENGINE_VALUE, c.LOG_PREFIX_ENGINE_VALUE + 'Extracted attribute `%s`. %s will be used for matching.'],
13
+ [c.ENGINE_SANITIZE, c.LOG_PREFIX_ENGINE + ':sanitize: Attempted to sanitize %s which should be of type %s. Sanitized and processed value => %s'],
14
+ [c.ENGINE_MATCHER_RESULT, c.LOG_PREFIX_ENGINE_MATCHER + '[%s] Result: %s. Rule value: %s. Evaluation value: %s'],
30
15
  // SDK
31
16
  [c.CLEANUP_REGISTERING, c.LOG_PREFIX_CLEANUP + 'Registering cleanup handler %s'],
32
17
  [c.CLEANUP_DEREGISTERING, c.LOG_PREFIX_CLEANUP + 'Deregistering cleanup handler %s'],
@@ -4,7 +4,7 @@ import { codesError } from './error';
4
4
  export const codesWarn: [number, string][] = codesError.concat([
5
5
  // evaluator
6
6
  [c.ENGINE_VALUE_INVALID, c.LOG_PREFIX_ENGINE_VALUE + 'Value %s doesn\'t match with expected type.'],
7
- [c.ENGINE_VALUE_NO_ATTRIBUTES, c.LOG_PREFIX_ENGINE_VALUE + 'Defined attribute [%s], no attributes received.'],
7
+ [c.ENGINE_VALUE_NO_ATTRIBUTES, c.LOG_PREFIX_ENGINE_VALUE + 'Defined attribute `%s`. No attributes received.'],
8
8
  // synchronizer
9
9
  [c.SYNC_MYSEGMENTS_FETCH_RETRY, c.LOG_PREFIX_SYNC_MYSEGMENTS + 'Retrying download of segments #%s. Reason: %s'],
10
10
  [c.SYNC_SPLITS_FETCH_FAILS, c.LOG_PREFIX_SYNC_SPLITS + 'Error while doing fetch of feature flags. %s'],
@@ -4,7 +4,7 @@ import { splitHttpClientFactory } from './splitHttpClient';
4
4
  import { ISplitApi } from './types';
5
5
  import { objectAssign } from '../utils/lang/objectAssign';
6
6
  import { ITelemetryTracker } from '../trackers/types';
7
- import { SPLITS, IMPRESSIONS, IMPRESSIONS_COUNT, EVENTS, TELEMETRY, TOKEN, SEGMENT, MY_SEGMENT, FLAGS_SPEC } from '../utils/constants';
7
+ import { SPLITS, IMPRESSIONS, IMPRESSIONS_COUNT, EVENTS, TELEMETRY, TOKEN, SEGMENT, MY_SEGMENT } from '../utils/constants';
8
8
  import { ERROR_TOO_MANY_SETS } from '../logger/constants';
9
9
 
10
10
  const noCacheHeaderOptions = { headers: { 'Cache-Control': 'no-cache' } };
@@ -29,6 +29,7 @@ export function splitApiFactory(
29
29
  const urls = settings.urls;
30
30
  const filterQueryString = settings.sync.__splitFiltersValidation && settings.sync.__splitFiltersValidation.queryString;
31
31
  const SplitSDKImpressionsMode = settings.sync.impressionsMode;
32
+ const flagSpecVersion = settings.sync.flagSpecVersion;
32
33
  const splitHttpClient = splitHttpClientFactory(settings, platform.getFetch);
33
34
 
34
35
  return {
@@ -44,7 +45,7 @@ export function splitApiFactory(
44
45
  },
45
46
 
46
47
  fetchAuth(userMatchingKeys?: string[]) {
47
- let url = `${urls.auth}/v2/auth?s=${FLAGS_SPEC}`;
48
+ let url = `${urls.auth}/v2/auth?s=${flagSpecVersion}`;
48
49
  if (userMatchingKeys) { // `userMatchingKeys` is undefined in server-side
49
50
  const queryParams = userMatchingKeys.map(userKeyToQueryParam).join('&');
50
51
  if (queryParams) url += '&' + queryParams;
@@ -53,7 +54,7 @@ export function splitApiFactory(
53
54
  },
54
55
 
55
56
  fetchSplitChanges(since: number, noCache?: boolean, till?: number) {
56
- const url = `${urls.sdk}/splitChanges?s=${FLAGS_SPEC}&since=${since}${filterQueryString || ''}${till ? '&till=' + till : ''}`;
57
+ const url = `${urls.sdk}/splitChanges?s=${flagSpecVersion}&since=${since}${filterQueryString || ''}${till ? '&till=' + till : ''}`;
57
58
  return splitHttpClient(url, noCache ? noCacheHeaderOptions : undefined, telemetryTracker.trackHttp(SPLITS))
58
59
  .catch((err) => {
59
60
  if (err.statusCode === 414) settings.log.error(ERROR_TOO_MANY_SETS);
@@ -1,5 +1,4 @@
1
1
  import { ISettings } from '../types';
2
- import { FLAGS_SPEC } from '../utils/constants';
3
2
  import { startsWith } from '../utils/lang';
4
3
  import { hash } from '../utils/murmur3/murmur3';
5
4
 
@@ -86,5 +85,5 @@ export class KeyBuilder {
86
85
  * The hash is in hexadecimal format (8 characters max, 32 bits).
87
86
  */
88
87
  export function getStorageHash(settings: ISettings) {
89
- return hash(`${settings.core.authorizationKey}::${settings.sync.__splitFiltersValidation.queryString}::${FLAGS_SPEC}`).toString(16);
88
+ return hash(`${settings.core.authorizationKey}::${settings.sync.__splitFiltersValidation.queryString}::${settings.sync.flagSpecVersion}`).toString(16);
90
89
  }
@@ -4,7 +4,7 @@ import { isString } from '../../../utils/lang';
4
4
  import { IAuthTokenPushEnabled } from '../AuthClient/types';
5
5
  import { ISSEClient, ISseEventHandler } from './types';
6
6
 
7
- const VERSION = '1.1';
7
+ const ABLY_API_VERSION = '1.1';
8
8
 
9
9
  const CONTROL_CHANNEL_REGEX = /^control_/;
10
10
 
@@ -78,7 +78,7 @@ export class SSEClient implements ISSEClient {
78
78
  return encodeURIComponent(params + channel);
79
79
  }
80
80
  ).join(',');
81
- const url = `${this.streamingUrl}?channels=${channelsQueryParam}&accessToken=${authToken.token}&v=${VERSION}&heartbeats=true`; // same results using `&heartbeats=false`
81
+ const url = `${this.streamingUrl}?channels=${channelsQueryParam}&accessToken=${authToken.token}&v=${ABLY_API_VERSION}&heartbeats=true`; // same results using `&heartbeats=false`
82
82
 
83
83
  this.connection = new this.eventSource!(
84
84
  // For client-side SDKs, SplitSDKClientKey and SplitSDKClientKey metadata is passed as query params,
package/src/types.ts CHANGED
@@ -118,7 +118,8 @@ export interface ISettings {
118
118
  impressionsMode: SplitIO.ImpressionsMode,
119
119
  __splitFiltersValidation: ISplitFiltersValidation,
120
120
  localhostMode?: SplitIO.LocalhostFactory,
121
- enabled: boolean
121
+ enabled: boolean,
122
+ flagSpecVersion: string
122
123
  },
123
124
  readonly runtime: {
124
125
  ip: string | false
@@ -105,4 +105,4 @@ export const DISABLED = 0;
105
105
  export const ENABLED = 1;
106
106
  export const PAUSED = 2;
107
107
 
108
- export const FLAGS_SPEC = '1.1';
108
+ export const FLAG_SPEC_VERSION = '1.1';
@@ -1,7 +1,7 @@
1
1
  import { merge, get } from '../lang';
2
2
  import { validateMode } from './mode';
3
3
  import { validateSplitFilters } from './splitFilters';
4
- import { STANDALONE_MODE, OPTIMIZED, LOCALHOST_MODE, DEBUG } from '../constants';
4
+ import { STANDALONE_MODE, OPTIMIZED, LOCALHOST_MODE, DEBUG, FLAG_SPEC_VERSION } from '../constants';
5
5
  import { validImpressionsMode } from './impressionsMode';
6
6
  import { ISettingsValidationParams } from './types';
7
7
  import { ISettings } from '../../types';
@@ -84,7 +84,8 @@ export const base = {
84
84
  // impressions collection mode
85
85
  impressionsMode: OPTIMIZED,
86
86
  localhostMode: undefined,
87
- enabled: true
87
+ enabled: true,
88
+ flagSpecVersion: FLAG_SPEC_VERSION
88
89
  },
89
90
 
90
91
  // Logger
@@ -104,7 +105,7 @@ function fromSecondsToMillis(n: number) {
104
105
  */
105
106
  export function settingsValidation(config: unknown, validationParams: ISettingsValidationParams) {
106
107
 
107
- const { defaults, runtime, storage, integrations, logger, localhost, consent } = validationParams;
108
+ const { defaults, runtime, storage, integrations, logger, localhost, consent, flagSpec } = validationParams;
108
109
 
109
110
  // creates a settings object merging base, defaults and config objects.
110
111
  const withDefaults = merge({}, base, defaults, config) as ISettings;
@@ -115,7 +116,8 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
115
116
  withDefaults.log = log;
116
117
 
117
118
  // ensure a valid impressionsMode
118
- withDefaults.sync.impressionsMode = validImpressionsMode(log, withDefaults.sync.impressionsMode);
119
+ const sync = withDefaults.sync;
120
+ sync.impressionsMode = validImpressionsMode(log, sync.impressionsMode);
119
121
 
120
122
  function validateMinValue(paramName: string, actualValue: number, minValue: number) {
121
123
  if (actualValue >= minValue) return actualValue;
@@ -133,7 +135,7 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
133
135
  scheduler.telemetryRefreshRate = fromSecondsToMillis(validateMinValue('telemetryRefreshRate', scheduler.telemetryRefreshRate, 60));
134
136
 
135
137
  // Default impressionsRefreshRate for DEBUG mode is 60 secs
136
- if (get(config, 'scheduler.impressionsRefreshRate') === undefined && withDefaults.sync.impressionsMode === DEBUG) scheduler.impressionsRefreshRate = 60;
138
+ if (get(config, 'scheduler.impressionsRefreshRate') === undefined && sync.impressionsMode === DEBUG) scheduler.impressionsRefreshRate = 60;
137
139
  scheduler.impressionsRefreshRate = fromSecondsToMillis(scheduler.impressionsRefreshRate);
138
140
 
139
141
  // Log deprecation for old telemetry param
@@ -186,25 +188,26 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
186
188
  // @ts-ignore, modify readonly prop
187
189
  if (integrations) withDefaults.integrations = integrations(withDefaults);
188
190
 
189
- if (localhost) withDefaults.sync.localhostMode = localhost(withDefaults);
191
+ if (localhost) sync.localhostMode = localhost(withDefaults);
190
192
 
191
193
  // validate push options
192
194
  if (withDefaults.streamingEnabled !== false) { // @ts-ignore, modify readonly prop
193
195
  withDefaults.streamingEnabled = true;
194
196
  // Backoff bases.
195
- // We are not checking if bases are positive numbers. Thus, we might be reauthenticating immediately (`setTimeout` with NaN or negative number)
197
+ // We are not checking if bases are positive numbers. Thus, we might be re-authenticating immediately (`setTimeout` with NaN or negative number)
196
198
  scheduler.pushRetryBackoffBase = fromSecondsToMillis(scheduler.pushRetryBackoffBase);
197
199
  }
198
200
 
199
201
  // validate sync enabled
200
- if (withDefaults.sync.enabled !== false) { // @ts-ignore, modify readonly prop
201
- withDefaults.sync.enabled = true;
202
+ if (sync.enabled !== false) {
203
+ sync.enabled = true;
202
204
  }
203
205
 
204
206
  // validate the `splitFilters` settings and parse splits query
205
- const splitFiltersValidation = validateSplitFilters(log, withDefaults.sync.splitFilters, withDefaults.mode);
206
- withDefaults.sync.splitFilters = splitFiltersValidation.validFilters;
207
- withDefaults.sync.__splitFiltersValidation = splitFiltersValidation;
207
+ const splitFiltersValidation = validateSplitFilters(log, sync.splitFilters, withDefaults.mode);
208
+ sync.splitFilters = splitFiltersValidation.validFilters;
209
+ sync.__splitFiltersValidation = splitFiltersValidation;
210
+ sync.flagSpecVersion = flagSpec ? flagSpec(withDefaults) : FLAG_SPEC_VERSION;
208
211
 
209
212
  // ensure a valid user consent value
210
213
  // @ts-ignore, modify readonly prop
@@ -26,4 +26,6 @@ export interface ISettingsValidationParams {
26
26
  localhost?: (settings: ISettings) => ISettings['sync']['localhostMode'],
27
27
  /** User consent validator (`settings.userConsent`) */
28
28
  consent: (settings: ISettings) => ISettings['userConsent'],
29
+ /** Flag spec version validation. Configurable by the JS Synchronizer but not by the SDKs */
30
+ flagSpec?: (settings: ISettings) => ISettings['sync']['flagSpecVersion']
29
31
  }
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function allMatcherContext(log: ILogger): (runtimeAttr: string) => boolean;
1
+ export declare function allMatcherContext(): (runtimeAttr: string) => boolean;
@@ -1,3 +1,2 @@
1
1
  import { IBetweenMatcherData } from '../../dtos/types';
2
- import { ILogger } from '../../logger/types';
3
- export declare function betweenMatcherContext(log: ILogger, ruleVO: IBetweenMatcherData): (runtimeAttr: number) => boolean;
2
+ export declare function betweenMatcherContext(ruleVO: IBetweenMatcherData): (runtimeAttr: number) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function booleanMatcherContext(log: ILogger, ruleAttr: boolean): (runtimeAttr: boolean) => boolean;
1
+ export declare function booleanMatcherContext(ruleAttr: boolean): (runtimeAttr: boolean) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function containsAllSetMatcherContext(log: ILogger, ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
1
+ export declare function containsAllSetMatcherContext(ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function containsAnySetMatcherContext(log: ILogger, ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
1
+ export declare function containsAnySetMatcherContext(ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function containsStringMatcherContext(log: ILogger, ruleAttr: string[]): (runtimeAttr: string) => boolean;
1
+ export declare function containsStringMatcherContext(ruleAttr: string[]): (runtimeAttr: string) => boolean;
@@ -2,4 +2,4 @@ import { IDependencyMatcherData, MaybeThenable } from '../../dtos/types';
2
2
  import { IStorageAsync, IStorageSync } from '../../storages/types';
3
3
  import { ILogger } from '../../logger/types';
4
4
  import { IDependencyMatcherValue, ISplitEvaluator } from '../types';
5
- export declare function dependencyMatcherContext(log: ILogger, { split, treatments }: IDependencyMatcherData, storage: IStorageSync | IStorageAsync): ({ key, attributes }: IDependencyMatcherValue, splitEvaluator: ISplitEvaluator) => MaybeThenable<boolean>;
5
+ export declare function dependencyMatcherContext({ split, treatments }: IDependencyMatcherData, storage: IStorageSync | IStorageAsync, log: ILogger): ({ key, attributes }: IDependencyMatcherValue, splitEvaluator: ISplitEvaluator) => MaybeThenable<boolean>;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function equalToMatcherContext(log: ILogger, ruleAttr: number): (runtimeAttr: number) => boolean;
1
+ export declare function equalToMatcherContext(ruleAttr: number): (runtimeAttr: number) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function equalToSetMatcherContext(log: ILogger, ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
1
+ export declare function equalToSetMatcherContext(ruleAttr: string[]): (runtimeAttr: string[]) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function endsWithMatcherContext(log: ILogger, ruleAttr: string[]): (runtimeAttr: string) => boolean;
1
+ export declare function endsWithMatcherContext(ruleAttr: string[]): (runtimeAttr: string) => boolean;
@@ -1,2 +1 @@
1
- import { ILogger } from '../../logger/types';
2
- export declare function greaterThanEqualMatcherContext(log: ILogger, ruleAttr: number): (runtimeAttr: number) => boolean;
1
+ export declare function greaterThanEqualMatcherContext(ruleAttr: number): (runtimeAttr: number) => boolean;