mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-05-21 14:52:18 +00:00
feat: added double asterisk wildcard selector to prevent uppercasing of keys before exporting envs (#545)
* feat: added double asterisk wildcard selector to prevent uppercasing of keys before exporting envs * chore: update changelog --------- Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
This commit is contained in:
parent
4b1f32b395
commit
7709c60978
8 changed files with 69 additions and 20 deletions
|
|
@ -3,12 +3,12 @@
|
|||
* @param {string} dataKey
|
||||
* @param {boolean=} isEnvVar
|
||||
*/
|
||||
function normalizeOutputKey(dataKey, isEnvVar = false) {
|
||||
function normalizeOutputKey(dataKey, upperCase = false) {
|
||||
let outputKey = dataKey
|
||||
.replace(".", "__")
|
||||
.replace(new RegExp("-", "g"), "")
|
||||
.replace(/[^\p{L}\p{N}_-]/gu, "");
|
||||
if (isEnvVar) {
|
||||
if (upperCase) {
|
||||
outputKey = outputKey.toUpperCase();
|
||||
}
|
||||
return outputKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue