@statsig/client-core 3.18.1 → 3.18.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/client-core",
3
- "version": "3.18.1",
3
+ "version": "3.18.3",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -24,6 +24,7 @@ export type CommonContext = {
24
24
  errorBoundary: ErrorBoundary;
25
25
  session: StatsigSession;
26
26
  stableID: string | null;
27
+ sdkInstanceID: string;
27
28
  };
28
29
  export type OnDeviceEvaluationsContext = CommonContext & {
29
30
  values: DownloadConfigSpecsResponse | null;
@@ -63,24 +63,24 @@ const _createConfigExposure = (user, config, exposureMapping) => {
63
63
  };
64
64
  exports._createConfigExposure = _createConfigExposure;
65
65
  const _createLayerParameterExposure = (user, layer, parameterName, exposureMapping) => {
66
- var _a, _b, _c, _d, _e, _f;
66
+ var _a, _b, _c, _d, _e, _f, _g;
67
67
  const evaluation = layer.__evaluation;
68
68
  const isExplicit = ((_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.explicit_parameters) === null || _a === void 0 ? void 0 : _a.includes(parameterName)) === true;
69
69
  let allocatedExperiment = '';
70
70
  let secondaryExposures = (_b = evaluation === null || evaluation === void 0 ? void 0 : evaluation.undelegated_secondary_exposures) !== null && _b !== void 0 ? _b : [];
71
71
  if (isExplicit) {
72
72
  allocatedExperiment = (_c = evaluation.allocated_experiment_name) !== null && _c !== void 0 ? _c : '';
73
- secondaryExposures = evaluation.secondary_exposures;
73
+ secondaryExposures = (_d = evaluation.secondary_exposures) !== null && _d !== void 0 ? _d : [];
74
74
  }
75
- const parameterRuleIDs = (_d = layer.__evaluation) === null || _d === void 0 ? void 0 : _d.parameter_rule_ids;
75
+ const parameterRuleIDs = (_e = layer.__evaluation) === null || _e === void 0 ? void 0 : _e.parameter_rule_ids;
76
76
  const metadata = {
77
77
  config: layer.name,
78
78
  parameterName,
79
- ruleID: (_e = parameterRuleIDs === null || parameterRuleIDs === void 0 ? void 0 : parameterRuleIDs[parameterName]) !== null && _e !== void 0 ? _e : layer.ruleID,
79
+ ruleID: (_f = parameterRuleIDs === null || parameterRuleIDs === void 0 ? void 0 : parameterRuleIDs[parameterName]) !== null && _f !== void 0 ? _f : layer.ruleID,
80
80
  allocatedExperiment,
81
81
  isExplicitParameter: String(isExplicit),
82
82
  };
83
- if (((_f = layer.__evaluation) === null || _f === void 0 ? void 0 : _f.version) != null) {
83
+ if (((_g = layer.__evaluation) === null || _g === void 0 ? void 0 : _g.version) != null) {
84
84
  metadata['configVersion'] = layer.__evaluation.version;
85
85
  }
86
86
  return _createExposure(LAYER_EXPOSURE_NAME, user, layer.details, metadata, _mapExposures(secondaryExposures, exposureMapping));
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "3.18.1";
1
+ export declare const SDK_VERSION = "3.18.3";
2
2
  export type StatsigMetadata = {
3
3
  readonly [key: string]: string | undefined | null;
4
4
  readonly appVersion?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '3.18.1';
4
+ exports.SDK_VERSION = '3.18.3';
5
5
  let metadata = {
6
6
  sdkVersion: exports.SDK_VERSION,
7
7
  sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients