@zohodesk/testinglibrary 0.2.1 → 0.2.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.
@@ -10,8 +10,7 @@ var _path = _interopRequireDefault(require("path"));
10
10
  var _configFileNameProvider = require("./helpers/configFileNameProvider");
11
11
  var _logger = require("../../utils/logger");
12
12
  var _getUsers = require("./helpers/auth/getUsers");
13
- function setEnvironmentVariables(mode, configJSON) {
14
- process.env.mode = mode;
13
+ function setEnvironmentVariables(configJSON) {
15
14
  for (const key in configJSON) {
16
15
  process.env[key] = configJSON[key];
17
16
  }
@@ -29,11 +28,12 @@ function initializeEnvConfig(mode) {
29
28
  }
30
29
  const configFile = (0, _fs.readFileSync)(_path.default.resolve(process.cwd(), `./${(0, _configFileNameProvider.getEnvConfigFilePath)(mode)}`));
31
30
  const configJSON = JSON.parse(configFile);
32
- const defaultActorConfiguration = (0, _getUsers.getDefaultActorConf)();
33
- setEnvironmentVariables(mode, {
31
+ setEnvironmentVariables({
34
32
  ...configJSON,
35
- ...defaultActorConfiguration
33
+ mode
36
34
  });
35
+ const defaultActorConfiguration = (0, _getUsers.getDefaultActorConf)();
36
+ setEnvironmentVariables(defaultActorConfiguration);
37
37
  } catch (err) {
38
38
  _logger.Logger.error(err);
39
39
  throw new Error(`Config File Not Exists. Please provide a config file ${(0, _configFileNameProvider.getEnvConfigFilePath)(mode)} to intiailize the environment variables `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {