Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/incremental-updater/…
Browse files Browse the repository at this point in the history
…jest-29.7.0
  • Loading branch information
praveenkumarct authored Jul 5, 2024
2 parents 94ab4f1 + 19d099f commit 879f868
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
25 changes: 13 additions & 12 deletions full-export/src/utils/config.utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CustomError from '../errors/custom.error.js';
import envValidators from '../validators/env-var.validators.js';
import { getValidateMessages } from '../validators/helpers.validators.js';
// import CustomError from '../errors/custom.error.js';
// import envValidators from '../validators/env-var.validators.js';
// import { getValidateMessages } from '../validators/helpers.validators.js';

/**
* Read the configuration env vars
Expand All @@ -18,15 +18,16 @@ export const readConfiguration = () => {
region: process.env.CTP_REGION,
};

const validationErrors = getValidateMessages(envValidators, envVars);

if (validationErrors.length) {
throw new CustomError(
'InvalidEnvironmentVariablesError',
'Invalid Environment Variables please check your .env file',
validationErrors
);
}
// Enable it for your environment variables validation
// const validationErrors = getValidateMessages(envValidators, envVars);
//
// if (validationErrors.length) {
// throw new CustomError(
// 'InvalidEnvironmentVariablesError',
// 'Invalid Environment Variables please check your .env file',
// validationErrors
// );
// }

return envVars;
};
23 changes: 12 additions & 11 deletions incremental-updater/src/utils/config.utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CustomError from '../errors/custom.error.js';
import envValidators from '../validators/env-var.validators.js';
import { getValidateMessages } from '../validators/helpers.validators.js';
// import CustomError from '../errors/custom.error.js';
// import envValidators from '../validators/env-var.validators.js';
// import { getValidateMessages } from '../validators/helpers.validators.js';

/**
* Read the configuration env vars
Expand All @@ -18,15 +18,16 @@ export const readConfiguration = () => {
region: process.env.CTP_REGION,
};

const validationErrors = getValidateMessages(envValidators, envVars);
// Enable it for your environment variables validation
// const validationErrors = getValidateMessages(envValidators, envVars);

if (validationErrors.length) {
throw new CustomError(
'InvalidEnvironmentVariablesError',
'Invalid Environment Variables please check your .env file',
validationErrors
);
}
// if (validationErrors.length) {
// throw new CustomError(
// 'InvalidEnvironmentVariablesError',
// 'Invalid Environment Variables please check your .env file',
// validationErrors
// );
// }

return envVars;
};

0 comments on commit 879f868

Please sign in to comment.