@splitsoftware/splitio-commons 1.13.2-rc.1 → 1.13.2-rc.2

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.
@@ -32,11 +32,11 @@ function splitApiFactory(settings, platform, telemetryTracker) {
32
32
  return splitHttpClient(url).then(function () { return true; }).catch(function () { return false; });
33
33
  },
34
34
  fetchAuth: function (userMatchingKeys) {
35
- var url = urls.auth + "/v2/auth";
36
- if (userMatchingKeys) { // accounting the possibility that `userMatchingKeys` is undefined (server-side API)
35
+ var url = urls.auth + "/v2/auth?s=" + constants_1.FLAGS_SPEC;
36
+ if (userMatchingKeys) { // `userMatchingKeys` is undefined in server-side
37
37
  var queryParams = userMatchingKeys.map(userKeyToQueryParam).join('&');
38
- if (queryParams) // accounting the possibility that `userKeys` and thus `queryParams` are empty
39
- url += '?' + queryParams;
38
+ if (queryParams)
39
+ url += '&' + queryParams;
40
40
  }
41
41
  return splitHttpClient(url, undefined, telemetryTracker.trackHttp(constants_1.TOKEN));
42
42
  },
@@ -29,11 +29,11 @@ export function splitApiFactory(settings, platform, telemetryTracker) {
29
29
  return splitHttpClient(url).then(function () { return true; }).catch(function () { return false; });
30
30
  },
31
31
  fetchAuth: function (userMatchingKeys) {
32
- var url = urls.auth + "/v2/auth";
33
- if (userMatchingKeys) { // accounting the possibility that `userMatchingKeys` is undefined (server-side API)
32
+ var url = urls.auth + "/v2/auth?s=" + FLAGS_SPEC;
33
+ if (userMatchingKeys) { // `userMatchingKeys` is undefined in server-side
34
34
  var queryParams = userMatchingKeys.map(userKeyToQueryParam).join('&');
35
- if (queryParams) // accounting the possibility that `userKeys` and thus `queryParams` are empty
36
- url += '?' + queryParams;
35
+ if (queryParams)
36
+ url += '&' + queryParams;
37
37
  }
38
38
  return splitHttpClient(url, undefined, telemetryTracker.trackHttp(TOKEN));
39
39
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "1.13.2-rc.1",
3
+ "version": "1.13.2-rc.2",
4
4
  "description": "Split JavaScript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -44,11 +44,10 @@ export function splitApiFactory(
44
44
  },
45
45
 
46
46
  fetchAuth(userMatchingKeys?: string[]) {
47
- let url = `${urls.auth}/v2/auth`;
48
- if (userMatchingKeys) { // accounting the possibility that `userMatchingKeys` is undefined (server-side API)
47
+ let url = `${urls.auth}/v2/auth?s=${FLAGS_SPEC}`;
48
+ if (userMatchingKeys) { // `userMatchingKeys` is undefined in server-side
49
49
  const queryParams = userMatchingKeys.map(userKeyToQueryParam).join('&');
50
- if (queryParams) // accounting the possibility that `userKeys` and thus `queryParams` are empty
51
- url += '?' + queryParams;
50
+ if (queryParams) url += '&' + queryParams;
52
51
  }
53
52
  return splitHttpClient(url, undefined, telemetryTracker.trackHttp(TOKEN));
54
53
  },
@@ -0,0 +1,3 @@
1
+ import { ISet } from '../../utils/lang/sets';
2
+ import { ILogger } from '../../logger/types';
3
+ export declare function inListSemverMatcherContext(log: ILogger, ruleAttr: ISet<string>): (runtimeAttr: string) => boolean;
@@ -0,0 +1,3 @@
1
+ import { IBetweenMatcherData } from '../../dtos/types';
2
+ import { ILogger } from '../../logger/types';
3
+ export declare function betweenSemverMatcherContext(log: ILogger, ruleVO: IBetweenMatcherData): (key: string) => boolean;
@@ -0,0 +1,2 @@
1
+ import { ILogger } from '../../logger/types';
2
+ export declare function equalToSemverMatcherContext(log: ILogger, ruleAttr: string): (runtimeAttr: string) => boolean;
@@ -0,0 +1,2 @@
1
+ import { ILogger } from '../../logger/types';
2
+ export declare function greaterThanEqualToSemverMatcherContext(log: ILogger, ruleAttr: string): (runtimeAttr: string) => boolean;
@@ -0,0 +1,2 @@
1
+ import { ILogger } from '../../logger/types';
2
+ export declare function lessThanEqualToSemverMatcherContext(log: ILogger, ruleAttr: string): (runtimeAttr: string) => boolean;
@@ -0,0 +1,22 @@
1
+ export declare class Semver {
2
+ private _major;
3
+ private _minor;
4
+ private _patch;
5
+ private _preRelease;
6
+ private _isStable;
7
+ private _oVersion;
8
+ constructor(version: string);
9
+ private removeMetadataIfExists;
10
+ isEqualTo(toCompare: Semver): boolean;
11
+ isGreaterThanOrEqualTo(toCompare: Semver): boolean;
12
+ isLessThanOrEqualTo(toCompare: Semver): boolean;
13
+ isBetween(start: Semver, end: Semver): boolean;
14
+ /**
15
+ * Precedence comparision between 2 Semver objects.
16
+ *
17
+ * @return the value {@code 0} if {@code this == toCompare};
18
+ * a value less than {@code 0} if {@code this < toCompare}; and
19
+ * a value greater than {@code 0} if {@code this > toCompare}
20
+ */
21
+ private compare;
22
+ }