haven-cypress-integration 2.1.2 → 2.1.3
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.
package/package.json
CHANGED
|
@@ -33,7 +33,8 @@ echo "customTags: ${CUSTOM_TAGS}"
|
|
|
33
33
|
# =============================================================================
|
|
34
34
|
|
|
35
35
|
# Pattern for system/internal vars to EXCLUDE from Cypress --env
|
|
36
|
-
|
|
36
|
+
# Only Haven-configured vars should pass through (MOCK, ENV, CLIENT, auth, etc.)
|
|
37
|
+
EXCLUDE_VARS="^(PATH|HOME|USER|SHELL|PWD|OLDPWD|TERM|LANG|LC_.*|AWS_.*|HOSTNAME|SHLVL|_.*|NODE_.*|NPM_.*|HAVEN_GREP_PATTERN|ADO_REPO|ADO_PAT|ADO_BRANCH|RUN_ID|PLAN_ID|PRODUCT_NAME|BUCKET_NAME|TRIGGERED_BY|INSTANCE_TYPE|E2E_COMMAND|TEST_ENVIRONMENT|CUSTOM_TAGS|AUTOMATION_IDS|HAVEN_BROWSERS|LS_COLORS|SSH_.*|XDG_.*|DISPLAY|COLORTERM|LESSOPEN|LESSCLOSE|MAIL|LOGNAME|EDITOR|VISUAL|PAGER|MANPATH|INFOPATH|HISTSIZE|HISTFILESIZE|HISTCONTROL|PS1|PS2|PROMPT_COMMAND|IFS|CI|CYPRESS_.*|APPLIED_.*|DBUS_.*|QT_.*|X11_.*|GPG_.*|GNOME_.*|GTK_.*|KDE_.*|WINDOWID|XAUTHORITY|container|npm_.*|TMPDIR|TMP|TEMP)$"
|
|
37
38
|
|
|
38
39
|
echo "=== Building Cypress env vars from Haven ==="
|
|
39
40
|
CUSTOM_ENV_ARGS=""
|
|
@@ -69,17 +70,14 @@ while IFS='=' read -r key value; do
|
|
|
69
70
|
if [[ "$value" =~ ^\{.*\}$ ]]; then
|
|
70
71
|
FLATTENED=$(flatten_json_to_dot "$key" "$value")
|
|
71
72
|
if [ -n "$FLATTENED" ]; then
|
|
72
|
-
echo " -> ${key} (JSON object) flattened to dot notation"
|
|
73
|
+
echo " -> ${key} (JSON object) flattened to dot notation: ${FLATTENED}"
|
|
73
74
|
if [ -n "$CUSTOM_ENV_ARGS" ]; then
|
|
74
75
|
CUSTOM_ENV_ARGS="${CUSTOM_ENV_ARGS},${FLATTENED}"
|
|
75
76
|
else
|
|
76
77
|
CUSTOM_ENV_ARGS="${FLATTENED}"
|
|
77
78
|
fi
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
for pair in "${PAIRS[@]}"; do
|
|
81
|
-
export "CYPRESS_${pair%%=*}=${pair#*=}"
|
|
82
|
-
done
|
|
79
|
+
# Note: Cannot export dot-notation vars to bash env (dots not allowed in var names)
|
|
80
|
+
# They are passed to Cypress via --env which does support dots
|
|
83
81
|
continue
|
|
84
82
|
fi
|
|
85
83
|
fi
|