expf-sigma-node.js 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/sigma.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expf-sigma-node.js",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "expf-sigma-node.js lets you manage features flags and remote config across web, server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
5
5
  "main": "public/sigma.js",
6
6
  "keywords": [
package/public/sigma.js CHANGED
@@ -898,7 +898,7 @@ var Sigma = class {
898
898
  this.token = token;
899
899
  this.userData = userData || {};
900
900
  cacheTTL < 10 ? this.cacheTTL = 10 : this.cacheTTL = cacheTTL;
901
- this.api = options.api || `${defaultApi}/config.json`;
901
+ this.api = options.api || `${defaultApi}`;
902
902
  this.retries = options.retries || 3;
903
903
  this.sigmaUserData = new SigmaUserData();
904
904
  this.postfix = options.postfix || "";
@@ -976,7 +976,7 @@ var Sigma = class {
976
976
  }
977
977
  async getUserGeoData() {
978
978
  try {
979
- const data = await this.getDataFile(`${defaultApi}/geo`);
979
+ const data = await this.getDataFile(`${this.api}/geo`);
980
980
  return data;
981
981
  } catch (error) {
982
982
  throw new Error(error);
@@ -1008,13 +1008,13 @@ var Sigma = class {
1008
1008
  }
1009
1009
  let data;
1010
1010
  try {
1011
- data = await this.getDataFile(`${api}`);
1011
+ data = await this.getDataFile(`${api}/config.json`);
1012
1012
  } catch (error) {
1013
1013
  if (!this.cache.get(sigmaDataFile)) {
1014
1014
  throw new Error(`
1015
1015
  Get data: ${error},
1016
1016
  token: ${this.token},
1017
- url: ${defaultApi}/config.json
1017
+ url: ${this.api}/config.json
1018
1018
  `);
1019
1019
  } else {
1020
1020
  console.error(`Get data config.json: ${error}`);