mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
CLI fixes for aws and environment modifications (#1713)
* Interpolate awsv4 values to support them including templated values. Closes #1508 * change to let to allow for rewrite; rename to envVariables for consistency * When running via CLI, preserve changes to collection variables and environment variables. Closes #1255 * Closes #1255 - set well known variable name on environment * Revert "When running via CLI, preserve changes to collection variables and" This reverts commit7c94c9ec19
. * Revert "change to let to allow for rewrite; rename to envVariables for consistency" This reverts commit9320b8faf0
. --------- Co-authored-by: Scott LaPlante <scott.laplante@flueid.com>
This commit is contained in:
parent
e6090a4d59
commit
3ee76067fb
@ -288,6 +288,7 @@ const handler = async function (argv) {
|
||||
const envBruContent = fs.readFileSync(envFile, 'utf8');
|
||||
const envJson = bruToEnvJson(envBruContent);
|
||||
envVars = getEnvVars(envJson);
|
||||
envVars.__name__ = env;
|
||||
}
|
||||
|
||||
if (envVar) {
|
||||
|
@ -109,7 +109,16 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
|
||||
delete request.auth;
|
||||
}
|
||||
|
||||
return request;
|
||||
if (request.awsv4config) {
|
||||
request.awsv4config.accessKeyId = _interpolate(request.awsv4config.accessKeyId) || '';
|
||||
request.awsv4config.secretAccessKey = _interpolate(request.awsv4config.secretAccessKey) || '';
|
||||
request.awsv4config.sessionToken = _interpolate(request.awsv4config.sessionToken) || '';
|
||||
request.awsv4config.service = _interpolate(request.awsv4config.service) || '';
|
||||
request.awsv4config.region = _interpolate(request.awsv4config.region) || '';
|
||||
request.awsv4config.profileName = _interpolate(request.awsv4config.profileName) || '';
|
||||
}
|
||||
|
||||
if (request) return request;
|
||||
};
|
||||
|
||||
module.exports = interpolateVars;
|
||||
|
Loading…
Reference in New Issue
Block a user